2010-06-01 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / ChangeLog
1 2010-06-01  Marek Safar  <marek.safar@gmail.com>
2
3         A fix for bug #610139
4         * generic.cs, convert.cs: Recursively check effective base interface
5
6 2010-06-01  Marek Safar  <marek.safar@gmail.com>
7
8         * statement.cs: Handle nullable types and type parameters in using
9         statement, avoid boxing value types. Also fixes #571010
10
11 2010-06-01  Marek Safar  <marek.safar@gmail.com>
12
13         * convert.cs, expression.cs: Emit unbox for underlying nullable
14         type boxing cast.
15
16 2010-05-29  Marek Safar  <marek.safar@gmail.com>
17
18         A fix for bug #610126
19         * expression.cs: Don't use branch optimization for types bigger than
20         int.
21
22 2010-05-28  Marek Safar  <marek.safar@gmail.com>
23
24         A fix for bug #609088
25         * import.cs: Check private modifier correctly.
26
27 2010-05-28  Marek Safar  <marek.safar@gmail.com>
28
29         A fix for bug #609049
30         * ecore.cs: Don't ignore override methods when looking for base
31         member.
32
33 2010-05-27  Marek Safar  <marek.safar@gmail.com>
34
35         A fix for bugs #608007, #572540, #566130, #476358
36
37         * generic.cs, linq.cs, expression.cs, statement.cs, cs-parser.jay:
38         More tricky refactoring of implicit linq blocks.
39         
40 2010-05-25  Marek Safar  <marek.safar@gmail.com>
41
42         * linq.cs, cs-parser.jay: Keep location for all linq clauses.
43
44 2010-05-25  Marek Safar  <marek.safar@gmail.com>
45
46         * context.cs, expression.cs, cs-parser.jay: Don't store current
47         block in This expression (it's too early for linq blocks).
48
49 2010-05-21  Marek Safar  <marek.safar@gmail.com>
50
51         * expression.cs: Use constrained prefix more broadly to avoid boxing.
52
53 2010-05-20  Marek Safar  <marek.safar@gmail.com>
54
55         A fix for bug #591149
56         * nullable.cs: Don't double wrap same expression.
57         
58 2010-05-20  Marek Safar  <marek.safar@gmail.com>
59
60         A fix for bug #569827
61         * anonymous.cs: Any issued error in probing mode means no match.
62
63 2010-05-20  Marek Safar  <marek.safar@gmail.com>
64
65         * expression.cs: Search for base indexer using the closest match
66         rule.
67
68 2010-05-20  Marek Safar  <marek.safar@gmail.com>
69
70         A fix for bug #572071
71         * method.cs: Set override constraints using unexpanded interface
72         list.
73
74 2010-05-20  Marek Safar  <marek.safar@gmail.com>
75
76         A fix for bug #572071
77         * ecore.cs: Include secondary extension method lookup in probing
78         mode.
79
80 2010-05-19  Marek Safar  <marek.safar@gmail.com>
81
82         A fix for bug #515801
83         * typespec.cs (MayBecomeEqualGenericTypes): Recursively check
84         type arguments.
85
86 2010-05-19  Marek Safar  <marek.safar@gmail.com>
87
88         A fix for bug #515801
89         * pending.cs: Advance counter correctly.
90
91 2010-05-19  Marek Safar  <marek.safar@gmail.com>
92
93         A fix for bug #480139
94         * method.cs, pending.cs: Indexer override uses base name.
95         
96 2010-05-19  Marek Safar  <marek.safar@gmail.com>
97
98         A fix for bug #424064
99         * generic.cs: Replace original with inflated type parameter on
100         failure.
101
102 2010-05-19  Marek Safar  <marek.safar@gmail.com>
103
104         A fix for bug #359733
105         * parameter.cs: Extension attribute can be defined in each assembly.
106
107 2010-05-18  Marek Safar  <marek.safar@gmail.com>
108
109         A fix for bug #446507
110         * method.cs: Only one method can implement an interface.
111
112 2010-05-18  Marek Safar  <marek.safar@gmail.com>
113
114         A fix for bug #594905
115         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
116         Typed null can be used as a source for expression methods.
117
118 2010-05-18  Marek Safar  <marek.safar@gmail.com>
119
120         A fix for bug #606551
121         * namespace.cs: Using directive imports only types and not nested
122         namespaces.
123
124 2010-05-17  Marek Safar  <marek.safar@gmail.com>
125
126         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
127         delegate.cs: Member instance is resolved after member overload
128         definitely resolves static/instance property of member expression.
129         Fixes #545047, #358848, #456605, #460016, #603299
130
131 2010-05-12  Marek Safar  <marek.safar@gmail.com>
132
133         A fix for bug #604981
134         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
135         details for nested anonymous methods stories.
136
137 2010-05-11  Marek Safar  <marek.safar@gmail.com>
138
139         A fix for bug #604735
140         * namespace.cs: Don't report namespace collision.
141
142 2010-05-11  Marek Safar  <marek.safar@gmail.com>
143
144         A fix for bug #604748
145         * class.cs, typespec.cs: Search full imported attribute hierarchy
146         for AttributeUsage.
147
148 2010-05-11  Marek Safar  <marek.safar@gmail.com>
149
150         * namespace.cs: Ignore missing dependencies failure at
151         initialization.
152
153 2010-05-11  Marek Safar  <marek.safar@gmail.com>
154
155         A fix for bug #604640
156         * namespace.cs: Don't resolve using constraints too early.
157
158 2010-05-11  Marek Safar  <marek.safar@gmail.com>
159
160         A fix for bug #604239
161         * generic.cs: Copy partial type constraints to partial container.
162
163 2010-05-10  Marek Safar  <marek.safar@gmail.com>
164
165         A fix for bug #557210
166         * import.cs: Relax underlying enum field rules.
167
168 2010-05-10  Marek Safar  <marek.safar@gmail.com>
169
170         A fix for bug #603476
171         * property.cs: Implement IParametersMember for indexer accessors.
172
173 2010-05-07  Marek Safar  <marek.safar@gmail.com>
174
175         A fix for bug #601141
176         * class.cs: Update all partial modifiers.
177
178 2010-05-06  Marek Safar  <marek.safar@gmail.com>
179
180         A fix for bug #601708
181         * method.cs, membercache.cs: Destructors cannot be hidden.
182
183 2010-05-06  Marek Safar  <marek.safar@gmail.com>
184
185         A fix for bug #602551
186         * class.cs: Resursive reference of type definition is allowed.
187
188 2010-05-06  Marek Safar  <marek.safar@gmail.com>
189
190         * anonymous.cs: Mutate cached storey instance types too.
191
192 2010-05-06  Marek Safar  <marek.safar@gmail.com>
193
194         A fix for bug #602443
195         * convert.cs: Explicit enum conversion cannot involve user operators
196
197 2010-05-05  Miguel de Icaza  <miguel@novell.com>
198
199         * class.cs (TypeContainer.DefineBaseTypes)
200         (TypeContainer.CheckRecursiveDefinition): check for the iface not
201         being null, as we could have failed resolution and crashed;
202         Fixes #442144
203
204         * cs-parser.jay: Productions to catch common mistakes when other
205         punctuation operators are used instead of comma.   Fixes 571702 
206
207 2010-05-05  Marek Safar  <marek.safar@gmail.com>
208
209         * anonymous.cs: Mutate correct set of constraints.
210
211 2010-05-05  Marek Safar  <marek.safar@gmail.com>
212
213         A fix for bug #602842
214         * expression.cs: Resolve all array bound arguments.
215
216 2010-05-05  Marek Safar  <marek.safar@gmail.com>
217
218         * import.cs: Don't import private fields.
219
220 2010-04-30  Marek Safar  <marek.safar@gmail.com>
221
222         Partially based on patch by <sami.lamti@gmail.com>
223
224         * eval.cs, ecore.cs: Fixed eval show methods.
225
226 2010-04-30  Marek Safar  <marek.safar@gmail.com>
227
228         * generic.cs, delegate.cs: Implement output type inference of
229         methodgroup now when the specification was cleared at least little
230         bit.
231
232 2010-04-29  Marek Safar  <marek.safar@gmail.com>
233
234         A fix for bug #575611
235         * class.cs: Fix recursive unmanaged recursice sruct check.
236         
237 2010-04-29  Marek Safar  <marek.safar@gmail.com>
238
239         A fix for bug #479776
240         * expression.cs: Implement typeof unbounded nested generic types.
241
242 2010-04-29  Marek Safar  <marek.safar@gmail.com>
243
244         A fix for bug #474953
245         * class.cs: Fix valid recursive base type definition.
246
247 2010-04-29  Marek Safar  <marek.safar@gmail.com>
248
249         A fix for bug #421737
250         * convert.cs, expression.cs: A boxing conversion exists from a
251         nullable-type to a reference type, if a boxing conversion exists
252         from the underlying non-nullable-value-type to the reference type.
253
254 2010-04-29  Marek Safar  <marek.safar@gmail.com>
255
256         A fix for bug #376875
257         * import.cs: Import volatile modifier.
258
259 2010-04-29  Marek Safar  <marek.safar@gmail.com>
260
261         A fix for bug #372412
262         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
263         generic arrays.
264
265 2010-04-29  Marek Safar  <marek.safar@gmail.com>
266
267         A fix for bug #568955
268         * statements.cs: Handle recursive scope initializers.
269
270 2010-04-28  Marek Safar  <marek.safar@gmail.com>
271
272         A fix for bug #566511
273         * anonymous.cs: Always get inflated version of hoisted variable
274         on generic type definition.
275
276 2010-04-28  Marek Safar  <marek.safar@gmail.com>
277
278         * import.cs, membercache.cs: Relax rules for valid properties.
279
280 2010-04-28  Marek Safar  <marek.safar@gmail.com>
281
282         * import.cs: Intern arrays used in generic arguments.
283
284 2010-04-28  Marek Safar  <marek.safar@gmail.com>
285
286         A fix for bug #600398
287         * convert.cs: Actually use effective base type for the comparison.
288
289 2010-04-28  Marek Safar  <marek.safar@gmail.com>
290
291         A fix for bug #600326
292         * ecore.cs: Pass arity to base member lookup.
293
294 2010-04-28  Marek Safar  <marek.safar@gmail.com>
295
296         A fix for bug #573385
297         * expression.cs: MemberAccess is of generic type based on right
298         arity length only.
299
300 2010-05-28  Marek Safar  <marek.safar@gmail.com>
301
302         * cs-tokenizer.cs: Made tab size configurable.
303
304 2010-05-27  Marek Safar  <marek.safar@gmail.com>
305
306         * attribute.cs: Ensure Obsolete members are defined before doing
307         ctor look-up.
308
309 2010-05-27  Marek Safar  <marek.safar@gmail.com>
310
311         * visit.cs: Add DOM visitor skeleton.
312         
313         * *.cs: Updated.
314
315 2010-05-27  Marek Safar  <marek.safar@gmail.com>
316
317         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
318         
319 2010-05-27  Marek Safar  <marek.safar@gmail.com>
320
321         * *.cs: Major rewrite of compiler internals to better work with
322         unmodified System.Reflection.Emit. Some of the key changes are
323         - TypeSpec replaces reflection specific System.Type.
324         - All Type(TypeSpec) operations are now done in compiler therefore
325         no dependency on SRE to inflate generic members and types or to
326         query unclosed types.
327         - MemberCache is now the only and full hierarchical topology.
328         - Generic constraints are implemented properly.
329         - And as a bonus compilation is on average 30% faster.
330
331 2010-04-15  Jb Evain  <jbevain@novell.com>
332
333         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
334
335 2010-04-12  Marek Safar  <marek.safar@gmail.com>
336
337         * expression.cs, attribute.cs, parameter.cs: More attribute type
338         checks.
339
340 2010-04-12  Marek Safar  <marek.safar@gmail.com>
341
342         A fix for bug #593342
343
344         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
345         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
346         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
347         codegen.cs: Add custom attribute encoder to deal with unfinished
348         types and easier corlib bootstrap from its own types.
349
350 2010-03-26  Marek Safar  <marek.safar@gmail.com>
351
352         * cs-parser.jay: Report invalid constraint types.
353
354 2010-03-16  Jb Evain  <jbevain@novell.com>
355
356         * Makefile: rename the net_2_1 profile to moonlight.
357
358 2010-03-11  Marek Safar  <marek.safar@gmail.com>
359
360         * statement.cs, cs-parser.jay: Use correct location for empty
361         statements.
362
363 2010-03-11  Marek Safar  <marek.safar@gmail.com>
364
365         * cs-parser.jay: Disable Location from expression.
366         
367         * generic.cs: Check constraints for overrides in the parser.
368
369 2010-03-09  Marek Safar  <marek.safar@gmail.com>
370
371         * cs-parser.jay (GetLocation): Use an expression when available.
372
373 2010-03-04  Marek Safar  <marek.safar@gmail.com>
374
375         A fix for bug #582579
376         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
377
378 2010-03-04  Marek Safar  <marek.safar@gmail.com>
379
380         A patch by kornelpal@gmail.com
381         
382         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
383         compiler generated classes sealed by default. Emit and close top
384         level compiler generated classes as well. 
385         
386         * support.cs: Use RuntimeHelpers.GetHashCode.
387
388 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
389
390         * Makefile: We need to use the internal bootstrapping gmcs for
391         net_2_1_bootstrap too now.
392
393 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
394
395         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
396
397 2010-03-02  Marek Safar  <marek.safar@gmail.com>
398
399         * cs-tokenizer.cs: Missed few locations in previous fix.
400
401 2010-03-02  Marek Safar  <marek.safar@gmail.com>
402
403         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
404         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
405         Report correct location for operator errors.
406
407 2010-03-02  Marek Safar  <marek.safar@gmail.com>
408
409         * typemanager.cs (IsDynamicType): Don't check external types when
410         the attribute is not external.
411
412 2010-02-24  Marek Safar  <marek.safar@gmail.com>
413
414         A fix for bug #582579
415         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
416         modifiers.
417
418 2010-02-24  Marek Safar  <marek.safar@gmail.com>
419
420         A fix for bug #581804
421         * ecore.cs: Fixed type comparison.
422
423 2010-02-08  Miguel de Icaza  <miguel@novell.com>
424
425         * namespace.cs (CompletionGetTypesStartingWith): Do not include
426         private types in the completion results.
427
428         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
429         ... let ?"
430
431 2010-02-17  Marek Safar  <marek.safar@gmail.com>
432
433         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
434         constraint parsing.
435
436 2010-02-14  Miguel de Icaza  <miguel@novell.com>
437
438         * eval.cs: Do not do the report printer dance unless the user has
439         set the DescribeTypes feature.
440
441 2010-02-10  Marek Safar  <marek.safar@gmail.com>
442
443         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
444
445 2010-02-08  Marek Safar  <marek.safar@gmail.com>
446
447         A fix for bug #577029
448         * anonymous.cs: Fixed TypeBuilder* check.
449
450 2010-02-06  Miguel de Icaza  <miguel@novell.com>
451
452         * eval.cs (CompileBlock): Also undo if there are problems during
453         semantic analysis, fixes various cases where invalid C# code would
454         be reported, but the internal changes would not be undone.
455
456 2010-02-03  Miguel de Icaza  <miguel@novell.com>
457
458         * driver.cs: Change the --fatal flag to allow a number to be
459         passed, this ignores the first N fatal errors.   Useful to debug
460         errors that do not happen on the first hit.
461
462         * cs-parser.jay (invocation_expression): accept both the
463         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
464         inside an invocation.
465
466         * driver.cs: Expose FatalErrors.
467
468         * eval.cs: Initialize the printer's Fatal property from the
469         Driver's FatalError flag, this allows csharp --fatal to work
470         again. 
471
472         Add support for calling Describe (typeof (TYPE)) if the expression
473         entered is a TYPE.
474         
475 2010-02-02  Marek Safar  <marek.safar@gmail.com>
476
477         A fix for bug #574991
478         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
479         --lint.
480
481 2010-02-02  Marek Safar  <marek.safar@gmail.com>
482
483         A fix for bug #575986
484         * expression.cs: Don't mutate typeof type definitions.
485
486 2010-01-28  Marek Safar  <marek.safar@gmail.com>
487
488         * decl.cs: Use only one set of modifiers.
489
490 2010-01-26  Marek Safar  <marek.safar@gmail.com>
491
492         A fix for bug #573329
493         * eval.cs: Don't disable error reporting completely on silent mode.
494         
495 2010-01-25  Marek Safar  <marek.safar@gmail.com>
496
497         A fix for bug #573312
498         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
499         pointer index of unknown size types greater than 2.
500
501 2010-01-15  Marek Safar  <marek.safar@gmail.com>
502
503         * *.cs: Use only 1 member kind enum.
504
505 2010-01-15  Marek Safar  <marek.safar@gmail.com>
506
507         * *.cs: Add event specification.
508
509 2010-01-14  Marek Safar  <marek.safar@gmail.com>
510
511         * membercache.cs: Extracted from decl.cs.
512         
513         * *.cs: Put more infrastructure in place.
514
515 2010-01-13  Marek Safar  <marek.safar@gmail.com>
516
517         * *.cs: Add property specification, unused yet.
518
519 2010-01-13  Marek Safar  <marek.safar@gmail.com>
520
521         * property.cs: Move all property based declarations into a new file.
522
523 2010-01-13  Marek Safar  <marek.safar at gmail.com>
524
525         * expression.cs (Conditional): Resolve reduced expression.
526
527 2010-01-13  Marek Safar  <marek.safar at gmail.com>
528
529         * *.cs: Introduced non-generic method specification.
530
531 2010-01-07  Marek Safar  <marek.safar@gmail.com>
532
533         * method.cs: Move all method based declarations into a new file.
534
535 2010-01-07  Marek Safar  <marek.safar@gmail.com>
536
537         * *.cs: Extract field specification.
538
539 2009-12-17  Marek Safar  <marek.safar@gmail.com>
540
541         * field.cs: Extracted from class.cs
542
543 2009-12-15  Marek Safar  <marek.safar@gmail.com>
544
545         * attribute.cs (GetFixedBuffer): Work on field definition only.
546
547 2009-12-15  Marek Safar  <marek.safar@gmail.com>
548
549         * *.cs: Clean up NET_4_0 conditional where possible.
550
551 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
552
553         support.cs (DynamicType): Assembly property returns the assembly builder.
554         This is required due to how compiler context works in corlib.
555
556 2009-12-14  Marek Safar  <marek.safar@gmail.com>
557
558         A fix for bug #564376
559         * assign.cs (LocalTemporary): Removed no longer needed special
560         by-ref handling.
561
562 2009-12-11  Marek Safar  <marek.safar@gmail.com>
563
564         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
565         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
566         enum for easier debugging.
567
568 2009-12-10  Marek Safar  <marek.safar@gmail.com>
569
570         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
571         point.
572         
573         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
574         directly.
575
576 2009-12-10  Marek Safar  <marek.safar@gmail.com>
577
578         * cs-parser.jay, statement.cs: Handle parser error in code
579         completition.
580
581 2009-12-10  Marek Safar  <marek.safar@gmail.com>
582
583         * ecore.cs: Ignore base imported methods when they are already
584         in method bag.
585         
586         * eval.cs: Handle non-existent keys.
587         
588         * report.cs, driver.cs: Make fatal work with console printer only.
589
590 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
591
592         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
593
594 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
595
596         * typemanager.cs: Add MakeGenericMethod that checks if the method
597         is really the generic method definition.
598
599         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
600         to inflate generic methods.
601
602 2009-12-08  Marek Safar  <marek.safar@gmail.com>
603
604         A fix for bug #561149
605         * anonymous.cs: Use actual type parameters when checking for generic
606         method host.
607
608 2009-12-08  Marek Safar  <marek.safar@gmail.com>
609
610         A fix for bug #561369
611         * expression.cs (DoNumericPromotion): Fixed typo.
612
613 2009-12-08  Marek Safar  <marek.safar@gmail.com>
614
615         *.cs: Moving to generics world.
616
617         cs-parser.jay: Removed current_array_type.
618
619 2009-12-07  Marek Safar  <marek.safar@gmail.com>
620
621         *.cs: Moving to generics world.
622
623 2009-12-04  Marek Safar  <marek.safar@gmail.com>
624
625         *.cs: Moving to generics world (day 2).
626
627 2009-12-03  Marek Safar  <marek.safar@gmail.com>
628
629         *.cs: Moving to generics world.
630
631 2009-12-02  Marek Safar  <marek.safar@gmail.com>
632
633         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
634         Encode dynamic type attribute for elements where attributes cannot
635         be used.
636
637 2009-12-01  Marek Safar  <marek.safar@gmail.com>
638
639          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
640          arguments by ref.
641
642 2009-12-01  Marek Safar  <marek.safar@gmail.com>
643
644         A fix for bug #360455
645         * class.cs: Never report a unused warning for generic events to
646         workaround wrong expression type.
647
648 2009-11-30  Marek Safar  <marek.safar@gmail.com>
649
650         A fix for bug #558305
651         * decl.cs, class.cs: Check partial method definitions using correct
652         flag.
653
654 2009-11-30  Marek Safar  <marek.safar@gmail.com>
655
656         * argument.cs: Don't cache rarely used dynamic flag.
657
658 2009-11-27  Marek Safar  <marek.safar@gmail.com>
659
660         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
661
662 2009-11-27  Marek Safar  <marek.safar@gmail.com>
663
664         * ecore.cs (SimpleName): Removed no longer needed in_transit as
665         Resolve is now non-reentrant (saves ~0.6MB for corlib).
666
667 2009-11-26  Marek Safar  <marek.safar@gmail.com>
668
669         A fix for bug #545081
670         * decl.cs: Check private nested types of nested types recursively.
671
672 2009-11-26  Marek Safar  <marek.safar@gmail.com>
673
674         A fix for bug #558305
675         * location.cs: Ignore self referencing #line directive
676
677 2009-11-26  Marek Safar  <marek.safar@gmail.com>
678
679         A fix for bug #558292
680         * class.cs: Allow single unsafe fixed buffer fields.
681
682 2009-11-26  Marek Safar  <marek.safar@gmail.com>
683
684         * expression: Optimize few more zero-based operations.
685
686 2009-11-26  Marek Safar  <marek.safar@gmail.com>
687
688         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
689         avoids boxing of literal values.
690
691 2009-11-26  Marek Safar  <marek.safar@gmail.com>
692
693         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
694         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
695         codegen.cs: LocatedToken redesing to avoid excessive allocation and
696         boxing (saves ~7MB for corlib). Also fixes presise token location.
697
698 2009-11-25  Marek Safar  <marek.safar@gmail.com>
699
700         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
701         common data buckers.
702
703 2009-11-24  Marek Safar  <marek.safar@gmail.com>
704
705         * expression.cs: Lower static array initializer barrier.
706         
707         * support.cs, driver.cs: Share reader buffer.
708
709 2009-11-23  Marek Safar  <marek.safar@gmail.com>
710
711         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
712
713 2009-11-23  Marek Safar  <marek.safar@gmail.com>
714
715         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
716         cleanup some obsolete code.
717
718 2009-11-20  Marek Safar  <marek.safar@gmail.com>
719
720         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
721         Expression.Resolve.
722
723 2009-11-20  Marek Safar  <marek.safar@gmail.com>
724
725         * *.cs: Resolved expressions are never resolved again, this helps to
726         uncover some not easy to find bugs and improve the performance.
727
728 2009-11-19  Marek Safar  <marek.safar@gmail.com>
729
730         * *.cs: Made constant expressions fully compatible with any other
731         expression.
732
733 2009-11-19  Marek Safar  <marek.safar@gmail.com>
734
735         * *.cs: DoResolve is a worker method and has to be protected.
736
737 2009-11-18  Marek Safar  <marek.safar@gmail.com>
738
739         * *.cs: More context specific handling.
740
741 2009-11-17  Marek Safar  <marek.safar@gmail.com>
742
743         * *.cs: More context specific handling.
744
745 2009-11-16  Marek Safar  <marek.safar@gmail.com>
746
747         * dynamic.cs, class.cs: Removed few fixed user types conversions.
748         
749         * symbolwriter.cs: Uses public ILOffset.
750
751 2009-11-13  Marek Safar  <marek.safar@gmail.com>
752
753         A fix for bug #553650
754         * generic.cs: Another missing TypeToCoreType, still too many to fix.
755
756 2009-11-13  Marek Safar  <marek.safar@gmail.com>
757
758         A fix for bug #555170
759
760         * class.cs, delegate.cs, enum.cs: Constants have to be available
761         for parameters resolve.
762
763 2009-11-12  Marek Safar  <marek.safar@gmail.com>
764
765         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
766         arrays.
767
768 2009-11-12  Marek Safar  <marek.safar@gmail.com>
769
770         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
771         with a statically known candidate set.
772
773 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
774
775         * generic.cs: Made type inflation for generic constraint checks
776         recursive. This fixes BGO #553655.
777
778 2009-11-11  Marek Safar  <marek.safar@gmail.com>
779
780         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
781         checks.
782
783 2009-11-10  Marek Safar  <marek.safar@gmail.com>
784
785         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
786         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
787         attribute.cs: Add some dynamic error checking.
788
789 2009-11-07  Marek Safar  <marek.safar@gmail.com>
790
791         A fix for bug #553465
792
793         * expression.cs: Fixed mixed version of expression tree anonymous
794         type.
795
796 2009-11-06  Marek Safar  <marek.safar@gmail.com>
797
798         A fix for bug #553031
799
800         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
801         expression tree version of anonymous type with members declaration.
802
803 2009-11-05  Marek Safar  <marek.safar@gmail.com>
804
805         * parameter.cs: Handle nullable parameter default expression.
806         
807         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
808         class.cs, attribute.cs: Check for wrong dynamic arguments.
809
810 2009-11-05  Marek Safar  <marek.safar@gmail.com>
811
812         * statement.cs: Dynamic statements.
813
814 2009-11-04  Marek Safar  <marek.safar@gmail.com>
815
816         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
817         Compound assignments over dynamic type.
818
819 2009-11-03  Marek Safar  <marek.safar@gmail.com>
820
821         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
822         constructor arguments.
823
824 2009-10-30  Marek Safar  <marek.safar@gmail.com>
825
826         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
827         codegen.cs: Unary mutator on dynamic member access expression.
828
829 2009-10-29  Marek Safar  <marek.safar@gmail.com>
830
831         A fix for bug #550580   
832         * convert.cs: Don't eliminate explicit precission casts.
833
834 2009-10-28  Marek Safar  <marek.safar@gmail.com>
835
836         A fix for bug #550404
837         
838         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
839         expression.cs, statement.cs, ecore.cs: Quote any nested expression
840         tree.
841
842 2009-10-27  Marek Safar  <marek.safar@gmail.com>
843
844         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
845         constant.
846         
847         * class.cs: Allow nullable binary user operators.
848
849 2009-10-26  Marek Safar  <marek.safar@gmail.com>
850
851         * expression.cs: Move binary expression optimization at the end of
852         resolve.
853
854 2009-10-23  Marek Safar  <marek.safar@gmail.com>
855
856         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
857         Separate NullConstant from NullLiteral.
858
859 2009-10-23  Marek Safar  <marek.safar@gmail.com>
860
861         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
862         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
863         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
864         ModuleContainer. Add common unclosed member check routine.
865
866 2009-10-22  Marek Safar  <marek.safar@gmail.com>
867
868         * argument.cs: Use literal flag for real literals only.
869
870         * dynamic.cs: Use correct return type for custom delegates.
871
872 2009-10-22  Marek Safar  <marek.safar@gmail.com>
873
874         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
875         resolver.
876
877 2009-10-22  Marek Safar  <marek.safar@gmail.com>
878
879         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
880
881 2009-10-21  Marek Safar  <marek.safar@gmail.com>
882
883         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
884         conversion.
885
886 2009-10-21  Marek Safar  <marek.safar@gmail.com>
887
888         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
889         binder flags.
890
891 2009-10-20  Marek Safar  <marek.safar@gmail.com>
892
893         * argument.cs, dynamic.cs, expression.cs: Latest API update.
894
895 2009-10-19  Marek Safar  <marek.safar@gmail.com>
896
897         * typemanager.cs, expression.cs: Dynamic array initializer.
898
899 2009-10-16  Marek Safar  <marek.safar@gmail.com>
900
901         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
902         is imported.
903
904 2009-10-16  Marek Safar  <marek.safar@gmail.com>
905
906         A fix for bug #493523, #507067
907         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
908         standard nullable conversion using underlying standard conversion
909         and not full conversion.
910
911 2009-10-15  Marek Safar  <marek.safar@gmail.com>
912
913         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
914         type in VerifyArgumentsCompat.
915
916 2009-10-15  Marek Safar  <marek.safar@gmail.com>
917
918         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
919         Reject variable used with type arguments.
920
921 2009-10-14  Marek Safar  <marek.safar@gmail.com>
922
923         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
924         Implement dynamic expressions assignment.
925
926 2009-10-14  Marek Safar  <marek.safar@gmail.com>
927
928         * expression.cs: Build underlying expression when resolving unary
929         mutators.
930
931 2009-10-14  Marek Safar  <marek.safar@gmail.com>
932
933         * expression.cs: Emit enum array initializer using binary blob.
934
935 2009-10-08  Marek Safar  <marek.safar@gmail.com>
936
937         * typemanager.cs, constant.cs: Optimize decimal constants which fit
938         to long range.
939
940 2009-10-07  Marek Safar  <marek.safar@gmail.com>
941
942         * typemanager.cs: Reset object_type.
943         
944         * assign: Made SimpleAssign public.
945
946 2009-10-06  Marek Safar  <marek.safar@gmail.com>
947
948         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
949         invocation assembly to IsThisOrFriendAssembly.
950
951 2009-10-05  Marek Safar  <marek.safar@gmail.com>
952
953         * expression.cs: Equality comparison of generic parameter with
954         class constraint.
955
956 2009-10-05  Marek Safar  <marek.safar@gmail.com>
957
958         A fix for bug #543570
959         * generic.cs: Import predefined constraints correctly.
960
961 2009-10-02  Marek Safar  <marek.safar@gmail.com>
962
963         * ecore.cs: Don't crash on overloads with optional paremeters where
964         arguments count overflows.
965         
966         * parameter.cs: Import optional parameter constants using optional
967         value type.
968
969 2009-10-01  Marek Safar  <marek.safar@gmail.com>
970
971         * Makefile: Default is gmcs compiler.
972
973 2009-10-01  Marek Safar  <marek.safar@gmail.com>
974
975         * cs-parser.jay: Fixed few NRE.
976
977 2009-10-01  Marek Safar  <marek.safar@gmail.com>
978
979         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
980
981 2009-09-30  Marek Safar  <marek.safar@gmail.com>
982
983         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
984         ShimExpression, ImplicitCast.
985
986 2009-09-30  Marek Safar  <marek.safar@gmail.com>
987
988         A fix for bug #542959
989         * delegate.cs: Emit correct delegate instance variable when there
990         are static and non-static overloads.
991
992 2009-09-29  Marek Safar  <marek.safar@gmail.com>
993
994         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
995         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
996
997 2009-09-28  Marek Safar  <marek.safar@gmail.com>
998
999         A fix for bug #542487
1000         * ecore.cs: Resolve extension methods hidden by properties.
1001
1002 2009-09-25  Marek Safar  <marek.safar@gmail.com>
1003
1004         * expression.cs, ecore.cs: More dynamic binary expressions.
1005
1006 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1007
1008         * nullable.cs, expression.cs: Fixed null lifted conversion for
1009         bitwise enum operations.
1010
1011 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1012
1013         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
1014         values in checked context.
1015
1016 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1017
1018         * expression.cs, ecore.cs: Fixed array index constant conversion.
1019
1020 2009-09-20  Miguel de Icaza  <miguel@novell.com>
1021
1022         * expression.cs: Do not crash when MemberLookup returns something
1023         that is not a MemberExpr here.   Report error 582 instead. 
1024
1025         Fixes #499988.
1026
1027 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1028
1029         * decl.cs, class.cs: Check protected property accessors.
1030
1031 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1032
1033         * dynamic.cs, assign.cs: Dynamic compound assignment.
1034
1035 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1036
1037         * expression.cs: Fixed compound assignment explicit conversion.
1038
1039 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1040
1041         * expression.cs, ecore.cs: Cannot infer variables from method group.
1042
1043 2009-09-16  Marek Safar  <marek.safar@gmail.com>
1044
1045         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
1046         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
1047         codegen.cs: Dynamic binary operations scaffolding.
1048
1049 2009-09-15  Marek Safar  <marek.safar@gmail.com>
1050
1051         * expression.cs: Fixes nullable promotion for enum type variables.
1052
1053 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1054
1055         * driver.cs, dynamic.cs: Reset more static variables.
1056
1057 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1058
1059         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
1060         driver.cs: Introduced Expression::MakeExpression.
1061
1062 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1063
1064         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
1065
1066 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1067
1068         * eval.cs, report.cs: Use Console.Out for all eval error or warning
1069         output.
1070
1071 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1072
1073         A fix for bug #518707
1074         * expression.cs (Is): Optimize only generic parameter type
1075         expression probing value type generic parameter.
1076
1077 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1078
1079         A fix for bug #532571
1080         * ecore.cs: Check for simple name type arguments used with
1081         non-generic type.
1082
1083 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1084
1085         A fix for bug #497421
1086         * generic.cs (CheckConstraint): Don't use buildin types to check for
1087         parameterless constructor.
1088
1089 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1090
1091         A fix for bug #537402
1092         * generic.cs (CheckConstraint): Correctly inflate generic type
1093         arguments when checking generic method. 
1094
1095 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1096
1097         A fix for bug #536463
1098         * decl.cs (AddToContainer): Don't report collision between explicit
1099         and parameterless non-explicit members.
1100
1101 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1102
1103         * eval.cs: Reset more static stuff.
1104
1105 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1106
1107         A fix for bug #324625
1108         * expression.cs, ecore.cs: Create nested generic type expression
1109         using declaring and not current type.
1110
1111 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1112
1113         * *.cs: Changed Report class to accept various output printers and
1114         be an instance class. An expression resolver can now use different
1115         message reporter for each call and Report.Error can safely throw
1116         an exception. Part of ongoing work to turn mcs into proper library.
1117
1118 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1119
1120         * statement.cs, ecore.cs: Removed error reporting from emit code.
1121
1122 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1123
1124         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1125
1126 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1127
1128         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1129         parser checks out of constructors.
1130
1131 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1132
1133         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1134
1135 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1136
1137         A fix for bug #535448
1138         * anonymous.cs, class.cs: Copy return label between all contexts.
1139
1140 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1141
1142         A fix for bug #535395
1143         * namespace.cs: Resolve context can be null.
1144
1145 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1146
1147         A fix for bug #533912
1148         * generic.cs: Use correct context for constraints resolving.
1149
1150 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1151
1152         A fix for bug #532630
1153         * driver.cs: Trim conditional symbols.
1154
1155 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1156
1157         * context.cs: New file.
1158         
1159         * *.exe.sources, *.csproj: Updated.
1160
1161 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1162
1163         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1164         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1165         IMembercontext, some small cleanups.
1166
1167 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1168
1169         * *.cs: Split ResolveContext and EmitContext.
1170
1171 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1172
1173         * *.cs: Only ResolveContext implements IMemberContext.
1174
1175 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1176
1177         * *.cs: Renamed IResolveContext to IMemberContext.
1178
1179 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1180
1181         * *.cs: Detached ResolveContext from EmitContext.
1182
1183 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1184
1185         * codegen.cs: Moved flow-analysis to BlockContext.
1186
1187 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1188
1189         * *.cs: Detached BlockContext from EmitContext.
1190
1191 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1192
1193         * statement.cs: avoid nullref when the return value of GetEnumerator()
1194         does not contain any MoveNext() method.
1195
1196 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1197
1198         * *.cs: Removed IResolveContext::GenericDeclContainer.
1199
1200 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1201
1202         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1203
1204 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1205
1206         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1207         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1208
1209 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1210
1211         * *.cs: Removed boolean fields from EmitContext.
1212
1213 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1214
1215         * *.cs: Add IResolveContext::IsStatic.
1216
1217 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1218
1219         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1220
1221 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1222
1223         * *.cs: Removed DeclContainer from EmitContext.
1224
1225 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1226
1227         * *.cs: Add IResolveContext::CurrentTypeParameters.
1228
1229 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1230
1231         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1232
1233 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1234
1235         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1236         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1237
1238 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1239
1240         * decl.cs: Look in PartialContainer for parent type parameters.
1241
1242 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1243
1244         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1245         codegen.cs: Add IResolveContext::LookupTypeParameter.
1246
1247 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1248
1249         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1250         Moved resolved logic from Emit to Resolve.
1251
1252 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1253
1254         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1255         codegen.cs: Reworked atttributes handling of ResolveContext.
1256
1257 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1258
1259         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1260         LookupNamespaceOrType to ResolveContext.
1261
1262 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1263
1264         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1265         class.cs: Removed unused parameters and methods.
1266
1267 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1268
1269         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1270         codegen.cs: Finding the best common type of a set of expressions for
1271         lambda statements.
1272
1273 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1274
1275         * dynamic.cs, expression.cs: More dynamic conversions.
1276
1277 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1278
1279         * generic.cs: This loop was incorrect, it was increment ii, but
1280         checking for `i'.  This was a change introduced to fix #327497,
1281         now we fix #424012.
1282  
1283         * class.cs: Catch another case for cs0533 error, fixes #324782.
1284
1285 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1286
1287         * typemanager.cs (GetGenericArguments): SRE returns null for
1288         generic methods on type builder instances if they are not generic
1289         themselves. For example, for Foo<int>::Bar() it returns null, but
1290         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1291
1292 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1293
1294         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1295         delegate.cs: Work on dynamic binding.
1296
1297 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1298
1299         A second fix for bug #525342
1300         * class.cs: Attach partial method attributes to method
1301         implementation.
1302
1303 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1304
1305         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1306         restrictions.
1307         
1308         * rootcontext.cs: Default to langversion v4.
1309
1310 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1311
1312         * pending.cs: Check return type before member info is set.
1313
1314 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1315
1316         * anonymous.cs: Fully initialize generic hoisted field expression.
1317
1318 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1319
1320         * cs-parser.jay: Flag variables declared on the interactive shell
1321         as used to prevent the 168 warning about local variable not being
1322         used. 
1323
1324 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1325
1326         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1327         attribute.cs: Emit dynamic export attribute.
1328
1329 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1330
1331         * expression.cs: More verifier work.
1332
1333 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1334
1335         * nullable.cs: Fixed SRE crash during corlib compilation.
1336
1337 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1338
1339         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1340         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1341         More TypeManager.TypeToCoreType needed.
1342
1343 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1344
1345         * anonymous.cs: Update after recent SRE fixes.
1346
1347 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1348
1349         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1350         version of GetFieldHandle for fields of generic types.
1351
1352 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1353
1354         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1355         ecore.cs: Add TypeManager.IsDynamicType,
1356         PredefinedAttributes.Dynamic.
1357
1358 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1359
1360         A fix for bug #415375
1361         * expression.cs: Fixed object and reference type parameter
1362         comparison.
1363
1364 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1365
1366         A fix for bug #525342
1367         * class.cs: Attach partial method attributes to method
1368         implementation.
1369
1370 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1371
1372         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1373         Dynamic arguments.
1374
1375 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1376
1377         * anonymous.cs (MutateField): Add imported types handling.
1378
1379 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1380
1381         * expression.cs, delegate.cs: Moved arguments resolve into their
1382         counterparts expressions. Removed argument resolve from
1383         CollectionElementInitializer.
1384
1385 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1386
1387         A fix for bug #523683
1388         * convert.cs, delegate.cs: Use common overload mechanism for method
1389         group conversion check.
1390
1391 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1392
1393         A fix for bug #523899
1394         * generics.cs: Exact type inference with other bound types.
1395
1396 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1397
1398         Don't complain when the same type is implemented by the output
1399         assembly as well as multiple referenced assemblies
1400         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1401         'must_be_unique' flag.
1402         (GlobalRootNamespace): Update to changes.
1403         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1404         already have a type in hand.
1405
1406 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1407
1408         * expression.cs: More verifier instrumentation.
1409         
1410         * statement.cs: Do proper throw expression conversion.
1411
1412 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1413
1414         A fix for bug #522789
1415         * expression.cs: Mutate invocation return type.
1416
1417 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1418
1419         * anonymous.cs: Split assignable and readonly generated variable
1420         references.
1421
1422 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1423
1424         A fix for bug #521671
1425         * statement.cs: Fixed crash when checking missing type.
1426
1427 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1428
1429         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1430         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1431         class.cs, driver.cs: Work on dynamic binding.
1432
1433         * dynamic.cs: New file.
1434
1435         * *.sources, *.proj: Updated.
1436
1437 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1438
1439         * expression.cs (Conditional): Avoid double Resolve.
1440
1441 2009-07-13  Marcus Griep  <marcus@griep.us>
1442
1443         * ecore.cs: Fix obscure bug with resolving members of interfaces
1444         that hide parent interface members. Fixes bug #444388 and corrects
1445         bug #323096
1446
1447 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1448
1449         * expression.cs (LocalVariableReference): Bounce resolve.
1450
1451 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1452
1453         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1454         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1455         types to new class.
1456         
1457         * support.cs: New dynamic type wrapper.
1458
1459 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1460
1461         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1462         typed local variable.
1463
1464 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1465
1466         A fix for bug #519005
1467         * anonymous.cs: Use null_type as no return type placeholder.
1468
1469 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1470
1471         * generic.cs: Handle type inference of identical type parameters
1472         with different bounds.
1473
1474 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1475
1476         * expression.cs, class.cs: Events variance.
1477         
1478         * cs-parser.jay: Interface events error messages.
1479
1480 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1481
1482         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1483
1484 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1485
1486         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1487         parameter expression can be value-type New.
1488
1489         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1490
1491 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1492
1493         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1494         Implemented C# 4.0 named arguments.
1495
1496 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1497
1498         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1499         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1500         parameter modifier. Also fixes bug #515497.
1501
1502 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1503
1504         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1505         arguments expression to be implemented.
1506         
1507         *.sources: Add argument.cs
1508
1509 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1510
1511         * parameter.cs: Moved GetParameterIndexByName to base class.
1512         
1513         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1514         unused AType. Use argument's version of GetExpressionTree.
1515
1516 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1517
1518         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1519         arguments grammar.
1520
1521 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1522
1523         A fix for bug #514096
1524         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1525
1526 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1527
1528         * expression.cs: The first multi-dimensional array nested array
1529         initializers was not checked.
1530         
1531         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1532
1533 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1534
1535         A fix for bug #513400
1536         * nullable.cs (EmitEquality): Operands emit could be simplified for
1537         built-in types when we now emit user operators differently.
1538
1539 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1540
1541         * ecore.cs: Report inaccessible delegate methods correctly.
1542
1543 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1544
1545         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1546         cs-parser.jay: Implemented C# 4.0 optional parameters.
1547
1548 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1549
1550         * driver.cs: Removed broken DefineManifestResource.
1551
1552 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1553
1554         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1555         Use $(BOOTSTRAP_PROFILE) instead.
1556
1557 2009-06-12  Jb Evain  <jbevain@novell.com>
1558
1559         * rootcontext.cs: add a Platform field.
1560         * driver.cs: handle /platform.
1561         * codegen.cs: pass the proper flags according to
1562         the platform when saving the assembly.
1563
1564 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1565
1566         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1567         Add optional parameters grammar.
1568
1569 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1570
1571         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1572         driver.cs: Split lang version and metadata version.
1573
1574 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1575
1576         * decl.cs: Better overload ctor collision error message.
1577
1578 2009-06-05  Jb Evain  <jbevain@novell.com>
1579
1580         * driver.cs (EmbededResource): avoid using an internal method
1581         in gmcs to embed manifest resources.
1582
1583 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1584
1585         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1586         the compiler from older mono versions (like moon's bots)
1587
1588 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1589
1590         * namespace.cs (LookupTypeReflection): Ignore collisions between
1591         forwarded types.
1592
1593 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1594
1595         * codegen.cs: Enabled generic type forwarders.
1596
1597 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1598
1599         * dmcs.*: Add another version of SRE compiler.
1600
1601 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1602
1603         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1604         generic-mcs.cs: Fixed variant type conversions.
1605
1606 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1607
1608         A fix for bug #507863
1609         * codegen.cs: Fixes a crash on invalid string value attribute.
1610
1611 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1612
1613         A fix for bug #508334
1614         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1615         cs-parser.jay: Fully import __arglist modifier.
1616
1617 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1618
1619         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1620         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1621         actually work with closed generic types.
1622
1623 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1624
1625         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1626         Fix the build by replacing the use of 'var' with the actual type.
1627
1628 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1629
1630         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1631     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1632         declarations.
1633           
1634         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1635         filter.
1636
1637 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1638                         Marek Safar  <marek.safar@gmail.com>
1639
1640         A fix for bug #377509
1641         * parameter.cs: Use predefined and not empty name for implicit
1642         setters.
1643
1644 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1645
1646         * class.cs: Don't report wrong warnings for event fields.
1647
1648 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1649
1650         A fix for bug #504667
1651         * class.cs: Check for static class using parent container instead of
1652         parent type.
1653
1654 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1655
1656         A fix for bug #496922
1657         * expression.cs: Always use temporary variable when using object
1658         initializer.
1659
1660 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1661
1662         A fix for bug #495112
1663         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1664         local cache.
1665
1666 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1667
1668         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1669
1670 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1671
1672         * complete.cs: No idea how gonzalo got a null in the list, but
1673         avoid crashing.
1674
1675 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1676
1677         * complete.cs (CompletionElementInitializer): New completion class
1678         to support completing inside a C# 3 element initializer, so this
1679         allows completion for Silverlight situations where it is very
1680         common to do:
1681
1682         new TextBlock () { Fo<TAB>
1683
1684         (CompletionSimpleName): Expose the prefix that was
1685         passed to the simple name.
1686
1687         * cs-parser.jay (object_or_collection_initializer): Add support
1688         for element_initializers.
1689
1690         * expression.cs (CollectionOrObjectInitializers.DoResolve):
1691         special case completion expressions as this method aggressively
1692         collects data before it operates, and errors were being thrown
1693         earlier than we were able to complete.
1694
1695 2009-04-23  Miguel de Icaza  <miguel@novell.com>
1696
1697         * eval.cs: Make getcompletions silent and enable debugging output
1698         if the -v option is passed.
1699
1700         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
1701         Consider looking up the namespace that matches the prefix being
1702         used. 
1703
1704         This is part of the support for allowing completions like:
1705         `System.Co<TAB>' to complete to System.Console.
1706
1707         * complete.cs (CompletionSimpleName.AppendResults): Make this
1708         routine reusable.
1709
1710 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
1711
1712         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
1713         COMPLETE_COMPLETION as internal.
1714
1715 2009-04-17  Miguel de Icaza  <miguel@novell.com>
1716
1717         * complete.cs: Include namespace resolution in simple names as
1718         well as global types and types in the using scope in the
1719         resolution. 
1720
1721         * namespace.cs: Supporting infrastrcture to provide completions
1722         based on the current using scope. 
1723
1724         * eval.cs: Introduce an entry point that allows for initialization
1725         to return a list of the files passed on the command line.
1726
1727 2009-04-14  Marek Safar  <marek.safar@gmail.com>
1728
1729         A fix for bug #494243
1730         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
1731
1732 2009-04-13  Marek Safar  <marek.safar@gmail.com>
1733
1734         A fix for bug #493887
1735         * statement.cs: Don't skip string multi-section with default or
1736         null label when populating string hashtable.
1737
1738 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1739
1740         A fix for bug #492329
1741         * expression.cs (New): Load variable when assigning type parameter
1742         to ref variable.
1743
1744 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1745
1746         A fix for bug #488960
1747         * decl.cs: Compare MVAR types using non-null values.
1748
1749 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1750
1751         * typemanager.cs, expression.cs: Removed unused nullable checks.
1752
1753 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1754
1755         * *.cs: Removed some gmcs conditionals.
1756
1757 2009-03-26  Marek Safar  <marek.safar@gmail.com>
1758
1759         * generic.cs, support.cs: Moved generics stuff out of support.cs
1760
1761 2009-03-24  Marek Safar  <marek.safar@gmail.com>
1762
1763         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
1764         DeclaringType.
1765
1766 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1767
1768         * attribute.cs: Consider all members for error reporting when
1769         checking named arguments.
1770
1771 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1772
1773         A fix for bug #487625
1774         * namespace.cs: Use a warning for all predefined type conflicts.
1775
1776 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1777
1778         A fix for bug #485706
1779         * statement.cs: Explicitly type catch type argument to pass verifier
1780         check.
1781
1782 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1783
1784         Initial support to provide code completion facilities to consumers
1785         of the evaluator API.
1786         
1787         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
1788         support the completion engine.   When we reach the end of the
1789         input stream instead of returning EOF, when this flag is true the
1790         tokenizer instead produces:
1791
1792                 One GENERATE_COMPLETION token: this token then must be
1793                 handled in the grammar at every point where the user
1794                 would likely request a completion.
1795
1796                 As many COMPLETE_COMPLETION tokens as necessary.   These
1797                 tokens are generated to assist the parser in unwinding and
1798                 producing a valid parse tree.    
1799
1800         The parser rules do not have to be perfect, the parser needs to be
1801         augmented with judicious use of GENERATE_COMPLETION tokens to
1802         improve the areas where we can provide completion and the parser
1803         needs to add support for COMPLETE_COMPLETION tokens in productions
1804         to make them work.
1805
1806         It is common to not have enough support for COMPLETE_COMPLETION
1807         under certain rules and that even if we generated the
1808         GENERATE_COMPLETION token that the resulting tree will be invalid
1809         due to the missing rules that support COMPLETE_COMPLETION.
1810
1811         The final EOF token is produced by having the parser notify the
1812         tokenizer when it reaches the root production that the next token
1813         should be EOF.
1814
1815         * support.cs (CompletionResult): New Exception.   This exception
1816         is thrown to return the completion results when one of the special
1817         completion expressions is reached.
1818
1819         This exception is thrown by the completing ExpressionStatements
1820         classes that live in complete.cs
1821
1822         * complete.cs (CompletingExpression): a new base class for
1823         completing expressions.   This derives from the
1824         ExpressionStatement class and not from Expression as it allows
1825         completion to happen not only where expressions are expected in
1826         the grammar, but also where statements are expected.
1827
1828         (CompletionSimpleName): A new class used to provide completions
1829         for SimpleNames.     This currently only resolves to local
1830         variables from the evaluator context (GetVars call).
1831
1832         (CompletionMemberAccess): Implements support for completing member
1833         access patterns. 
1834
1835         * cs-parser.jay: Add support for completion in a few places. 
1836
1837         * eval.cs (GetCompletions): New public API for the evaluator that
1838         returns a list of possible completions given the input.   The
1839         return value is an array of completions 
1840
1841         * anonymous.cs (Compatible): If the exception thrown from the
1842         resolved expression is a CompletionResult exception let that one
1843         through instead of printing a diagnostic error in the try/catch. 
1844 <       
1845 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1846
1847         * 
1848
1849         * driver.cs (Main): Use Environment.Exit to quit quickly and
1850         prevent the compiler from doing the usual wait for helper thread
1851         to terminate.  
1852
1853         This is to prevent a slowdown that was reported by Gonzalo on
1854         ASP.NET 
1855
1856 2009-03-19  Marek Safar  <marek.safar@gmail.com>
1857
1858         * ecore.cs: Load build-in types directly instead of accessing
1859         an internal field.
1860
1861 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1862
1863         * ecore.cs: Always use unbox.any when available.
1864
1865 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1866
1867         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
1868
1869 2009-03-17  Marek Safar  <marek.safar@gmail.com>
1870
1871         * generic.cs: Removed obsolete version of type inference.
1872
1873 2009-03-16  Marek Safar  <marek.safar@gmail.com>
1874
1875         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
1876         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
1877         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
1878         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
1879
1880 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1881
1882         A fix for bug #482996
1883         * anonymous.cs: Make sure we are not infering return type when
1884         checking type compatibility.
1885
1886 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1887
1888         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
1889         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
1890         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
1891         attributes in their own structure. Needed when accessing their
1892         properties before they are resolved.
1893
1894 2009-03-09  Marek Safar  <marek.safar@gmail.com>
1895
1896         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
1897         hashtable (~10x faster).
1898         
1899         * driver.cs: Removed wrong Reset.
1900
1901 2009-03-08  Marek Safar  <marek.safar@gmail.com>
1902
1903         * class.cs: Use correct common base type for unmanaged delayed
1904         check.
1905
1906         * rootcontext.cs: Wrap unhandled exception.
1907
1908 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
1909
1910         Make SeekableStreamReader self-tuning and arbitrarily seekable
1911         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
1912         the buffer.
1913         (SeekableStreamReader.Position.set): Use it.  Simplify logic
1914         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
1915         buffer size when the stream needs to be re-read from the beginning.
1916
1917 2009-03-05  Marek Safar  <marek.safar@gmail.com>
1918
1919         A fix for bug #480100
1920         * parameter.cs: A parameter is not hoisted when used directly as ET.
1921
1922 2009-03-04  Marek Safar  <marek.safar@gmail.com>
1923
1924         * statement.cs: Fixed an issue when using variable is of interface
1925         type.
1926
1927 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1928
1929         A fix for bug #480319
1930         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
1931
1932 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1933
1934         A fix for bug #480867
1935         * typemanager.cs, expression.cs, ecore.cs: Changed method group
1936         expression to have no valid type.
1937
1938 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1939
1940         A fix for bug #481258
1941         * class.cs: Set extension method flag in partial container.
1942
1943 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1944
1945         * statement.cs, typemanager.cs: Use expression for StringEmitter.
1946         
1947         * attribute.cs: Add sanity check.
1948
1949 2009-02-27  Marek Safar  <marek.safar@gmail.com>
1950
1951         * class.cs: Add external constructor error.
1952
1953 2009-02-26  Marek Safar  <marek.safar@gmail.com>
1954
1955         A fix for bug #475354
1956         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
1957         correctly user defined nullable equality operators.
1958
1959 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1960
1961         A fix for bug #479532
1962         * expression.cs: Implement NewInitialize::AddressOf.
1963
1964 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1965
1966         A fix for bug #413633
1967         * expression.cs: Iterate all base class-constraint types.
1968
1969 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1970
1971         A fix for bug #479209
1972         * literal.cs: Mutate null underlying type.
1973
1974 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1975
1976         A fix for bug #476295
1977         * convert.cs: Avoid wrapping implicitly convertible reference type.
1978
1979 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1980
1981         * iterators.cs: Create MemberName correctly.
1982
1983 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1984
1985         A fix for bug #478655
1986         * literal.cs: Check also underlying null type conversion.
1987
1988 2009-02-21  Marek Safar  <marek.safar@gmail.com>
1989
1990         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
1991
1992 2009-02-20  Marek Safar  <marek.safar@gmail.com>
1993
1994         A fix for bug #477447
1995         * statement.cs: Add reference to correct parent storey when this
1996         is accessible from deep children storey (more than 1 level).
1997
1998 2009-02-19  Marek Safar  <marek.safar@gmail.com>
1999
2000         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
2001         * class.cs: Define base type members before setting up member cache.
2002
2003 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2004
2005         A fix for bug #477378
2006         * nullable.cs, expression.cs, statement.cs: More precise null type
2007         sanity checks.
2008
2009 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2010
2011         A fix for bug #472805
2012         * typemanager.cs, namespace.cs: Import only visible extension method
2013         types.
2014
2015 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2016
2017         A fix for bug #476895
2018         * attribute.cs: Use correct resolve context for attribute type.
2019
2020 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2021
2022         A fix for bug #476266
2023         * anonymous.cs: Mutate multi-dimensional arrays.
2024
2025 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2026
2027         A fix for bug #476400
2028         * statement.cs, expression.cs: Removed wrong Dispose optimization.
2029
2030 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2031
2032         A fix for bug #476811
2033         * generics.cs: Fixed null-literal check.
2034
2035 2009-02-17  Marek Safar  <marek.safar@gmail.com>
2036
2037         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
2038         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
2039         messing with static variables.
2040
2041 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2042
2043         A fix for bug #475965
2044         * generics.cs: Check generic parameter type after extracting from
2045         Expression<T>.
2046
2047 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2048
2049         A fix for bug #475823
2050         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
2051         typed-null support.
2052
2053 2009-02-14  Marek Safar  <marek.safar@gmail.com>
2054
2055         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
2056         Simplified event field definition using backing field and not
2057         field builder directly.
2058
2059         * expression.cs (EmitLdArg): Optimize fast paths.
2060
2061 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2062
2063         A fix for bug #475327
2064         * expression.cs (ArrayCreation): Don't mutate values optimized away.
2065
2066 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2067
2068         A fix for bug #475342
2069         * cs-parser.jay: Using 'super' instead of 'base' to call base
2070         constructor crashes compiler.
2071
2072 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2073
2074         A fix for bug #475354
2075         * expression.cs (Constantify): Add nullable types.
2076         
2077         * const.cs (EmitDecimalConstant): Avoid explicit cast.
2078
2079 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2080
2081         A fix for bug #475246
2082         * expression.cs: More broken flowanalysis hacking needed.
2083
2084 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2085
2086         * attribute.cs: Compare only ref/out array modifiers. 
2087
2088 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2089
2090         * statement.cs: Use member cache when looking for foreach members.
2091
2092 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2093
2094         * expression.cs: Don't expose internal initializer types.
2095         
2096         * statement.cs: Check also explicit conversions for goto case.
2097
2098 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2099
2100         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2101
2102 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2103
2104         * *.cs: Replace null-type with NullLiteral where appropriate.
2105
2106 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2107
2108         * expression.cs: Initializer of reference argument use temporary
2109         variable to be verifiable.
2110         
2111         * parameter.cs: Share EmitLdArg.
2112
2113 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2114
2115         A fix for bug #473559
2116         * class.cs: Fixed: Not reporting error about nested class with the
2117         same name.
2118
2119 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2120
2121         Contributed under the MIT/X11 license.
2122
2123         * generic.cs: Added VerifyVariantTypeParameters which performs new
2124         variance verification logic. The old logic, based on the spec, was
2125         wrong because the spec is full of LIES!
2126
2127         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2128
2129         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2130
2131         * class.cs:
2132         * ecore.cs: Added calls to the new variance verification logic.
2133
2134         * parameter.cs:
2135         * delegate.cs: Removed calls to the old variance verification logic.
2136
2137 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2138
2139         * delegate.cs: Use cached Invoke method directly.
2140
2141 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2142
2143         * expression.cs: Emit expression tree for hoisted variable access.
2144
2145 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2146
2147         * namespace.cs: Add better extension class check.
2148
2149 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2150
2151         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2152
2153 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2154
2155         This patch adds initial generic variance support to the compiler.
2156         It is contributed under the MIT/X11 license.
2157
2158         * typemanager.cs: Modified ImplementsInterface to check variance.
2159         Added VerifyVariantTypeParameters which checks the specified type to see
2160         if it uses a variant type parameter as a type argument (which is not
2161         allowed). Added IsVariantOf which determins if the first type is a
2162         variant of the second. NOTE: This only supports reference types at
2163         the moment to conform with the current level of VM support. When the
2164         VM supports value types, this will follow step.
2165
2166         * generic.cs: Added the Variance enum. Added a Variance property to
2167         TypeParameter and added variance support to definition phase. Added a
2168         Variance property to TypeParameterName. Also check to make sure that
2169         no variant types appear in generic method parameters.
2170
2171         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2172         keywords if the langversion supports it.
2173
2174         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2175         that variant types are only used in legal positions. Also added
2176         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2177         parameters.
2178
2179         * decl.cs: Construct TypeParameter with the variance information.
2180
2181         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2182         and ImplicitConversionStandard.
2183
2184         * rootcontext.cs: Added new "Future" language version.
2185
2186         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2187         type parameters are not used as type arguments in interface inheritance.
2188         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2189         parameters are not used as method return types. In MemberBase.
2190         ResolveMemberType, ensure that variant type parameters are not used
2191         as type arguments. Also call VerifyNoVariantTypeParameters on every
2192         set of parameters which are resolved.
2193
2194         * delegate.cs: Modified Delegate.Define to ensure that variant
2195         parameters are not used as type arguments and that a contravariant
2196         parameter is not used as the return type. Also call
2197         VerifyNoVariantTypeParameters on the delegate parameters.
2198
2199         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2200         to specify generic variance.
2201
2202         * driver.cs: Added support for LanguageVersion.Future in the form of
2203         "-langversion:future".
2204
2205         * generic-mcs.cs: Stubbed out new members in generic.cs.
2206
2207 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2208
2209         * class.cs, generic.cs: Emit type parameter constraints for nested
2210         types.
2211
2212 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2213
2214         A fix for bug #471213
2215         * class.cs: Avoid emitting backing field for abstract event fields.
2216
2217 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2218
2219         A fix for bug #359731
2220         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2221         expressions.
2222
2223 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2224
2225         A fix for bug #470767
2226         * statement.cs: Introduced BlockScopeExpression, needed when 
2227         expression tree conversion has to emit scope variables.
2228
2229 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2230
2231         * class.cs: Remove duplicate CallingConvention.
2232
2233 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2234
2235         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2236         when I finally found the right naming convention.
2237
2238 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2239
2240         * cs-tokenizer.cs: Put back different open parens optimization.
2241
2242 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2243
2244         A fix for bug #470227
2245         * cs-tokenizer.cs: Remove too agressive parser optimization.
2246
2247 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2248
2249         A fix for bug #324319
2250         * class.cs: Remove too early base type resolve.
2251
2252 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2253
2254         A fix for bug #324319
2255         * ecore.cs: Explicitly type null when assigning to type argument to
2256         make pass verifier check.
2257
2258 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2259
2260         * anonymous.cs: Fixed recent regression when initializing captured 
2261         this.
2262
2263 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2264
2265         A fix for bug #469019
2266         * anonymous.cs: Use all parent type parameters when instantiating
2267         nested generic storey.
2268
2269 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2270
2271         * expression.cs: Check for null instance methodgroup expression.
2272
2273 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2274
2275         A fix for bug #469244
2276         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2277         instance inside a conditional expression.
2278
2279 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2280
2281         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2282         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2283         GetElementType and HasElementType. IsValueType clean up.
2284
2285 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2286
2287         * nullable.cs: Use common EmitCall.
2288         
2289         * expression.cs: Emit constraint. for virtual calls only.
2290
2291 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2292
2293         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2294         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2295         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2296         checks.
2297
2298 2009-01-22  Jb Evain  <jbevain@novell.com>
2299
2300         * anonymous.cs: make anonymous types' ToString implementation
2301         match what csc outputs.
2302
2303 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2304
2305         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2306         up.
2307
2308 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2309
2310         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2311         verifier checks.
2312
2313 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2314
2315         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2316         expressions.
2317
2318 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2319
2320         A fix for bug #466634
2321         * statement.cs: Add reference for nested storey when only this
2322         is captured.
2323
2324 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2325
2326         A fix for bug #466474
2327         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2328         was specified.
2329
2330 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2331
2332         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2333         Fixed nested stories parent referencing process. Also fixes #463985.
2334
2335 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2336
2337         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2338         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2339         implementation. Also fixes #463108.
2340
2341 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2342
2343         A fix for bug #416109
2344         * decl.cs: Issue correct CLSAttribute warning location.
2345
2346 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2347
2348         A fix for bug #456775
2349         * attribute.cs: Use attribute owner scope when resolving attribute
2350         arguments.
2351
2352 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2353
2354         A fix for bug #457257
2355         * decl.cs: Fixed incorrect member declaring type comparison.
2356
2357 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2358
2359         A fix for bug #460896
2360         * driver.cs: Handle /RES resources as embeddable.
2361
2362 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2363
2364         A fix for bug #462515
2365         * ecore.cs: Report inacessible members upwards.
2366
2367 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2368
2369         A fix for bug #463190, #463192
2370         * decl.cs, namespace.cs: Also import internal extension classes.
2371
2372 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2373
2374         A fix for bug #463415
2375         * generic.cs: Use right index for RemoveDependentTypes.
2376
2377 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2378
2379         A fix for bug #463196
2380         * expression.cs: Fixed enum to null comparison.
2381
2382 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2383
2384         A fix for bug #463121
2385         * nullable.cs: Fixed nullable user equality operator comparison.
2386
2387 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2388
2389         A fix for bug #462950
2390         * class.cs, decl.cs: Use full explicit name when defining automatic
2391         property backing field.
2392
2393 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2394
2395         A fix for bug #462592
2396         * pending.cs: Emit type arguments for generic proxy method.
2397
2398 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2399
2400         * expression.cs (As): Mutate all type arguments.
2401
2402 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2403
2404         A fix for bug #462622
2405         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2406         context.
2407
2408 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2409
2410         A fix for bug #450782
2411         * ecore.cs: Consider more variables of form V.I to be fixed.
2412
2413 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2414
2415         A fix for bug #460712
2416         * typemanager.cs: Core types could be imported.
2417
2418 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2419
2420         A fix for bugs #460847, #460772, #458049, #457339, #447807
2421         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2422         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2423         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2424         user lambdas used inside query clauses.
2425
2426 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2427
2428         A fix for bug #460229
2429         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2430
2431 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2432
2433         A fix for bug #459952
2434         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2435
2436 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2437
2438         A fix for bug #459630
2439         * convert.cs: Enum to valuetype conversion is not allowed.
2440
2441 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2442
2443         A fix for bug #457087
2444         * generic.cs: Don't crash when constraint comes from type
2445         declaration.
2446
2447 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2448
2449         A fix for bug #459221
2450         * anonymous.cs, statement.cs: Delay only captured this
2451         initialization.
2452
2453 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2454
2455         A fix for bug #457489
2456         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2457         and initialization to capture scope initializers correctly.
2458
2459 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2460
2461         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2462         ParameterReference refactoring.
2463
2464 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2465
2466         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2467         to be imported from any assembly.
2468
2469 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2470
2471         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2472         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2473         from anonymous method and lambda expression.
2474
2475 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2476
2477         A fix for bug #448560
2478         * expression.cs (As): Box any generic type arguments to be
2479         verifiable.
2480
2481 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2482
2483         Add tripwire for implicit conversion bugs
2484         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2485         for CS1501 error.
2486         (MethodGroupExpr.OverloadResolve): Add sanity check between
2487         IsApplicable and VerifyArgumentsCompat.
2488         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2489
2490 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2491
2492         Fix build break in System.Data_test
2493         * convert.cs (ImplicitConversionExists): Move NullLiteral
2494         conversions ...
2495         (ImplicitStandardConversionExists): ... here.
2496
2497 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2498
2499         * literal.cs: Emit correctly explicit null to nullable cast.
2500
2501 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2502
2503         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2504         resolve.
2505
2506 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2507
2508         A fix for bug #449005
2509         * convert.cs, nullable.cs: Use only one implicit nullable
2510         conversion.
2511
2512 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2513
2514         * convert.cs, literal.cs: More Convert cleanup is needed.
2515
2516 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2517
2518         * decl.cs, class.cs: Fixed misleading error message.
2519
2520 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2521
2522         A fix for bug #449005
2523         * nullable.cs (EmitEquality): Disable optimization for user operator
2524         operands.
2525
2526 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2527
2528         A fix for bug #447027
2529         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2530         with context variables stored as expression instances.
2531
2532 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2533
2534         A fix for bug #447027
2535         * delegate.cs: Fixed delegate VerifyMethod logic.
2536
2537 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2538
2539         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2540         but not verifiable.
2541
2542 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2543
2544         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2545         member type resolve to follow normal flow, instead of random
2546         property access.
2547
2548 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2549
2550         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2551         type.
2552
2553 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2554
2555         * const.cs: Emit decimal array constant as literal.
2556
2557 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2558
2559         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2560
2561 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2562
2563         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2564         into real property (saves 8 MB for corlib compilation).
2565
2566 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2567
2568         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2569         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2570         generic-mcs.cs: Small cleanup of TypeArguments.
2571
2572 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2573
2574         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2575         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2576         of ConstructedType expression, renamed to GenericTypeExpr.
2577
2578 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2579
2580         A fix for bug #445303
2581         * location.cs (IsConditionalDefined): Handle undefined global
2582         defines.
2583
2584 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2585
2586         A fix for bug #444678
2587         * expression.cs (TryReduceConstant): Always create new constant
2588         instance.
2589
2590 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2591
2592         A fix for bug #444673
2593         * ecore.cs: Ignore open generic types when used as generic type
2594         instance fields.
2595
2596 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2597
2598         A fix for bug #445458
2599         * expression.cs, cs-parser.jay: Don't crash when an expression
2600         statement is null.
2601
2602 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2603
2604         A fix for bug #445464
2605         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2606         inside unbound type.
2607
2608 2008-11-14  Jb Evain  <jbevain@novell.com>
2609
2610         * driver.cs: ignore empty -nowarn argument such as
2611         the one in -nowarn:12,13,,.
2612
2613 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2614
2615         A fix for bug #444271
2616         * anonymous.cs: Rescan parent storeys when best candidate was
2617         undone.
2618
2619 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2620
2621         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2622         useless UnboundTypeExpression.
2623         
2624         * attribute.cs: Do check obsolete attribute on generic types.
2625
2626 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2627
2628         A fix for bugs #425680, #400139
2629         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2630         refactoring.
2631
2632 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2633
2634         A fix for bug #435747
2635         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2636         compound value types assignment. Few micro optimizations added.
2637
2638 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2639
2640         A fix for bug #442610
2641         * anonymous.cs (MutateConstructor): More SRE hacking.
2642
2643 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2644
2645         A fix for bug #442579
2646         * ecore.cs: Also initialize expanded form of a method with 1 params
2647         parameter.
2648
2649 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2650
2651         * expression.cs (UnaryMutator): Do early l-side check.
2652
2653 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2654
2655         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2656         Init, otherwise we would crash later on when checking for friend
2657         assemblies. 
2658
2659         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2660         Otherwise we never get any meaningful information as to what
2661         failed. 
2662
2663 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2664
2665         A fix for bug #436318
2666         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2667
2668 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2669
2670         * namespace.cs: Turns out that it was a really bad idea to hide
2671         the errors for namespaces not found here in eval mode.    
2672
2673         * eval.cs: When we process using clauses, only enter those into
2674         the list of valid using clauses after they have been validated.   
2675
2676         The above change gives the proper semantics: it does not
2677         senselessly report the same errors with broken using statements by
2678         never storing them in the first place when they are invalid.
2679
2680 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2681
2682         A fix for bug #421839
2683         * cs-parser.jay: Remove expression from coalesce rule to force lower
2684         priority than the assignment operator.
2685
2686 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2687
2688         A fix for bug #437875
2689         * nullable.cs: Compile correctly method group operand used with null
2690         coalescing operator.
2691
2692 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2693
2694         A fix for bug #434589
2695         * expression.cs (Binary): Ignore lifted conversions when at least
2696         one operand is of reference type.
2697
2698 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2699
2700         * cs-parser.jay: Better syntax error report.
2701
2702 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2703
2704         A fix for bug #436792
2705         * cs-parser.jay: Use GetLocation to access location.
2706
2707 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2708
2709         A fix for bug #440774
2710         * cs-parser.jay: Also set current_array_type when parsing local
2711         variables types.
2712
2713 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2714
2715         A fix for bug #440785
2716         * expression.cs (As): Don't resolve self modifing expression
2717         multiple times.
2718
2719 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2720
2721         A fix for bug #439447
2722         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
2723
2724 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2725
2726         A fix for bug #437571
2727         * cs-parser.jay: Fixes internal error for invalid expression
2728         statements.
2729
2730 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2731
2732         * ecore.cs: Resolve correctly ambiguous params delegate methods.
2733
2734 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2735
2736         * generic.cs, anonymous.cs: Simplified GetDeclarations.
2737
2738 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2739
2740         * cs-tokenizer.cs: More precise cast parsing.
2741
2742 2008-10-16  Martin Baulig  <martin@ximian.com>
2743
2744         * anonymous.cs (AnonymousMethodStorey): Put back the
2745         `hoisted_locals' hashtable and use it in EmitType().
2746
2747 2008-10-15  Marek Safar  <marek.safar@gmail.com>
2748
2749         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
2750         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
2751         ~5MB for corlib.
2752
2753 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2754
2755         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
2756
2757 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2758
2759         * statement.cs: Mutate scope initializers.
2760
2761 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2762
2763         * expression.cs: Use typeless value for This constant.
2764         
2765         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
2766
2767 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2768
2769         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
2770         tokenizer.
2771
2772 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2773
2774         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
2775         type to type cast.
2776
2777 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2778
2779         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
2780         parser and tokenizer. Fixes many ambiguities including #433258.
2781
2782 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2783
2784         * cs-parser.jay: Fixed missing accessor recovery.
2785
2786 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2787
2788         A fix for bug #433701
2789         * expression.cs: Better error message.
2790
2791 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2792
2793         * cs-parser.jay, expression.cs: Start reporting real parser errors.
2794         
2795         * Makefile: Disabled unused debug symbols.
2796
2797         Also fixes: #320556, #321097, #321656, #321876, #351316
2798
2799 2008-10-09  Miguel de Icaza  <miguel@novell.com>
2800
2801         * eval.cs: rename "<interactive>" to "{interactive}", to work
2802         around a requirement in the compiler that this be a valid
2803         filename, and in Windows it is not (433886).
2804
2805 2008-10-09  Marek Safar  <marek.safar@gmail.com>
2806
2807         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
2808
2809 2008-10-08  Marek Safar  <marek.safar@gmail.com>
2810
2811         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
2812         cs-parser.jay: Generic type declaration and type arguments cleanup.
2813
2814 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2815
2816         * cs-parser.jay: Allow parsing weird array creation construct.
2817
2818 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2819
2820         * cs-parser.jay: Conflicts reduction.
2821
2822 2008-10-04  Marek Safar  <marek.safar@gmail.com>
2823
2824         * cs-parser.jay: Conflicts reduction.
2825
2826 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
2827
2828         Fix #398325
2829         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
2830         property.  Add a 'count' hint about the use of the shared vector.
2831         Ensure that we don't leak out dirty bits.
2832         (UsageVector.MergeChild): Throw away information about variables
2833         in child vectors.
2834         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
2835
2836 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2837
2838         A fix for bug #431746
2839         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
2840         parameters when iterator is created.
2841
2842 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2843
2844         A fix for bug #431827
2845         * expression.cs: Fixed right based pointer arithmetic operations
2846         emit.
2847
2848 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2849
2850         A fix for bug #353779
2851         * assign.cs, expression.cs: Fixed compound assignment conversions.
2852
2853 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2854
2855         A fix for bug #375262
2856         * statement.cs: Refactor ArrayForeach to be usable with string
2857         indexer. Optimized single dimentional arrays foreach.
2858
2859 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2860
2861         A fix for bug #431255
2862         * anonymous.cs, expression.cs: Removed broken optimization.
2863
2864 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2865
2866         * anonymous.cs: Use full type parameters of parent generic
2867         containers. Removed unnecessary AddParentStoreyReference call.
2868
2869 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2870
2871         A fix for bug #324702
2872         * class.cs: Use better shorter names for explicit interface member
2873         implementations.
2874
2875         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
2876
2877 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2878         
2879         * expression.cs: Use new interface to check fixed expression.
2880
2881 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2882
2883         A fix for bug #421101
2884         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
2885         interface to check for fixed fixed-buffers.
2886
2887 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2888
2889         A fix for bug #429264
2890         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
2891         
2892         * delegate.cs: Removed unnecessary casts.
2893
2894 2008-09-30  Marek Safar  <marek.safar@gmail.com>
2895
2896         A fix for bug #352151
2897         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
2898         class.cs: Fixed already defined explicit interface members check.
2899
2900 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
2901
2902         cs-tokenizer.cs: Fix typo.
2903
2904 2008-09-28  Miguel de Icaza  <miguel@novell.com>
2905
2906         * eval.cs (InteractiveBase): The quit command now just sets a
2907         flag, instead of calling Environment.Exit(), it is milder on
2908         embedded hosts. 
2909
2910         CompiledMethod is now in Mono.CSharp, not nested inside
2911         the Evaluator, it was inconvenient to use.
2912
2913 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2914
2915         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
2916         code to be invoked without having to reparse.
2917
2918 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2919
2920         * ecore.cs: The recent changes to FieldExpr broke this as well.
2921         Fixes LINQ queries in the interactive shell.
2922
2923         * Multiple files: indentation fixing for the Mono coding
2924         guidelines for the switch statement.
2925
2926         * eval.cs: Make the Evaluator API thread safe.
2927
2928 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2929
2930         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
2931         constructor parsing.
2932
2933 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2934
2935         A fix for bug #325326
2936         * statement.cs: Check possible mistaken empty statement using
2937         explicit blocks only.
2938
2939 2008-09-25  Miguel de Icaza  <miguel@novell.com>
2940
2941         * eval.cs (LoadAssembly, ReferenceAssembly): Call
2942         RootNamespace.ComputeNamespaces to update the internal list of
2943         namespaces, this is no longer done for us.
2944
2945         (InteractiveBase): Use the Evaluator APIs instead of calling into
2946         Driver directly
2947
2948 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2949
2950         A fix for bug #429264
2951         * expression.cs: Missing mutator for access to multidimensional
2952         arrays.
2953
2954 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2955
2956         * class.cs, statement: Emit DebuggerHidden attribute for iterator
2957         entry wrapper.
2958         
2959         * driver.cs: Missing input argument check.
2960
2961 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2962
2963         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
2964         expression.cs, statement.cs, rootcontext.cs, class.cs, 
2965         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
2966         DefineMembers.
2967
2968 2008-09-24  Miguel de Icaza  <miguel@novell.com>
2969
2970         * ecore.cs (FieldExpr): Only initialize eclass when we return a
2971         fully constructed FieldExpr, fixes the regression introduced in
2972         the last commit.
2973         
2974         * ecore.cs, expression.cs: Plug back the eclass initialization as
2975         otherwise it regresses `csharp'. 
2976
2977 2008-09-24  Marek Safar  <marek.safar@gmail.com>
2978
2979         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
2980         ecore.cs, attribute.cs: Moved obsolete method checks from emit
2981         phase to resolve phase. It resolves problems with expression trees
2982         and fixes bugs #323796, #325156.
2983
2984 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2985
2986         * codegen.cs: Report better error when symbol writer is missing.
2987
2988 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2989
2990         * codegen.cs: Set .NET symbol writer.
2991         
2992         * decl.cs: Guard against null generic arguments.
2993         
2994         * report.cs: Don't report exactly same additional details.
2995
2996 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2997
2998         A fix for bug #324917
2999         * cs-parser.jay: Add missing multidimensional non-expression type
3000         ranks.
3001         
3002 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3003
3004         A fix for bug #428191
3005         * anonymous.cs: Create an outer generic fields also for non-storey
3006         anonymous methods.
3007
3008 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3009
3010         A fix for bug #378294
3011         * class.cs: Make fixed size buffers gmcs feature only.
3012
3013 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3014
3015         A fix for bug #355622, #324993
3016         * assign.cs, const.cs, class.cs: Create new EmitContext for each
3017         field initializer.
3018
3019 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3020
3021         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
3022         error reporting.
3023
3024 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3025
3026         A fix for bug #416110
3027         * generic.cs: Struct constraint results in default ctor and
3028         ValueType base type constraint to be set.
3029
3030 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3031
3032         A fix for bug #423791
3033         * generic.cs: Fixed params output type type-inference.
3034
3035 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3036
3037         * cs-parser.jay, expression.cs: Fixed few expression crashes.
3038         
3039 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3040
3041         * cs-tokenizer.cs: Don't break on extra partial modifier.
3042
3043 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3044
3045         A fix for bug #427592
3046         * generic.cs: Use common parameter resolve method.
3047
3048 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3049
3050         A fix for bug #414758
3051         * expression.cs, ecore.cs: Fixed crash when accessing non-static
3052         property.
3053
3054 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3055
3056         * driver.cs, namespace.cs: Read types and namespaces after all
3057         requested assemblies are loaded, fixes issues with System.Core
3058         auto-reference, and #419888.
3059
3060 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3061
3062         A fix for bug #417705
3063         * cs-parser.jay: Fixed as/is operator expression split.
3064
3065 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3066
3067         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
3068         Fixed expression tree representation of empty new expression and
3069         new initializer expression.
3070
3071 2008-09-18  Miguel de Icaza  <miguel@novell.com>
3072
3073         * eval.cs: Remove warning, keep reference to driver around.
3074
3075         * Hide fields that do not need to be public.
3076
3077 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3078
3079         A fix for bug #426385
3080         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
3081         conversion for array elements.
3082
3083 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3084
3085         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
3086         void parsing conflicts.
3087
3088 2008-09-15  Marek Safar  <marek.safar@gmail.com>
3089
3090         A fix for bug #425601
3091         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
3092         System.Core only when there is no custom ExtensionAttribute
3093         implementation.
3094
3095 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3096
3097         * namespace.cs: Do not report CS0246 (name
3098
3099 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3100
3101         A fix for bug #425669
3102         * generic.cs: Don't cache generic static anonymous method 
3103         containers.
3104
3105 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3106
3107         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3108         conflicting constraints.
3109
3110 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3111
3112         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3113         mcs too.
3114
3115 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3116
3117         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3118         to null pointer conversion fixes.
3119
3120 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3121
3122         * cs-parser.jay, expression.cs: An implicitly typed local variable
3123         declarator cannot use an array initializer.
3124
3125 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3126
3127         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3128
3129 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3130
3131         * generic.cs (InflatedConstraints): Don't crash when constraints
3132         are different.
3133         
3134         * cs-parser.jay: const_declarator is a block.
3135
3136         * constant.cs: Check for not allowed NaN conversions.
3137
3138 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3139
3140         * driver.cs: Drop --shell argument, the compiler is no longer a
3141         REPL. 
3142
3143         * eval.cs: Move most of the code that deals with evaluation into
3144         this file and document the public API from repl.cs
3145
3146         * repl.cs: Remove from here.
3147         
3148 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3149
3150         A fix for bug #424684
3151         * generic.cs: Generic class constraints must come first.
3152
3153 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3154
3155         * cs-parser.jay: Improve error reporting for syntax errors in
3156         statements and expressions, we now report the expected tokens
3157         instead of reporting the useless "; expected".
3158
3159         Drop the strings from the token declaration, it turns out that
3160         they did not do what I thought they did.  Instead they were adding
3161         two sets of tokens to the tables.
3162
3163 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3164
3165         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3166         delegate.cs: Share special type check.
3167
3168 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3169
3170         A fix for bug #423981
3171         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3172
3173 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3174
3175         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3176         ConvertImplicitly.
3177
3178 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3179
3180         A fix for bugs: #324750, #335946
3181         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3182         lookup rule to determine ?-based tokens.
3183
3184 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3185
3186         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3187         expressions (like event adding or removing) end up here, so we
3188         need to treat those as statements.
3189
3190         Add LoadAssembly method.
3191
3192 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3193
3194         * repl.cs: Add Time method.
3195
3196 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3197
3198         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3199
3200 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3201
3202         * repl.cs: Add workaround for old compilers.
3203
3204 2008-09-04  Jb Evain  <jbevain@novell.com>
3205
3206         * repl.cs (PrettyPrint): pretty print everything that
3207         implements IDictionary, as well as IEnumerables. Also,
3208         add a quit helper property.
3209
3210 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3211
3212         * constant.cs: Better error reporting for decimal literals.
3213         
3214         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3215         field attributes.
3216         
3217 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3218                         Miguel de Icaza  <miguel@novell.com>
3219
3220         A fix for bug #422951
3221         * assign.cs (Assign.DoResolve): Perform the type conversions
3222         checks before we attempt to initialize `New' initializers. 
3223
3224 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3225
3226         A fix for bug #422853
3227         * delegate.cs (DelegateCreation): Add special handling for
3228         EmptyExpression.Null instance expression which is just another
3229         hack for undecided member instance exression.
3230
3231 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3232
3233         * expression.cs, ecore.cs: Emit full expression tree for reduced
3234         binary expressions.
3235
3236 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3237
3238         * expression.cs (This): Guard against multi-resolving.
3239         
3240         * ecore.cs, statement.cs (Throw): Simplified.
3241         
3242         * flowanalysis.cs: Also verify event fields.
3243
3244 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3245
3246         * assign.cs (Assign.DoResolve): Perform the type conversions
3247         checks before we attempt to initialize `New' initializers. 
3248
3249         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3250
3251         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3252         public. 
3253
3254         * repl.cs: Update help.
3255
3256 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3257
3258         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3259         handling of the default config handling, including the special
3260         treatment of System.Core assembly. 
3261
3262         Fixes the REPL processing for LINQ.
3263
3264 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3265
3266         A fix for bug #422507
3267         * expression.cs (UnboxCast): Add missing child expression mutator.
3268
3269 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3270
3271         * driver.cs: Don't self reference System.Core assembly.
3272
3273 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3274
3275         A fix for bug #422507
3276         * expression.cs (StringConcat): Add missing type mutator.
3277
3278 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3279
3280         * generic.cs (TypeInferenceContext): Follow equality rule for
3281         constructed type lower bound type inference.
3282
3283 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3284
3285         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3286         <dblank@cs.brynmawr.edu> which updates the cursor position on
3287         refresh.
3288         
3289 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3290
3291         A fix for bug #367145
3292         * driver.cs: Fixed import of extension methods when using -noconfig
3293         option.
3294
3295 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3296
3297         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3298         version from non-generic implementation instead.
3299
3300 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3301
3302         A fix for bug #418908
3303         * class.cs: Use AddScopeStatement for field initializers.
3304
3305 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3306
3307         A fix for bug #415385
3308         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3309
3310 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3311
3312         A fix for bug #421736
3313         * iterators.cs: Don't crash on unreachable iterators.
3314
3315 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3316
3317         A fix for bug #421628
3318         * parameter.cs, attribute.cs: Clone also parameter attributes.
3319
3320 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3321
3322         * namespace.cs (LookupType): In EvalMode, try to replace
3323         the TypeBuilder from our cache with a Type as Reflection.Emit does
3324         not  like to mix code from older assemblies emitted and new
3325         assemblies emitted. 
3326
3327         This sounds like a serious Mono bug that prevents multiple
3328         assemblies to be generated and consumed at the same time.
3329
3330         * cs-parser.jay (push_current_class): Do not make interactive
3331         classes internal or private, make them public as we currently
3332         generate each new class in a new assembly.   
3333
3334 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3335
3336         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3337         remove types that are entered into the global namespace during
3338         parsing so that we can remove them on failure.
3339  
3340         * cs-parser.jay: Parsing: we now keep track of types that are
3341         entered into global variables and queue those in case the parsing
3342         or resolution fail.
3343  
3344         This happens in a few situations: during partial-input, we invoke
3345         the parser repeatedly for example with the string "class X", this
3346         would cause X to be registed, and we need to remove this
3347         registration so that another parse attempt later with say "class X {"
3348         would actually work.
3349  
3350         Additionally, if there is an error in the resolution phase, for
3351         example: "class X : NonExistant {}" th
3352         
3353         * cs-parser.jay: Be more precise with the errors being raised,
3354         instead of flagging all exceptions during parsing to be attributed
3355         to the parsing process, distinguish those from errors happening in
3356         the actions and hint that using -v would produce the actual
3357         exception. 
3358
3359         * repl.cs: Do not load all compiler references on each reset,
3360         doing the partial reset takes care of this.
3361         
3362 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3363
3364         * repl.cs: Add support for loading all the files from
3365         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3366         as shell libraries.
3367
3368         Introduce a micro-parser that is able to deambiguate on its input
3369         whether we are dealing with a compilation unit (namespace, class,
3370         interface, struct, delegate) declaration or a statement.   This
3371         allows both declarations and statements to be entered. 
3372
3373         Set history size by default to 300 lines.
3374
3375         Instead of distinguishing based on the parser.InteractiveResult,
3376         have only two cases: statements were parsed, or a compilation unit
3377         was.   Always pull the Using statement additions from the
3378         compilation unit parse.
3379         
3380         * cs-tokenizer.cs: Rename tokens to better describe their intent
3381         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3382         
3383         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3384         EvalMode is used to trigger the lookup of global variables while
3385         StatementMode is used turn variable declarations into static
3386         fields.
3387
3388         * getline.cs: Allow history size to be set.
3389         
3390 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3391
3392         A fix for bug #360755
3393         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3394
3395 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3396
3397         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3398         
3399         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3400         member name, it is too confusing
3401         
3402         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3403         
3404         * rootcontext.cs: Finally default to warning level 4.
3405
3406 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3407
3408         * class.cs (CheckBase): Ignore overloaded operators.
3409
3410 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3411
3412         A fix for bug #420830
3413         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3414
3415 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3416
3417         A fix for bug #420832
3418         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3419
3420 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3421
3422         A fix for bug #420386
3423         * nullables.cs: Fixed logic of nullable user comparison operators involving
3424         null values.
3425
3426 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3427         
3428         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3429
3430 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3431
3432         * repl.cs: Add support for aborting the running code with C-c. 
3433
3434 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3435
3436         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3437
3438 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3439
3440         * cs-parser.jay (interactive_statement_list): A new set of rules
3441         for hosting statements that uses the "interactive_" prefix.   
3442
3443         * repl.cs: Add support for parsing `using' as a statement or as a
3444         directive.  Deambiguating before passing this to the parser.
3445
3446         We need to distinguish statement_expressions that occur at the
3447         toplevel vs those that occur embedded into expressions.
3448
3449         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3450         that fixes the cursor key handling, and a history bug.
3451         
3452 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3453
3454         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3455         limitations in Console, instead the 2.0 bootstrap libraries now
3456         include the Console bits.
3457
3458         Also, remove the use of Nullables from getline.cs
3459
3460         ------------
3461         
3462         Interactive support for the C# compiler.   Use gmcs --shell to
3463         enter a read-eval-print loop shell.
3464
3465         Docs: http://www.mono-project.com/CsharpRepl
3466         
3467         * sources: include repl.cs here and getline.cs for gmcs.exe,
3468         everything else is getline.cs impaired.
3469
3470         * Makefile: when bootstrapping pass a special flag
3471         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3472         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3473         This distinguishes those two cases.
3474
3475         * repl.cs: Support for a read-eval-print loop.   Will be soon
3476         refactored into eval support and then REPL on top of it.
3477
3478         * ecore.cs: If a simplename lookup fails, before erroring out,
3479         if we are in EvalMode to resolve the name to a declaration in the
3480         Eval-land.    
3481
3482         This means that variable declarations that happened in previous
3483         classes (as repl puts every statement in a separate class) are
3484         made visible in this way.
3485
3486         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3487         triggered an error due to the end of file being reached.   This is
3488         used to do multi-line input, and notify the caller that the user
3489         needs to provide more text before a successful parse.
3490
3491         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3492         to drive the evaluation with a custom wrapper. 
3493
3494         * driver.cs: Add support for --shell, and refactor some code to be
3495         reused from repl.cs
3496         
3497         * namespace.cs: Add support for serializing the contents of the
3498         namespaces and reloading them.  
3499
3500         * getline.cs: A managed implementation of ReadLine under
3501         X11/Apache2 license terms.  Easy to embed in other applications as
3502         well.
3503
3504         * namespace.cs: Add some functions to save and restore the
3505         namespace state.
3506
3507         * rootcontext.cs: New public field.
3508
3509         * cs-tokenizer.cs: Add support for one of the possible characters
3510         we introduce into the token stream.  
3511
3512         This patch does not affect the regular tokenization process, the
3513         only performance hit would happen if there is an invalid character
3514         on the input string.
3515
3516         * support.cs: Move isatty helper routine here.
3517
3518         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3519         code generator for in-memory assemblies.
3520
3521 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3522
3523         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3524         parameter cannot be always used as a type.
3525
3526 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3527
3528         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3529
3530 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3531
3532         * convert.cs: Implement explicit array to IList<T> conversion.
3533
3534 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3535
3536         A fix for bug #362740
3537         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3538
3539 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3540         
3541         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3542         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3543         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3544         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3545         handling to use just one type of infrastructure and deal with generics
3546         more effectivelly.
3547
3548 2008-07-23  Martin Baulig  <martin@ximian.com>
3549
3550         *** Merged this from trunk revision 108527 ***
3551
3552         * statement.cs
3553         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3554         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3555         scope variable.
3556
3557 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3558         
3559         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3560         error checks.
3561
3562 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3563         
3564         * delegate.cs: Fixed compiler crash when creating delegate using partial
3565         method.
3566         
3567         * typemanager.cs: MulticastDelegate is not a delegate.
3568
3569 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3570         
3571         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3572         checks.
3573
3574 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3575
3576         * cs-parser.jay (type): Allow 'var' in mcs too.
3577         (local_variable_type): Likewise.
3578
3579 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3580         
3581         * driver.cs: Removed broken -noconfig variants.
3582
3583 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3584         
3585         A fix for bug #417078
3586         * expression.cs: Emit correctly left side pointer operators.
3587
3588 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3589
3590         * generic.cs, lambda.cs: Inflate method generic arguments only.
3591
3592 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3593
3594         * class.cs: Fixed struct layout check regression.
3595
3596 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3597
3598         * cs-parser.jay, enum.cs: Simplified enum parsing.
3599         
3600         * decl.cs: Check all type parameters conflicts.
3601         
3602         * expression.cs, statement.cs, attribute.cs: More expression checks.
3603
3604 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3605
3606         * generic.cs: Add type inference types restriction.
3607         
3608         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3609         anonymous.cs, expression.cs: Allocate less accessor parameters.
3610
3611 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3612
3613         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3614         classes.
3615
3616 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3617
3618         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3619
3620 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3621
3622         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3623         Also fixes #362146 and #381592.
3624
3625 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3626
3627         * ecore.cs: Reduced constant cannot be used as an attribute value.
3628         
3629         * cs-parser.jay: Base expression has to be a type.
3630         
3631         * expression.cs (Conditional): Uses ReducedExpression.
3632
3633 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3634
3635         A fix for bug #376826
3636         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3637         address of hoisted local variable or parameter cannot be taken.
3638
3639 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3640
3641         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3642         anonymous method inside checked/unchecked expression.
3643
3644 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3645
3646         * typemanager.cs (IsEqual): Guard against null.
3647         
3648         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3649         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3650         routine. Fixed few misleading conversion errors.
3651
3652 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3653
3654         * class.cs: Consider generics when checking cycles in struct layout.
3655
3656 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3657
3658         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3659
3660 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3661
3662         A fix for bug #414165
3663         * anonymous.cs: Use same anonymous implementation method for all anonymous
3664         method emits.
3665
3666 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3667
3668         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3669         constraints.
3670
3671 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3672
3673         * cs-parser.jay: Typeof argument has to be a type expression.
3674         
3675         * namespace.cs: Check alias and namespace definitions collisions.
3676         
3677         * class.cs, pending.cs: Moved explicit interface accessor implementation
3678         check.
3679         
3680         * delegate.cs, expression.cs: Verify special name invocations.
3681         
3682 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3683
3684         * cs-parser.jay: Don't choke on empty generic type arguments.
3685         
3686         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3687         
3688         * expression.cs, ecore.cs: Minor expressions bugs.
3689
3690 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3691
3692         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
3693         and added more error handling.
3694         
3695         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
3696         
3697         *  modifiers.cs, enum.cs: Fixed.
3698
3699 2008-07-31  Jb Evain  <jbevain@novell.com>
3700
3701         * driver.cs: remove -pkg ability of smcs.
3702
3703 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3704
3705         * statement.cs (Switch): Correctly set empty default target for single
3706         blocks.
3707
3708 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3709
3710         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
3711         string switch statement implementation to use string dictionary which
3712         significantly (2-8x) improves performance of generated code.
3713
3714 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3715
3716         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
3717         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
3718         
3719 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3720
3721         A fix for bug #412595
3722         * typemanager.cs, convert.cs, expression.cs: Some types are never
3723         convertible to each other.
3724
3725 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3726
3727         * nullable.cs (CreateNullConstant): An error messages update.
3728
3729 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3730
3731         A fix for bug #412595
3732         * cfold.cs: Don't cast undefined bool constant.
3733
3734 2008-07-29  Martin Baulig  <martin@ximian.com>
3735
3736         * symbolwriter.cs
3737         (SymbolWriter.Reset): New public static method.
3738
3739         * driver.cs
3740         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
3741
3742 2008-07-28  Marek Safar  <marek.safar@gmail.com>
3743
3744         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
3745         
3746         * expression.cs (ElementAccess): Exact size allocation.
3747
3748 2008-07-26  Marek Safar  <marek.safar@gmail.com>
3749
3750         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
3751
3752 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3753
3754         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
3755         
3756         * class.cs: Removed $PRIVATE$ field hack which caused problems during
3757         flow analysis.
3758
3759 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3760
3761         A fix for bug #412217
3762         * assign.cs: Mutate also assignment type.
3763
3764 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3765
3766         A fix for bug #323644
3767         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
3768         indexers.
3769
3770 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3771
3772         A fix for bug #412134
3773         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
3774         non-enumerable operands when overloading equality or bitwise operators.
3775
3776 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3777
3778         * anonymous.cs: Cache closed generic anonymous method delegates.
3779
3780 2008-07-24  Marek Safar  <marek.safar@gmail.com>
3781
3782         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
3783         anonymous.cs, statement.cs: Always emit anonymous method as static method
3784         when is instance free. Use nesting for nested anynomous methods blocks.
3785         
3786 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3787
3788         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
3789         types.
3790
3791 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3792
3793         * expression.cs: Removed MakeSimpleCall.
3794
3795 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3796
3797         A fix for bug #323012
3798         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
3799         Base method implementing interface has to be public.
3800
3801 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3802
3803         * cs-parser.jay: Don't break on missing argument.
3804
3805 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3806
3807         A fix for bug #320993
3808         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
3809           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
3810
3811 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3812
3813         A fix for bug #320748
3814         * convert.cs: Implicit user operators cannot convert to interfaces
3815
3816 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3817
3818         A fix for bug #312686
3819         * driver.cs: Ignore empty assembly references.
3820
3821 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3822
3823         A fix for bug #387040
3824         * ecore.cs: Skip constrains check for an explicit implementation.
3825
3826 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3827
3828         A fix for bug #409045
3829         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
3830           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
3831           identifiers are file specific unless passed as input arguments.
3832
3833 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3834
3835          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
3836          to emit UnmanagedMarshal data under 2.0 profile.
3837
3838 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3839
3840         A fix for bug #410369
3841         * parameter.cs: Clone correctly ParamsParameter.
3842
3843 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3844
3845         * expression.cs (Argument): Always report type for type based expressions
3846         errors.
3847
3848 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3849
3850         A fix for bug #410666
3851         * anonymous.cs: Correctly initialize generic storey reference.
3852
3853 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3854
3855         * convert.cs: Don't box same type arguments.
3856
3857 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3858
3859         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
3860         Finished missing generic type mutators.
3861
3862 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3863
3864         * iterators.cs, statement.cs: Finished statements CloneTo.
3865
3866 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3867
3868         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
3869         
3870         * expression.cs: Emit optimized default value expressions in expression tree
3871         array initializer.
3872
3873 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3874
3875         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
3876
3877 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3878
3879         A fix for bug #367536
3880         * cs-parser.jay: Check static constructor of generic types for an access
3881         modifier.
3882
3883 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3884
3885         A fix for bug #353800
3886         * lambda.cs: Emit ret for contextual statements.
3887         
3888         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
3889         up emitting redundant ret for all anonymous methods with return.
3890
3891 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3892
3893         A fix for bug #365188
3894         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
3895         create anonymous method storey in unreachable block.
3896
3897 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3898
3899         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
3900         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
3901         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
3902         statement.cs: Fixed relevant defects found by Gendarme.
3903
3904 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3905
3906         A fix for bug #325291
3907         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
3908         statement.cs: Replaced IAnonymousHost with top level block flag.
3909
3910 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3911
3912         * cs-parser.jay: Clean up unused open_parens.
3913
3914 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3915
3916         * ecore.cs: Custom error message for a range variable assignment.
3917
3918 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3919
3920         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
3921         load.
3922
3923 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3924
3925         * literal.cs: Null literal is of object type.
3926
3927 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3928
3929         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
3930         expression of nullable equality comparison.
3931
3932 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3933
3934         * expression.cs(PointerArithmetic): Removed redundant assignment.
3935
3936 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3937
3938         * decl.cs (GetSignatureForError): Report full namespace name for containers.
3939
3940 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3941
3942         A fix for bug #408361
3943         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
3944         they are replaced by GetMethod.
3945
3946 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3947
3948         A fix for bug #408721 by jeremie.laval@gmail.com
3949         * expression.cs (Indirection): Implemented CloneTo.
3950
3951 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3952
3953         * statement.cs (AssignableSlots): Temporary disabled variable initialization
3954         assert check.
3955
3956 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3957
3958         * report.cs (EnableReporting): Don't reinitialize 0-based values.
3959
3960 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3961
3962         * linq.cs: Reset tranparent parameter counter in probing mode.
3963
3964 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3965
3966         * anonymous.cs: Mutate anonymous method type.
3967
3968 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3969
3970         * ecore.cs, anonymous.cs: Mutate field expressions.
3971
3972 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3973
3974         A fix for bug #369670
3975         * linq.cs, statement.cs: Use explicit block for query expressions variables.
3976
3977 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3978
3979         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
3980
3981 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
3982
3983         Fix bug #314902
3984         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
3985         only one '>', and finds a '>>', abort the generic lookahead.
3986
3987 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3988
3989         A fix for bug #319902
3990         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
3991
3992 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3993
3994         A fix for bug #406371
3995         * statement.cs: Moved EmitSymbolInfo to Block.
3996
3997 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3998
3999         * ecore.cs: Report better error for extension method overload failures.
4000
4001 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4002
4003         * expression.cs (Is): No need to box reference values.
4004
4005 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4006
4007         * class.cs: Use event resolve context when initializing CreateEmitContext.
4008
4009 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4010
4011         A fix for bug #394436
4012         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
4013         method used inside expression trees. Added more LINQ to expression tree
4014         conversions.
4015
4016 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4017
4018         A fix for bug #378189, #370577
4019         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
4020         from expression.
4021
4022 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4023
4024         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
4025         hierarchically.
4026
4027 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4028
4029         A fix for bug #406702
4030         * anonymous.cs: Always park anonymous method in the nearest parent storey.
4031
4032 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4033
4034         A fix for bug #406648
4035         * cs-parser.jay: Report nullable use in mcs for some cases.
4036
4037 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4038
4039         * ecore.cs: Improved argument mismatch error messages.
4040
4041 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4042
4043         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
4044
4045 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4046
4047         * expression.cs (TypeOf): Mutate type argument.
4048
4049 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4050
4051         * class.cs: Report missing partial modifier for correct type.
4052
4053 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4054
4055         * ecore.cs, expression.cs (VariableReference): Variable property is 
4056         protected.
4057
4058 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4059
4060         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
4061         
4062 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4063
4064         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
4065         method delegates.
4066
4067 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4068
4069         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
4070         anonymous method storey to an instance method when only "this" is hoisted.
4071
4072 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4073
4074         A fix for bug #321615
4075         * expression.cs: Pointer comparisons use unsigned operator.
4076
4077 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4078
4079         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
4080
4081 2008-07-02  Marek Safar  <marek.safar@gmail.com>
4082
4083         A fix for bug #404905
4084         * class.cs: Always initialize local unsafe variables.
4085
4086 2008-06-30  Marek Safar  <marek.safar@gmail.com>
4087
4088         A fix for bug #396987
4089         * expression.cs (NewInitialize): Clear local temporary variable for next run
4090
4091 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4092
4093         A fix for bug #401020
4094         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4095
4096 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4097
4098         A fix for bug #398319
4099         * cs-parser.jay: Implemented undocumented base access expression inside
4100         anonymous types.
4101
4102 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4103
4104         A fix for bug #404227
4105         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4106
4107 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4108
4109         A fix for bug #404227
4110         * convert.cs: Fixed explicit array to interface cast.
4111
4112 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4113
4114         A fix for bug #403894
4115         * delegate.cs: Mutate DelegateInvocation type.
4116
4117 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4118
4119         A fix for bug #379348
4120         * delegate.cs: Box a load of generic parameters.
4121
4122 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4123
4124         * expression.cs: Add an array creation arguments mutate.
4125
4126 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4127
4128         A fix for bug #386068
4129         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4130         parameter.
4131
4132 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4133
4134         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4135         CloneTo.
4136
4137 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4138
4139         A fix for bug #403518
4140         * delegate.cs: Type correctly anonymous method new invocation.
4141
4142 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4143
4144         A fix for bug #394826
4145         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4146         calls.
4147
4148 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4149
4150         A fix for bug #394826
4151         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4152         needed.
4153
4154 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4155
4156         * class.cs: Clone indexer parameters for localized capturing.
4157
4158 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4159
4160         A fix for bug #402379
4161         * expression.cs: Don't crash when an object initializer resolve fails.
4162
4163 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4164
4165         A fix for bug #402888
4166         * expression.cs: Mutate conditional expression.
4167
4168 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4169
4170         A fix for bug #401012
4171         * class.cs: Keep StructLayout in shared container.
4172
4173 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4174
4175         A fix for bug #400438
4176         * decl.cs, class.cs: Only properties can be automatically implemented.
4177
4178 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4179
4180         * statement.cs (ChangeToIterator): Copy also labels.
4181
4182 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4183
4184         * ecore.cs: Pass type argument details to parent extension method.
4185
4186 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4187
4188         A fix for bug #375966
4189         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4190
4191 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4192
4193         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4194
4195 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4196
4197         A fix for bug #394347
4198         * anonymous.cs: Cache compatible delegates as compatibility check produces
4199         a new method every time.
4200
4201 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4202
4203         * anonymous.cs: Propagate storey reference for single references.
4204
4205 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4206
4207         A fix for bug #387615
4208         * assign.cs, expression.cs: Correctly clone compound assignment.
4209
4210 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4211
4212         A fix for bug #359611, #359604
4213         * anonymous.cs: Mutate all types of hoisted parameters.
4214
4215 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4216
4217         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4218         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4219         expression.cs, codegen.cs, statement.cs
4220         
4221         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4222         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4223         
4224         ** Anonymous methods, lambda expressions rewrite **
4225         
4226         Anonymous expressions are now resolved when an explicit block is resolved 
4227         and they don't require any registration procedure anymore. Further,
4228         anonymous methods are defined when explicit block is emitted which allows
4229         better control of whole process and opens possibilities for more
4230         optimizations as well as alternative to reverse whole process.
4231         
4232         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4233         process consistent and to correctly emit hoisted generic methods when they
4234         have at least 1 hoisted variable.
4235         
4236 2008-06-17  Martin Baulig  <martin@ximian.com>
4237
4238         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4239         iterator method.
4240         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4241         virtual property; check it in Emit().
4242         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4243         an iterator.
4244         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4245         an iterator.
4246         (Indexer.Define): Likewise.
4247
4248 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4249
4250         * convert.cs: Don't use IsInterface on type arguments.
4251         
4252         * delegate.cs: DelegateInvocation uses MethodInfo.
4253         
4254         * parameter.cs: Removed IsTypeParameter.
4255         
4256         * generic-mcs.cs: More missing stuff.
4257
4258 2008-06-16  Martin Baulig  <martin@ximian.com>
4259
4260         * modifiers.cs
4261         (Modifiers.DEBUGGER_HIDDEN): New public const.
4262
4263         * typemanager.cs
4264         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4265
4266         * class.cs
4267         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4268         (AbstractPropertyEventMethod): Likewise.
4269         (Constructor.Emit): Likewise.
4270         (SourceMethod.SetCompilerGenerated): Removed.
4271
4272         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4273         on MoveNext().
4274
4275         * anonymous.cs
4276         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4277         if we're an `IteratorHost'.
4278         (AnonymousMethodMethod..ctor): Don't set
4279         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4280         not on the method.
4281
4282 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4283
4284         * statement.cs: Clean-up foreach statements.
4285
4286 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4287
4288         * class.cs: Stop using public method which should not exist
4289         (MethodBuilder.SetGenericMethodSignature).
4290
4291 2008-06-11  Martin Baulig  <martin@ximian.com>
4292
4293         * location.cs
4294         (Location.LookupFile): Add `CompilationUnit' argument; when given
4295         a relative file name, make it relative to the directory the .cs
4296         file is located in instead of using the current directory.
4297
4298 2008-06-11  Martin Baulig  <martin@ximian.com>
4299
4300         * class.cs
4301         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4302         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4303         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4304         (SourceMethod.SetCompilerGenerated): Likewise.
4305
4306 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4307
4308         * codegen.cs, driver: Only write symbol file when it's asked for.
4309
4310 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4311
4312         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4313
4314 2008-06-10  Martin Baulig  <martin@ximian.com>
4315
4316         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4317
4318 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4319
4320         A fix for bug #316290
4321         * expression.cs: Include decimal operators in predefined table.
4322         
4323         * parameters.cs: More readonlyness.
4324
4325 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4326
4327         A fix for bug #397213
4328         * cs-parser.jay: One more missing current_local_parameters reset.
4329
4330 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4331
4332         A fix for bug #396633
4333         * class.cs: Host backing field in partial container.
4334
4335 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4336
4337         A fix for bug #397068
4338         * expression.cs: Check both operand types when predefined operator is used.
4339
4340 2008-06-05  Martin Baulig  <martin@ximian.com>
4341
4342         Merged the `debugger-kahalo' branch.
4343
4344         * class.cs
4345         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4346         we're an iterator method.
4347         (SourceMethod): Reflect latest symbol writer changes;
4348         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4349         now `start_row' and `end_row'.
4350         (Constructor.Emit): Fix the logic whether to emit symbol information.
4351
4352         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4353         generated methods.
4354
4355         * location.cs
4356         (CompilationUnit): New public class; derives from `SourceFile'.
4357         (SourceFileEntry.DefineSymbolInfo): New public method.
4358         (SourceFileEntry.SetChecksum): New public method.
4359         (Location): Encode hidden line numbers by using `column == 255';
4360         the .ctor now accepts `column == -1' to mark a hidden line number.
4361         (Location.Hidden): New public property.
4362         (Location.CheckPoint): Add `CompilationUnit'.
4363         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4364         (Location.Push): Add `CompilationUnit compile_unit' argument.
4365         (Location.CompilationUnit): New public property.
4366
4367         * statement.cs
4368         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4369
4370         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4371
4372         * driver.cs: `SourceFile' -> `CompilationUnit'.
4373
4374         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4375
4376         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4377
4378         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4379         `#line hidden'.
4380
4381         * symbolwriter.cs
4382         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4383         new symbol writer API to also pass the file.
4384
4385 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4386
4387         * statement.cs: Emit catch variable assignment using variable expression.
4388         
4389 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4390
4391         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4392         with other variable types.
4393
4394 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4395
4396         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4397         GetLength method emit, it breaks resolve rules.
4398         
4399 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4400             Marek Safar  <marek.safar@gmail.com>
4401                         
4402         A fix for bug #395542
4403         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4404         declaration.
4405         
4406 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4407
4408         A fix for bug #395287
4409         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4410
4411 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4412
4413         A fix for bug #395845
4414         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4415         non-nullable parameter type.
4416         
4417 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4418
4419         * class.cs: Handle contructor initializer as a statement in top-level block.
4420
4421 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4422
4423         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4424         security attributes.
4425
4426 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4427
4428         * ecore.cs, expression.cs: Small IVariable refactoring.
4429
4430 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4431
4432         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4433
4434 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4435
4436         * cs-parser.jay: Removed redundant catch type check.
4437
4438 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4439
4440         A fix for bug #390372
4441         * nullable.cs: Set correct return type.
4442
4443 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4444
4445         A fix for bug #391062
4446         * typemanager.cs: Fixed crash when comparing null types.
4447
4448 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4449
4450         A fix for bug #391871
4451         * cs-parser.jay: Better error handling for invalid catch type.
4452
4453 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4454
4455         A fix for bug #392155
4456         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4457
4458 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4459
4460         A fix for bug #390666
4461         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4462         expressions.
4463
4464 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4465
4466         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4467         in getter.
4468
4469 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4470
4471         A fix for bug #389625
4472         * delegate.cs, generic.cs: Some progress on method group return type
4473         inference.
4474
4475 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4476
4477         A fix for bug #378419
4478         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4479
4480 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4481
4482         * class.cs (Constructor): Added IsCompilerGenerated.
4483
4484 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4485
4486         * expression.cs: Enum binary operators can accept non-enum operand only when
4487         is implicitly convertible to underlying type.
4488
4489 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4490
4491         A fix for bug #389272
4492         * support.cs: Workaround System.InvalidOperationException for enums.
4493
4494 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4495
4496         A fix for bug #389073
4497         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4498
4499 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4500
4501         * driver.cs: Split Parse.
4502         
4503         * location.cs (LookupFile): Uses string.Empty.
4504
4505 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4506
4507         * expression.cs, parameter.cs: Small ParameterReference clean up.
4508
4509 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4510
4511         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4512         hack. Fixes #387502.
4513
4514 2008-05-06  Martin Baulig  <martin@ximian.com>
4515
4516         * class.cs (Constructor.Emit): Fix the logic whether to emit
4517         symbol information.
4518
4519 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4520
4521         Fix #385503
4522         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4523         InvalidOperationException when the iterator is before the start or
4524         after the end.
4525
4526 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4527
4528         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4529         when left is nullable type.
4530
4531 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4532
4533         A fix for bug #386628
4534         * expression.cs (LocalVariableReference): Continue in resolving when
4535         variable is not assigned.
4536
4537 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4538
4539         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4540         nullable operations.
4541
4542 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4543
4544         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4545         it saves many redundant temporary variables for nullable operations.
4546
4547 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4548
4549         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4550         
4551         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4552         method.
4553         
4554         * nullable.cs: Constant coalescing operator optimizations.
4555
4556 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4557
4558         * constant.cs: Use unsigned conversion for values which are unsigned only.
4559
4560 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4561
4562         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4563         coalescing operator as it should be.
4564
4565 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4566
4567         A fix for bug #371016
4568         * expression.cs: All predefined delegate operators require implicit method
4569         group conversion.
4570         
4571 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4572
4573         * constant.cs: Emit long constant as uint when fits the range.
4574         
4575         * convert.cs, expression.cs: Fixed few unsafe conversions.
4576
4577 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4578
4579         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4580
4581 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4582
4583         Fix #385758
4584         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4585         'expr'.
4586         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4587
4588 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4589
4590         * constant.cs, literal.cs: IsLiteral property for error reporting.
4591         
4592         * ecore.cs, expression.cs: Implemented Property expression.
4593
4594 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4595
4596         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4597         
4598         * nullable.cs: Implemented nullable coalescing null operator.
4599
4600         * ecore.cs, expression.cs: Expression trees work.
4601
4602 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4603
4604         * ecore.cs: CreateExpressionTree is finally abstract.
4605
4606         * expression.cs, linq.cs: Updated.
4607
4608 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4609
4610         * expression.cs, ecore.cs: Block base access expression inside expression
4611         tree.
4612
4613 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4614
4615         A fix for bug #385058
4616         * expression.cs: User-defined operator implementations always take
4617         precedence over predefined operator implementations.
4618
4619 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4620
4621         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4622         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4623         expression tree conversions.
4624         
4625 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4626
4627         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4628         operators method details to Operator class.
4629
4630 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4631
4632         * anonymous.cs: Pass unsafe flags to anonymous container.
4633         
4634         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4635         inside expression tree.
4636
4637 2008-04-29  Martin Baulig  <martin@ximian.com>
4638
4639         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4640         (Tokenizer.PopPosition): Also restore the `line'.
4641
4642 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4643
4644         * delegate.cs: Implemented Invoke expression.
4645
4646 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4647
4648         * expression.cs: Fixed equality reference comparison regression.
4649
4650 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4651
4652         * ecore.cs: Clean up EmptyCast hack.
4653         
4654         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4655         using correct conversion rules. Also fixes #383993.
4656
4657 2008-04-28  Martin Baulig  <martin@ximian.com>
4658
4659         * class.cs (Constructor.Emit): Don't emit debugging information
4660         for generated default .ctor's.
4661
4662 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4663
4664         * convert.cs: Empty-cast ushort to int conversion.
4665
4666 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4667
4668         A fix for bug #384191
4669         * ecore.cs, expression.cs: Fixed expression cloning.
4670
4671 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4672
4673         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4674
4675 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4676
4677         Fix #381559, test-638.cs, test-639.cs
4678         * assign.cs (CompoundAssign.Helper): New wrapper.
4679         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4680         access.
4681         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4682         Pass unconverted expressions to the params array creation expression.
4683         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4684         (PropertyExpr.EmitAssign): Likewise.
4685         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4686         element if it is of kind CompoundAssign.Helper.
4687         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
4688         first before anything else.
4689         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
4690         (ArrayAccess.LoadArrayAndArguments): Simplify.
4691
4692 2008-04-27  Marek Safar  <marek.safar@gmail.com>
4693
4694         * expression.cs: Fixed cloning of typeof(void).
4695
4696 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
4697
4698         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
4699         (Assign.Emit): Likewise.  Move it to ...
4700         (CompoundAssign.DoResolve): ... here and ...
4701         (CompoundAssign.Emit): ... here.
4702         (EventAddOrRemove): New helper to handle += and -= on events, and
4703         avoid the use of BinaryDelegates.
4704         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
4705         (EventExpr.EmitAddOrRemove): Improve.
4706         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
4707
4708         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
4709         create VarExprs for 'foo.bar.var'.
4710         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
4711         is a highly inappropriate name for its functionality.
4712
4713 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4714
4715         Simplify handling of multiple assignments
4716         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
4717         inheritable-only.
4718         (SimpleAssign): New.  Class to be used for normal assignments.
4719         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
4720         * expression.cs, parameter.cs, statement.cs: Likewise.
4721
4722 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4723
4724         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
4725         for incompatible underlying types, more to come, uff.
4726
4727 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4728
4729         Fix gtest-388.cs
4730         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
4731         Handle 'leave_copy'.
4732
4733 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4734
4735         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
4736
4737 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
4738
4739         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
4740         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
4741         * statement.cs (While, Do, For): Allow test to have side effects.
4742         (For.DoEmit): Always emit InitStatement.
4743
4744         Fix test-635.cs
4745         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
4746         Always create SideEffectConstant.
4747         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
4748         of type EnumConstant.
4749
4750         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4751         Handle 'right' being SideEffectConstant of type 'bool'.
4752
4753         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4754         Use left.EmitBranchable instead of open coding it, so as to
4755         improve optimization opportunities.
4756
4757         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
4758
4759         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
4760         assumptions.
4761         (Expression.EmitSideEffect): Document.
4762
4763 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4764
4765         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
4766
4767 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4768
4769         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
4770
4771 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4772
4773         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
4774         conversion to expression tree.
4775
4776 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4777
4778         * ecore.cs: Removed unused expression.
4779
4780 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4781
4782         * expression.cs: Implemented NegateChecked and New expressions.
4783
4784 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4785
4786         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
4787
4788 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
4789
4790         Fix #351102
4791         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
4792         needing final 'ret' instruction.
4793
4794 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4795
4796         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
4797
4798 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4799
4800         * expression.cs: Emit ldnull and not null expression as an instance argument
4801          of static method expression calls.
4802
4803 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4804
4805         A fix for bug #378200
4806         * expression.cs: Fixed crash when creating parameterless expression tree
4807         method call.
4808
4809 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4810
4811         A fix for bug #375297
4812         * anonymous.cs: Fixed crash when inferring from null argument anonymous
4813         method.
4814
4815 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4816
4817         A fix for bug #377596
4818         * decl.cs, class.cs: Emit delegate type argument attributes.
4819
4820 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4821
4822         A fix for bug #365314
4823         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
4824         
4825 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4826
4827         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
4828         only.
4829
4830 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4831
4832         * generic.cs (TypeParameter): Removed redundant location.
4833
4834 2008-04-19  Marek Safar  <marek.safar@gmail.com>
4835
4836         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
4837         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
4838         FullNamedExpression in all declaration type expression, statements will come
4839         later.
4840
4841 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4842
4843         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
4844         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
4845
4846 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4847
4848         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
4849         code.
4850
4851 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4852
4853         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
4854         constraints.
4855
4856 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4857
4858         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
4859         name expressions.
4860         Also fixes #340463.
4861
4862 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
4863
4864         Hook up 'EmitSideEffect'
4865         * constant.cs (Constant.EmitSideEffect): New.
4866         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
4867         (SideEffectConstant.EmitSideEffect): New.
4868         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
4869         unconditional branch in EmitBranchable.
4870         (FieldExpr.EmitBranchable): New.
4871         * expression.cs (Unary.EmitSideEffect): New.
4872         (Binary.EmitSideEffect): New.
4873         (VariableReference.EmitSideEffect): New.  Do nothing.
4874
4875 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4876
4877         Introduce 'EmitSideEffect'
4878         * ecore.cs (Expression.EmitSideEffect): New.
4879         (TypeCast): Rename from EmptyCast.
4880         (EmptyCast): New.
4881         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
4882         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
4883         * convert.cs, nullable.cs: Update to changes.
4884
4885 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4886
4887         * class.cs, cs-parser.jay: Early check for base types expression.
4888
4889 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4890
4891         * decl.cs (MemberName): Declare PrettyName as obsolete.
4892
4893 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4894
4895         * namespace.cs: Use MemberName comparison.
4896
4897 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4898
4899         Fix build break
4900         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
4901         FullName.
4902         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
4903         (MemberName.FullyQualifiedName): New.  Provides the functionality
4904         that users assume FullName would have.
4905         * ecore.cs, namespace.cs: Update to changes.
4906
4907         * statement.cs (Using.assign): Make into ExpressionStatement.
4908         (Using.EmitPreTryBody): Simplify.
4909
4910 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4911
4912         * report.cs: ColorFormat is protected.
4913         
4914         * rootcontext.cs: Unused fields clean-up.
4915         
4916         * namespace.cs: Made UsingEntry name private.
4917
4918 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4919
4920         * cs-tokenizer.cs, location.cs: Removed unused field.
4921
4922 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
4923             Raja R Harinath  <harinath@hurrynot.org>
4924
4925         Fix #379822
4926         * constant.cs (SideEffectConstant.value): Rename from 'left'.
4927         (SideEffectConstant.side_effect): Rename from 'right'.
4928         (SideEffectConstant..ctor): Normalize 'side_effect'.
4929         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
4930         value of this constant.
4931         * cfold.cs: Update to changes.
4932
4933 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4934
4935         * cs-paser.jay: Removed unused variable.
4936         
4937         * driver.cs: Made Compile instance method.
4938
4939 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
4940
4941         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
4942
4943 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4944
4945         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
4946
4947 2008-04-13  Jb Evain  <jbevain@novell.com>
4948
4949         * namespace.cs: update the System.Core fullname for 2.1
4950         * driver.cs: update the list of required assemblies for 2.1.
4951         Merged from the Moonlight 2 branch.
4952
4953 2008-04-11  Marek Safar  <marek.safar@gmail.com>
4954
4955         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
4956         types and user defined operators. User operators arguments has to be checked
4957         for null value before invocation, which also means no operator is called
4958         when any argument is not convertible to unwrapped nullable type.
4959         
4960 2008-04-09  Marek Safar  <marek.safar@gmail.com>
4961
4962         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
4963         of Unary expressions to follow operator overloading rules precisely.
4964         Also fixes #321794, #323794
4965         
4966 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4967
4968         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
4969         expression.
4970         
4971 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4972
4973         * expression.cs, ecore.cs: Implemented MemberInit expression.
4974         
4975 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
4976
4977         Fix mono/tests/exception4.cs
4978         * statement.cs (ExceptionStatement, TryCatch): Revert to using
4979         ec.NeedReturnLabel () rather emitting a 'nop'.
4980
4981         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
4982         simple heuristic.
4983         (TryCatch.SomeCodeFollows): Likewise.
4984         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
4985         for 'break', 'continue' and 'return' statements inside a try.
4986         We're fairly sure that the generated IL stream will have more
4987         instructions textually following the try.
4988         (FlowBranchingTryCatch): Likewise.
4989
4990         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
4991         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
4992         overrides.
4993
4994         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
4995         wrapper -- forward everything to CollectionForeach.
4996         (CollectionForeach.NonDisposableWrapper): New.
4997         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
4998         instead of a pop + branch to end.
4999
5000 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5001
5002         A fix for bug #377485
5003         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
5004         Propagate location for extension method groups. Report conversion failure at
5005         right place.
5006
5007 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5008
5009         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
5010         ListInit and Field expressions.
5011
5012 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
5013
5014         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
5015         Since $PC is always -1 inside the body of MoveNext, the fault
5016         handler is a no-op.
5017         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
5018         * statement.cs (ExceptionStatement.emit_finally): Likewise.
5019         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
5020
5021         The denouement!  Fix #324708
5022         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
5023         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
5024         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
5025         'finally' inside the finally clause.
5026
5027         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
5028         inside an iterator.  Don't emit the body of the 'finally' inside
5029         the finally clause yet.
5030
5031         Use the ResumableStatement infrastructure for MoveNext ()
5032         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
5033         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
5034         'old_resume_points'.  Move dispatcher upfront.
5035         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
5036         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
5037         in an enumerator.  This encodes the main fix in this patch series
5038         -- we can only jump into the first instruction of a try from the
5039         outside, but we want to emit try/finally regions in iterators and
5040         resume in the middle of them.
5041
5042 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
5043
5044         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
5045         of NeedReturnLabel here.
5046
5047         Introduce a common point for emitting try/finally to IL
5048         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
5049         features of the various subclasses, which are now driven by ...
5050         (ExceptionStatement.EmitPreTryBody): ... this and ...
5051         (ExceptionStatement.EmitTryBody): ... this and the original
5052         EmitFinallyBody.
5053         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
5054         Remove DoEmit and update to follow above protocol.
5055
5056         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
5057         of the dispatcher are the same, skip emitting the 'switch'.
5058         * iterator.cs (Iterator.EmitDispose): Update to changes.
5059
5060         Clean up handling of 'using' statement
5061         * statement.cs (UsingTemporary): New.  Carved out of ...
5062         (Using): ... this.  Simplify drastically.  Handle exactly
5063         one variable.
5064         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
5065         or Using as appropriate.  If there are multiple variable declared,
5066         create nested Using statements.
5067         (resource_acquisition): Kill.
5068
5069         * statement.cs (ExceptionStatement.EmitForDispose): Use
5070         EmitFinallyBody, not EmitFinally.
5071
5072         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
5073         * iterator.cs: Update to changes.
5074
5075         Start using the ResumableStatement infrastructure
5076         * statement.cs (ResumeableStatement.PrepareForDispose): New.
5077         (ResumableStatement.EmitForDispose): New.
5078         (ExceptionStatement): Override them.
5079         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
5080         EmitForDispose to create the body of the Dispose method.  Don't
5081         use OldResumePoint.
5082
5083         * iterator.cs (Iterator.AddResumePoint): Move here from ...
5084         * statement.cs (Toplevel.AddResumePoint): ... here.
5085         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
5086         * flowanalysis.cs (FlowBranchingIterator): New.
5087         * codegen.cs (EmitContext): Update to changes.
5088
5089         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
5090         (Iterator.old_resume_points): Rename from 'resume_points'.
5091         (Iterator.MoveNextStatement): Remove unused class.
5092
5093         New infrastructure for try/finally in iterators (still unused)
5094         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5095         (FlowBranchingToplevel.AddResumePoint): Hook into
5096         ToplevelBlock.AddResumePoint.
5097         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5098         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5099         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5100         resume points and assign program-counter values.
5101         (ExceptionBlock.AddResumePoint): Collect resume points for
5102         de-muxer at the top of try block.
5103         * iterators.cs (Yield.CheckContext): Simplify.
5104         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5105
5106 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5107
5108         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5109         argument to an ExitStatement.
5110         (FlowBranchingException): Refactor saved origins code.
5111         * statement.cs (ExitStatement): Update to cahges.
5112         * iterator.cs (YieldBreak): Likewise.
5113
5114         * statement.cs (ResumableStatement): New.  Common base class for
5115         YieldReturn and ExceptionStatement.
5116         (ExitStatement): New.  Common base class for Return and YieldBreak.
5117         (Return): Update to changes.
5118         * iterator.cs (YieldBreak): Likewise.
5119         * lambda.cs (ContextualReturn): Likewise.
5120
5121         Fix #377028
5122         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5123         emit a meaningful error message.
5124
5125         Fix #324765, #319508
5126         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5127         (VariableInfo.SetAssigned): Set it.
5128         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5129         determine if CS0219 or CS0168 is appropriate.  Don't use
5130         flow-analysis information.
5131         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5132         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5133         (EmitContext.EndFlowBranching): ... this.
5134
5135 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5136
5137         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5138
5139 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5140
5141         A fix for bug #376508
5142         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5143         ImplicitConversionExists.
5144
5145 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5146
5147         * expression.cs (Binary): Added remaining binary operators to expression
5148         tree builder.
5149
5150         * nullable.cs: Optimize shift with null argument.
5151
5152 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5153
5154         Fix minor IL regression
5155         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5156         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5157         * cs-parser.jay (try_statement): Update to changes.
5158
5159         * statement.cs (TryFinally.need_exc_block): Delete.
5160         (TryFinally): Update to changes.
5161
5162         Now all ExceptionStatements are unconditional
5163         * statement.cs (CollectionForeach.DisposableWrapper): New.
5164         Extract out the try/finally code into a new wrapper.
5165         (CollectionForeach.Resolve): Use it to simplify the code.
5166
5167 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5168
5169         Start at simplifying ExceptionStatement semantics a bit
5170         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5171         * cs-parser.jay (try_statement): Update to changes.
5172         (opt_catch_clauses): Remove.
5173         * flowanalysis.cs: Update to changes.
5174         (FlowBranching.BranchingType.TryCatch): New.
5175         (FlowBranchingTryCatch): New.
5176
5177         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5178         (FlowBranching.CreateBranching): Update to changes.
5179         (FlowBranchingBlock.AddSibling): Add sanity check.
5180         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5181         Update to changes.
5182
5183         * iterators.cs (Iterator.MarkFinally): Remove.
5184         * statement.cs (ExceptionStatement): Update to changes.
5185
5186         Add support for skipping over finally blocks at runtime.  First
5187         in a series to fix #324708
5188         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5189         (Iterator.EmitMoveNext): Initialize it.
5190         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5191         branch over the body of the 'finally' clause.
5192
5193 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5194
5195         Avoid lopsided use of Foo/DoFoo names
5196         * statement.cs (ExpressionStatement.EmitFinallyBody):
5197         Rename from EmitFinally.
5198         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5199         * iterator.cs: Update to changes.
5200
5201 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5202
5203         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5204         based on UserOperatorCall. More binary nullable operators clean up.
5205
5206 2008-04-02  Martin Baulig  <martin@ximian.com>
5207
5208         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5209
5210 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5211
5212         * nullable.cs: Merge user and empty conversions when lifting expression
5213         trees.
5214         
5215         * expression.cs (StringConcat): Implemented expression tree representation.
5216
5217 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5218
5219         * nullable.cs: When lifting null literal and a user operator exists, no call 
5220         is made.
5221         
5222 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5223
5224         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5225         null.
5226
5227 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5228
5229         * nullable.cs, expression.cs: Use namespace instead heavily nested
5230         monster abstract class.
5231
5232 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5233
5234         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5235         lifting of null literal and user operators. Clean up of some temporary
5236         nullable hacks.
5237
5238 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5239
5240         Fix #368224, test-629.cs
5241         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5242         if it crossed an unwind-protect boundary.
5243         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5244         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5245         inside an unwind-protected region.
5246         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5247         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5248         'leave' instead of a 'br' if unwind-protected.
5249         (Iterator.EmitYieldBreak): Likewise.
5250
5251 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5252
5253         * driver.cs: Only define versioninfo resources if no win32 resource
5254         file was specified.
5255
5256 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5257
5258         A fix for bug #372375
5259         * convert.cs: Fixed boxing of nullable types.
5260
5261 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5262
5263         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5264         type.
5265
5266 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5267
5268         A fix for bug #374619
5269         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5270         
5271 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5272
5273         * lambda.cs: Check return type only for invocation.
5274         
5275 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5276
5277         A fix for bug #374214
5278         * ecore.cs: Correctly report argument type mismatch.
5279
5280 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5281
5282         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5283         and not rely on broken IsEnum.
5284
5285 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5286
5287         * nullable.cs: New file, extracted from generic.cs.
5288         
5289         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5290
5291 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5292
5293         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5294         predefined comparison operators and null literals.
5295         
5296         * report.cs: New warning ID.
5297         
5298 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5299
5300         A fix for bug #370577
5301         * lambda.cs: Check return type too.
5302
5303 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5304
5305         A fix for bug #372846
5306         * class.cs: Automatic properties can be declared as unsafe.
5307
5308 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5309
5310         * location.cs: Use string based concatenation.
5311         
5312         * expression.cs: LiftedBinaryOperator is gmcs only.
5313         
5314 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5315
5316         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5317         conversions rules and expression trees.
5318
5319 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5320
5321         * delegate.cs: Use extension method source as delegate target.
5322
5323 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5324
5325         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5326         binary operations to be purely based on binary operations and optimized
5327         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5328         and other ET refactoring.
5329         
5330         * typemanager.cs: Fixed warning.
5331         
5332 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5333
5334         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5335         
5336         * symbolwriter.cs: Fixed.
5337
5338 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5339
5340         * anonymous.cs, driver.cs: Reset anonymous types counters.
5341
5342 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5343
5344         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5345         
5346         * class.cs: Use fullname for all type member definitions.
5347         
5348 2008-02-19  Martin Baulig  <martin@ximian.com>
5349
5350         * class.cs
5351         (IMethodData.EmitExtraSymbolInfo): New interface method.
5352         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5353         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5354         interface method here as an empty public virtual method.
5355
5356         * anonymous.cs
5357         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5358         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5359         CodeGen.SymbolWriter.SetRealMethodName().       
5360
5361 2008-02-18  Martin Baulig  <martin@ximian.com>
5362
5363         * anonymous.cs
5364         (ScopeInfo.EmitType): Override this and emit debugging
5365         information for captured variables.
5366         (RootScopeInfo.EmitType): Override this and emit symbol
5367         information for a captured `this'.
5368
5369 2008-02-15  Martin Baulig  <martin@ximian.com>
5370
5371         * iterators.cs: Emit debugging info.
5372
5373         * codegen.cs
5374         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5375         (EmitContext.OmitDebuggingInfo): New public property.
5376
5377         * statement.cs
5378         (While): Override Emit() and don't emit symbol info there; do it
5379         inside DoEmit() instead.
5380         (Block.Emit): Omit symbol information while emitting the scope
5381         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5382         block logic.
5383         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5384         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5385         .ctor to make `IsIterator' work.
5386
5387 2008-03-14  Martin Baulig  <martin@ximian.com>
5388
5389         * symbolwriter.cs: Added the new symbol writer function from the
5390         debugger's `terrania' branch; temporarily enclose them inside
5391         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5392         my vacations.
5393
5394 2008-03-14  Martin Baulig  <martin@ximian.com>
5395
5396         * symbolwriter.cs
5397         (SymbolWriter): Make this a public static class.
5398
5399         * codegen.cs
5400         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5401         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5402
5403 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5404
5405         A fix for bug #370577
5406         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5407         return type.
5408         
5409 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5410
5411         * typemanager.cs (CSharpName): Made 250 times faster.
5412
5413 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5414
5415         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5416         
5417 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5418
5419         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5420         crash when predefined field does not exist.
5421         
5422 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5423
5424         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5425         
5426 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5427
5428         * class.cs (FixedField): Don't crash when contructors are missing.
5429
5430 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5431
5432         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5433         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5434         check internal types accessibility for internal and external types.
5435         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5436
5437 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5438
5439         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5440         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5441         attribute.cs, statement: Use corect instance of predefined types (work
5442         related to #364674).
5443
5444 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5445
5446         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5447         
5448 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5449
5450         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5451         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5452         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5453         predefined types clean up, delayed predefined types members initialization
5454         (work related to #364674).
5455
5456 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5457
5458         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5459         
5460 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5461
5462         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5463         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5464         predefined types clean up (work related to #364674).
5465
5466 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5467
5468         * ecore.cs: Print an error message instead of throwing exception.
5469         
5470 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5471
5472         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5473         expression.cs, statement.cs: Unififed null literal representation.
5474
5475 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5476
5477         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5478         expression.cs: Refactored binary operators resolve phase and improved speed.
5479         The nullable code is still missing and won't work correctly, more fixes
5480         required.
5481
5482         It also fixes #323726, #324312, #324248, and many other unreported issues.
5483
5484 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5485
5486         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5487         instead of 'gmcs'.
5488
5489 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5490
5491         * ecore.cs: Clean-up and split BetterConversion.
5492         
5493 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5494
5495         Fix #363791
5496         * enum.cs (EnumMember.Value): Only access 'value' if
5497         ResolveValue says it's ok.
5498         (EnumMember.DoResolveValue): Don't set prev_member.value.
5499         (Enum.GetDefinition): Reverse arguments of Equals --
5500         EnumMember.Value can return 'null'.
5501
5502         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5503
5504 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5505
5506         * generic.cs, expression.cs: More ongoing work on expression trees.
5507         
5508 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5509
5510         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5511         handle missing matches when mutiple operators exist.
5512         
5513 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5514
5515         A fix for bug #363218
5516         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5517         initializers.
5518         
5519 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5520
5521         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5522         update. This time to deal correctly with SideEffectConstant expression used
5523         as an argument for another constant folding.
5524
5525 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5526
5527         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5528         MethodBuilder.
5529
5530 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5531
5532         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5533
5534 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5535
5536         A fix for bug #328136
5537         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5538         side is a false constant, because we still need to evaluate the right-hand
5539         side.
5540
5541         * statement.cs (If): Emit two types of boolean constants (simple constant,
5542         side-effect constant).
5543
5544 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5545
5546         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5547
5548         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5549         constants.
5550
5551 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5552
5553         A fix for bug #361457
5554         * ecore.cs (IsApplicable): Params methods have lower priority.
5555
5556         * support.cs: Return correct parameter modifier for params types.
5557
5558 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5559
5560         * generic.cs (TypeParameter): Cache attribute target name.
5561
5562         * support.cs: Removed unused variable.
5563
5564         * typemanager.cs: Removed debugging leftover.
5565
5566         * ecore.cs: Use local type instead of a property;
5567
5568         * class.cs (VerifyMembers): Consider also parent to test whether type member
5569         is local or public.
5570
5571         * expression.cs (FullMethodDesc): Removed.
5572
5573         * attribute.cs (IsValidArgumentType): Made static.
5574
5575 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5576
5577         Cleanup to be more readable.
5578         * Makefile (GMCS_PROFILE): Remove.
5579         (COMPILER_NAME): New helper.
5580
5581 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5582
5583         * cs-tokenizer.cs: if a conditional expression happens inside a
5584         (...) this also means that we do not need to de-ambiguate between
5585         an parenthesized expression and a cast.
5586
5587         Fixes 346484.
5588
5589         * constant.cs (SideEffectConstant): a constant value that happens
5590         to have a side effect.
5591
5592         Fixes the build regressions introduced by the fix for #359789
5593
5594 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5595
5596         * expression.cs (Conditional.Emit): when emitting the ternary
5597         operator, use local variables to generate code verifiable code.
5598
5599         The verifier cannot infer that the type on stack before the
5600         stloc.0 is executed is of type ParentB. This happens because the
5601         stack merge algorithm uses only parent types when deciding which
5602         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5603         335.
5604
5605         This code compiled with mcs is not verifiable under MS. The MS
5606         verifier picks the first common interface of Foo and Bar, which is
5607         wrong, but doesn't use a full join type of the 2 interfaces.
5608
5609         CSC uses a clever hack to compile such code in a verifiable
5610         way. It stores the intermediate values in a local variable with
5611         the expected type.
5612
5613         Fixes: #358102
5614
5615 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5616
5617         * expression.cs: Do not fold BitwiseAnd operators when the left
5618         side is a false constant, because we still need to evaluate the
5619         right-hand side.
5620
5621         Fixes #359789
5622
5623         * support.cs: Instead of throwing an InternalErrorException when
5624         the position of the stream is outside the boundary of our buffer,
5625         reset the state of the reader, and restart the reading from the
5626         beginning of the file.
5627
5628 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5629
5630         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5631
5632 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5633
5634         A fix for bug #361686
5635         * decl.cs: A protected types used inside a private class which parents
5636         derives from the protected class are accessible.
5637
5638 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5639
5640         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5641         the parameterless constructor.
5642
5643 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5644
5645         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5646         lookup methods to use standard member cache when doing member lookup.
5647
5648 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5649
5650         * driver.cs: Don't report full path for referenced module as assembly error.
5651
5652 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5653
5654         * Makefile: Fixed `qh' target to work on all machines.
5655
5656         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5657         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5658         and HasElementType with TypeManager implementation.
5659
5660 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5661
5662         A fix for bugs #325134, #359749
5663         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5664         first binds point to non-method member expression.
5665
5666 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5667
5668         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5669
5670 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5671
5672         A fix for bugs #321394, #323028
5673         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5674         Reworked naive IsAccessibleAs implementation to handle nested types.
5675
5676 2008-02-05  Jb Evain  <jbevain@novell.com>
5677
5678         * class.cs: use generic type comparison for parameters
5679         as well.
5680
5681 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5682
5683         A fix for bug #325372
5684         * class.cs: Use generic type comparison when testing method signatures.
5685
5686 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5687
5688         A fix for bug #357047
5689         * ecore.cs: Applied C# 3.0 changes to better conversion.
5690
5691 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5692
5693         A fix for bug #358374
5694         * cs-parser.jay: Correctly set modifiers for all constructor types.
5695
5696 2008-02-04  Marek Safar  <marek.safar@gmail.com>
5697
5698         A fix for bug #355251
5699         * generic.cs: Added base class constraint based type inference.
5700
5701 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5702
5703         A fix for bug #357255
5704         * decl.cs: One more missing visibility check.
5705
5706 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5707
5708         * support.cs: Fixed broken return.
5709
5710 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5711
5712         * report.cs: Correctly reset warnings count after probing.
5713
5714 2008-01-25  Martin Baulig  <martin@ximian.com>
5715
5716         * namespace.cs
5717         (NamespaceEntry.SymbolFileID): Make this work again after
5718         MemberName.ToString() is gone.
5719
5720 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5721
5722         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
5723         expressions.
5724
5725 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5726
5727         * generic.cs: Use full implicit conversion for type inference fixing.
5728
5729 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5730
5731         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
5732         Fixed user operator conversions.
5733
5734 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5735
5736         * generic.cs: Do nullable type to null comparison optimization during
5737         resolve phase.
5738
5739 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5740
5741         A fix for bug #355163
5742         * generic.cs: Enabled l-value resolve on nullable expressions.
5743
5744 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5745
5746         A fix for bug #353986
5747         * class.cs: Ingore static ctors with parameters for any further checks.
5748
5749 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5750
5751         A fix for bug #354310
5752         * namespace.cs: Removed redundant check.
5753
5754 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5755
5756         A fix for bug #354928
5757         * expression.cs: ElementInitializers can be resolved only once.
5758
5759 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5760
5761         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
5762         Condition expressions.
5763
5764 2008-01-23  Marek Safar  <marek.safar@gmail.com>
5765
5766         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
5767
5768 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5769
5770         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
5771         not allowed.
5772
5773         * generic.cs: Implemented coalesce expression.
5774
5775 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5776
5777         A fix for bug #355145
5778         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
5779         expression tree type inference.
5780
5781 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
5782
5783         Fix #354663
5784         * expression.cs (Binary.IsUnsignedType): Fix typo.
5785
5786 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5787
5788         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
5789
5790 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5791
5792         A fix for bug #355161
5793         * ecore.cs, expression.cs: Wider range of extension method supported
5794         expressions.
5795
5796 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
5797
5798         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
5799         AssemblyBuilder to operate in compiler context. Fixes mcs part of
5800         bug #354970.
5801
5802 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5803
5804         A fix for bug #355148
5805         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
5806
5807 2008-01-22  Miguel de Icaza  <miguel@novell.com>
5808
5809         * expression.cs (CreateExpressionTree): Add support for or and
5810         logical or, and indent following the coding conventions.
5811
5812         * typemanager.cs (LinqExpression): renamed from
5813         ExpressionTreeManager, for a shorter name.
5814
5815         Use TypeManager.CoreLookupType to lookup types from our core
5816         assemblies and turn those into "Type" variables.
5817
5818         Consumers that previously used "Namespace" and "Type" from this
5819         class should instead use the TypeExpression which is a type that
5820         is fully resolved (without involving the regular C# resolution
5821         rules). 
5822
5823         This typically looks like this:
5824
5825         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
5826         new MemberAccess (texpr, name, type_arguments, loc)
5827
5828         This avoids the problem in: #355178
5829
5830 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5831
5832         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
5833         feature in parser only as we do in other cases.
5834         
5835 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5836
5837         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
5838         typemanager.cs: A refactoring of params arguments to reuse existing
5839         expressions (params -> array initializer) to emit params argument instead
5840         of specialized handling.
5841         It was required by expression tree implementation and it has other benefits
5842         as well, we now apply same optimization for params arguments as we do for
5843         array initializers.
5844         
5845 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5846
5847         A fix for bug #353526
5848         * generic.cs: A type inference of params arguments may not required any
5849         temporary array creation.
5850         
5851 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5852
5853         A fix for bug #353534
5854         * generic.cs, ecore.cs, expression.cs: A method group type inference is
5855         supported for delegates only.
5856         
5857 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5858
5859         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
5860         type for more than 1 candidates.
5861         
5862 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5863
5864         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
5865         expressions.
5866         
5867 2008-01-16  Marek Safar  <marek.safar@gmail.com>
5868
5869         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
5870         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
5871         operator) expressions. 
5872                 
5873 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5874
5875         * statement.cs: Avoid declaring an IL variable for this_variable since it is
5876         not accessed from the generated IL.
5877
5878 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5879
5880         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
5881         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
5882         statement.cs: The first expression tree implementation drop, mostly
5883         infrastructure work.
5884
5885 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5886
5887         * ecore.cs (IsNestedChild): Refactored.
5888
5889 2008-01-11  Marek Safar  <marek.safar@gmail.com>
5890
5891         * lambda.cs: Don't use a cast on unknown expression statement.
5892
5893 2008-01-10  Geoff Norton  <gnorton@novell.com>
5894
5895         * cs-tokenizer.cs: One more token to distinguish between method and lambda
5896         arguments
5897
5898 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5899
5900         * doc.cs: Report better /doc crash details.
5901         
5902 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5903
5904         A fix for bug #352536
5905         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
5906
5907 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5908
5909         A fix for bug #352287
5910         * ecore.cs, expression.cs: Do `this' access checking in all member access
5911         expressions.
5912         
5913 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5914
5915         * rootcontext.cs, driver.cs: Switch to linq mode by default.
5916         
5917         * report.cs: Reset message stacks.
5918         
5919 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5920
5921         * generic.cs (InferInPhases): Correctly calculate params position.
5922         
5923 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5924
5925         * cs-tokenizer.cs: No need to parse full string when parsing lambda
5926         arguments.
5927
5928 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5929
5930         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
5931         
5932         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
5933         
5934         * driver.cs: Updated --help option.
5935         
5936 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5937
5938         * generic.cs (InferParamsTypeArguments): Removed.
5939         (InferInPhases): Add params type inference.
5940         (LowerBoundInference): Fixed scoring mechanism.
5941         
5942         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
5943         
5944 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
5945
5946         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
5947         byte array for unsigned "baked" assemblies.
5948
5949 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
5950
5951         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
5952         array for assemblies that are not strongnamed.
5953
5954 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5955
5956         A fix for bug #351481
5957         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
5958         declaring type for nested generic types.
5959         
5960 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5961
5962         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
5963         instead of ToString.
5964         
5965 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5966
5967         A fix for bug #351047
5968         * expression.cs (Binary.ResolveOperator): Allow equality operators between
5969         null and structs only when equality and inequality operators are defined
5970         either as an user-operators or predefined operators.
5971         
5972 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5973
5974         A fix for bug #351047
5975         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
5976         
5977 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5978
5979         A fix for bug #351257
5980         * cs-tokenizer.cs: Advance line number for '\r' correctly.
5981         
5982 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5983
5984         A fix for bug #351157
5985         * class.cs (Using): Fixed yet another broken cloning.
5986         
5987         (Block): Put back more sensible default value for statements.
5988         
5989 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
5990
5991         * codegen.cs: Allow AssemblyVersion with only major version component.
5992         Fixes bug #351055.
5993
5994 2007-12-29  Marek Safar  <marek.safar@gmail.com>
5995
5996         A fix for bug #324654
5997         * class.cs: Use FullName property as member name.
5998
5999 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6000
6001         A fix for bug #342117
6002         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
6003         constructor constraint.
6004
6005 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6006
6007         A fix for bug #338273
6008         * class.cs (ProbertyBase): Access modifier checks are required for overrides
6009         only.
6010
6011 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6012
6013         A fix for bug #350839
6014         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
6015
6016 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6017
6018         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6019         GHOP:
6020         
6021         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6022
6023         * statement.cs: Changed some Hashtables to use HybridDictionaries
6024         instead. It was observed that some HashTables only contained a few
6025         items in the vast majority of cases. Since HybridDictionary is
6026         more efficient on small sets (<10 elements), "known_variables"
6027         from class ExplicitBlock as well as "labels" and "constants " from
6028         class Block were changed to HybridDictionaries. 
6029
6030         Atsai results: (56216kb->54987kb)
6031
6032         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
6033
6034
6035 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6036
6037         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6038         GHOP:
6039         
6040         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6041         
6042         * expression.cs: foreach loop to for loop, saved on allocation of
6043         enumerator (59333kb->59141kb)
6044
6045         * statement.cs. Changed foreach loops to for loops, saved on
6046         allocation of enumerator (59141kb->59006kb)
6047
6048         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
6049         when constructed with no specified capacity. This was causing a
6050         few ArrayLists to allocate more memory than they would potentially
6051         need in the Block class and MemberCache class. Setting the
6052         ArrayLists to construct with a capacity of 1 saves some
6053         memory. (56216kb->55585kb)
6054
6055 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6056
6057         A fix for bug #347189 (2nd issue)
6058         * expression.cs (MemberAccess): Nested type can be found in base non-generic
6059         type.
6060
6061 2007-12-27  Miguel de Icaza  <miguel@novell.com>
6062         
6063         * report.cs: Do not use colors if stdout and stderr are not a
6064         terminal.
6065
6066 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6067
6068         A fix for bug #346998
6069         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
6070         overloads.
6071
6072 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6073
6074         A fix for bug #343465
6075         * class.cs: Explicit method name for nested types uses dots only.
6076
6077 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6078
6079         A fix for bug #343707
6080         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
6081
6082 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6083
6084         * ecore.cs: Report type inference errors only when arguments count matches
6085         parameter count.
6086         
6087         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
6088         
6089         * expression.cs, report.cs: New warning.
6090         
6091         * typemanager.cs: Catch anonymous method type too.
6092
6093 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6094
6095         A fix for bug #346379
6096         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6097
6098 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6099
6100         A fix for bug #347359
6101         * expression.cs (Invocation): Don't resolve already resolved expression.
6102
6103 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6104
6105         A fix for bug #347189
6106         * class.cs (FixedField): Use non-dependent code only in the define phase.
6107
6108 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6109
6110         A fix for bug #348076
6111         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6112
6113 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6114
6115         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6116         discovered extension methods.
6117
6118 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6119
6120         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6121         method.
6122
6123 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6124
6125         * report.cs (ErrorMessage): Add support for using colors on
6126         terminals that support it. 
6127
6128 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6129
6130         * ecore.cs: Use information about expanded params for error reporting.
6131
6132 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6133
6134         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6135         and logic for params overloads.
6136         
6137 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6138
6139         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6140         as this is also created from the parser.  Fixes #349034
6141
6142 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6143
6144         * statement.cs (Throw.CloneTo): it is valid to have empty
6145         expressions for throw. 
6146
6147 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6148
6149         * cs-parser.jay: Set delegate constraint parsing region correctly.
6150
6151 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6152
6153         A fix for bug #345467
6154         * typemanager.cs (IsEqual): Compare generic parameters position only.
6155         
6156 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6157
6158         * expression.cs (BaseAccess): Type arguments can be null.
6159
6160 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6161
6162         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6163         consistent even when an error has occured.
6164         (Switch.Resolve): Likewise.
6165
6166 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6167
6168         A fix for bug #334505
6169         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6170         overrides.
6171         
6172 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6173
6174         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6175         refactorings required to resolve extension methods correctly when mixing
6176         generics and non-generics members.
6177         
6178 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6179
6180         A fix for bug #342584
6181         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6182         conversion.
6183         
6184 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6185
6186         A fix for bug #342512
6187         * delegate.cs: Use delegate argument expression when is available. Don't
6188         emit virtual call when class is sealed.
6189         
6190 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6191
6192         A fix for bug #325423
6193         * assign.cs (FieldInitializer): Use resolved expression for emit.
6194         
6195         * class.cs: Print less confusing error message.
6196         
6197 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6198
6199         * cs-tokenizer.cs: Removed GMCS ifdefs.
6200         
6201         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6202         mcs.
6203         
6204         * cs-parser.jay: Disabled nullable check.
6205         
6206         * generic-mcs: Copied more generic stuff.
6207                 
6208 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6209
6210         * gcs-parser.jay: Merged to cs-parser.jay.
6211         
6212         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6213         * *.csproj, *.sources: Updated to use only jay parser file.
6214
6215 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6216
6217         * gcs-parser.jay: Added nullable and default expression feature checks.
6218         
6219 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6220
6221         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6222         it fixes many TODOs and hidden bugs.
6223         
6224         * expression: Removed duplicate error check.
6225
6226 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6227
6228         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6229         implicitly type local variable only when it is used in a declaration.
6230
6231 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6232
6233         * attribute.cs: Use CS0612 for empty strings.
6234
6235 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6236
6237         * lambda.cs, statement.cs: Contextual return may act as a statement.
6238
6239 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6240
6241         A fix for a regression cause by #324222
6242         * class.cs: Don't report unused even when it implements an interface.
6243         
6244 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6245
6246         A fix for bug #341205
6247         * ecore.cs, expression.cs: Method group expression cannot do static
6248         method access with an instance reference check before overloading takes
6249         a place.
6250         
6251 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6252
6253         A fix for bug #325359
6254         * class.cs: Use predictable name for automatically generated property.
6255         
6256 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6257
6258         A fix for bug #324996
6259         * expression.cs (Is): Handle case where D is nullable and T is not
6260         correctly.
6261         
6262         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6263         
6264 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6265
6266         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6267         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6268         Flush small error reporting changes.
6269         
6270 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6271
6272         A fix for bug #324996
6273         * expression.cs: Rewrote Is expression implementation to work with
6274         generics, nullable types, anonymous method. A const result expression 
6275         uses existing infrastructure instead of custom not fully-featured one.
6276         
6277 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6278
6279         A fix for bug #340202
6280         * class.cs: Consider generics for volatile field.
6281
6282 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6283
6284         A fix for bug #335594
6285         * expression.cs: Use conversion rules when handling string addition.
6286         
6287 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6288
6289         A fix for bug #336651
6290         * expression.cs: Fixed a crash when probing is on.
6291         
6292 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6293
6294         A fix for bug #324242
6295         * covert.cs: Added a conversion from any nullable-type with an 
6296         underlying enum-type to the type System.Enum.
6297         
6298 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6299
6300         A fix for bug #324222
6301         * class.cs: Report all non-used event fields.
6302         
6303 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6304
6305         A fix for bug #325161
6306         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6307         qualifier for generic types.
6308         
6309 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6310
6311         A fix for bug #322971
6312         * expression.cs, ecore.cs: Added intermediate result value check for
6313         indexers. 
6314         
6315 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6316
6317         A fix for bug #324754
6318         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6319         when it was requested.
6320
6321 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6322
6323         A fix for bug #325101
6324         * expression.cs: Do type not value comparison for `is' expression.
6325
6326 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6327
6328         A fix for bug #320236
6329         * convert.cs: Don't apply user conversion on underlying target type.
6330
6331 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6332
6333         * expression.cs: Don't use unresolved expression for error reporting.
6334  
6335 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6336
6337         A fix for bugs #337712, #324490
6338         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6339         overloading resolution too.
6340         
6341         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6342         the process consistent and more robust.
6343         
6344         * expression.cs, linq.cs, report.cs: Update.
6345
6346 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6347
6348         A fix for bug #332909
6349         * attribute.cs: Resolve attributes in correct context using error
6350         handling procedure.
6351         
6352         * rootcontext.cs: Define Obsolete attribute members as core members.
6353         
6354 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6355
6356         * statement.cs: Removed unused methods.
6357         
6358 2007-10-31  Wade Berrier  <wberrier@novell.com>
6359
6360         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6361         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6362         during 'make dist')
6363
6364 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6365
6366         A fix for bug #338102
6367         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6368         methods registered as non-generics.
6369         
6370 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6371
6372         A fix for bugs #337712, #324490
6373         * delegate.cs: Delegate covariance and contravariance is not allowed for
6374         value types.
6375         
6376 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6377
6378         A fix for bug #337719 
6379         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6380         `from' keyword.
6381         
6382 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6383  
6384         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6385
6386 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6387  
6388         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6389         query expressions.
6390
6391 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6392
6393         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6394
6395 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6396  
6397         A fix for bug #334652
6398         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6399         extension methods when we have not found the best candidate in normal
6400         container.
6401
6402 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6403
6404         * AssemblyInfo.cs: Keep up-to-date.
6405
6406 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6407
6408         * Makefile: Fixed generics compiler name.
6409         
6410 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6411
6412         * lambda.test: removed, lambda parsing is done differently.
6413         
6414         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6415
6416 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6417
6418         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6419
6420 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6421
6422         * Makefile, *.sources : All C# compilers are in mcs folder.
6423         
6424         * *.cs: Use existing 2_1 define for smcs.
6425
6426 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6427
6428         A fix for bug #335847
6429         * assign.cs, expression.cs: Couple of changes to avoid creating a
6430         temporary variable for each object initializer assignment statement. It
6431         simplifies struct initialization too, otherwise two temporary variables
6432         would be required.
6433         Implemented optimization of redundant default element initializers.
6434         
6435 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6436
6437         A fix for bug #336766
6438         * expression.cs (Class.CheckBase): Use generic name when method is
6439         generic.
6440         
6441 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6442
6443         A fix for bug #334737
6444         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6445         variable and not variable argument for prepared copies.
6446
6447 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6448
6449         A fix for bug #325110
6450         * class.cs, expression.cs, attribute.cs: Use open generic method when
6451         checking conditional attribute.
6452         
6453 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6454
6455         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6456         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6457         FeatureIsNotAvailable.
6458
6459 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6460
6461         ** C# 3.0 Partial methods
6462         
6463         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6464         methods support. Because of member cache issue with generics only
6465         non-generics partial methods are fully supported.
6466         
6467 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6468         
6469         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6470         generics and to use member cache for member checking. It also improves
6471         performance and fixes remaining overloads issues.
6472         
6473 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6474         
6475         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6476         roottypes.cs, typemanager.cs:
6477                 
6478         A member cache creation logic changed to add members immediately and
6479         not rely on fallback. The member cache is now only prefered way
6480         how to access and find type declaration members. It saves 5 MB of memory
6481         during MWF compilation and makes code ready for more optimizations and
6482         clean-ups, it's also a pre-requirement for partial methods.
6483         
6484 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6485
6486         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6487         handling for generic parameters.
6488
6489 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6490         
6491         * class.cs (FixedField): Removed redundant volatile check.
6492         
6493 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6494         
6495         * class.cs, decl.cs: Fixed overload members verification to do only one
6496         check per possible collision.
6497         
6498 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6499         
6500         A fix for bug #325478
6501         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6502         and create only one disposable flags container.
6503         
6504 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6505         
6506         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6507         * statement.cs (Fixed): Fixed variables cloning.
6508         
6509 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6510         
6511         A fix for bug #333342
6512         * class.cs (EventField): Don't mark value type event as synchronized. 
6513         
6514 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6515         
6516         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6517         inference to identify best candidate method correctly.
6518         (ProperyExpr): A range variable is read only and cannot be modified.
6519         
6520 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6521         
6522         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6523         logic to identify best candidate method correctly.
6524         
6525 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6526         
6527         * location.cs (Equals, GetHashCode): Removed.
6528         
6529 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6530         
6531         * report.cs: Implemented message recorder. It is used mainly for lambda
6532         expressions to capture otherwise swallowed error messages.
6533         
6534         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6535
6536         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6537         and not at the top.
6538         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6539                 
6540         * expression.cs (MemberAccess): Always report lookup failure.
6541         
6542         * location.cs: Implemented Equals, GetHashCode.
6543         
6544         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6545         
6546 2007-10-10  Jb Evain  <jbevain@novell.com>
6547
6548         * codegen.cs: re-enable assembly version check.
6549
6550 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6551         
6552         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6553         checks.
6554         
6555         * namespace.cs (UsingAlias): Do correct version check.
6556         
6557 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6558         
6559         * expresison.cs, ecore.cs: Issue extension method error message when
6560         appropriate.
6561         
6562         * rootcontext.cs: Added ISO_2 compiler mode option.
6563
6564 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6565         
6566         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6567          message.
6568         
6569 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6570         
6571         * attribute.cs (GetString, GetBoolean): Work with both literal and
6572         constant.
6573         
6574         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6575         Moved method overload specific methods to MethodGroupExpr.
6576         
6577         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6578         it should be less memory consuming.
6579         
6580 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6581
6582         * codegen.cs: remove the assembly version check until the buildbot is
6583         fixed.
6584
6585 2007-10-07  Jb Evain  <jbevain@novell.com>
6586
6587         * attribute.cs (Attribute.GetString): if the value
6588         expression is a StringConstant, return its string value.
6589
6590 2007-10-07  Jb Evain  <jbevain@novell.com>
6591
6592         * typemanager.cs: add `assembly_version_attribute_type`.
6593         * codegen.cs: on attribute emission, check that the
6594         AssemblyVersionAttribute doesn't overflow.
6595
6596 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6597         
6598         A fix for bug #324677
6599         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6600         parent container of a scope container with currently resolved one. 
6601         
6602 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6603         
6604         A fix for bug #325534
6605         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6606         only.
6607         
6608 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6609         
6610         A fix for bug #327504
6611         * class.cs (Operator.Define): Refactored implicit and explicit user
6612         operator conversion rules.
6613         
6614 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6615         
6616         A fix for bug #327520
6617         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6618         
6619 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6620         
6621         A fix for bug #328022
6622         * class.cs (MethodData.Define): Use correct method to check whether
6623         a method implementents an accessor.
6624         
6625 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6626         
6627         A fix for bug #330069
6628         * statement.cs (Fixed.Resolve): Read the first array element only when
6629         an array is instantiated. 
6630         
6631 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6632         
6633         * expression.cs, assign.cs, generics.cs: Print correct operator when
6634         compound assignment is used.
6635         
6636 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6637         
6638         A fix for bug #325841
6639         * expression.cs (ArrayAccess): Use full argument cloning only for
6640         string compound concatenation.
6641         
6642 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6643         
6644         A fix for bug #328774
6645         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6646         assignment.
6647         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6648         assignment.
6649
6650 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6651
6652         Fix #328490
6653         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6654         Event accessibility checks here.  Remove some bogus code that
6655         accidently made GenericMethods work.
6656         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6657
6658 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6659         
6660         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6661         
6662         * statement.cs (Block): Refactored AddVariable to allow error handling
6663         customization.
6664         
6665         * generic.cs: New stub.
6666         
6667 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6668         
6669         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6670         flag.
6671         
6672 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6673
6674         * class.cs: Use partial container to record whether any partial part
6675         contains static field initializer and therefore default contructor has
6676         to be defined.
6677         
6678 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6679
6680         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6681         mono-list when only one of two partial parts has defined accessibility
6682         modifier.
6683         
6684 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6685
6686         A fix for bug #82845
6687         
6688         * class.cs (TypeContainer): Set correct resolve context for all field
6689         initializers.
6690         
6691 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6692
6693         * assign.cs: Fixed a crash when field is resolved twice with an error.
6694         
6695         * codegen.cs: Changed InFieldInitializer to be flag.
6696         
6697         * anonymous.cs, ecore.cs, expression.cs: Update after
6698         IsInFieldInitializer rename.
6699         
6700         * const.cs: Removed unused parameter.
6701         
6702         * class.cs: Changed the way how we resolve and emit field initializers.
6703         The field initilizers have to have access to contructor block to emit
6704         compiler generated code.
6705
6706 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6707
6708         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
6709         generics use TypeContainer instead.
6710         
6711 2007-09-12  Marek Safar  <marek.safar@gmail.com>
6712         
6713         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
6714
6715         * lambda.cs (ResolveParameters): Use more powerful
6716         InflateGenericArgument.
6717         
6718         * parameters.cs: Better exception message.
6719                 
6720 2007-09-10  Marek Safar  <marek.safar@gmail.com>
6721
6722         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
6723         correct expression block type. 
6724         
6725         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
6726         
6727         * expression.cs (Invocation): Extracted method group resolve to
6728         DoResolveOverload.
6729         
6730 2007-09-07  Marek Safar  <marek.safar@gmail.com>
6731
6732         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
6733         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
6734         
6735         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
6736         generic extension methods.
6737
6738 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6739
6740         A fix for bug #82676 (Do I get it right now?)
6741         * convert.cs (Binary.ResolveOperator): An interface is converted to the
6742         object before a standard conversion is applied.
6743         
6744 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6745
6746         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
6747         #82676.
6748         
6749 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6750
6751         A fix for bug #82676
6752         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
6753         non-generic interface types.
6754         
6755 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6756
6757         A fix for bug #82690
6758         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
6759         
6760 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6761
6762         A fix for bug #82571
6763         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
6764         modifier for container based methods.
6765         
6766 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6767
6768         A fix for bug #82676
6769         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
6770         any interface-type T means to any of interface type T.
6771
6772 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6773
6774         * namespace.cs: We have 2 versions of System.Core assembly.
6775
6776 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6777
6778         A fix for bug #82652
6779         * class.cs (Class.GetClassBases): Compare types and not expressions.
6780
6781 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6782
6783         A fix for bug #82620
6784         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
6785         actually never worked before.
6786         (IndexerAccess): Emit prepared arguments before they are modified.
6787         
6788 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6789
6790         A fix for bug #82563
6791         * assign.cs: Revert wrong fix.
6792         
6793         * expression.cs (VariableReference.EmitAssign): Handle ref reference
6794         correctly.
6795         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
6796         Instead of ldelema/stdind we have to use temporary variables to handle
6797         cases like String.Concat (params string[]).
6798         
6799 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6800
6801         * class.cs: EmitAttributes to Emit rename.
6802         
6803         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
6804         null.
6805         (MemberCore.HasClsCompliantAttribute): Don't depend on 
6806         GetClsCompliantAttributeValue execution.
6807         
6808 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6809
6810         * anonymous.cs: Use shorter type prefix.
6811         
6812         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
6813         when exist.
6814         
6815         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
6816         variables when probing is on.
6817         
6818         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
6819         unresolved variables.
6820         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
6821         handle transparent identifiers.
6822         
6823 2007-08-26  Marek Safar  <marek.safar@gmail.com>
6824
6825         * attribute.cs (IsClsCompliant): Add nullable types test.
6826         
6827 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
6828
6829         * doc.cs : catch other types of exception than XmlException to
6830           report CS1570. Fixed bug #82565.
6831
6832 2007-08-23  Marek Safar  <marek.safar@gmail.com>
6833
6834         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
6835         The number of delegate parameters has to match.
6836         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
6837         arrays.
6838
6839 2007-08-21  Marek Safar  <marek.safar@gmail.com>
6840
6841         * anonymous.cs (AnonymousMethod): Generate private anonymous method
6842         to fix problem with private arguments.
6843
6844 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6845
6846         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
6847         
6848         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
6849         
6850         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
6851         empty. Add cloning suport.
6852         
6853         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
6854
6855 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6856
6857         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
6858         to create EmptyCast. It handles EmptyConstantCast specialization for
6859         constants.
6860         
6861 2007-08-18  Marek Safar  <marek.safar@gmail.com>
6862
6863         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
6864         (EmitArrayArgument): One routine for array arguments.
6865         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
6866         
6867 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6868
6869         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
6870
6871 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6872
6873         * anonymous.cs: MemberLookupFinal update.
6874
6875         * class.cs (ConstructorInitializer): Is expression based.
6876         
6877         * delegate.cs: MethodGroupExpr update.
6878         
6879         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
6880         messages.
6881         (Error_MemberLookupFailed): Customizable error override.
6882         (MethodGroupExpr): Keep queried type for later usage.
6883         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
6884         resolve.
6885         
6886         * expression.cs: Error_MemberLookupFailed refactoring.
6887         (New.DoResolve): Resolve as much as possible.
6888         (ElementInitializer.Error_MemberLookupFailed): Object initializer
6889         customization for invalid member types.
6890
6891         * statement.cs: MethodGroupExpr update.
6892         
6893 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6894
6895         * modifier.cs (Check): Check all modifiers and not only accessibility
6896         ones.
6897
6898 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6899
6900         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
6901         type and not an expression.
6902
6903 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6904
6905         * statement.cs (Catch.Clone): Type and variable can be null.
6906
6907 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6908
6909         A fix for bug #81979
6910         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
6911         I am really not sure whether this is the best fix.
6912         
6913         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
6914         only once.
6915         
6916 2007-08-14  Marek Safar  <marek.safar@gmail.com>
6917
6918         ** C# 3.0 Object and collection initializers (major re-write)
6919         
6920         * assign.cs (DoResolve): Initializers are not assign related.
6921         
6922         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
6923         used during collection or object initialization.
6924         
6925         * expression.cs (Error_InvalidArguments): Add initializers specific
6926         messages. More will come later because it requires some general
6927         refactoring.
6928         (New.DoResolve): Better error handling for unsafe types.
6929         (EmptyExpressionStatement): New class.
6930         (ElementInitializer): An object initializer expression.
6931         (CollectionElementInitializer): A collection initializer expression.
6932         (CollectionOrObjectInitializers): A block of object or collection
6933         initializers.
6934         (NewInitialize): New expression with element/object initializers.
6935         
6936         * statement.cs: Reverted object/collection initializer hacks.
6937         
6938         * typemanager.cs (CSharpName): Filter __arglist type.
6939         
6940 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6941
6942         ** C# 3.0 Anonymous Types (update to the latest standard)
6943         
6944         * expression.cs (Binary.ResolveOperator): Threat all null based types
6945         same.
6946         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
6947         (AnonymousTypeParameter): Updated.
6948         
6949         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
6950         (AnonymousTypeClass): New anonymous type container.
6951         
6952         * class.cs (AddField): Return operation result.
6953         
6954         * generic.cs: Another empty TypeArguments overload.
6955         
6956         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
6957         are stored at top of normal hierarchy.
6958         
6959         * typemanager.cs (CSharpName): Filter anonymous types.
6960         
6961 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6962
6963         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
6964         as single Concat call. How could we miss that :-(
6965         
6966 2007-08-08  Marek Safar  <marek.safar@gmail.com>
6967
6968         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
6969         
6970 2007-08-07  Miguel de Icaza  <miguel@novell.com>
6971
6972         * expression.cs: Fix the previous commit, the creation of the
6973         arguments array list needs also to be conditional on the arguments
6974         not being null.
6975
6976         * class.cs: Add a little bit of help to help narrow down problems.
6977
6978         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
6979         not try to copy in that case. 
6980
6981         * driver.cs: When building SMCS, include a new different set of
6982         default assemblies here.   Do this here so we can control whether
6983         to include the default assemblies with /noconfig.
6984
6985 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6986
6987         A fix for bug #81979
6988         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
6989         only.
6990
6991 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6992
6993         A fix for bug #82300
6994
6995         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
6996         we are in probing scope.
6997
6998 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6999
7000         A fix for bug #82301
7001
7002         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
7003         (Statement.CloneTo): Clone and not map children blocks.
7004
7005 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7006
7007         A fix for bug #82299
7008
7009         * expression.cs (LocalVariableReference.CloneTo): Remap local info
7010         variable too.
7011         
7012         * statement.cs (Statement.CloneTo): Clone variables before statements
7013         to allow remaping of local variables.
7014
7015 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7016
7017         A fix for bug #82296
7018
7019         * anonymous.cs,
7020         * report.cs: Log crash details for future clone problems.
7021         
7022         * statement.cs (Return.Clone): Don't clone non-existent expression.
7023
7024 2007-08-03  Raja R Harinath  <harinath@gmail.com>
7025
7026         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
7027         (Class.AddBasesForPart): Move CS0537 check here from ...
7028         * cs-parser.jay (class_declaration): ... here.  Move calling of
7029         'AddBasesForPart' to ...
7030         (class_bases): ... here.
7031         (struct_declaration, interface_declaration): Update to changes.
7032
7033 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7034
7035         A fix for bug #81923
7036
7037         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
7038         conversion is allowed.
7039
7040 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7041
7042         A fix for bug #81564
7043
7044         * ecore.cs (EventExpr): Add IsBase handling.
7045
7046         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
7047         too.    
7048         
7049 2007-08-02  Raja R Harinath  <harinath@gmail.com>
7050
7051         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
7052         * cs-parser.jay: Some whitespace cleanups.
7053         (current_delegate): New.
7054         (type_name): New.
7055         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
7056         a dummy code block, and use 'type_name' instead of 'member_name'.
7057         (interface_declaration, class_declaration): Likewise.
7058         (delegate_declaration): Likewise.  Rearrange slightly and use
7059         'current_delegate'.
7060         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
7061         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
7062
7063 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7064
7065         A fix for bug #82039
7066
7067         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
7068         available.
7069
7070         * typemanager.cs (CSharpName): Split to string overload.
7071
7072 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7073
7074         * expression.cs,
7075         * report.cs: Updated warning CS0472.
7076
7077 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7078
7079         A fix for bug #82181
7080         * cs-parser.jay,
7081         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
7082
7083 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7084
7085         A fix for bug #82277
7086         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
7087
7088 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7089
7090         ** C# 3.0 Type Inference (major bits are working)
7091         
7092         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
7093         (.ImplicitStandardConversionExists): Uses compatible.
7094         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7095         (.InferReturnType): New method.
7096         (.Compatible): Refactored.
7097         (.ResolveParameters): Uses factory to create resolved parameters.
7098         (.CompatibleMethod): Add probing mode support.
7099         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7100         clearly distinguish between 2 different operations.
7101         (LambdaMethod): Moved to lambda.cs.
7102         (AnonymousMethod): Removed unused fields and methods.
7103         (AnonymousDelegate): Simplified.
7104         
7105         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7106         
7107         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7108         
7109         * delegate.cs (Delegate): New mehods to reduce code duplication.
7110         (.GetConstructor): New method.
7111         (.GetInvokeMethod): New method.
7112         (DelegateCreation): Updated.
7113         
7114         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7115         does not exist.
7116         (OverloadResolve): Made probing little bit faster.
7117         
7118         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7119         when probing is on.
7120         
7121         * generic.cs (TypeInferenceContext): Dummy implementation.
7122         
7123         * iterators.cs: Updated after Resolve/Define rename.
7124         
7125         * lambda.cs (LambdaExpression)
7126         (.ResolveParameters): Handles both type of arguments and type inference too.
7127         
7128         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7129         (InflateTypes): Updated.
7130         
7131         * support.cs (InflateTypes): Changed signature and updated.
7132         
7133         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7134         (MemberLookup_FindMembers): More MS tricks.
7135         (GetParameterData): Ditto.
7136         (GetDelegateParameters): Uses quick path for dynamic types.
7137         
7138 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7139
7140         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7141         only.
7142
7143 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7144
7145         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7146         syntax.
7147         
7148 2007-07-26  Jb Evain  <jbevain@novell.com>
7149
7150         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7151         which takes a boolean 'report_errors', similar to the GetMethod.
7152         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7153         in .net 2.1, do not report errors here.
7154
7155         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7156         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7157         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7158         in .net 2.1.
7159
7160         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7161         of the type InternalsVisibleToAttribute before the first call
7162         to CoreLookupType which is allowed to fail (third boolean parameter
7163         to true). Because, during the resolution for a type that is not
7164         immediately found, we try to check if the type is not defined in
7165         a friend assembly, and to do so, we need the
7166         InternalVisibleToAttribute.
7167
7168 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7169
7170         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7171         feature that allows structs to be compared against null and inline
7172         the result as true or false.
7173
7174         Notice that the same code is not permitted inside a generic block
7175         of code that would do:
7176
7177         class Foo<T> where T : struct {
7178             bool Eval (T x)
7179             {
7180                  return x == null;
7181             }
7182         }
7183
7184         It is only allowed if the type of T is not bound (no where
7185         clause).   In my opinion, this CSC 2 behavior is broken but people
7186         seem to be using it (IronRuby does, a few bug reports on bugzilla
7187         have it and some people have complained about it).
7188
7189         All of the users that depend on this behavior have code that is
7190         very likely broken. 
7191         
7192         * report.cs (Warning, Error): make these take object arguments,
7193         not strings, as that allows us to take advantage of Format.
7194
7195 2007-07-20  William Holmes  <billholmes54@gmail.com>
7196
7197         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7198           Left member variable for the Count.
7199         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7200           MemberName.CountTypeArguments to avoid a NRE. 
7201
7202         This code is contributed under the MIT X11 license
7203
7204 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7205
7206         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7207
7208 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7209
7210         * doc.cs : generic method arguments are written as ``x while generic
7211           type arguments are `x. Combined with the previous change, fixed bug
7212           #79706.
7213
7214 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7215
7216         Fix #82120
7217         * expression.cs (Binary.ResolveOperator): When converting
7218         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7219
7220 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7221
7222         * doc.cs : when T: or whatever x: is specified, it does not really
7223           check the doc comment's syntax correctness. Fixed bug #82006.
7224
7225 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7226
7227         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7228         LambdaExpression better.
7229         
7230         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7231         
7232         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7233         
7234         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7235         as it can be generated.
7236         
7237         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7238         modifiers.
7239         
7240         * lambda.cs (LambdaExpression): Refactored to share same code with
7241         AnonymousMethodExpression.
7242         
7243 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7244
7245         * anonymous.cs (MakeName): Include host name for easier debugging.
7246         (LambdaMethod): New class for lambda spcecific stuff.
7247         
7248         * attribute.cs: Set EmitContext return type.
7249
7250         * class.cs: Set EmitContext return type.
7251         
7252         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7253         with null/void meaning.
7254         
7255         * iterators.cs (ContainerType): Implemented.
7256         
7257         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7258         
7259         * statement.cs (Return): Updated to lambda expressions.
7260         (Block.CloneTo): Parent can be null.
7261                 
7262 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7263
7264         A fix for bug #81917
7265         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7266         
7267         * class.cs (FixedField): Check whether field is in unsafe scope.
7268
7269         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7270         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7271
7272         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7273         FieldExpr.
7274         
7275         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7276                 
7277 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7278
7279         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7280         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7281         from Report class.
7282
7283 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7284
7285         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7286         
7287 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7288
7289         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7290         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7291         
7292         * codegen.cs(EmitContext): Add ProbingMode flag.
7293         
7294         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7295         
7296         * driver.cs: For now set both warning values.
7297         
7298         * ecore.cs (SimpleName): Name is readonly.
7299         (MethodGroup.OverloadResolve): One quick path for probing.
7300         
7301         * expression.cs (Unary): Set Oper r/o.
7302         (Binary): Set Oper r/o.
7303         (ParameterReference): Set few instance variables as r/o.
7304         (ParameterReference.DoResolveBase): Don't capture aruments when 
7305         the probing is on.
7306         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7307         (Arglist): arguments are private.
7308         (SizeOf): type is private and r/o.
7309         (MemberAccess): arguments are private.
7310
7311         * report.cs: Enhanced reporting on/off capabilities.
7312         
7313         * lambda.cs: Uses ec.IsInProbingMode.
7314         (ContextualReturn): Derives from return.
7315         
7316         * rootcontext.cs: For now set both warning values.
7317         
7318         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7319         copy if one exists.
7320         (Return.Resolve): Don't die immediately.
7321         (Block.Resolve): Speed-up probing.
7322         (Block.CloneTo): Clone only child blocks.
7323
7324 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7325
7326         * iterators.cs: reverted Miguel's latest change (r81925) as it
7327         breaks the build in System.
7328
7329 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7330
7331         * iterators.cs (Yield.CheckContext): Check for the iterator type
7332         also here as we can call into Yield even in codepaths that are not
7333         directly checked by
7334         (MethodOrOperator is the only path that was checked).
7335
7336         In addition to the standard check, use a more specific check for
7337         constructors to report a more verbose error. 
7338
7339 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7340
7341         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7342         report the warning and continue 
7343
7344         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7345         values on the stack on the call to Emit.   Use EmitStatement if
7346         possible, or using Emit + Pop if not possible.   Fixes #82064
7347
7348 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7349
7350         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7351         avoid try...finally in some cases.
7352
7353 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7354
7355         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7356         
7357         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7358         instead of method. Re-use standard error handling.
7359         (ConstructorInitializer.Emit): Simplified.
7360         
7361         * delegate.cs: Updated after Invocation.EmitCall change.
7362         
7363         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7364         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7365         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7366         method and don't permanently changing input arguments.
7367         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7368         is resolved it has one of the candidates is the best one which is later
7369         used to emit. Removed a few unused method.
7370         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7371
7372         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7373         (Binary.ResolveOperator): Ditto.
7374         (ConditionalLogicalOperator.DoResolve): Ditto.
7375         (Invocation): Uses method group.
7376         (Invocation.DoResolve): Simplified.
7377         (Invocation.EmitCall): Removed useless is_static.
7378         (Invocation.Emit): Delegate to method group.
7379         (Invocation.EmitStatement): Simplified.
7380         (New): Uses method group.
7381         (MemberAccess.DoResolve): Don't destroy original expression.
7382         
7383         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7384         
7385 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7386
7387         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7388         
7389         * anonymous.cs,
7390         * lambda.cs: Add custom error message type.
7391
7392 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7393
7394         * lambda.cs: Simplified little bit.
7395         
7396         * parameter.cs: Introduced ImplicitLambdaParameter.
7397         (Parameters.CreateFullyResolved): New factory instead of ctor.
7398         
7399         * anonymous.cs,
7400         * class.cs,
7401         * delegate.cs: Updated parameter creation.
7402         
7403 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7404
7405         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7406         arguments.
7407         
7408         * generic.cs: Synchronized with gmcs.
7409         
7410 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7411
7412         * class.cs (Indexer): Check return type as soon as possible.
7413         
7414         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7415         members too.
7416         
7417         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7418         
7419         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7420         
7421         * parameter.cs (Parameter): Use expression type when it is available.
7422         
7423         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7424         method modifier for the first parameter only.
7425
7426 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7427
7428         A fix for bug #81938
7429         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7430         
7431         * constant.cs: Tide up an exception message.
7432
7433 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7434
7435         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7436         an uninitialized variable is used.
7437         
7438         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7439
7440 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7441
7442         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7443         not found error handling.
7444
7445         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7446         simplified.
7447         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7448         (ArrayCreation.DoResolve): Simplified.
7449         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7450         its own resolve process.
7451         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7452
7453 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7454
7455         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7456         more error details.
7457         
7458 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7459
7460         * cs-tokenizer.cs: Removed var related stuff.
7461         
7462         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7463         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7464         a type and a keyword at same time.
7465         
7466         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7467         matches to "var".
7468         
7469         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7470         implicitly typed arrays, more changes will follow.
7471         
7472         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7473         
7474 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7475
7476         * ecore.cs (VarExpr): Removed Handled field.
7477         
7478         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7479         build-in assign functionality.
7480         (ForEach.Resolve): Removed all implicitly typed local variable code and
7481         simplified.
7482         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7483         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7484
7485 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7486
7487         * assign.cs: Removed implicitly typed local variable check.
7488         
7489         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7490         referencing implicitly typed local variable.
7491         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7492         variable here.
7493         
7494         * statement.cs (Fixed): Removed unsupported implicitly typed local
7495         variable code.
7496
7497 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7498
7499         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7500
7501 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7502
7503         A fix for bugs #81855 and #76274
7504         * attribute.cs (AttachTo): Always set owner for global attributes to
7505         prefined owner.
7506         
7507         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7508         usefull too.
7509         
7510         * cs-parser.jay: Assembly and module attributes must precede all other
7511         elements except using clauses and extern alias declarations.
7512
7513 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7514
7515         A fix for bug #81748
7516         * cs-tokenizer.cs,
7517         * expression.cs: More checks for non ISO-1 features.
7518
7519 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7520
7521         A fix for bug #81807
7522         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7523         present inside switch statement and it is required by nullable check.
7524
7525 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7526
7527         A fix for bug #81840
7528         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7529         when type matching fails.
7530         
7531         * namespace.cs: Tiny error message change.
7532
7533 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7534
7535         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7536         reporting. Added automatic property check.
7537         
7538         * class.cs: Updated after CheckAbstractAndExtern relocation.
7539         (AEventPropertyAccessor.GetSignatureForError): Customized.
7540         
7541 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7542
7543         * class.cs (DefineBaseTypes): Base type can be undefined.
7544         
7545         * ecore.cs (TypeLookup): Minor refactoring.
7546         (DoResolveAsTypeStep): Removed redundant check.
7547
7548         * namespace.cs (Lookup): Removed redundant check.
7549                 
7550         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7551         ResolveAsTypeTerminal step.
7552         (BootstrapCorlib_*): Simplified.
7553         (PopulateCoreType): Core types can be now external.
7554
7555 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7556
7557         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7558          verification only.
7559          (InferTypeArguments): Infers anonymous expression type arguments.
7560          (Compatible): Split to Compatible and InferTypeArguments. 
7561         
7562         * lambda.cs: Updated.
7563
7564 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7565
7566         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7567
7568 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7569
7570         Fix #80477, cs0135-2.cs, cs0135-3.cs
7571         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7572         names to the "known" variables list.
7573         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7574         parameter names are also "known".
7575         (Block.CheckError136): Remove.
7576         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7577         null.
7578
7579 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7580
7581         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7582
7583 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7584
7585         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7586         internal error not an user error.
7587          
7588         * expression.cs (IsApplicable): Refactored to make debugging easier.
7589
7590         * support.cs: More tricks for non-mono runtimes.
7591         
7592         * typemanager.cs (CoreLookupType): Made public.
7593         (InitSystemCore): All linq specific stuff moved to linq.cs
7594
7595 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7596
7597         * typemanager.cs (CSharpSignature): One more missing build-in types
7598         replacement.
7599         More tricks for non-mono runtime.
7600
7601 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7602
7603         * statement.cs (Block.CheckError136_InParents): Remove.
7604         (Block.AddVariable): Use GetParameterInfo instead.
7605         (ToplevelBlock.ProcessArguments): Likewise.
7606
7607 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7608
7609         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7610         information too.
7611         (ToplevelBlock.GetParameterInfo): Split out of ...
7612         (ToplevelBlock.GetParameterRefernce): ... this.
7613         (ToplevelBlock.ParameterMap): Remove.
7614         * expression.cs (ParameterReference): Update to use
7615         ToplevelParameterInfo.
7616
7617         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7618         regression.
7619
7620         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7621         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7622
7623         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7624         (ToplevelBlock.ProcessParameters) ... here.
7625         (ToplevelBlock..ctor): Invoke it.
7626
7627         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7628         new parameters.
7629
7630         * statement.cs (IKnownVariable): New interface.
7631         (LocalInfo): Implement it.
7632         (ToplevelParameterInfo): New class.
7633         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7634         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7635         GetKnownVariableInfo.
7636
7637 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7638
7639         Partly speed up CS0136 error checks.
7640         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7641         'recurse' parameter.
7642         (Block.DoCheckError136): Only check errors in parameters.  Move
7643         local variable checks ...
7644         (Block.AddVariable): ... here, and ...
7645         (ToplevelBlock.ResolveMeta): ... here.
7646
7647 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7648
7649         * statement.cs (Block.IsChildOf): Remove.
7650
7651         * statement.cs (Statement.Clone): Move special case code ...
7652         (Block.CloneTo): ... here.
7653
7654 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7655
7656         * statement.cs (ToplevelBlock.container): Remove field.  It's
7657         redundant with 'Parent'.
7658         (ToplevelBlock.ContainerBlock): Remove accessor.
7659         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7660         child with parent here, ...
7661         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7662         current_block.
7663         (start_anonymous): Don't save current_block.
7664         (top_current_block): Remove.
7665
7666         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7667         (Block.Resolve): Update to changes.
7668         (Block..ctor): Move setting of "correct" 'Toplevel'
7669         and 'Explicit' fields to ...
7670         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7671
7672 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7673
7674         Kill Block.Implicit
7675         * statement.cs (Block.Implicit): Remove.
7676         (Block): Update to changes.
7677         * flowanalysis.cs: Likewise.
7678
7679         Mildly speed up CheckInvariantMeaningInBlock
7680         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7681         Recursively call AddKnownVariable to all enclosing blocks.
7682         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7683         Remove recursive calls.
7684         (Block): Update to changes.
7685
7686         New ExplicitBlock invariants
7687         * statement.cs (Block.Explicit): New field.  It points to the
7688         immediately enclosing non-implicit block.
7689         (Block..ctor): Maintain the invariant.
7690         * cs-parser.jay: Take advantage of invariant.
7691
7692         Introduce ExplicitBlock
7693         * statement.cs (ExplicitBlock): New.
7694         (ToplevelBlock): Derive from it.
7695         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
7696         sense of flag.
7697         (Block.Implicit): Update to changes.
7698         * cs-parser.jay: Update to changes.
7699
7700         Remove unused field
7701         * codegen.cs (EmitContext.IsLastStatement): Remove.
7702         * statement.cs (Block.DoEmit): Update to changes.
7703
7704 2007-05-25  Raja R Harinath  <rharinath@novell.com>
7705
7706         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
7707         modifying current_block directly.
7708
7709 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
7710         
7711         * class.cs: Implemented automatic properties (C# 3.0)
7712           Thanks to Marek for the help.
7713
7714 2007-05-23  Raja R Harinath  <rharinath@novell.com>
7715
7716         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
7717         variable as assigned, note also that all its components are
7718         assigned too.
7719         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
7720
7721 2007-05-19  Marek Safar  <marek.safar@gmail.com>
7722
7723         * anonymous.cs, class.cs: Emit Compiler generated attribute when
7724         member is marked as compiler generated.
7725         
7726         * decl.cs (MemberCore): Refactored ModFlags into property.
7727
7728         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
7729         (Check): Check only accessibility modifiers.
7730
7731 2007-05-18  Raja R Harinath  <rharinath@novell.com>
7732
7733         Track all assignable slots in one bit array
7734         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
7735         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
7736         logic from VariableMap constructor here.  Use the same 'offset'
7737         variable that's later used for computing offsets of local
7738         variables.
7739         * flowanalysis.cs (UsageVector.parameters): Remove.
7740         (UsageVector): Update to changes.
7741         (VariableMap): Remove.
7742
7743         Avoid creating ParameterMap in every block
7744         * statement.cs (Block.ParameterMap): Move ...
7745         (ToplevelBlock.ParameterMap): ... here.
7746         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
7747         only once.
7748         * flowanalysis.cs (FlowBranching.param_map): Remove.
7749         (FlowBranching.UsageVector): Update to changes.
7750         (FlowBranchingToplevel.CheckOutParameters): Likewise.
7751
7752         * statement.cs (Block.CloneTo): Clone Toplevel field too.
7753
7754         * expression.cs (ParameterReference): Distinguish between block
7755         where parameter was referenced and declared.
7756
7757 2007-05-18  Marek Safar  <marek.safar@gmail.com>
7758
7759         * flowanalysis.cs, statement.cs: Put back improved error handling.
7760
7761 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
7762         
7763         * assign.cs:
7764         * expression.cs:
7765           Imporved object and collection initialization (C# 3.0).
7766
7767 2007-05-15  Marek Safar  <marek.safar@gmail.com>
7768
7769         A fix for bug #81380
7770         * expression.cs (Is.DoResolve): Only value types have constant `is'
7771         behaviour.
7772
7773 2007-05-15  Raja R Harinath  <rharinath@novell.com>
7774
7775         * statement.cs (ToplevelBlock.child): Remove.
7776
7777 2007-05-15  Raja R Harinath  <harinath@gmail.com>
7778
7779         Rationalize ResolveMeta: refactoring
7780         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
7781         out constant handling code into ...
7782         (Block.DoResolveConstants): ... this.
7783
7784         Rationalize ResolveMeta: kill local_map
7785         * statement.cs (Block.local_map, Block.LocalMap): Remove.
7786         (Block.AssignableSlots): New.
7787         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
7788         for locals -- move code from VariableMap here.  Avoid unnecessary
7789         allocations.
7790         * flowanalysis.cs (FlowBranching.local_map): Remove.
7791         (FlowBranching..ctor): Use Block.AssignableSlots.
7792         (VariableMap): Remove unused constructors.
7793
7794 2007-05-11  Raja R Harinath  <rharinath@novell.com>
7795
7796         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
7797
7798 2007-05-11  Marek Safar  <marek.safar@gmail.com>
7799
7800         * typemanager.cs (IsFriendAssembly): Should not be called for building
7801         assembly.
7802
7803 2007-05-09  Marek Safar  <marek.safar@gmail.com>
7804
7805         * literal.cs (NullConstant): Print null in all cases.
7806         
7807         * expression.cs (Binary.ResolveOperator): Implemented delegate
7808          comparison based on C# 2.0 changes.
7809
7810 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
7811
7812         This code is contributed under the MIT X11 license
7813         
7814         The following enables support for several C# 3.0 language features:
7815         
7816         * cs-tokenizer.cs: Added support for the "var" keyword.
7817         
7818         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
7819           Added VarExpr class to facilitate type inferencing.
7820         
7821         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
7822           to support anonymous types.
7823         
7824         * assign.cs: Added support for type inferencing and initialization.
7825         
7826         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
7827         
7828         * expression.cs: Added implicit array support to ArrayCreation.
7829           Added 5 types and 1 interface:
7830           
7831           IInitializable                Implementing classes can inject initializing
7832                                         statements after object instantiation.
7833           
7834           Initializer                   Stores data for object initialization.
7835           
7836           AnonymousType                 An expression for anonymous types.
7837           
7838           AnonymousTypeParameter        Stores data about an anonymous type's field.
7839           
7840           NewInitialize                 An expression for object initialization.
7841           
7842           CollectionInitialize          An expression for collection initialization.
7843         
7844         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
7845           statements.
7846
7847 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7848
7849         A fix for bug #81500
7850         * cs-tokenizer.cs: Add special handling for coalescing operator.
7851
7852 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7853
7854         A fix for bug #81529
7855         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
7856         its value from base class until it is redefined.
7857
7858 2007-05-02  Raja R Harinath  <rharinath@novell.com>
7859
7860         Fix regression in cs0631-3.cs
7861         * cs-parser.jay (operator_declarator): Add opt_attributes to error
7862         fallback.  Make error fallback catch more cases.
7863
7864 2007-05-01  Miguel de Icaza  <miguel@novell.com>
7865
7866         * cs-parser.jay: Allow parameters in operator declarations to have
7867         attributes. 
7868
7869 2007-04-27  Miguel de Icaza  <miguel@novell.com>
7870
7871         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
7872         exists. 
7873
7874         * lambda.cs (ContextualReturn.Resolve): An expression is valid
7875         inside the ContextualReturn, it does not have to be an
7876         ExpressionStatement. 
7877
7878 2007-04-24  Miguel de Icaza  <miguel@novell.com>
7879
7880         * lambda.cs (ContextualReturn.Resolve): if the return type is not
7881         set, set it.
7882
7883 2007-04-23  Miguel de Icaza  <miguel@novell.com>
7884
7885         * anonymous.cs (AnonymousContainer): split the virtual Resolve
7886         method in two methods: ResolveNoDefine and Resolve.
7887
7888         ResolveNoDefine will stop just after ResolveTopBlock has been
7889         called.   
7890
7891         Resolve will then continue by creating a method and issuing the
7892         call to method.Define ().
7893
7894         (AnonymousMethod): Split and implement the new Resolve and
7895         ResolveNoDefine as well.
7896
7897         * lambda.cs (LambdaExpression): Split the anonymous method
7898         resolution code into a separate routine (CoreCompatibilityTest)
7899         from DoCompatibleTest.
7900
7901         (LambdaExpression.TryBuild): New method, this method tries to
7902         build the LambdaExpression with the given set of types to be used
7903         as the types for the various parameters of the lambda expression. 
7904
7905         If the compilation succeed with the given types, the infered type
7906         of the Anonymous method is returned, otherwise null is returned.
7907
7908 2007-04-23  Marek Safar  <marek.safar@gmail.com>
7909
7910         A fix for bug #81414
7911         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
7912
7913 2007-04-22  Miguel de Icaza  <miguel@novell.com>
7914
7915         * cs-tokenizer.cs: Change various identifiers here from the
7916         camelCasing to the recommended Linux-like style for instance
7917         variables from the Coding Guidelines. 
7918
7919 2007-04-19  Martin Baulig  <martin@ximian.com>
7920
7921         * convert.cs
7922         (Convert.ImplicitReferenceConversionCore): Allow conversions from
7923         System.Enum to System.ValueType.
7924
7925 2007-04-13  Martin Baulig  <martin@ximian.com>
7926
7927         Rewrote implicit reference conversions.  We need to distinguish
7928         between implicit reference conversions (13.1.4) and implicit
7929         boxing conversions (13.1.5).
7930
7931         According to the spec, there's an an implicit conversion
7932         "From a one-dimensional array-type S[] to IList<T> and base
7933         interfaces of this interface, provided there is an implicit
7934         reference conversion from S to T."  Note that this does not
7935         include boxing conversions.
7936
7937         * convert.cs
7938         (Convert.ImplicitTypeParameterBoxingConversion): New method.
7939         (Convert.ImplicitReferenceConversion): Split into
7940         ImplicitReferenceConversionCore() and
7941         ImplicitBoxingConversionExist().
7942         (Convert.ImplicitReferenceConversionExists): Use the new
7943         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
7944
7945 2007-04-12  Martin Baulig  <martin@ximian.com>
7946
7947         * convert.cs (Convert.ImplicitReferenceConversion): Move the
7948         `TypeManager.null_type' checks up to the top of the method.
7949
7950 2007-04-11  Marek Safar  <marek.safar@gmail.com>
7951
7952         A fix for bug #81350
7953         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
7954         extension methods.
7955
7956 2007-04-11  Martin Baulig  <martin@ximian.com>
7957
7958         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
7959         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
7960         to make this work for generic classes; fixes #79561.
7961
7962 2007-04-11  Martin Baulig  <martin@ximian.com>
7963
7964         * expression.cs (As): Add support for nullable types; fixes #79371.
7965
7966 2007-04-11  Martin Baulig  <martin@ximian.com>
7967
7968         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
7969         `type.FullName' is null; fixes #80243.
7970
7971 2007-04-11  Martin Baulig  <martin@ximian.com>
7972
7973         * expression.cs (Invocation.IsApplicable): Don't modify the method
7974         if type inference succeeded, but the method was not applicable.
7975         Fixes #81250.
7976
7977 2007-04-10  Marek Safar  <marek.safar@gmail.com>
7978
7979         A fix for bug #81324
7980         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
7981         internal and external namespaces containers.
7982
7983 2007-04-10  Martin Baulig  <martin@ximian.com>
7984
7985         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
7986         TypeManager.DropGenericMethodArguments() so we also call
7987         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
7988
7989 2007-04-10  Martin Baulig  <martin@ximian.com>
7990
7991         * iterators.cs (Iterator.CreateIterator): Don't crash if
7992         `method.ReturnType' is null.  This happens if something went wrong
7993         while resolving that typ (we already reported an error in this case).
7994
7995 2007-04-10  Martin Baulig  <martin@ximian.com>
7996
7997         * expression.cs (New.DoResolve): Don't call CheckComImport() on
7998         generic interfaces; report the CS0144 directly.
7999
8000 2007-04-10  Martin Baulig  <martin@ximian.com>
8001
8002         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
8003         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
8004
8005 2007-04-10  Martin Baulig  <martin@ximian.com>
8006
8007         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
8008
8009 2007-04-09  Raja R Harinath  <rharinath@novell.com>
8010
8011         A better fix
8012         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
8013         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
8014
8015         Fix #81338
8016         * statement.cs (For.Resolve): If resolution fails, use
8017         KillFlowBranching.
8018
8019 2007-04-08  Marek Safar  <marek.safar@gmail.com>
8020
8021         * anonymous.cs (MakeName): Make faster and zero-based.
8022         (VerifyExplicitParameterCompatibility): Back to mode where generic
8023         parameter is ignored.
8024         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
8025
8026         * class.cs (EmitType): Method can emit another new method.
8027
8028         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
8029
8030         * driver.cs: Updated.
8031
8032         * lambda.cs: Reuse predefined empty parameters.
8033
8034         * parameter.cs: Updated
8035
8036         * support.cs: Implemented InflateTypes.
8037
8038         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
8039         (InitSystemCore): Introduced to isolate 3.0 dependencies.
8040
8041 2007-04-03  Martin Baulig  <martin@ximian.com>
8042
8043         Fix #80632.
8044
8045         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
8046         version of TypeManager.IsOverride() which also works with generic
8047         types.  
8048
8049 2007-04-03  Martin Baulig  <martin@ximian.com>
8050
8051         Fix #81044.
8052
8053         * convert.cs
8054         (Convert.ExplicitReferenceConversion): We need to cast when
8055         converting from IList<T> to S[].
8056
8057 2007-04-01  Marek Safar  <marek.safar@gmail.com>
8058
8059         * decl.cs (FindExtensionMethods): Consider all candidates with same name
8060         at this level.
8061         
8062         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
8063
8064 2007-03-31  Marek Safar  <marek.safar@gmail.com>
8065
8066         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
8067         argument and return type inferring.
8068
8069         * codegen.cs (InferReturnType): Flag whether return can be inferred.
8070         (ReturnType): Turned to property.
8071
8072         * statement.cs (Return): Implemented return type inferring.
8073
8074         * support.cs (ReflectionParameters): Use local types if possible.
8075
8076 2007-03-30  Raja R Harinath  <rharinath@novell.com>
8077
8078         * flowanalysis.cs (FlowBranching.Reachability): Remove.
8079         (FlowBranching.UsageVector): Update to changes.
8080
8081         Prepare to kill 'Reachability'
8082         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
8083         argument of constructor.
8084
8085 2007-03-29  Raja R Harinath  <rharinath@novell.com>
8086
8087         Prepare to kill 'Reachability'
8088         * flowanalysis.cs (UsageVector.is_unreachable): New.
8089         (UsageVector): Update to maintain 'is_unreachable' in parallel to
8090         'reachability', and verify they're consistent.
8091
8092         Fix #81121
8093         * expression.cs (New.EmitStatement): Handle type parameters here too.
8094
8095 2007-03-29  Martin Baulig  <martin@ximian.com>
8096
8097         Fix #79148.
8098
8099         * anonymous.cs
8100         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8101         CompilerGeneratedClass.
8102         (ScopeInfo.EmitScopeInstance): Make this protected.
8103         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8104         `ec.CurrentAnonymousMethod.Scope == Scope'.
8105
8106         * statement.cs (Block.ScopeInfo): Make this a property.
8107
8108 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8109
8110         Prepare to kill 'Reachability'
8111         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8112         (FlowBranching.UsageVector.Reachability): Remove property.
8113         (FlowBranching.UsageVector.IsUnreachable): New property.
8114         (FlowBranching.UsageVector.ResetBarrier): New.
8115         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8116         * codegen.cs, statement.cs: Update to changes.
8117
8118 2007-03-27  Martin Baulig  <martin@ximian.com>
8119
8120         Fix #81209.
8121
8122         * decl.cs
8123         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8124         generic types.
8125
8126 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8127
8128         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8129         instead of TriState.  Remove all mention of TriState.
8130
8131         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8132         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8133         and maintain invariants.
8134
8135 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8136
8137         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8138
8139 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8140
8141         * expression.cs: Stop using obsolete 2.0 opcodes.
8142
8143 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8144
8145         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8146         one of the latests Martin's fixes.
8147
8148 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8149
8150         * expression.cs: On BigEndian systems, swap the bytes, temporary
8151         solution until we get a new bitconverter class.
8152
8153 2007-03-23  Martin Baulig  <martin@ximian.com>
8154
8155         Fix #81158.
8156
8157         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8158         "Method" and "Method`1".  Normally, a cache lookup is done on the
8159         "Method" form (ie. without the generic arity), but this one makes
8160         lookups on the full form work as well.
8161
8162 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8163
8164         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8165         unused properties.
8166
8167 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8168         * class.cs: 
8169         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8170         ordered_member_list, to TypeBuilder to store members to be defined
8171         in the order they were parsed in.
8172         - ordered_explicit_member_list contains all properties indexers
8173           and methods that are defined as explicit implementation of an
8174           interface or base class.
8175         - ordered_member_list contains all properties indexers and methods
8176           that are not defined as explicit implementation of an interface
8177           or base class.
8178
8179         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8180         functionality in these removed classes has been replaced with 
8181         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8182         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8183
8184         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8185         to CheckForDuplications inside GetMethod and SetMethod Define Method
8186         to handle method property and indexer name conflicts.
8187
8188         Fixes #79434
8189
8190         All code is contributed under the MIT/X11 license.
8191
8192 2007-03-20  Martin Baulig  <martin@ximian.com>
8193
8194         * class.cs (TypeContainer.Interfaces): Removed; they're now
8195         included in `TypeContainer.Types'.
8196
8197 2007-03-20  Martin Baulig  <martin@ximian.com>
8198
8199         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8200
8201         * class.cs (TypeContainer.CreateType): New public method.  This is
8202         now called before DefineType() to create the TypeBuilders.
8203         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8204         has already been created by CreateType().
8205         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8206         don't resolve our base classes here; this has been moved into
8207         DefineBaseTypes().  We're now called from CreateType().
8208         (TypeContainer.DefineBaseTypes): New private method; resolve our
8209         base classes here.  We're now called from DefineType().
8210
8211         * rootcontext.cs
8212         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8213         our types first to create all the TypeBuilders.  After that, call
8214         TypeContainer.DefineType() on all the types which'll resolve their
8215         base classes and setup the resolve order.
8216
8217 2007-03-20  Martin Baulig  <martin@ximian.com>
8218
8219         * class.cs (TypeContainer.Enums): Removed; they're now included in
8220         `TypeContainer.Types'.  
8221
8222 2007-03-20  Martin Baulig  <martin@ximian.com>
8223
8224         * class.cs
8225         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8226         (TypeContainer.DoResolveMembers): Call DefineType() on our
8227         `compiler_generated' classes; moved here from DefineNestedTypes().
8228
8229         * rootcontext.cs
8230         (RootContext.ResolveTree): Call ResolveMembers() on all
8231         TypeContainer's in the `type_container_resolve_order'.
8232
8233 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8234
8235         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8236
8237 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8238
8239         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8240         implementation flags.
8241
8242 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8243
8244         * class.cs: More optimizations for type parameters.
8245
8246 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8247
8248         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8249
8250         * ecore.cs, parameter.cs: More common code for both corlibs.
8251
8252         * typemanager.cs (IsGenericMethod): Simplified.
8253
8254 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8255
8256         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8257         'returns'.
8258         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8259
8260         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8261         unconditionally.  Simplify explanation.
8262         (Try.Resolve, Using.Resolve): Likewise.
8263
8264 2007-03-15  Martin Baulig  <martin@ximian.com>
8265
8266         Fix #80731.
8267
8268         * decl.cs (DeclSpace): If we're a partial class, use our
8269         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8270
8271 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8272
8273         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8274         'throws'.
8275         (FlowBranching.UsageVector): Update to changes.
8276         (FlowBranching.MergeSiblings): Likewise.
8277         * statement.cs: Likewise.
8278
8279 2007-03-15  Martin Baulig  <martin@ximian.com>
8280
8281         Fix #79302.
8282
8283         * decl.cs
8284         (MemberCache): Added a special .ctor for type parameters.
8285
8286         * typemanager.cs
8287         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8288         `MemberCache'.  
8289
8290 2007-03-09  Martin Baulig  <martin@ximian.com>
8291
8292         * enum.cs (Enum): Make this a TypeContainer.
8293         (EnumMember): Derive from `Const'.
8294
8295         * const.cs
8296         (Const.DoResolveValue): New protected virtual method; move most of
8297         the functionality of ResolveValue() here so we can override it in
8298         `EnumMember'.
8299         (Const.CreateConstantReference): Make this virtual.
8300
8301         * class.cs (Kind): Add `Kind.Enum'.
8302         (TypeContainer.Emit): Don't emit the enums here; they're already
8303         in the `RootContext.typecontainer_resolve_order'.
8304
8305         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8306         here; they're already in the `typecontainer_resolve_order'.
8307
8308         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8309         TypeManager.DropGenericTypeArguments().
8310
8311         * typemanager.cs
8312         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8313         (TypeManager.IsEnumType): Likewise.
8314         (TypeManager.EnumToUnderlying): Likewise.
8315         (TypeManager.IsEqual): Add support for enums.
8316
8317 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8318
8319         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8320         DefaultParameterValueAttribute to be undefined, say if System.dll
8321         is not referenced.
8322
8323 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8324
8325         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8326         any mscorlib.
8327
8328 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8329
8330         * class.cs, parameter.cs: Unified parameters verification.
8331
8332 2007-03-08  Martin Baulig  <martin@ximian.com>
8333
8334         * cs-parser.jay (constructor_header): Pass the location to the
8335         newly created TopLevelBlock.
8336
8337 2007-03-07  Martin Baulig  <martin@ximian.com>
8338
8339         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8340
8341 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8342
8343         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8344         with the changes from David, fixes the build.
8345
8346 2007-03-05  David Mitchell  <dmitchell@logos.com>
8347
8348         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8349         and its base interfaces to a one-dimensional array type S[],
8350         provided there is an implicit or explicit reference conversion
8351         from S to T.
8352
8353 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8354
8355         * cs-tokenizer.cs: Implemented basic linq grammar.
8356
8357         * driver.cs: Set linq lang version on demand.
8358
8359 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8360
8361         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8362
8363 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8364
8365         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8366         (Fixes #80455)
8367
8368         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8369         here.
8370         Check property and event extern attributes.
8371
8372         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8373         charset.
8374
8375 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8376
8377         A fix for bug #80407
8378         * ecore.cs: Don't report ambiguity error when methods have same parent.
8379
8380 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8381
8382         A fix for bug #80878
8383         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8384
8385 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8386
8387         * attribute.cs: Enable ExtensionAttribute presence test.
8388
8389 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8390
8391         * class.cs: Warn about missing GetHashCode only when Equals is override.
8392
8393         * decl.cs: Check accessibility of type arguments.
8394
8395         * typemanager.cs: Correctly report nullable array.
8396
8397 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8398
8399         * class.cs, report.cs: Capture more details when things go wrong.
8400
8401 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8402
8403         A fix for bug #80650
8404         * cs-parser.jay: Anonymous container starts at constructor declaration
8405         and not at block beginning because it has to be usable in constructor
8406         initializer.
8407
8408         * statement.cs: Use context location and not block one for error reporting.
8409
8410 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8411
8412         A fix for bug #78712
8413         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8414         too.
8415
8416 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8417
8418         A fix for bug #80493 by Atsushi Enomoto
8419         * cs-parser.jay: Ignore invalid attribute target.
8420
8421 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8422  
8423         * cs-tokenizer.cs: Ignore '\0' as white space character.
8424
8425 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8426
8427         * cs-parser.jay: Add support for lambda expressions to the mcs
8428         compiler as well.
8429
8430         * lambda.cs: Only clone when we are probing, not on the final call
8431         (Compatible is the final call). 
8432
8433         * statement.cs (CloneContext): Introduce class to provide block
8434         remapping during clone.
8435
8436         All statements Clone themselves now.
8437
8438         (Clone): special handling for blocks, when we clone a block, we
8439         register the block inside this routine, as children of the block
8440         might trigger a lookup. 
8441         
8442         * expression.cs: Add support for CloneContext in all expressions. 
8443         
8444 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8445  
8446         A fix for bug #80493
8447         * statement.cs: Report ambiguous warning when interfaces are not related.
8448
8449 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8450
8451         C# 3.0 extension methods.
8452
8453         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8454         cannot be used directly.
8455
8456         * class.cs (Class.Emit): Emit extension attribute if any class method
8457         is extension method.
8458         (Method.Define): Add basic extension method validation conditions.
8459         (Method.Emit): Emit extension attribute for method.
8460
8461         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8462         extension method exists. Currently we follow same approach as Microsoft
8463         does, emit even if a method or a class are private but this can change
8464         later.
8465
8466         * cs-parser.jay: Add handling of `this' keyword in method parameters
8467         context.
8468
8469         * decl.cs (DeclSpace.IsStaticClass): New property.
8470         (MemberCache.FindExtensionMethods): Looks for extension methods with
8471         defined name and extension type.
8472
8473         * doc.cs: Updated after OverloadResolve changes.
8474
8475         * driver.cs: Add new soft reference to System.Core.dll.
8476
8477         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8478         (ExtensionMethodGroupExpr): Represents group of extension methods.
8479
8480         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8481         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8482         to MethodGroupExpr and made non-static for easier customization.
8483         (Invocation.DoResolve): Add extension method lookup when no standard
8484         method was found.
8485         (MemberAccess.DoResolve): Try extension methods if no member exists.
8486
8487         * modifiers.cs: Add METHOD_EXTENSION modifier.
8488
8489         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8490         as well as candidate extension type.
8491         (ComputeNamespaces): When assembly constains extension methods registers
8492         them.
8493         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8494         extension method lookup.
8495         (Namespace.LookupExtensionMethod): Looks for extension method in this
8496         namespace.
8497         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8498         find a method which matches name and extensionType.
8499
8500         * parameter.cs (Parameter): Add This modifer.
8501         (HasExtensionMethodModifier): New property.
8502         (Resolve): Add extension parameter check.
8503         (ModFlags): turned to property to exclude this modifier as it is not real
8504         parameter modifier.
8505         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8506
8507         * support.cs (ParameterData): Add ExtensionMethodType.
8508         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8509
8510         * typemanager.cs: Add type and ctor extension attribute type.
8511
8512 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8513
8514         * report.cs (DisableErrors, EnableErrors): used to prevent error
8515         output when we are "trying" to compile various methods with
8516         different types. 
8517
8518         * ecore.cs (Expression): Add Clone method that calls the virtual
8519         CloneTo method.  The current CloneTo method in Expression throws
8520         an exception so we can track down all the places where this must
8521         be implemented (not using abstract, because that would be a lot of
8522         up-front-work before we can start testing the implementation
8523         idea). 
8524
8525         Important: we only need Clone capabilities for expressions created
8526         by the parser, as the expressions we will be cloning are
8527         expressions in the pre-resolved state.   This vastly simplifies
8528         the work required. 
8529         
8530         (SimpleName): Add CloneTo that does nothing.
8531         (EmptyCast): Add CloneTo.
8532         
8533         * expression.cs (Binary): Implement CloneTo.
8534         (Invocation.IsApplicable): Store the current ec in
8535         EmitContext.TempEc and restore it on return.  This is used so we
8536         do not have to sprinkle hundres of methods with an extra
8537         EmitContext, we know that the only user is the lambda expression
8538         ImplicitConversionExists code. 
8539         
8540         (Argument): Add Cloning capabilities.
8541         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8542         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8543         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8544         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8545         IndexerAccess): Add Clone capability.
8546
8547         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8548
8549         (Argument): Add cloning capability.
8550
8551         * assign.cs (Assign): Implement CloneTo.
8552
8553         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8554         
8555         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8556         version by calling Convert with the EmitContext (that we are
8557         currently storing in ec, this is not great, but will do for now,
8558         to avoid passing EmitContext parameters to hundreds of functions
8559         that do not need them now).
8560
8561         (SetExpression): Remove, it is not needed.
8562         
8563         (ContextualReturn): Implement CloneTo.
8564
8565         * statement.cs (Statement): Implement cloning infrastructure,
8566         similar to expressions.
8567
8568         (Block): Partial implementation of Clone for statements.
8569
8570         (Return): Implement clone.
8571         
8572         * constant.cs (Constant.CloneTo): New method, does nothing.
8573
8574         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8575         solution, until we decide how to exactly do this.  
8576         
8577 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8578  
8579         A fix for bug #80493
8580         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8581         a property is override we need to use second accessor.
8582
8583 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8584  
8585         A fix for bug #80418
8586         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8587         methods.
8588
8589 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8590
8591         Another fix for bug #80749
8592         * pending.cs: Abstract class has priority over interfaces.
8593
8594 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8595
8596         Another fix for bug #80749
8597         * pending.cs: Abstract class has priority over interfaces.
8598
8599 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8600
8601         Another fix for bug #80749
8602         * pending.cs: Abstract class has priority over interfaces.
8603
8604 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8605
8606         Another fix for bug #80749
8607         * pending.cs: Abstract class has priority over interfaces.
8608
8609 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8610
8611         * class.cs Better error message.
8612
8613         * driver.cs: Add shorter versions of -optimize option.
8614
8615 2007-02-13  Martin Baulig  <martin@ximian.com>
8616
8617         * class.cs (Constructor.Emit): Check the return value of
8618         ec.ResolveTopBlock() and return on error.
8619
8620 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8621
8622         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8623         message to fix error message regression.
8624
8625 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8626
8627         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8628
8629 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8630
8631         A fix for bug #80749
8632         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8633         its parent container.
8634
8635         * class.cs (DefineFieldInitializers): Each initializer can has different
8636         resolve context.
8637
8638         * const.cs: Updated.
8639
8640 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8641
8642         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8643         now all the heavy lifting to check that embedded statements or
8644         expressions have the right form is done in the ContextualReturn.
8645
8646         (ContextualReturn): New class.  
8647
8648         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8649         method that can be invoked to report 201, so we do not replicate
8650         this everywhere.
8651
8652         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8653         
8654         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8655         treating tabs as spaces. 
8656
8657 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8658
8659         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8660         * assign.cs: Use full implicit conversion for right side check.
8661
8662 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8663
8664         * statement.cs (Switch): Switch over boolean type is not standardized.
8665
8666 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8667
8668         A fix for bug #80755
8669         * decl.cs (FindBaseEvent): Don't use method cache for events.
8670
8671 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8672
8673         * cs-parser.jay: Better syntax error handling.
8674
8675         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8676         instead of underlying type value.
8677
8678 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8679
8680         * driver.cs: Check define identifier before is registered.
8681
8682         * namespace.cs: Use existing error message.
8683
8684         * report.cs: New warning.
8685
8686 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8687
8688         A fix for bug #80742
8689         * expression.cs: Delegate Invoke method can be called directly.
8690
8691 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8692
8693         A fix for bug #80676
8694         * class.cs (IsEntryPoint): The Main method can have params modifier.
8695
8696 2007-02-04  Miguel de Icaza  <miguel@novell.com>
8697
8698         * parameter.cs (Parameter, Parameters): Add Clone method.
8699
8700         * anonymous.cs (Compatible): Turn method into virtual method, so
8701         LambdaExpression can implement a different behavior.
8702
8703         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
8704         out the basic checking here, so it can be used by
8705         LambdaExpressions.
8706         
8707         * lambda.cs: Introduce "Compatible" function that will do the
8708         heavy lifting.
8709
8710 2007-02-02  Marek Safar  <marek.safar@gmail.com>
8711
8712         * attribute.cs: Unified one error message.
8713
8714         * class.cs (Class): Use type attributes and not properties to test static
8715         class.
8716         (IsEntryPoint): Don's pass local variable.
8717
8718         * convert.cs: Removed duplicate check.
8719
8720         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
8721
8722         * driver.cs: Don't crash when soft reference does not exist.
8723
8724         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
8725         (UsingEntry): Removed redundant allocation.
8726
8727         * parameter.cs: Add fast path for type parameters.
8728
8729         * support.cs: Don't allocate attribute when it's not used.
8730
8731 2007-01-30  Miguel de Icaza  <miguel@novell.com>
8732
8733         * anonymous.cs
8734         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
8735         this into a virtual method, so we can override it in LambdaExpression.
8736
8737         * driver.cs: Improve diagnostics in case of failure. 
8738
8739         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
8740         write a function that is slightly more complex and that parses:
8741
8742         type identifier [, type identifier]* )
8743
8744         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
8745         this expression:
8746
8747                 (canEmpty ? i >= 0 : i > 0)
8748
8749 2007-01-30  Raja R Harinath  <rharinath@novell.com>
8750
8751         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
8752         exception on possibly valid code.
8753
8754 2007-01-29  Raja R Harinath  <rharinath@novell.com>
8755
8756         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
8757         Push/PopPosition.
8758         (parse_opt_type_arguments): Remove.  It's almost the same as
8759         parse_less_than.
8760         (parse_namespace_or_typename): Use parse_less_than.
8761
8762 2007-01-28  Miguel de Icaza  <miguel@novell.com>
8763
8764         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
8765         this bug took a few hours to find, because the state saved and
8766         restored by PushPosition and PopPosition was ignoring the state of
8767         parse_generic_less_than.
8768
8769         I can also now remove the handling of OP_LT and OP_GT, this solves
8770         the big mistery.
8771         
8772         * cs-tokenizer.cs: store the location for the ARROW token, we use
8773         that in the parser.
8774
8775         (PushPosition, PopPosition): save/restore also `current_token',
8776         restore `parse_generic_less_than' (was missing).
8777
8778         (parse_opt_type_arguments): use parse_type, not
8779         parse_namespace_or_typename to parse types.
8780
8781         * lambda.cs: Empty new file, will eventually have the lambda
8782         expression implementation.
8783
8784         * lambda.test: used to test the internal tokenizer. 
8785
8786         * report.cs (FeatureIsNotISO1): Rename from
8787         FeatureIsNotStandardized, because it was about the language level
8788         (1 vs 2) it was not about standarization.
8789
8790         (FeatureRequiresLINQ): New.
8791
8792         * support.cs (SeekableStreamReader): Only require that the reader
8793         is a TextReader, not a StreamReader, so we can plug StringReader. 
8794
8795         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
8796         given position in the input stream the following tokens can be
8797         parsed as a type followed by an identifier.
8798
8799         (is_punct): after a '(' if parse_type_and_parameter returns true,
8800         then return a special token OPEN_PARENS_LAMBDA which is used to
8801         avoid reduce/reduce errors in the grammar for the
8802         lambda_expression rules.
8803
8804         (parse_type): implement a type parser inside the
8805         tokenizer, the parser only returns true or false depending on
8806         whether the input at a given position can be parsed as a type.
8807
8808         (peek_token): new method used during type parsing.
8809
8810 2007-01-28  Raja R Harinath  <rharinath@novell.com>
8811
8812         Fix #80531
8813         * anonymous.cs (ScopeInfo.InflateParameters): New.
8814         (AnonymousContainer.Resolve): Use it to redirect types of
8815         delegate parameters.
8816
8817 2007-01-27  Raja R Harinath  <rharinath@novell.com>
8818
8819         Fix #80530
8820         * expression.cs (Error_InvalidArguments): Don't use two different
8821         messages for CS1503.  Use ExtraInformation and
8822         SymbolRelatedToPreviousError instead.
8823
8824         Fix #80358
8825         * decl.cs (DeclSpace.initialize_type_params): Don't access
8826         'type_params' of a partial class directly.
8827
8828 2007-01-26  Miguel de Icaza  <miguel@novell.com>
8829
8830         * constant.cs: Removed a handful of out-of-range checks that were
8831         not necessary. 
8832
8833 2007-01-25  Marek Safar  <marek.safar@gmail.com>
8834
8835         * expression.cs (CheckUselessComparison): Add additional check for char
8836         constants.
8837
8838         * namespace.cs: Fixed typo.
8839
8840 2007-01-23  Miguel de Icaza  <miguel@novell.com>
8841
8842         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
8843         gone, instead we inline the test, preventing the needless casts to
8844         longs, ulongs and doubles for the parameters, avoiding calls to
8845         methods that overchecked stuff, and instead inlined things
8846         nicely. 
8847
8848 2007-01-20  Marek Safar  <marek.safar@gmail.com>
8849
8850         * cs-parser.jay: Better parameter error handling.
8851
8852 2007-01-17  Marek Safar  <marek.safar@gmail.com>
8853
8854         A fix for bug #80368, #80522
8855         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
8856         whether array initializer contains constants only.
8857         (ArrayCreation.Emit): Use better formula to decide when
8858         are array initializers for static initialization.
8859         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
8860         have to emit even constants otherwise they are pre-initialized.
8861
8862 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
8863             Raja R Harinath  <rharinath@novell.com>
8864
8865         Fix emit order of 'get' vs. 'set'.
8866         * support.cs (Accessors): New.
8867         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
8868         Note the order in which accessors are declared in the source.
8869         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
8870         Refactored from Property.Define and Indexer.Define.
8871         (PropertyBase.DefineAccessors): New helper that calls the above in
8872         appropriate order as noted by the parser.
8873         (Property.Define, Indexer.Define): Update to changes.
8874         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
8875
8876 2007-01-17  Raja R Harinath  <rharinath@novell.com>
8877
8878         Fix cs0029-6.cs and gcs0029-2.cs (regression)
8879         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
8880         there's an implicit conversion from the current type to the target
8881         type before converting the underlying constant.
8882
8883 2007-01-16  Marek Safar  <marek.safar@gmail.com>
8884
8885         * const.cs (ResolveValue): Updated after constant conversion was made more
8886         generic.
8887
8888         * constant.cs (GetAttributableValue): constant to object conversion is
8889         used for attributes only.
8890         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
8891         constant conversions.
8892         (LongConstant.ConvertImplicitly): Ditto.
8893
8894         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
8895         (ImplicitConversionStandard): Handle constant conversion as extra step.
8896         It solves the issue when constant conversion was called indirectly like
8897         inside array initializer and constant folding was skipped.
8898
8899         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
8900         this change.
8901
8902         * statement.cs(ImplicitConversionStandard): Updated after constant
8903         conversion was made more generic.
8904
8905 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
8906
8907         * expression.cs (As.DoResolve): Use GenericConstraints instead of
8908         Constraints, solves the problem where the compiler incorrectly
8909         reported that a type parameter was not constrained to a class (Bug
8910         80518)
8911
8912 2007-01-14  Marek Habersack  <grendello@gmail.com>
8913
8914         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
8915
8916 2007-01-14  Marek Safar  <marek.safar@gmail.com>
8917
8918         A fix for bug #80368
8919         * assign.cs (FieldInitializer): New class implements field
8920         initializer statement.
8921
8922         * attribute.cs: Update after FieldMember rename.
8923
8924         * class.cs (PropertyBasedMember): New common class for property based
8925         types.
8926         (InterfaceMemberBase): New base class for all members which can be used as
8927         an interface members.
8928         (MethodCore): Moved really common code to InterfaceMemberBase.
8929         (Method.Define): Equal and GetHasCode detection is relevant for methods
8930         only.
8931         (MethodData.Define): Don't assume that public event implements an
8932         interface automatically.
8933         (MethodData.DefineMethodBuilder): Issue an error even if only extern
8934         modifier is used.
8935         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
8936         (FieldMember): Merged with FieldBase.
8937         (EventProperty.AEventPropertyAccessor): New specialization to check whether
8938         event extern modifier can be used.
8939         (EventField.EventFieldAccessor): Moved event field specific code here.
8940         (Event.AllowedModifiers): Even event can be extern.
8941         (Event.FindOutBaseMethod): New override specific to events.
8942         (Indexer.parameters): Reintroduce parameters because base class holds
8943         only properties common data.
8944         (Indexer.CheckForDuplications): Indexers are threated as methods so we
8945         need do extra parameters check.
8946
8947         * const.cs: Update after FieldMember rename.
8948
8949         * decl.cs (MemberCache.FindBaseEvent): New method.
8950
8951         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
8952         to reflect that indexer is now derived from PropertyBased.
8953
8954         * ecore.cs (GetMemberType): Made public.
8955         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
8956         obsolete event.
8957
8958         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
8959         
8960         * typemanager.cs (CSharpSignature): Correctly print event accessors.
8961         (RegisterEvent): Removed.
8962         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
8963         (GetPrivateFieldOfEvent): Renamed to GetEventField.
8964
8965 2007-01-11  Raja R Harinath  <rharinath@novell.com>
8966
8967         Fix #80249
8968         * statement.cs (CollectionForeach.TryType): Prefer generic
8969         GetEnumerator over non-generic variant.  Fix code to follow comments.
8970
8971 2007-01-09  Raja R Harinath  <rharinath@novell.com>
8972
8973         Fix #80446
8974         * support.cs (ReflectionParameter): Don't use an invalid index on
8975         the generic parameter data.
8976
8977 2007-01-08  Miguel de Icaza  <miguel@novell.com>
8978
8979         * driver.cs: Just add a tiny bit of infrastructure.
8980
8981 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8982
8983         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
8984         where field type is struct from current assembly.
8985         
8986         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
8987         it is possible.
8988
8989 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8990
8991         A fix for bug #80381
8992         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
8993         the core types.
8994
8995         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
8996         messages.
8997         (Namespace.LookupType): Always use core types from corlib when speficied.
8998
8999         * report.cs: A new warning.
9000
9001         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
9002         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
9003         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
9004
9005         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
9006         (InitCoreTypes): Set expression type of object_type and value_type
9007         immediately after lookup.
9008
9009 2007-01-01  Miguel de Icaza  <miguel@novell.com>
9010
9011         * cs-tokenizer.cs: Accept Pc class characters (Connector
9012         Punctuation) as valid identifiers.  Fixes #78259
9013
9014         * expression.cs (Invocation.DoResolve): Moved the check for the
9015         use of `this' for doing method calls to the Invocation resolution
9016         step, after overload resolution has taken place instead of doing
9017         the check at the low-level `This.DoResolve' level.
9018
9019         The `This.DoResolve'(appens before overload resolution, so it has
9020         no way of knowing if the method that will be called will be
9021         instace or static, triggering an erroneous report for cs0188 (Bug
9022         78113).
9023
9024         We now do the check for instance method invocations after we know
9025         what method will be called.
9026
9027         (This.CheckThisUsage): Move the actual use of this structure
9028         checking into its own method and expose it. 
9029
9030         * Everywhere that called Error_ValueCannotBeConverted: pass a new
9031         EmitContext.
9032
9033         Exceptions: Null.ConvertImplicitly,
9034         Constant.ImplicitConversionRequired as there are too many call
9035         sites for passing the ec. 
9036
9037         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
9038         EmitContext, if the value is null, then we do not try to provide
9039         the extra information from the error (If a userdefined conversion
9040         exists, as UserDefinedConversion requires a non null-EmitContext).
9041
9042         Fixes: #80347
9043
9044 2006-12-30  Raja R Harinath  <rharinath@novell.com>
9045
9046         * flowanalysis.cs (MyBitVector): Document some invariants.
9047         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
9048         introduced below, and add a couple of others, 
9049
9050 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9051
9052         * attribute.cs (GetMethodObsoleteAttribute): Uses new
9053         GetPropertyFromAccessor and GetEventFromAccessor.
9054         
9055         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
9056         overrides non-obsolete one.
9057         (Indexer.Define): Error message has been moved to the parser.
9058
9059         * cs-parser.jay: Better syntax errors handling.
9060
9061         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
9062         when an invocation has no arguments.
9063
9064         * ecore.cs: Removed not used caching.
9065
9066         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
9067         implementation.
9068
9069         * report.cs: Add a new warning.
9070
9071         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
9072
9073         * typemanager.cs (enumeration_type): Removed.
9074         (CSharpSignature): Reuses IsSpecialMethod.
9075         (IsEqual): Hack for MS BCL.
9076         (GetPropertyFromAccessor): New method.
9077         (GetEventFromAccessor): New method.
9078         (IsSpecialMethod): Fixed to handle more cases.
9079
9080 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9081
9082         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
9083         Made white spaces array static.
9084
9085         * ecore.cs (RemoveGenericArity): Optimized.
9086
9087         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
9088         10 times faster).
9089         (MyBitVector.initialize_vector): Simplified.
9090
9091 2006-12-22  Miguel de Icaza  <miguel@novell.com>
9092
9093         * ecore.cs: Am not entirely happy with this hack, but it seems to
9094         address the issue in 80257 (a small test case for
9095         CreativeDocs.NET). 
9096
9097         I set the MethodGroupExpr.Type to an internal compiler type
9098         (itself in this case) to force the resolution to take place.   Why
9099         it does not take place with a null is beyond me.
9100
9101 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9102
9103         A fix for bug #80288
9104         * expression.cs (ResolveOperator): Consider user defined conversion for
9105         logical and operator too.
9106         (EmitBranchable): Optimization for logical and when full constant folding
9107         could not be applied but one operand is constant.
9108
9109 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9110
9111         * class.cs (GetClassBases): Write 5 times every day, will never use
9112         FullName for error reporting.
9113
9114         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9115
9116 2006-12-19  Martin Baulig  <martin@ximian.com>
9117
9118         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9119         the symbol file info here.
9120
9121 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9122
9123         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9124         of `elseif' is taking then following sections are not taking.
9125         Fixes an issue reported on mono mailing list.
9126
9127 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9128
9129         A fix for bug #80300
9130         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9131         a caller is not taking.
9132
9133 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9134
9135         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9136         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9137         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9138         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9139         * class.cs: Update to changes.
9140
9141 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9142
9143         A fix for bug #79934
9144         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9145         partial container.
9146
9147         * class.cs (ResolveMembers): Register an iterator in current container and
9148         not in shared one.
9149
9150 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9151
9152         Fix test-543.cs
9153         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9154         satisfy a params annotated parameter.
9155
9156 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9157
9158         A fix for bug #77014
9159         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9160         paramters correctly and not rely on hacks in Parameters class.
9161         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9162         at any possition.
9163         (Invocation.VerifyArgumentsCompat): Ditto.
9164         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9165         any possition.
9166
9167         * parameter.cs (HasParams): Don't assume that params is the last one.
9168
9169         * support.cs (ReflectionParameters.ctor): Look for params attribute
9170         correctly.
9171         (ReflectionParameters.ParameterType): Removed hack when we returned last
9172         parameter for out of range parameters.
9173         (ParameterName, ParameterModifier): Ditto.
9174
9175 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9176
9177         A fix for bug #79987
9178         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9179         when assembly is not CLS compliant but type is. I have no idea why is this
9180         allowed.
9181
9182         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9183
9184 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9185
9186         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9187         in struct constructors, they are basically no-ops.
9188
9189 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9190
9191         * cs-tokenizer.cs (Position): Save preprocessor status too.
9192
9193 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9194
9195         A fix for bug #77794
9196         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9197
9198 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9199
9200         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9201         Fixes #69299.
9202         (pp_expr): Report error for an invalid expression.
9203         (handle_preprocessing_directive): Simplified; add more error checking.
9204
9205 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9206
9207         A fix for bug #74939
9208         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9209         directives handling.
9210
9211 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9212
9213         A fix for bugs #80093, and #75984
9214         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9215         logic, it seems to me as it worked before "by coincidence".
9216         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9217         (cleanup): Enabled endif check.
9218
9219 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9220
9221         A fix for bug #80162
9222         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9223         enumerators are never ambiguous.
9224
9225 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9226
9227         Fix #80060
9228         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9229
9230 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9231
9232         A fix for bug #80144
9233         * class.cs (EventProperty.Define): Explicit implementation means
9234         that an even is used.
9235
9236 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9237
9238         Fixes the operators implementation (part II)
9239
9240         * cfold.cs (DoConstantNumericPromotions): Renamed to
9241         DoBinaryNumericPromotions and simplified.
9242         (BinaryFold): Couple of conversion fixes; simplified.
9243
9244         * constant.cs, ecore.cs, literal.cs
9245         (ToType): Renamed to ConvertImplicitly.
9246         (Reduce): Renamed to ConvertExplicitly.
9247
9248         * class.cs, convert.cs: Updated.
9249
9250         * expression.cs: TryReduce doesn't throw an exception.
9251
9252 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9253
9254         A fix for bug #80108
9255         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9256         compatible.
9257
9258 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9259
9260         Fixes unary operators implementation (part I)
9261         Also fixes #80026
9262
9263         * cfold.cs (Error_CompileTimeOverflow): Made internal
9264
9265         * const.cs (IConstant): Changed to use reference to constant and
9266         not constant itself.
9267         Updated IConstant implementations.
9268
9269         * constant.cs (CreateConstant): New factory method.
9270         Updated IConstant implementation.
9271
9272         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9273
9274         * ecore.cs: Updated to use CreateConstantReference.
9275
9276         * enum.cs: Reflects IConstant changes.
9277
9278         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9279
9280         * literal.cs (NullConstant): Change to be independently usable.
9281
9282 2006-11-29  Martin Baulig  <martin@ximian.com>
9283
9284         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9285         we need to emit the scope initializer before calling the base .ctor.
9286
9287         * anonymous.cs: Merged back from the new anonymous methods branch.
9288         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9289
9290         * expression.cs (ParameterReference.DoResolveBase): Create a
9291         "normal" ScopeInfo when capturing parameters rather than using the
9292         root scope; this makes things work with anonymous methods having
9293         parameters.
9294
9295         * statement.cs
9296         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9297
9298 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9299
9300         A fix for bug #79987
9301         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9302         check to a base class.
9303         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9304         only when assembly has missing attribute.
9305         * report.cs: Update.
9306
9307 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9308
9309         * cs-tokenizer.cs: Merged with gmcs version.
9310
9311 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9312
9313         * cs-tokenizer.cs,
9314         * cs-parser.jay: Better error message when partial keyword is misplaced.
9315
9316 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9317
9318         A fix for bug #79810
9319         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9320         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9321         a RuntimeWrappedException by default.
9322
9323 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9324
9325         A fix for bug #79843
9326         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9327         implementation.
9328         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9329
9330 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9331
9332         * driver.cs, namespace.cs: Uses faster IndexOf version.
9333
9334 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9335
9336         A fix for bug #79941
9337         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9338         operators.
9339         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9340         even if internal name is different.
9341         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9342         (UserDefinedConversion): Simplified as the operators cannot be internal.
9343         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9344         conversions.
9345         (MethodLookup): Replaced EmitContext with parentType.
9346         * expression.cs: Updated.
9347
9348 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9349
9350         * driver.cs (BadAssembly): Handle all the ugliness of
9351         DefineDynamicAssembly.
9352
9353 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9354
9355         Address parts of #58244 -- most of what's left is in the runtime
9356         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9357         CS1509 error checks, and handle them for all assembly loads, not
9358         just the first invocation.
9359         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9360         * codegen.cs (AssemblyClass.AddModule): ... here.
9361
9362 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9363
9364         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9365         IEnumerable<T> is ambiguous.
9366
9367 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9368
9369         A fix for bug #67689
9370         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9371         GetEnumerator is ambiguous.
9372
9373         * report.cs: Add new warning.
9374
9375 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9376
9377         A fix for bug #78602
9378         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9379         to protected member can be nested type.
9380
9381 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9382
9383         A fix for bug #78965
9384         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9385         to protected member must derive from current type.
9386
9387 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9388
9389         assign.cs: Reuses error method.
9390
9391         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9392         instead of type for constants.
9393         (Expression.Error_ValueAssignment): Common error method.
9394
9395         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9396         for any assignment.
9397
9398 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9399
9400         A fix for bug #79081
9401         * expression.cs (MemberAccess.DoResolve): Check nested type
9402         accessibility.
9403
9404 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9405
9406         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9407
9408 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9409
9410         A fix for bug #76591
9411         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9412
9413 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9414
9415         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9416         type forwarder of the same type multiple times.
9417
9418 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9419
9420         Fix #78820
9421         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9422         instance as an rvalue, even when we later resolve as an lvalue.
9423
9424 2006-10-25  Martin Baulig  <martin@ximian.com>
9425
9426         * anonymous.cs: Fix #79673.
9427
9428 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9429
9430         A fix for bug #79666
9431         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9432         ignored when is optimized (= default value) as its value is already set.
9433
9434 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9435
9436         A fix for bug #79724
9437         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9438         TypeContainer for type lookup.
9439
9440 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9441
9442         A fix for bug #79231
9443         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9444         * expression.cs (OverloadResolve): Always convert type name for
9445         an error message.
9446         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9447         other member.
9448
9449 2006-10-18  Martin Baulig <martin@ximian.com>
9450
9451         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9452
9453 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9454
9455         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9456         an int32, but requesting an int64 from the conversion
9457
9458 2006-10-12  Martin Baulig  <martin@ximian.com>
9459
9460         * anonymous.cs
9461         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9462         
9463 2006-10-12  Martin Baulig  <martin@ximian.com>
9464
9465         * statement.cs
9466         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9467
9468 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9469
9470         * convert.cs: Remove broken code: I was doing the "Existance"
9471         tests for Implicit conversions.
9472
9473 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9474
9475         * convert.cs: Added one missing case in
9476         ImplicitStandardConversionExists uint64 to intptr.
9477
9478         Fixes #59800
9479         
9480         * typemanager.cs (uintptr_type): another core known type.   
9481
9482         * ecore.cs (OperatorCast): routine used to do cast operations that
9483         depend on op_Explicit.  We could change some of the Decimal
9484         conversions to use this.
9485
9486         This one has a probe mechanism that checks both types for an op_
9487         which it coudl be used to eliminate two classes: CastToDecimal
9488         and CastFromDecimal.
9489
9490         * convert.cs: Implement the conversions documented in #59800
9491         
9492 2006-10-10  Martin Baulig  <martin@ximian.com>
9493
9494         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9495         before RootScope.ResolveMembers().
9496
9497         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9498         `CurrentType' if appropriate.
9499
9500 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9501
9502         A fix for bug #78568
9503         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9504         when contains binary operators.
9505         * cs-parser.jay: Updated.
9506
9507 2006-10-09  Martin Baulig  <martin@ximian.com>
9508
9509         * delegate.cs
9510         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9511         moved that into Define() and also do the other type parameter
9512         checks there.  Fixes #79094.  Added gtest-292.cs.
9513
9514         * expression.cs
9515         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9516         since that doesn't include type parameters; don't use `Ldelema'
9517         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9518
9519 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9520
9521         A fix for #77796
9522         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9523         conversion is allowed.
9524
9525 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9526
9527         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9528         error reporting when no error occurs.
9529
9530 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9531
9532         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9533         does not exist.
9534
9535 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9536
9537         Fix #79584
9538         * class.cs (DefineTypeBuilder): Check circular dependencies before
9539         setting the parent of the TypeBuilder.
9540         (CheckRecursiveDefinition): Don't use 'BaseType', since
9541         it may not be valid until after DefineTypeBuilder.  Use
9542         'base_type' instead.
9543
9544 2006-10-04  Martin Baulig  <martin@ximian.com>
9545
9546         Merged the Anonymous Methods patch.
9547
9548         * anonymous.cs, iterators.cs: The new anonymous methods code.
9549
9550         * statement.cs (Variable): New public abstract class.
9551         (LocalInfo.Variable): New public property.
9552         (LocalInfo.ResolveVariable): New public method.
9553         (Block.Flags): Add `IsIterator'.
9554         (Block.AddVariable): Improved the CS0136 check.
9555         (Block.AnonymousChildren): New public property.
9556         (Block.AddAnonymousChild): New public method.
9557         (ToplevelBlock): Update to use the new anonymous method framework.
9558         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9559         `ToplevelBlock'; this is required to correctly implement the
9560         CS0136 check.
9561         (Fixed, Using): Use `TemporaryVariable' instead of directly
9562         creating the `LocalBuilder'.
9563
9564         * parameter.cs (Parameter.ResolveVariable): New public method.
9565         (Parameters.ResolveVariable): Likewise.
9566
9567         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9568
9569         * class.cs (TypeContainer): Replaced the `iterators' list and
9570         corresponding methods with a list of `CompilerGeneratedClass'es.
9571         (TypeContainer.ResolveMembers): New public method.
9572         (Method): `IIteratorContainer' has been replaced by
9573         `IAnonymousHost'.
9574
9575         * expression.cs (VariableReference): New public abstract base
9576         class for `LocalVariableReference', `ParameterReference' and
9577         `This'.
9578
9579         * codegen.cs (EmitContext): Removed `capture_context',
9580         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9581         (EmitContext.EmitThis): Removed.
9582
9583         * cs-parser.jay: Replace `iterator_container' with
9584         `anonymous_host'.       
9585
9586 2006-10-04  Martin Baulig  <martin@ximian.com>
9587
9588         * generic.cs (GenericMethod): Don't make this abstract.
9589         (Constraints.Clone): Added dummy implementation.
9590
9591 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9592
9593         Fix #79577
9594         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9595         'declspaces'.  Avoid allocating arrays willy-nilly.
9596
9597         Fix #79553
9598         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9599         cases out of the switch.
9600
9601 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9602
9603         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9604         message when non-generic type is used with the type arguments.
9605         * expression.cs: Updated.
9606
9607 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9608
9609         Fix #79013
9610         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9611         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9612         Change semantics slightly.  Don't insist on having only one
9613         temporary EmptyExpression -- just throttle the creation of new ones.
9614
9615         Fix #79451
9616         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9617         non-interfaces too.  If no methods are found, don't try to create
9618         a MethodGroupExpr.
9619
9620 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9621
9622         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9623         generic type.
9624
9625         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9626         us produce better error message.
9627
9628 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9629
9630         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9631         of the `|' operator.
9632
9633         * report.cs: A new warning added.
9634
9635 2006-09-27  Martin Baulig  <martin@ximian.com>
9636
9637         * generic.cs (GenericMethod): Don't make this abstract.
9638
9639 2006-09-27  Martin Baulig  <martin@ximian.com>
9640
9641         * report.cs
9642         (InternalErrorException): Added overloaded ctor taking a params array.
9643
9644 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9645
9646         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9647         Fixed the cases when same error was reported twice.
9648
9649         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9650         now report symbol information.
9651
9652 2006-09-25  Martin Baulig  <martin@ximian.com>
9653
9654         * class.cs: Completely unified with the gmcs version.
9655
9656 2006-09-25  Martin Baulig  <martin@ximian.com>
9657
9658         * typemanager.cs (TypeManager.IsNullableType): New public function.
9659         (TypeManager.IsNullableTypeOf): Likewise.
9660         (TypeManager.IsNullableValueType): Likewise.
9661
9662         * class.cs (MethodCore): Added the `GenericMethod' argument from
9663         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9664
9665 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9666
9667         * convert.cs: Unify with gmcs version.
9668
9669 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9670
9671         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9672         verify them as well.
9673
9674         * report.cs: New warning.
9675
9676 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9677
9678         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9679         for anonymous block with out argument.
9680
9681 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9682
9683         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9684         not used private events only.
9685
9686 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9687
9688         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
9689
9690         * const.cs (Const.Define): Check for constant type.
9691         (Const.IsConstantTypeValid): Looks for valid constant types.
9692
9693         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
9694
9695         * ecore.cs (EmptyConstantCast): New common class for all constant based
9696         EmptyCast(s).
9697
9698         * expression.cs (Is.DoResolve): Handle null constant especially.
9699         (New.DoResolve): Check for new void().
9700         (MemberAccess.DoResolve): Cope with all kind of nulls.
9701
9702         * literal.cs (NullConstant): Uses EmptyConstantCast.
9703         (NullDefault): Based on EmptyConstantCast.
9704         (NullLiteral): Uses EmptyConstantCast.
9705
9706         * statement.cs (Block.ResolveMeta): Check for constant type.
9707
9708 2006-09-22  Martin Baulig  <martin@ximian.com>
9709
9710         * delegate.cs, attribute.cs: Merged with the gmcs versions.
9711
9712 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9713
9714         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
9715         not the null type.
9716
9717         Fix part of #79451
9718         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
9719         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
9720         code slightly.
9721
9722 2006-09-22  Martin Baulig  <martin@ximian.com>
9723
9724         * ecore.cs: Merged with the gmcs version.
9725
9726         * generic.cs (ConstructedType): New dummy class.
9727         (TypeArguments): Don't make this abstract.
9728
9729         * typemanager.cs
9730         (TypeManager.IsGenericTypeDefinition): New method.
9731         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
9732
9733 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9734
9735         * expression.cs (ComposedCast): Check for arrays of TypedReference
9736         before creating the type, not after.
9737
9738 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
9739
9740         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
9741         after ToType change.
9742
9743         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
9744         when constant must be implicitly convertible.
9745
9746         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
9747
9748         * ecore.cs (NullCast): Derives from NullConstant.
9749
9750         * expression.cs (Is.DoResolve): Removed useless variables.
9751         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
9752         (New.Constantify): Add enum support.
9753         (MemberAccess.DoResolve): Add warning when accessing null constant or
9754         variable.
9755
9756         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
9757         property.
9758
9759         * literal.cs (NullConstant): New abstract class with common
9760         functionality for all null specializations.
9761         (NullDefault): Represents default(X) when result can be
9762         reduced to null.
9763         (NullLiteral): Updated.
9764
9765         * report.cs: Add new warning.
9766
9767 2006-09-21  Martin Baulig  <martin@ximian.com>
9768
9769         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
9770
9771 2006-09-21  Martin Baulig  <martin@ximian.com>
9772
9773         * generic.cs (GenericConstraints): New dummy class.
9774         (Constraints): Likewise.
9775         (TypeParameter): Likewise.
9776         (TypeParameterName): Likewise.
9777         (GenericMethod): Likewise.
9778
9779         * typemanager.cs (TypeManager.GetGenericArguments): New method.
9780
9781         * decl.cs: Merged with the gmcs version.
9782
9783 2006-09-21  Raja R Harinath  <rharinath@novell.com>
9784
9785         * generic.cs (TypeParameter): Implement IMemberContainer.
9786         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
9787
9788         * rootcontext.cs: Unify with gmcs version.
9789
9790         * report.cs: Unify with gmcs version.
9791         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
9792         from gmcs/generics.cs.
9793         * generics.cs (TypeParameter): New dummy class.
9794
9795         * support.cs: Unify with gmcs version.
9796
9797 2006-09-20  Raja R Harinath  <rharinath@novell.com>
9798
9799         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
9800         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
9801
9802         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
9803         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
9804         * mcs.exe.sources: Add generic.cs.
9805
9806         * codegen.cs: Unify with gmcs version.
9807
9808         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
9809         (EmitContext): Add GenericDeclContainer implementation.
9810         * decl.cs (MemberCore, DeclSpace): Likewise.
9811         * namespace.cs: Remove #ifdef GMCS_SOURCE.
9812
9813         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
9814         MCS TypeManager has a corresponding dummy method.
9815
9816 2006-09-19  Martin Baulig  <martin@ximian.com>
9817
9818         * expression.cs: Completely merged with the gmcs version.
9819
9820 2006-09-19  Martin Baulig  <martin@ximian.com>
9821
9822         * expression.cs (Invocation): Merged with the gmcs version.
9823         (ArrayAccess.GetStoreOpcode): Likewise.
9824
9825 2006-09-19  Martin Baulig  <martin@ximian.com>
9826
9827         * typemanager.cs
9828         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
9829         (TypeManager.IsGenericMethodDefinition): Likewise.
9830
9831 2006-09-19  Martin Baulig  <martin@ximian.com>
9832
9833         * typemanager.cs
9834         (TypeManager.IsEqual): Moved the gmcs implementation here.
9835         (TypeManager.DropGenericTypeArguments): Likewise.
9836         (TypeManager.DropGenericMethodArguments): Likewise.
9837         (TypeManager.GetTypeArguments): Moved here from gmcs.
9838         (TypeManager.HasGenericArguments): Likewise.
9839
9840 2006-09-19  Martin Baulig  <martin@ximian.com>
9841
9842         * expression.cs (Binary): Merged with the gmcs version.
9843
9844 2006-09-19  Martin Baulig  <martin@ximian.com>
9845
9846         * expression.cs (Probe, As, Is): Merged with the gmcs version.
9847
9848 2006-09-19  Martin Baulig  <martin@ximian.com>
9849
9850         * typemanager.cs: Merged with the gmcs version.
9851
9852 2006-09-16  Raja R Harinath  <rharinath@novell.com>
9853
9854         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
9855         * driver.cs: Likewise.
9856
9857 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
9858
9859         A fix for #79401
9860         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
9861         only if parent type is class.
9862         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
9863         update.
9864
9865 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
9866
9867         * cs-parser.jay,
9868         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
9869         keywords are used.
9870         * typemanager.cs(CSharpName): Converts NullType to null.
9871
9872 2006-09-15  Martin Baulig  <martin@ximian.com>
9873
9874         * typemanager.cs
9875         (TypeManager.GetMethodName): Added mcs implementation.
9876         (TypeManager.IsEqual): Likewise.
9877
9878         * ecore.cs
9879         (SimpleName.RemoveGenericArity): Added dummy implementation.
9880
9881         * pending.cs: Merged with the gmcs version.     
9882
9883 2006-09-15  Martin Baulig  <martin@ximian.com>
9884
9885         * statement.cs: Merge with the gmcs version.
9886
9887 2006-09-15  Martin Baulig  <martin@ximian.com>
9888
9889         * statement.cs (Switch): Merge with the gmcs implementation
9890         (without nullables), which is newer.
9891
9892 2006-09-15  Martin Baulig  <martin@ximian.com>
9893
9894         * statement.cs (Block.Variables): Make this public.
9895         (ToplevelBlock.Parameters): Make this a property.
9896         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
9897
9898 2006-09-15  Martin Baulig  <martin@ximian.com>
9899
9900         * namespace.cs: Merge with the gmcs version.
9901
9902 2006-09-15  Martin Baulig  <martin@ximian.com>
9903
9904         * decl.cs (MemberName): Minor code cleanups.
9905
9906 2006-09-15  Martin Baulig  <martin@ximian.com>
9907
9908         * parameter.cs: Merge with the gmcs version.
9909
9910 2006-09-15  Martin Baulig  <martin@ximian.com>
9911
9912         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
9913         and an error in mcs.
9914
9915 2006-09-15  Martin Baulig  <martin@ximian.com>
9916
9917         * flowanalysis.cs: Merged from GMCS; added the generics code into
9918         a `GMCS_SOURCE' conditional so we can share this file.
9919
9920 2006-09-08  Martin Baulig  <martin@ximian.com>
9921
9922         * typemanager.cs (TypeManager.interlocked_type): New public field.
9923         (TypeManager.int_interlocked_compare-exchange): New public field.
9924         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
9925         enumerator types here and call InitGenericCoreTypes().
9926         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
9927         after calling InitEnumUnderlyingTypes().
9928
9929         * rootcontext.cs
9930         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
9931         `classes_second_stage'. 
9932
9933 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
9934
9935         * assign.cs, ecore.cs, expression.cs: Share error message text.
9936         * class.cs (FieldMember.Define): Check for varible of static type.
9937         * driver.cs (LoadAssembly): Uses error output for errors.
9938         * statement.cs: Updated.
9939
9940 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
9941
9942         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
9943         type instance.
9944
9945 2006-09-07  Martin Baulig  <martin@ximian.com>
9946
9947         * driver.cs
9948         (MainDriver): Revert r62663 from Marek; see #70506 for details.
9949
9950 2006-08-29  Miguel de Icaza  <miguel@novell.com>
9951
9952         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
9953         
9954 2006-08-17  Miguel de Icaza  <miguel@novell.com>
9955
9956         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
9957         #52019 and #79064, the use of the \uXXXX sequence in source code
9958         to represent unicode characters.
9959
9960 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
9961
9962         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
9963         support.
9964         * class.cs, ecore.cs, statement.cs: Merged to one error message.
9965
9966 2006-08-13  Miguel de Icaza  <miguel@novell.com>
9967
9968         * assign.cs: Catch attempts to assign to a method groups in += and
9969         report as 1656
9970
9971 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
9972
9973         A fix for #79056
9974         * cs-parser.jay: Don't destroy current array type by typeof of array's.
9975
9976 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
9977
9978         * class.cs (Method.Define): Issue a warning when generic method looks like
9979         an entry point.
9980         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
9981         as well.
9982
9983 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
9984  
9985         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
9986         looking for ctor.
9987         * decl.cs (MemberCache.FindMembers): When container is interface we need to
9988         search all base interfaces as a member can be ambiguous.
9989         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
9990         Constructor member type filter. 
9991         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
9992         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
9993         reporting for returned memberinfos.
9994         * report.cs: Updated.
9995         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
9996         version to work on all runtimes.
9997         (TypeManager.RealMemberLookup): Removed members filtering.
9998
9999 2006-08-08  Raja R Harinath  <rharinath@novell.com>
10000
10001         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
10002         (PropertyExpr.EmitAssign): Likewise.
10003         * expression.cs (Indirection.EmitAssign): Likewise.
10004         (LocalVariableReference.EmitAssign): Likewise.
10005         (ParameterReference.EmitAssign): Likewise.
10006         (Invocation.EmitArguments): Likewise.
10007         (ArrayAccess.EmitAssign): Likewise.
10008         (IndexerAccess.EmitAssign): Likewise.
10009         (This.EmitAssign): Likewise.
10010         (ConditionalLogicalOperator.Emit): Likewise.
10011
10012         Fix #79026
10013         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
10014         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
10015         leave it in after returning it.
10016         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
10017
10018 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
10019
10020         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
10021         message.
10022
10023 2006-08-03  Raja R Harinath  <rharinath@novell.com>
10024
10025         Fix cs0146-3.cs and cs0146-4.cs.
10026         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
10027         enclosing types don't depend on the current type.
10028
10029 2006-08-02  Raja R Harinath  <rharinath@novell.com>
10030
10031         Fix #77963
10032         * class.cs (TypeContainer.DoDefineMembers): Use
10033         FindBaseMemberWithSameName on Parent, since we're interested in
10034         whether we hide inherited members or not.
10035         (FindBaseMemberWithSameName): Make slightly more robust.
10036
10037         Fix the non-generic testcase from #77396
10038         * decl.cs (DeclSpace.DeclContainer): Remove override.
10039
10040         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
10041         declspaces for doppelgangers too.
10042         (UsingEntry): Implement IResolveContext.
10043         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
10044         'this' as the resolve context.
10045         (LocalAliasEntry): Likewise.
10046
10047         Implement parts of #77403
10048         * roottypes.cs (RootDeclSpace): New.  Used to represent the
10049         toplevel declaration space.  Each namespace declaration introduces
10050         a "partial" root declaretion space.
10051         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
10052         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
10053         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
10054         from 'current_namespace.SlaveDeclSpace'.
10055         (namespace_declaration): Likewise.
10056         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
10057         check.  It can't happen now.
10058         * decl.cs (DeclSpace.LookupType): Likewise.
10059         * driver.cs (MainDriver): Sanity check.
10060
10061 2006-08-01  Raja R Harinath  <rharinath@novell.com>
10062
10063         * decl.cs (DeclSpace.FindNestedType): Remove.
10064         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
10065         LookupTypeContainer to get the container of the nested type.
10066         * class.cs (TypeContainer.FindNestedType): Make non-override.
10067
10068 2006-07-31  Raja R Harinath  <rharinath@novell.com>
10069
10070         * decl.cs (DeclSpace.PartialContainer): Move field from ...
10071         * class.cs (TypeContainer.PartialContainer): ... here.
10072         (TypeContainer.AddBasesForPart): New helper.
10073         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
10074         instead.
10075         * cs-parser.jay (current_class): Convert to DeclSpace.
10076         (struct_declaration, interface_declaration, class_declaration):
10077         Use AddBasesForPart instead of .Bases directly.
10078         * const.cs, iterators.cs: Update to changes.
10079
10080 2006-07-28  Raja R Harinath  <rharinath@novell.com>
10081
10082         * class.cs (TypeContainer.AddMemberType): Rename from
10083         AddToTypeContainer.
10084         (TypeContainer.AddMember): Rename from AddToMemberContainer.
10085         (AddTypeContainer): New.  Combine AddClassOrStruct and
10086         AddInterface.
10087         (AddPartial): Update.  Add 'is_partial' argument.
10088         * roottypes.cs: Update to changes.
10089         * cs-parser.jay (push_current_class): New helper for handling
10090         current_container and current_class.
10091         (struct_declaration, interface_declaration, class_declaration):
10092         Use it.
10093
10094 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10095
10096         * roottypes.cs: Rename from tree.cs.
10097
10098         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10099         * tree.cs (Tree, ITreeDump): Remove types.
10100         * rootcontext.cs (tree, Tree): Remove fields.
10101         (root, ToplevelTypes): New.
10102         * *.cs: Update to rename.
10103
10104         * tree.cs (Tree.RecordDecl): Remove.
10105         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10106         namespace here.
10107         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10108
10109 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10110
10111         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10112         DoFlowAnalysis and OmitStructFlowAnalysis here.
10113         (ec.With): Rename from WithUnsafe and generalize.
10114         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10115         (ec.WithFlowAnalyis): New.
10116         * ecore.cs, expression.cs, statement.cs: Update.
10117
10118 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10119
10120         * statement.cs (Block.ResolveMeta): Simplify slightly.
10121
10122         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10123         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10124         check_state to flags.
10125         (CheckState, ConstantCheckState): Update.
10126         (InUnsafe): New read-only property.
10127         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10128         arbitrary flags.
10129         (WithUnsafe): New helper similar to WithCheckState.
10130         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10131         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10132
10133 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10134
10135         Make comparisons use the same IL irrespective of whether they're
10136         in a 'checked' or 'unchecked' context: one of the issues in #78899
10137         * codegen.cs (EmitContext.CheckState): Make read-only property.
10138         (EmitContext.ConstantCheckState): Likewise.
10139         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10140         helper that implement a save/restore stack for CheckState
10141         values.  This is the only way to change check-state.
10142         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10143         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10144         (CheckedExpr.EmitBranchable): New forwarding method.
10145         (UnCheckedExpr): Likewise.
10146         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10147         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10148         (Checked.Resolve, checked.DoEmit): Likewise.
10149
10150 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10151
10152         * anonymous.cs: Cache the resolved anonymous delegate, and return
10153         this so that the ResolveTopBlock is only triggered once, not
10154         twice.
10155
10156         Currently we trigger ResolvetopBlock twice due to a first pass of
10157         argument check compatibility, and a second pass that does the
10158         actual resolution.   
10159         
10160 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10161
10162         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10163         modifiers.
10164         * rootcontext.cs (Reset): Add helper_classes.
10165
10166 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10167
10168         A fix for #78860
10169         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10170         correctly.
10171
10172 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10173
10174         * statement.cs (Lock): Handle expressions of type
10175         TypeManager.null_type specially.  Fixes #78770
10176
10177 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10178
10179         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10180         to an event.
10181
10182 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10183
10184         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10185         for accessors as well.
10186         * ecore.cs (EventExpr): Add AccessorTable.
10187
10188 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10189
10190         A fix for #78738
10191         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10192         for CS0122 where appropriate.
10193         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10194         level attributes.
10195         (Filter): Assembly can be null in the case of top level attributes.
10196
10197 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10198
10199         A fix for #78690
10200
10201         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10202         is done at global level.
10203
10204 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10205
10206         A fix for #77002, Implemented TypeForwarder support.
10207
10208         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10209         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10210         * typemanager.cs (): Add type_forwarder_attr_type.
10211
10212 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10213
10214         * report.cs: Add CS0469 warning.
10215
10216 2006-06-21  Martin Baulig  <martin@ximian.com>
10217
10218         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10219         the `try'-block, so we also report CS0016 etc. there.
10220
10221 2006-06-21  Martin Baulig  <martin@ximian.com>
10222
10223         * delegate.cs
10224         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10225
10226 2006-06-21  Martin Baulig  <martin@ximian.com>
10227
10228         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10229         also report CS1686 for parameters.
10230
10231 2006-06-21  Martin Baulig  <martin@ximian.com>
10232
10233         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10234         instead of an error if the value is not implicitly convertible to
10235         the switch types; fixes #77964.
10236
10237 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10238
10239         Fix #78673
10240         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10241         FieldBuilder is null.
10242
10243         Fix #78662
10244         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10245         'left' and 'right' before error-checking.
10246
10247 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10248
10249         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10250         Fixed bug #78601.
10251         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10252         (FieldExpr.DoResolve): likewise.
10253         (PropertyExpr.InstanceResolve): likewise.
10254         (EventExpr.InstanceResolve): likewise. 
10255
10256 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10257
10258         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10259         attribute applicable tests for attribute argument.
10260
10261 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10262
10263         Fix #78079
10264         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10265         (Binary.OverloadResolve_PredefinedIntegral): New.
10266         (Binary.OverloadResolve_PredefinedFloating): New.
10267         (Binary.OverloadResolve_PredefinedString): New.
10268         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10269         Follow the standard more closely, and treat numeric promotions in
10270         terms of overload resolution.
10271         (Binary.CheckShiftArguments): Simplify.
10272
10273 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10274
10275         * flowanalysis.cs (MyBitVector): Simplify representation.
10276         (MyBitVector.Clone): Avoid allocating BitArray.
10277         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10278         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10279         (*): Update.  Change all references to MyBitVector.And and
10280         MyBitVector.Or to &= and |=.
10281
10282 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10283
10284         Fix cs0231-[34].cs.
10285         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10286         to param arguments too.
10287
10288 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10289
10290         * cs-parser.jay: Catch another parsing form for arglist being
10291         followed by other arguments.  Fixes #78313.
10292
10293 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10294
10295         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10296         checking of out parameters to ...
10297         (FlowBranchingToplevel.Merge): ... here.
10298         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10299         set, propagate the origin upward, and only complain if there was
10300         no other error.
10301         (FlowBranchingException.AddContinueOrigin): Likewise.
10302         (FlowBranchingException.AddReturnOrigin): Likewise.
10303         (FlowBranchingException.AddGotoOrigin): Likewise.       
10304
10305 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10306
10307         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10308         unreachable, skip it.
10309         (FlowBranchingException.Merge): Always propagate jumps, even if
10310         the finally block renders subsequent code unreachable.
10311
10312 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10313
10314         Fix #77601
10315         * statement.cs (Goto.Resolve): Move responsibility for resolving
10316         'goto' to FlowBranching.AddGotoOrigin.
10317         (Goto.SetResolvedTarget): New.  Callback to set the
10318         LabeledStatement that's the target of the goto.
10319         (Goto.DoEmit): Use Leave instead of Br when crossing an
10320         unwind-protect boundary.
10321         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10322         LookupLabel and adjust to new semantics.
10323         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10324         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10325         Goto.SetResolvedTarget to update target.
10326         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10327         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10328         AddBreakOrigin & co.  Delay propagation until ...
10329         (FlowBranchingException.Merge): ... this.
10330
10331         * statement.cs (Block.Resolve): Always depend on flow-branching to
10332         determine unreachability.  Kill workaround that originally emitted
10333         only one statement after an "unreachable" label (see infloop in
10334         test-515.cs).
10335
10336         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10337         This is still "wrong", but anything better would probably need a
10338         multi-pass algorithm.
10339         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10340         usage vector.  Force current usage vector to be reachable, to
10341         optimistically signify backward jumps.
10342         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10343         detected.
10344         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10345         detected, return the original salted-away usage vector instead,
10346         updated with appropriate changes.  Print unreachable warning if
10347         necessary.
10348         * statement.cs (Block.Resolve): Don't print unreachable warning on
10349         a labeled statement.
10350
10351 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10352
10353         * driver.cs: Pass filename without path to AssemblyBuilder's 
10354         AddResourceFile. Fixes bug #78407.
10355
10356 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10357
10358         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10359         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10360         (FlowBranching.MergeChild): Overwrite
10361         reachability information from Labeled branchings too.
10362
10363 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10364
10365         * statement.cs (Goto.Resolve): Merge jump origins here ...
10366         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10367
10368         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10369         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10370         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10371         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10372         here, ...
10373         * statement.cs (Goto.Resolve): ... not here.
10374         (Goto.Emit): Remove CS1632 check.
10375
10376 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10377
10378         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10379         error message.
10380
10381 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10382
10383         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10384         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10385         (FlowBranchingException.Label): Likewise.
10386
10387         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10388         given value.
10389         (MyBitVector.Or): Use it to avoid losing information (Count).
10390         (FlowBranching.MergeOrigins): Likewise.
10391
10392         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10393         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10394         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10395         (UsageVector.ToString): Simplify.
10396         (UsageVector.MergeSiblings): Move here from ...
10397         (FlowBranching.Merge): ... here.
10398         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10399         not a MyBitVector.
10400
10401 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10402
10403         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10404         null bitvector is treated as all-true.
10405
10406         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10407         (MyBitVector): Rationalize invariants.  'vector != null' implies
10408         that we have our own copy of the bitvector.  Otherwise,
10409         'InheritsFrom == null' implies all inherited bits are true.
10410
10411 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10412
10413         * statement.cs (LocalInfo): Add IsConstant.
10414         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10415         local variable for constants.
10416
10417 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10418
10419         * flowanalysis.cs (MyBitVector.Empty): New.
10420         (MyBitVector): Don't allow InheritedFrom to be null.
10421         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10422         (UsageVector, FlowBranching): Update to changes.
10423
10424         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10425         recursion.  The 'Parent == null' condition isn't sufficient for
10426         anonymous methods.
10427         (FlowBranching.AddBreakOrigin): Likewise.
10428         (FlowBranching.AddContinueOrigin): Likewise.
10429         (FlowBranching.AddReturnOrigin): Likewise.
10430         (FlowBranching.StealFinallyClauses): Likewise.
10431         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10432         (FlowBranching.CheckOutParameters): Likewise.
10433         (FlowBranchingToplevel): Terminate all the above recursions here.
10434         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10435         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10436
10437         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10438         toplevel block.
10439         (FlowBranchingToplevel): New.  Empty for now.
10440         (FlowBranching.MergeTopBlock): Update.
10441         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10442         branching for the anonymous delegate.
10443         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10444
10445         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10446         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10447         information at the start of the merge.  Reorganize.
10448
10449 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10450
10451         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10452
10453 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10454
10455         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10456         to newly introduced ctor.
10457
10458         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10459         message to one place.
10460         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10461         global namespace.
10462
10463 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10464
10465         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10466
10467         * ecore.cs (Expression.ResolveAsConstant): Updated.
10468
10469         * statement.cs (ResolveMeta): Updated.
10470
10471 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10472
10473         * cs-parser.jay: __arglist cannot be used in initializer.
10474
10475 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10476
10477         A fix for #77879
10478         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10479         private types.
10480
10481 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10482
10483         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10484         (LabeledStatement): Add 'name' parameter.
10485         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10486         (Block.AddLabel): Update to changes.
10487         * cs-parser.jay (labeled_statement): Likewise.
10488
10489         * flowanalysis.cs (BranchingType.Labeled): New.
10490         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10491         (FlowBranchingLabeled): New.  Does nothing for now, but will
10492         eventually handle 'goto' flows.
10493         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10494         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10495         that's terminated ...
10496         (Block.Resolve): ... here.
10497
10498         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10499         (UsageVector.MergeFinallyOrigins): Likewise.
10500         (FlowBranching.InTryOrCatch): Likewise.
10501         (FlowBranching.AddFinallyVector): Likewise.
10502         (FlowBranchingException): Update to changes.
10503
10504         Fix #78290
10505         * statement.cs (Return.Resolve): Move error checking to ...
10506         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10507         (FlowBranchingException): Handle return origins like break and
10508         continue origins.
10509         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10510
10511 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10512
10513         A fix for #76122
10514         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10515         filter.
10516
10517 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10518
10519         A fix for #77543
10520         * class.cs (MethodData.Define): Do public accessor check only when method
10521         implements an interface.
10522
10523 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10524
10525         Remove special handling of 'break'
10526         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10527         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10528         (UsageVector.Break): Remove.
10529         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10530         reachability.
10531         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10532
10533         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10534         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10535
10536 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10537
10538         A fix for #75726
10539         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10540         be the interface member.
10541
10542 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10543
10544         A fix for #60069
10545         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10546         for emitting small (int) values.
10547
10548 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10549
10550         Fix #59427
10551         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10552         control-flow passes through the 'finally' after merging-in all the
10553         control-flows from 'try' and the 'catch' clauses.
10554
10555         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10556         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10557         always true at the only non-recursive entry point.
10558         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10559         FlowBranchingBreakable.
10560         (FlowBranchingLoop): Remove.
10561         * statement.cs (Return.DoResolve): Update to changes.
10562
10563         Fix #76471, #76665
10564         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10565         (FlowBranching.CreateBranching): Handle it: create a
10566         FlowBranchingContinuable.
10567         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10568         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10569         except that it handles the 'continue' command.
10570         (FlowBranching.UsageVector.MergeOrigins): Rename from
10571         MergeBreakOrigins.
10572         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10573         except that it overrides AddContinueOrigin.
10574         (FlowBranchingException): Override AddContinueOrigin, similar to
10575         AddBreakOrigin.
10576         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10577         Create a new branching around the embedded statement.
10578         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10579         control flow after the embedded statement.
10580         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10581
10582         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10583         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10584         FlowBranchingBreakable.
10585         (FlowBranchingSwitch): Remove.
10586
10587         Fix test-503.cs
10588         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10589         error reporting to ...
10590         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10591         Rename from 'AddBreakVector'.  Add new location argument.  Return
10592         a bool indicating whether the 'break' crosses an unwind-protect.
10593         (FlowBranchingException.AddBreakOrigin): Add.
10594         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10595         flowbranching after updating with the effects of the 'finally'
10596         clause.
10597         (FlowBranchingBreakable): New common base class for
10598         FlowBranchingLoop and FlowBranchingSwitch.
10599
10600         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10601         embedded statement.
10602         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10603
10604 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10605
10606         * statement.cs (Do.Resolve): If the loop is infinite, set the
10607         barrier.
10608         (While.Resolve, For.Resolve): Set a barrier after the embedded
10609         statement.  There's no direct control flow that goes from the end
10610         of the embedded statement to the end of the loop.
10611         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10612         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10613         above ensure that the reachability is correctly computed.
10614
10615         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10616         (UsageVector.MergeBreakOrigins): If the current path is
10617         unreachable, treat it as if all parameters/locals are initialized.
10618         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10619         infinite loops before merging-in break origins.
10620
10621         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10622         (Reachability.Reachable): Split part into ...
10623         (Reachability.Unreachable): ... this.  Simplify.
10624         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10625
10626         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10627         (Reachability.SetThrowsSometimes): Likewise.
10628         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10629         TriState.Always, use corresponding property.
10630         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10631         (Block.Resolve): Likewise.  Remove some redundant checks.
10632
10633 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10634
10635         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10636         (Reachability.Meet): Don't bother checking AlwaysThrows --
10637         barrier is always set.
10638         (FlowBranchingBlock.Merge): Likewise.
10639
10640 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10641
10642         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10643         checks for unreachable.
10644
10645 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10646
10647         A fix for #77980
10648         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10649
10650         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10651         whether field is really assigned.
10652
10653 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10654
10655         * flowanalysis.cs (Reachability): Make 4-argument constructor
10656         private.
10657         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10658         (Reachability.Always): Rename from the highly misleading
10659         'Reachability.Never'.
10660         (FlowBranching.Merge): Update to changes.  Mark an impossible
10661         situation with a 'throw'.
10662         (*): Update to changes.
10663
10664 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10665
10666         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10667         Remove 'Undefined'.
10668         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10669         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10670         (*): Update to changes.
10671         * statement.cs: Update to changes.
10672
10673 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10674
10675         A fix for #78049
10676         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10677
10678 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10679
10680         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10681         dummy UsageVector.
10682
10683         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10684         argument to two arguments: an usage-vector and a bool.  Move call
10685         to FlowBranching.Merge () ...
10686         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10687
10688         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
10689         handling of loop and switch reachability to ...
10690         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
10691
10692 2006-04-27  Raja R Harinath  <harinath@gmail.com>
10693
10694         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
10695         handling to FlowBranchingLoop.InLoop.
10696         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
10697
10698 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
10699
10700         A fix for #78115
10701         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
10702         anonymous method is allowed from AnonymousContainer here.
10703
10704         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
10705
10706 2006-04-24  Raja R Harinath  <rharinath@novell.com>
10707
10708         Fix #78156
10709         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
10710
10711 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
10712
10713         A fix for #49011.
10714         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
10715         (DoubleConstant.Reduce): Ditto.
10716
10717 2006-04-23  Raja R Harinath  <rharinath@novell.com>
10718
10719         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
10720         Remove 'lvalue_right_side' argument.  Move parts to ...
10721         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
10722         (LocalVariable.DoResolveLValue): ... these.
10723
10724 2006-04-21  Raja R Harinath  <rharinath@novell.com>
10725
10726         Fix cs1655.cs
10727         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
10728         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
10729         (LocalVariableReference.DoResolveBase): Use it to implement new
10730         CS1655 check.
10731         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
10732         (Argument.Resolve): Simplify.  Move CS1510 check ...
10733         * ecore.cs (Expression.ResolveLValue): ... here.
10734         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
10735         (PropertyExpr.DoResolveLValue): Likewise.
10736         (FieldExpr.Report_AssignToReadonly): Likewise.
10737         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
10738         LValueMemberAccess or LValueMemberOutAccess on instance depending
10739         on it.
10740         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
10741         DoResolve as appropriate.
10742
10743 2006-04-20  Raja R Harinath  <rharinath@novell.com>
10744
10745         Fix #75800
10746         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
10747         implicit conversions on 'out' and 'ref' arguments.
10748
10749         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
10750         improve clarity.  Remove dead code.
10751
10752         Fix #66031
10753         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
10754         (Catch.Resolve): Resolve VarBlock if it exists.
10755
10756 2006-04-19  Miguel de Icaza  <miguel@novell.com>
10757
10758         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
10759         twice, this was some residual code, the enumerator was emitted
10760         properly in the two branche of if later.
10761
10762 2006-04-19  Raja R Harinath  <rharinath@novell.com>
10763
10764         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
10765         cast is never an lvalue.
10766         (Cast.DoResolve, Cast.ResolveRest): Combine.
10767         (Argument.Emit): Simplify slightly.  Move 'Expr is
10768         IMemoryLocation' check ...
10769         (Argument.Resolve): ... here.
10770         (Argument.Error_LValueRequired): Remove.  Inline into only user.
10771
10772         Simplifications.  Fix cs0191-2.cs
10773         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
10774         CS1649 and CS1651 to ...
10775         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
10776         the actual selection of the error code and message to a lookup
10777         table.  Add a dummy return value to simplify callsites.
10778         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
10779         readonly fields of other instances of the same type.  Move CS0197
10780         warning from ...
10781         * expression.cs (Argument.Resolve): ... here.  Simplify code.
10782         Ensure that ec.InRefOutArgumentResolving is only set during LValue
10783         resolution of an out or ref argument.  The code simplification
10784         above uses this invariant.
10785
10786 2006-04-18  Raja R Harinath  <rharinath@novell.com>
10787
10788         Possibly fix #77752.  Fix cs1690-[4-7].cs.
10789         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
10790         CheckMarshallByRefAccess.  Drop parameter.
10791         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
10792         warning.
10793         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
10794         InstanceExpression.
10795         * report.cs (AllWarnings): Add CS1690.
10796         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
10797         for ref access too.
10798         (LocalVariableReference.DoResolveBase): Update.
10799
10800 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10801
10802         * class.cs (MethodOrOperator): Moved common parts from method class.
10803         detect obsolete attributes.
10804         (Method.Define): Simplified as it reuses code from base.
10805         (Constructor.ValidAttributeTargets): Fixed issue found during
10806         refactoring.
10807         (Destructor.ValidAttributeTargets): Fixed issue found during
10808         refactoring.
10809         (Operator): Finished refactoring set off by #78020. Operator class is now
10810         ordinary method class.
10811
10812         * anonymous.cs: Updated.
10813
10814         * decl.cs (DeclSpace): Add IsGeneric
10815
10816 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10817
10818         * class.cs (Constructor.Emit): Don't emit the attributes twice.
10819
10820 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10821
10822         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
10823         detect obsolete attributes.
10824         (Method.CreateEmitContext): Moved to MethodOrOperator.
10825
10826 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10827
10828         A fix for #78048.
10829         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
10830         customized exception to make crash detection easier.
10831         (MethodOrOperator): Started to work on new base class for methods and
10832         operators.
10833         (Method): Derives from MethodOrOperator.
10834         (Constructor.Emit): Emits its own attributes.
10835         (AbstractPropertyEventMethod.Emit): Ditto.
10836         (Operator): Derives from MethodOrOperator, will refactor fully in extra
10837         patch.
10838         (Operator.Emit): It's temporary more tricky than should be.
10839         
10840         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
10841
10842         * report.cs (InternalErrorException): Add ctor with inner exception.
10843
10844 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
10845
10846         A fix for #76744.
10847         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
10848         only not visible.
10849
10850 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
10851
10852         A fix for #77916.
10853         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
10854         array.
10855
10856 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10857
10858         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
10859         attribute is present and Guid not.
10860         (Interface.ApplyAttributeBuilder): Ditto.
10861
10862         * attribute.cs: Add error message.
10863
10864 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10865
10866         A fix for #78020.
10867
10868         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
10869         sources (it's composite) so hold them in extra array as they are used in
10870         Emit phase only. It worked in the previous versions by mistake.
10871         (Attribute.Emit): Emit attribute for more owners when exist.
10872
10873         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
10874         it has now different behaviour.
10875
10876 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
10877
10878         * constant.cs (Constant.IsDefaultInitializer): New method.
10879
10880         * class.cs: Updated.
10881
10882         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
10883         re-initialize default values. It saves KBs almost for every assembly.
10884         Thanks Zoltan for the idea.
10885         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
10886         (ArrayCreation.DoResolve): Resolve only once.
10887         (ArrayCreation.Emit): Emit static initializer only when it is faster.
10888         (ArrayCreation.GetAttributableValue): Cope with optimized values.
10889
10890 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10891
10892         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
10893         From #77961.
10894
10895 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10896
10897         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
10898         in an embedded statement too.
10899
10900 2006-04-01  Raja R Harinath  <rharinath@novell.com>
10901
10902         Fix #77958
10903         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
10904
10905 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10906
10907         A fix for #77966.
10908
10909         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
10910         was not specified.
10911
10912         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
10913
10914 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
10915
10916         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
10917         phase.
10918
10919         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
10920         LocalTemporary change.
10921
10922         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
10923         TypeContainer.
10924         (ClassOrStruct.DefineFieldInitializers): Implemented static field
10925         initializers optimization.
10926         (ClassOrStruct.TypeAttr): Moved from modifiers.
10927         (Constructor.CheckBase): Don't crash when static ctor has parameters.
10928         (FieldBase.ResolveInitializer): Resolves initializer.
10929         (FieldBase.HasDefaultInitializer): New property.
10930
10931         * cs-parser.jay: Removed message.
10932
10933         * expression.cs (CompilerGeneratedThis): New specialization.
10934
10935         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
10936
10937 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
10938
10939         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
10940
10941 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10942
10943         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
10944         be now EnumConstants only.
10945
10946 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10947
10948         * attribute.cs, driver.cs: Reset more caches.
10949
10950 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10951
10952         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
10953
10954 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10955
10956         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
10957         for easier reuse. Updated all overrides.
10958         (IntegralConstant): New base class for all integral constants.
10959         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
10960         of the constant range, report custom error.
10961         (UIntConstant.Reduce): Fixed uint conversion.
10962
10963         * ecore.cs, literal.cs: Reduce updates.
10964
10965 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10966
10967         A fix for #75813.
10968
10969         * class.cs (Constructor.Define): Removed extra if for default ctors.
10970         A patch from Atsushi Enomoto.
10971
10972 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10973
10974         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
10975         GetAttributableValue.
10976
10977         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
10978         when required.
10979
10980         * convert.cs (ImplicitConversionRequired): Error message moved to
10981         DoubleLiteral.
10982
10983         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
10984         automatic implicit conversion of an output value.
10985         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
10986
10987         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
10988         conversion.
10989         (TypeOf.GetAttributableValue): Add extra handling for object type.
10990
10991         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
10992         special error message.
10993
10994 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
10995
10996         * class.cs (Constructor.Emit): Don't crash when struct ctor is
10997         InternalCall.
10998         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
10999         compatible with MS runtime.
11000
11001 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
11002
11003         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
11004         attribute arguments here.
11005
11006         * class.cs (Indexer.Define): The check was moved to attribute class.
11007
11008 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
11009
11010         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
11011         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
11012         easier.
11013
11014 2006-03-22  Raja R Harinath  <rharinath@novell.com>
11015
11016         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
11017         mcs to keep code differences small.
11018         * attribute.cs (Attribute.GetParameterDefaultValue): New.
11019         * typemanager.cs (parameter_default_value_attribute_type): New.
11020         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
11021         CS1908 check.
11022
11023 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11024
11025         * expression.cs (StringConcat.Append): Reverted back to no warning state.
11026
11027 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11028
11029         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
11030
11031         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
11032         the blocks too.
11033
11034 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
11035
11036         * doc-bootstrap.cs : fix build.
11037
11038 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11039
11040         * expression.cs (StringConcat.Append): Issue a warning when empty string
11041         is going to append.
11042
11043 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11044
11045         * assign.cs (CompoundAssign.ResolveSource): Removed.
11046
11047         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
11048         clean up.
11049
11050         * class.cs (TypeContainer.FindMethods): Removed.
11051         (TypeContainer.CheckMemberUsage): Made static.
11052
11053         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
11054
11055         * constant.cs (CheckRange): Removed unused type argument.
11056         (CheckUnsigned): Removed unused type argument.
11057
11058         * cs-parser.jay: Updated after MemberAccess clean up.
11059         Uses Length for empty string test.
11060
11061         * cs-tokenizer.cs: Uses Length for empty string test.
11062         (IsCastToken): Made static.
11063         (is_hex): Made static.
11064         (real_type_suffix): Made static.
11065
11066         * decl.cs (SetupCache): Made static.
11067         (OnGenerateDocComment): Removed unused ds argument.
11068
11069         * delegate.cs (VerifyDelegate): Removed unused argument.
11070
11071         * doc.cs: Uses Length for empty string test.
11072
11073         * driver.cs: Uses Length for empty string test.
11074
11075         * enum.cs (IsValidEnumType): Made static
11076
11077         * expression.cs (EnumLiftUp): Removed unused argument.
11078         (ResolveMethodGroup): Ditto.
11079         (BetterConversion): Ditto.
11080         (GetVarargsTypes): Ditto.
11081         (UpdateIndices): Ditto.
11082         (ValidateInitializers): Ditto.
11083         (MemberAccess.ctor): Ditto.
11084         (GetIndexersForType): Ditto.
11085
11086         * flowanalysis.cs: (MergeFinally): Removed unused argument.
11087
11088         * iterators.cs: Updated after MemberAccess clean up.
11089
11090         * location.cs: Uses Length for empty string test.
11091
11092         * namespace.cs: Uses Length for empty string test.
11093
11094          * report.cs (CheckWarningCode): Made static.
11095
11096         * statement.cs (LabeledStatement): Removed unused argument.
11097
11098         * typemanager.cs (FilterNone): Removed.
11099
11100 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11101
11102         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11103         obsolete.
11104
11105         * class.cs: Updated.
11106
11107 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11108
11109         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11110
11111 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11112
11113         A fix for #77822.
11114
11115         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11116         reporting, it's more tricky than I thought.
11117
11118 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11119
11120         A fix for #77816.
11121
11122         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11123         host container.
11124         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11125         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11126         Add more error reporting; Fixed issue with params.
11127
11128         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11129
11130         * cs-parser.jay: AnonymousMethod requires host container.
11131
11132         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11133
11134 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11135
11136         * class.cs: Change 'TypeContainer ds' constructor argument to
11137         'DeclSpace parent'.  Some classes were missed below due to
11138         different naming convention.
11139
11140         * class.cs (MemberCore.Parent): Delete.  This makes the
11141         ParentContainer changes below enforceable by the compiler.
11142
11143         Treat pointers to enclosing declaration space as 'DeclSpace', not
11144         'TypeContainer'.
11145         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11146         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11147
11148         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11149         of TypeContainer.
11150         (Block.AddThisVariable): Likewise.
11151         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11152         (AbstractPropertyEventMethod.Emit): Likewise.
11153         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11154         (GetMethod.Define, SetMethod.Define): Likewise.
11155         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11156         (DelegateMethod.EmitMethod): Likewise.
11157
11158         Fix regression test-partial-13.cs.
11159         Rationalize use of PartialContainer.  Ensure that the partial
11160         class semantics can be tied to type-correctness, i.e., any
11161         violation will cause a compile error.
11162         * class.cs, const.cs: Access all fields that belong to class
11163         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11164         Resolve()-like functions still use 'Parent'.
11165
11166         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11167         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11168         (PropertyMethod.CheckModifiers): Remove unused argument.
11169         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11170         DeclSpace.
11171
11172 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11173
11174         Make semantics of PartialContainer simpler.
11175         * decl.cs (DeclSpace.IsPartial): Remove.
11176         * class.cs (TypeContainer.IsPartial): Likewise.
11177         (TypeContainer..ctor): Set PartialContainer to point to self.
11178         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11179         (TypeContainer.FindNestedType): Likewise.
11180         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11181
11182 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11183
11184         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11185
11186 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11187
11188         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11189         classes.
11190
11191 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11192
11193         * class.cs (Operator.Define): An error for base conversion was not
11194         reported correctly.
11195
11196 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11197
11198         * iterator.cs : yield break is allowed in try statement which has
11199           catch clauses. Fixed bug #77767.
11200
11201 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11202
11203         A fix for #77593, #77574.
11204
11205         * class.cs (MethodCore.CheckBase): Another if for operator.
11206
11207 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11208
11209         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11210         were not resolved
11211
11212         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11213         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11214         conversion test.
11215         
11216         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11217         not needed.
11218
11219         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11220         Updated after another emitcontext usage was clean up. It should help us to
11221         synchronize with gmcs easier.
11222
11223 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11224
11225         A fix for #77353.
11226
11227         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11228         (Event.Define): ditto
11229         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11230
11231         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11232         Removed redundant code and set NewSlot for Invoke method too.
11233
11234         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11235         (Parameters.MergeGenerated): New method. Use this method when you merge
11236         compiler generated argument with user arguments.
11237
11238 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11239
11240         * attribute.cs (ResolveAsTypeTerminal): Removed.
11241
11242         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11243         specialization for predefined types; 30% speed up.
11244         Finally placed obsolete check to right place.
11245         (Expression.ResolveType): Removed.
11246
11247         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11248         Updated after ResolveType was removed.
11249
11250         * expression.cs (Cast.ctor): Check void cast.
11251         (Binary.ResolveAsTypeTerminal): Is never type.
11252         (Conditional.ResolveAsTypeTerminal): Is never type.
11253
11254         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11255
11256 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11257
11258         Fix #77679.
11259         * expression.cs (ParameterReference.DoResolveBase): Change return
11260         type to bool.
11261         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11262         Update.
11263
11264         Fix #77628.
11265         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11266
11267         Fix #77642.
11268         * typemanager.cs (GetFullNameSignature): Don't nullref on
11269         protected accessors.
11270
11271 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11272
11273         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11274         these two separated members to simplify the code.
11275         (Attribute.Resolve): Refactored to use new fields and methods.
11276         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11277         implemented obsolete attribute checking.
11278         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11279         implemented obsolete checking again. It look line never ending quest ;-)
11280         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11281
11282         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11283
11284         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11285
11286         *class.cs (Property.Define): Add RegisterProperty call.
11287
11288         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11289         argument groups (only 2).
11290
11291         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11292         encoding expression to arguments.
11293         (Expression.ExprClassToResolveFlags): Just turned to property.
11294
11295         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11296         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11297         optimized as well as implemented support for zero-length attributes.
11298
11299         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11300         Add caching of PropertyInfo's.
11301
11302 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11303
11304         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11305         error multiple times.
11306
11307 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11308
11309         New partial class implementation.
11310         A fix for #77027, #77029, #77403
11311
11312         * attribute.cs (Attributable): Made attributes protected.
11313
11314         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11315         the replacements of ClassPart and PartialContainer.
11316         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11317         (TypeContainer.AddInterface): Ditto.
11318         (TypeContainer.AddPartial): The main method for partial classes. It checks
11319         for errors and merges ModFlags and attributes. At the end class is added to
11320         partial_parts list.
11321         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11322         required here.
11323         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11324         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11325         from the rest of partial classes.
11326         (TypeContainer.GetClassBases): Simplified.
11327         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11328         DefineType.
11329         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11330         (TypeContainer.HasExplicitLayout): Uses Flags now.
11331         (PartialContainer): Removed.
11332         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11333         (StaticClass): Was merged with Class.
11334         (Class.GetClassBases): class and static class bases are verified here.
11335         (Class.TypeAttr): Added static attributes when class is static.
11336         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11337         (MemberBase): In some cases we need to call parent container for partial
11338         class. It should be eliminated but it's not easy now.
11339
11340         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11341
11342         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11343         partial classed to accumulate class comments.
11344         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11345
11346         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11347
11348         * driver.cs (MainDriver): Tree.GetDecl was removed.
11349
11350         * modifiers.cs (Modifiers): Add partial modifier.
11351
11352         * tree.cs (Tree.decl): Removed.
11353         (RootTypes): Started to use this class more often for root types
11354         specializations.
11355
11356 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11357
11358         A fix for #77615
11359
11360         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11361         external interface does not have an attribute.
11362
11363 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11364
11365         Another prerequisites for new partial classs implementation.
11366         
11367         * attribute.cs (Attribute.Equal): Implemented.
11368         (Attribute.Emit): Changed as attributes can be applied more than twice.
11369         (Attributes.Emit): Check for duplicate attributes here.
11370
11371         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11372         as a parameter, clean-up.
11373
11374 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11375
11376         A fix for #77485
11377
11378         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11379         contains obsolete attribute check which can in some cases look for base
11380         type of current class which is not initialized yet.
11381         (TypeContainer.BaseType): Replacement of ptype.
11382
11383         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11384
11385 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11386
11387         First of prerequisites for new partial classs implemention.
11388         
11389         * attribute.cs (Attributable): Extended by ResolveContext;
11390         Attributes finally have correct context for resolving in all cases.
11391         (AttachTo): Attribute owner is assigned here.
11392
11393         * codegen.cs (IResolveContext): Introduce new interface to hold
11394         all information needed in resolving phase.
11395         (EmitContext): Implements IResolveContext; more clean-up needed here.
11396         
11397         * decl.cs (MemberCore): Implemented IResolveContext.
11398
11399         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11400         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11401         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11402         Refactored to use new IResolveContext instead of EmitContext; cleanup
11403
11404 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11405
11406         * codegen.cs (EmitScopeInitFromBlock): check here the
11407         capture_context, there is no need to make two calls to the
11408         EmitContext. 
11409
11410         * anonymous.cs: Add some debugging messages that might help me
11411         track other instances of this problem in the future (the
11412         regression of test 467).
11413
11414         * cs-parser.jay: track the variable block, as we need to initalize
11415         any captured variables declared in this block for the "catch"
11416         portion of the "Try" statement.
11417
11418         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11419         scope initialization for captured variables. 
11420
11421         Also, move the emit for the variables after the block location has
11422         been marked.
11423
11424 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11425
11426         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11427
11428 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11429
11430         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11431         commit yesterday, the initialization for the roots is necessary.
11432         What is not necessary is the scope activation.
11433
11434 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11435
11436         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11437         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11438         CS0206 checks.
11439         (Argument.Resolve): Remove CS0206 checks.
11440
11441 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11442
11443         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11444         scopes for all the roots, the scopes will now be emitted when the
11445         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11446
11447         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11448         code.  This reduces a lot of existing cruft.
11449         
11450         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11451         that the ScopeInfo is generated as we enter the scope, not at the
11452         time of use, which is what we used to do before.
11453
11454         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11455         every time a Block is about to be emitted if we have a
11456         CaptureContext. 
11457
11458 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11459
11460         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11461         (Reset): Update.
11462         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11463
11464         * typemanager.cs (cons_param_array_attribute): Make private.
11465         (Reset): Set it to null.
11466         (InitCoreHelpers): Don't initialize it.
11467         (ConsParamArrayAttribute): New.  Initialize it as needed.
11468         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11469
11470 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11471
11472         * expression.cs: There might be errors reported during the
11473         selection of applicable methods.  If there are errors, do not
11474         continue execution as it will lead the compiler to crash.
11475
11476 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11477
11478         * expression.cs: Member access is not allowed on anonymous
11479         methods.  Fixes #77402.
11480
11481 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11482
11483         Fix #77401
11484         * cs-parser.jay (VariableDeclaration): Don't set
11485         current_array_type to null.
11486         (field_declaration, event_declaration, declaration_statement):
11487         Set it to null here.
11488
11489 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11490
11491         * typemanager.cs (GenericParameterPosition): New.
11492         * doc.cs: Use it.
11493
11494 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11495
11496         * doc.cs : To process "include" elements, first we should create
11497           another list than XmlNodeList, because it could result in node
11498           removal, which could result in that the XmlNodeList gives up
11499           yielding next node.
11500
11501           (Also made code identical to gmcs again.)
11502
11503 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11504
11505         * ecore.cs: Introduce an error report that we were not catching
11506         before, if not silent, we must report the error.  Gonzalo ran into
11507         it.
11508
11509 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11510
11511         A fix for bug: #76957
11512         
11513         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11514         ComputeMethodHost before creating the method, this is a new
11515         requirement. 
11516
11517         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11518         that this method references (RegisterScope).  The actual scope
11519         where the method is hosted is computed with the ComputeMethodHost
11520         before we create the method.
11521
11522         Moved the Deepest routine here.
11523
11524         (AnonymousContainer.ComputeMethodHost): New routine used to
11525         compute the proper ScopeInfo that will host the anonymous method.
11526
11527         (ScopeInfo): Deal with multiple roots.  The problem was that we
11528         did not have a unique root where all ScopeInfos could be hanged
11529         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11530         of roots.  
11531
11532         Remove AdjustMethodScope which is now computed at the end.  Remove
11533         LinkScope which did a partial link, instead link all ScopeInfos
11534         before code generation from the new "LinkScopes" routine. 
11535
11536         Simplify all the Add* routines as they no longer need to maintain
11537         the tree, they just need to record that they are using variables
11538         from a ScopeInfo.
11539
11540         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11541         routines to produce the forest of ScopeInfo trees.
11542
11543         * class.cs (TypeContainer.AppendMethod): This is just like
11544         AddMethod, but ensures that an interface implementation method
11545         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11546         methods, but at the end.
11547
11548         We use this functionality to ensure that the generated MoveNext
11549         method in the iterator class is resolved/emitted before the
11550         enumerator methods created.   
11551
11552         This is required because the MoveNext method computes the right
11553         ScopeInfo for the method.  And the other methods will eventually
11554         need to resolve and fetch information computed from the anonymous
11555         method. 
11556
11557 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11558             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11559
11560         Fix rest of #76995.
11561         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11562         the 'aliases' hash.
11563         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11564         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11565
11566 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11567
11568         Fix #76656, cs0231-2.cs.
11569         * cs-parser.jay (formal_parameter_list): Make error case catch
11570         more issues.
11571         (parenthesized_expression_0): Add CS1026 check.
11572         (invocation_expression): Remove unused { $$ = lexer.Location }.
11573
11574 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11575
11576         Fix #76824.
11577         * cs-parser.jay (statement_expression): Don't list out the
11578         individual statement-expressions.  Convert syntax error into
11579         CS0201 check.
11580
11581 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11582
11583         Fix #76874.
11584         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11585         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11586         CheckIntermediateModification.
11587         (FieldExpr.DoResolve): Add new two-argument version that
11588         allows us to resolve the InstanceExpression as an lvalue.
11589         The one-argument variant is now just a wrapper.
11590         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11591         Resolve the lhs as an lvalue if the it has a value type.
11592         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11593         from Assign.DoResolve.
11594         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11595         resolved as an lvalue.
11596         (PropertyExpr.DoResolve): Update.
11597         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11598         has a value type.  Move CS1612 check here from
11599         CheckIntermediateModification.
11600         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11601         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11602         'right_side' of a ResolveLValue on an 'out' argument.
11603         (EmptyExpression.LValueMemberAccess): New.  Used as the
11604         'right_side' of a propagated ResolveLValue on a value type.
11605         (LocalVariableReference.DoResolveBase): Recognize
11606         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11607         Add CS1654 check.
11608         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11609         EmptyExpression.Null.
11610
11611 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11612
11613         * typemanager.cs : added IsGenericParameter(). In mcs it always
11614           return false.
11615         * doc.cs : for generic parameters, use GenericParameterPosition,
11616           not FullName.
11617
11618 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11619
11620         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11621
11622 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11623
11624         This fixes the problem where we used ldfld instead of ldflda to
11625         load the "THIS" pointer on captured parameters, when THIS is a
11626         value type.  See bug #77205.
11627         
11628         * iterators.cs (CapturedThisReference.Emit): Pass false to
11629         EmitThis (we do not need the address).
11630
11631         * codegen.cs (EmitThis): it needs to know whether we need the
11632         address of `this' or not.  This is used by value types.  
11633
11634         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11635         every other call passes false.
11636
11637 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11638
11639         Fix #77221.
11640         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11641         GetOverride.
11642         * expression.cs (Invocation.OverloadResolve): Update.
11643         (Invocation.DoResolve): Avoid double resolution of invocation.
11644
11645 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11646
11647         Fix #77180.
11648         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11649         unary negation of floating point types as 0-expr; negation cannot
11650         overflow in floating point types.
11651
11652         Fix #77204.
11653         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11654         on operands of 'void' type.
11655
11656         Fix #77200.
11657         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11658         and ExclusiveOr for boolean constants too.
11659
11660 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11661
11662         Fix #75636.
11663         * expression.cs (Invocation.OverloadResolve): Replace reflected
11664         override methods with their base virtual methods, rather than
11665         skipping over them.
11666         * typemanager.cs (TypeManager.GetOverride): New.
11667
11668 2006-01-05  Jb Evain  <jbevain@gmail.com>
11669
11670         * class.cs (Property.Define, Indexer.Define): do not tag the
11671         properties as SpecialName | RTSpecialName.
11672
11673 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11674
11675         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11676         doing a low-level comparission of parameter types.  It was lacking
11677         a check for __argslist. 
11678
11679 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11680
11681         * expression.cs (ParameterReference.DoResolveBase): Allow
11682         reference parameters if they are local to this block. 
11683
11684         This allows the ref and out parameters of a delegate to be used in
11685         an anonymous method, for example:
11686
11687         delegate void set (out int x);
11688
11689         set s = delegate (out int x){
11690                 x = 0;
11691         };
11692
11693         This is used by functionality introduced late in the C# language.
11694         
11695         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
11696         method that take ref and out parameters. 
11697
11698         Fixes #77119 which was a late change in the spec.
11699
11700 2005-12-23  Miguel de Icaza  <miguel@novell.com>
11701
11702         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
11703         parent if its the same scope.  Fixes #77060.
11704
11705 2005-12-21  Miguel de Icaza  <miguel@novell.com>
11706
11707         * driver.cs: Report the case of no source files and no -out:
11708         argument provided.
11709
11710 2005-12-20  Raja R Harinath  <rharinath@novell.com>
11711
11712         Fix #77035.
11713         * expression.cs (ComposedCast.GetSignatureForError): Define.
11714
11715 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11716
11717         Fix #76995
11718
11719         * namespace.cs (NamespaceEntry): Add extern_aliases as a
11720         ListDictionary, to contain the ExternAliasEntry entries (in
11721         addition to the NamespaceEntry.aliases hashtable). This field is
11722         shared between the original entry and its doppelganger (bodyless 
11723         copy of it).
11724         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
11725         extern_aliases field.
11726         (NamespaceEntry.Lookup): Move the IsImplicit check after the
11727         lookup in extern_aliases.
11728
11729 2005-12-16  Raja R Harinath  <rharinath@novell.com>
11730
11731         Fix #77006.
11732         * class.cs (TypeContainer.Mark_HasEquals): New.
11733         (TypeContainer.Mark_HasGetHashCode): New.
11734         (ClassPart): Override them.
11735         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
11736
11737         Fix #77008.
11738         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
11739         'parent' argument to the base constructor.
11740
11741         Remove all mention of TypeContainer from decl.cs.
11742         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
11743         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
11744         (DeclSpace.DeclSpace): Likewise.
11745         (DeclSpace.DefineMembers): Remove unused argument.
11746         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
11747         debugging check -- we don't care if the debug code throws an
11748         InvalidCastException instead of an InternalErrorException.
11749         * class.cs (TypeContainer.DefineMembers): Update to changes.
11750         (TypeContainer.DoDefineMembers): Likewise.
11751         (TypeContainer.GetMethods): Likewise.
11752         (PropertyMember.Define): Likewise.
11753         (MemberBase.Parent): New property that forwards to
11754         MemberCore.Parent, but ensures that we get a TypeContainer.
11755         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
11756         (RootContext.PopulateTypes): Likewise.  Remove special case code
11757         for !RootContext.StdLib: DefineMembers is idempotent.
11758
11759 2005-12-14  Miguel de Icaza  <miguel@novell.com>
11760
11761         * convert.cs (ExplicitConversionCore): Check the return value from
11762         ExplicitConversionCore which can return null on failure.  Fixes #76914
11763
11764 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
11765
11766         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
11767
11768 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
11769
11770         * doc.cs : The search for referenced namespace was insufficient to
11771           get global one as it used to do. Fixed bug #76965.
11772
11773 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
11774
11775         * doc.cs : check name in cref in the last phase that whether it is
11776           namespace or not.
11777
11778 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11779
11780         * cs-tokenizer.cs : reverted the latest change: it somehow broke
11781           Mono.C5.
11782
11783 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11784
11785         * doc.cs : so it turned out that we cannot skip override check for 
11786           interface members. Fixed bug #76954.
11787
11788 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11789
11790         * cs-tokenizer.cs : fixed bug #75984:
11791           - #warning and #error should not be handled when the source line
11792             is disabled.
11793           - #line is not checked strictly when the source line is disabled.
11794           - #define and #undef is on the other hand checked strictly at any
11795             state.
11796
11797 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
11798
11799         * cs-tokenizer.cs : missing Location (actually, filename) in one of
11800           CS1027 report.
11801
11802 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11803
11804         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
11805
11806         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
11807         event initializers.
11808         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
11809         (FieldBase.Initializer): Initializer is now optional.
11810         (EventField.Define): Only event field can have initializer.
11811
11812         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
11813
11814         * const.cs (Const): Reuse initializer.
11815
11816         * cs-parser.jay: Updated after FieldBase changes.
11817         Added current_array_type to simplify array initializers.
11818
11819         * ecore.cs (NullCast.IsDefaultValue): Implemented.
11820
11821         * expression.cs, iterators.cs: Updated.
11822
11823         * namespace.cs (NamespaceEntry): Made UsingFound private.
11824
11825 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11826
11827         * parameterCollection.cs: Obsolete, removed.
11828         * parser.cs: Obsolete, removed.
11829
11830 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11831
11832         Fix #76849.
11833         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
11834
11835         * enum.cs (Enum.Define): Set obsolete context here.
11836
11837 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11838
11839         * doc.cs :
11840           - FindDocumentedMember() now expects 1) paramList as null
11841             when "we don't have to check the number of parameters" and
11842             2) Type.EmptyTypes when "there is no arguments".
11843           - Introduced FoundMember struct to hold the exact type which was
11844             used to find the documented member (the above change broke
11845             test-xml-044; it might be better just to use DeclaringType than
11846             what MS does, like this change does, but it depends on usage.)
11847
11848 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11849
11850         * doc.cs : documented member might be from DeclaringType for nested
11851           types. Fixed bug #76782.
11852
11853 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
11854
11855         * anonymous.cs: Have the param code handle leaving copies on the
11856         stack etc. Allows anonymous params to take part in the assignment
11857         code (++, +=, etc). Fixes bug #76550
11858
11859         * expression.cs: Handle the prepare_for_load/leave_copy by passing
11860         it down to the anon code.
11861
11862         * iterators.cs: Use dummy var here
11863
11864         * codegen.cs: Handle new vars
11865
11866 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11867
11868         Fix #76849.
11869         * class.cs (MethodData.Define): Set proper Obsolete context.
11870
11871         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
11872         obsolete context.
11873         (FieldExpr.DoResolve): Ditto.
11874
11875 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11876
11877         Fix #76849.
11878         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
11879         parent is not obsolete.
11880
11881 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
11882
11883         * doc.cs : (FindDocumentedMember) find parameterless members first
11884           and get CS0419 in the early stage. Fixed first case of bug #76727.
11885
11886 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
11887
11888         Fix #76859.
11889         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
11890         no error was reported.
11891
11892         *expression.cs (Binary.DoResolve): left can be null.
11893
11894 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
11895
11896         Fix #76783.
11897         * class.cs (MethodData.Emit): Parameters should be labeled first.
11898
11899 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
11900
11901         Fix #76761.
11902         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
11903
11904 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
11905
11906         * attribute.cs (AreParametersCompliant): Moved to Parameter.
11907
11908         * class.cs (MethodCore): Parameter clean up.
11909         (IMethodData): Added ParameterInfo.
11910         (MethodData): Parameter clean up.
11911         (Indexer.Define): Parameter clean up.
11912
11913         * anonymous.cs,
11914         * codegen.cs,
11915         * cs-parser.jay,
11916         * decl.cs,
11917         * doc.cs,
11918         * ecore.cs,
11919         * flowanalysis.cs,
11920         * iterators.cs,
11921         * pending.cs,
11922         * statement.cs,
11923         * typemanager.cs: Parameter clean up.
11924
11925         * delegate.cs (Define): Get rid of duplicated code.
11926
11927         * expression.cs (ParameterReference): Removed useless parameters
11928         and simplified.
11929         (Invocation): Ditto.
11930
11931         * parameter.cs (ParamsParameter): New class, params specialization.
11932         (ArglistParameter): Attemp to separate arglist.
11933         (Parameter): Refactored to be reusable and faster.
11934         (Parameter.Modifier): Made understandable.
11935         (Parameters): Changed to be used as a class for `this' assembly
11936         parameters. Refactored to use new specialized classes.
11937
11938         * support.cs (ParameterData): Added Types property.
11939         (InternalParameters): Deleted.
11940
11941 2005-08-20  Martin Baulig  <martin@ximian.com>
11942
11943         Merging this patch from GMCS to fix #75867.
11944
11945         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
11946         scope if we don't already have it.
11947
11948 2005-11-17  Martin Baulig  <martin@ximian.com>
11949
11950         * anonymous.cs
11951         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
11952         inherit the scope from our parent.  Fixes #76653.
11953
11954 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11955
11956         * doc.cs : the previous patch does not actually fix the bug.
11957           PropertyInfo override check is now implemented and really fixed it.
11958         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
11959
11960 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11961
11962         * doc.cs : apply "override filter" also to properties.
11963           Fixed bug #76730.
11964
11965 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11966
11967         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
11968           no need to check overrides. For classes, omit those results from 
11969           interfaces since they must exist in the class. Fixed bug #76726.
11970
11971 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11972
11973         * typemanager.cs : (GetFullNameSignature) differentiate indexers
11974           with different parameters. Fixed the second problem in #76685.
11975
11976 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11977
11978         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
11979           get expected 'protected' access in CheckValidFamilyAccess()).
11980           Fixed bug #76692.
11981
11982 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11983
11984         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
11985           Fixed bug #76705.  CS1569 was incorrectly commented out.
11986
11987 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11988
11989         * doc.cs : use Invocation.IsOverride() to do real override check.
11990         * expression.cs : made Invocation.IsOverride() internal.
11991
11992 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11993
11994         * doc.cs : use TypeManager.FindMembers() instead of (possible)
11995           TypeBuilder.FindMembers() and filter overriden base members out.
11996           Fixed bug #76990.
11997
11998 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11999
12000         * doc.cs : ref/out parameters are represented as '@' (instead of
12001           '&' in type FullName). Fixed bug #76630 (additionally crefs).
12002
12003 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12004
12005         * doc.cs : when there was no '.' in cref to methods in doc comment,
12006           then parameters were missing in the output. Fixed bug #76691.
12007
12008 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12009
12010         * driver.cs : don't output docs when there is an error.
12011           Fixed bug #76693.
12012
12013 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12014
12015         * doc.cs :
12016           Now it should detect indexers. Fixed primary concern in bug #76685.
12017           Fixed CS0419 message to not show the identical member signature in
12018           the message.
12019
12020 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12021
12022         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
12023           instead of Type.FindMembers() since it does not handle events.
12024           Fixed bug #71604.
12025
12026 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
12027
12028         * codegen.cs: Fixed typo (speficied -> specified).
12029
12030 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12031
12032         Fix #76369.
12033         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
12034
12035 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12036
12037         * attribute.cs: Changed error message.
12038
12039         * cs-tokenizer.cs: One more check.
12040
12041 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12042
12043         * statement.cs (Block.Resolve): Ignore empty statement.
12044
12045 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12046
12047         * report.cs: Made error/warning methods more strict to avoid
12048         their misuse.
12049
12050         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
12051         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
12052         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
12053         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
12054
12055 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
12056
12057         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
12058         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
12059
12060         * class.cs (TypeContainer.IsComImport): New property.
12061         (Constructor.Define): Create proper ctor for ComImport types.
12062
12063         * expression.cs (New.CheckComImport): Fixed.
12064
12065 2005-11-07  Miguel de Icaza  <miguel@novell.com>
12066
12067         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
12068         that a parameter has been captured does not mean that we do not
12069         have to do the rest of the processing.  This fixes the second part
12070         of #76592.  If there was another anonymous method capturing
12071         values in the past, the Scope would never be set for the second
12072         method that captured the same parameter.
12073
12074         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
12075         properly manipulate the stack.   Second part of fix for #76592.
12076
12077         * expression.cs (New): Add support for invoking "new" on
12078         interfaces that have been flagged with the ComImport attribute and
12079         the CoClass.  Fixes #76637 
12080
12081         * statement.cs (Try.DoEmit): When a variable is captured, do not
12082         try to emit the vi.LocalBuilder variable as it has been captured.
12083         Create a temporary variable and store the results on the
12084         FieldBuilder.  Fixes #76642
12085
12086 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
12087
12088         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
12089
12090         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
12091
12092         * expression.cs (Binary.DoResolve): Added && optimalization.
12093     
12094         * typemanager.cs (AddUserType): Removed useless argument.
12095
12096 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12097
12098         * statement.cs (Block.variables): Uses ListDictionary.
12099
12100 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12101
12102         Fix #75969.
12103         * class.cs (PartialContainer.EmitType): Customized to emit
12104         security attributes.
12105         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12106         for partial classes.
12107
12108 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12109
12110         Fix #76599.
12111         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12112         access has to be fixed.
12113         
12114         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12115
12116 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12117
12118         Fix #76590.
12119         * ecore.cs (NullCast.Reduce): Implemented.
12120
12121         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12122         constant type.
12123         
12124         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12125         properly.
12126         (Foreach.Resolve): Catch null properly.
12127
12128 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12129  
12130         * cs-tokenizer.cs: Warning text fix.
12131
12132         * driver.cs: AllWarningNumbers exposed on public interface.
12133
12134         * report.cs (): Reviewed warning numbers.
12135         (IsValidWarning): Use binary search.
12136
12137 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12138  
12139         * driver.cs: Implemeted resource visibility.
12140         (Resources): New class for code sharing between /res: and
12141         /linkres:
12142  
12143 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12144
12145         Fix #76568.
12146         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12147         folding.
12148         
12149         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12150         contants only.
12151         
12152         * ecore.cs (NullCast): Child is contant only.
12153         
12154         * literal.cs (NullLiteral.Reduce): null can be converted to any
12155         reference type.
12156
12157 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12158
12159         * driver.cs: Use Encoding.Default as default code page instead
12160           of ISO-28591.
12161
12162 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12163
12164         Fix #76085.
12165         * expression.cs (Invocation.Error_InvalidArguments): Handle
12166         __arglist parameters.
12167         (Invocation.VerifyArgumentsCompat): Likewise.
12168         * support.cs (ReflectionParameters.GetSignatureForError): Print
12169         __arglist parameters.
12170         (InternalParamters.GetSignatureForError): Likewise.
12171         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12172
12173 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12174
12175         * attribute.cs (GetPropertyValue): Made public.
12176
12177         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12178         Resolve.
12179         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12180         attribute.
12181         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12182         is not defined.
12183         
12184         * driver.cs: Reflect method name change.
12185         
12186         * statement.cs (Try.Resolve): Warn when try has both general
12187         exception handlers.
12188         
12189         * typemanager.cs: runtime_compatibility_attr_type new predefined
12190         type.
12191
12192 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12193
12194         Fix #76419.
12195         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12196         treat it as an empty parameter list.
12197
12198 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12199
12200         Fix #76271.     
12201         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12202         ResolveAsTypeStep silent.
12203         * statement.cs (Block.AddConstant): Mark block as used.
12204         (Block.ResolveMeta): Avoid piling on error messages
12205         if a constant initializer resolution fails.
12206
12207 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12208
12209         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12210         Remove.
12211         (NamespaceEntry.VerifyAllUsing): New.
12212         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12213         behaviour.  Delegates actual resolution of alias to ...
12214         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12215         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12216         Update.
12217         * driver.cs (Driver.MainDriver): Update.
12218         
12219         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12220         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12221         property.
12222         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12223         Remove.
12224         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12225         RootNamespace.DefineNamespacesForAll.
12226
12227 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12228
12229         * typemanager.cs (assemblies, external_aliases, modules)
12230         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12231         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12232         overhead.  Move resposibility ...
12233         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12234         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12235
12236 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12237
12238         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12239         cached_namespaces.  Improve usage.
12240         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12241         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12242         Move from GlobalRootNamespace and simplify.
12243         (RootNamespace.Global): Make instance variable.
12244         (RootNamespace.RootNamespace): Add "alias name" parameter.
12245         (GlobalRootNamespace): Simplify drastically.
12246         (Namespace.Lookup): Don't use GetNamespace.
12247         * typemanager.cs (GetRootNamespace): Rename from
12248         ComputeNamespaceForAlias.
12249         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12250
12251 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12252
12253         * anonymous.cs (AnonymousContainer): Don't crash when container
12254         doesn't exist.
12255
12256 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12257
12258         * expression.cs (Binary.DoResolve): Warn when comparing same
12259         values.
12260
12261 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12262
12263         Fix #76486.
12264         * expression.cs (Binary.DoResolve): It looks like there are no
12265         convetsion rules in enum context.
12266
12267 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12268
12269         Add support for extern alias qualifiers.
12270         * typemanager.cs: Move some LookupTypeReflection code
12271         to namespace.cs, to have cleaner code. Added some methods
12272         to help us keep track of the extern aliased references.
12273         * driver.cs: Add suport for extern alias assemblies on command
12274         line and check for their warnings/errors. Also keep track of the
12275         extern aliased assemblies.
12276         * namespace.cs: Move the global functionality of Namespace
12277         to GlobalRootNamespace/RootNamespace. Now the global namespace
12278         is GlobalRootNamespace.Globa. Also the code moved from 
12279         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12280         Finally added LocalAliasEntry (AliasEntry before) and
12281         ExternAliasEntry, to handle alias statements.
12282         * cs-parser.jay: Add support in the grammar for extern alias
12283         statement.
12284         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12285         Update callings to Namespace (now in GlobalRootNamespace).
12286
12287 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12288
12289         Fix #76371.
12290         * class.cs (TypeContainer.DefineType): Move updating of
12291         topological sort earlier in the code.
12292         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12293
12294 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12295
12296         Fix #76273.
12297         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12298         
12299         * constant.cs (Constant.TryReduce): Moved from Cast class.
12300         (Reduce): Made little bit more OO and fixed missing conversions.
12301         
12302         * ecore.cs (Reduce): Implemented.
12303         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12304         
12305         * literal.cs (Reduce): Implemented.
12306         
12307         * class.cs: Reverted Miguel's wrong commit.
12308
12309 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12310
12311         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12312
12313 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12314
12315         * cs-parser.jay, expression.cs : CS0214 was missing error location
12316           for constants. Fixed bug #76404.
12317
12318 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12319
12320         Fix #76370.
12321         * convert.cs (ExplicitConversionCore): Fixed object->enum
12322         conversion.
12323
12324 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12325
12326         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12327         InstanceExpression.
12328         (PropertyExpr.EmitCall): Likewise.
12329         * expression.cs (Invocation.EmitArguments): Handle case where
12330         arguments == null.
12331         (Invocation.EmitCall): Avoid allocating temporary variable if
12332         there are no arguments.
12333
12334 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12335
12336         Fix #76323.
12337         * convert.cs (ImplicitConversionStandard): Move conversion of
12338         void* to arbitrary pointer types ...
12339         (ExplicitConversionStandard): .. here.
12340         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12341         error to always print typenames.
12342
12343 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12344
12345         * convert.cs (GetConversionOperator): Rename from
12346         GetConversionOperators.  Move operator selection code from ...
12347         (UserDefinedConversion): ... here.
12348
12349 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12350
12351         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12352         conversion.
12353
12354 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12355
12356         * assign.cs (Assign.DoResolve): Error method changed.
12357
12358         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12359         
12360         * const.cs (ResolveValue): Reset in_transit immediately.
12361         
12362         * constant.cs: Error method changed.
12363         
12364         * convert.cs: Removed useless location parameter.
12365         (ExplicitNumericConversion): Don't do double enum check.
12366         (ExplicitConversionCore): Renamed from ExplicitConversion.
12367         (ExplicitUnsafe): Extracted from ExplicitConversion.
12368         (ExplicitConversion): Uses for error reporting.
12369         
12370         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12371         error messages.
12372         (ResolveBoolean): Uses common error method.
12373         (CastToDecimal): Get rid of ec.
12374         (CastFromDecimal): Optimized.
12375         (ConvCast): Get rid of ec.
12376         
12377         * enum.cs (ResolveValue): Reset in_transit immediately.
12378         (Emit): Return after first error.
12379         
12380         * expression.cs: Convert changes.
12381         
12382         * literal.cs: Error method changed.
12383         
12384         * statement.cs: Error method changed.
12385
12386 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12387
12388         * support.cs (SeekableStreamReader.Position): Don't error out when
12389         the requested position is just beyond the end of the current
12390         buffered data.
12391
12392 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12393
12394         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12395         try to keep in sync with the byte count of the underlying Stream.
12396         However, this limits us to a window size of 2048 characters: i.e.,
12397         the maximum lookahead of our lexer/parser can be 2048 characters.
12398
12399 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12400
12401         Fix #76255.
12402         * driver.cs: Fix compilation files with full root path.
12403
12404 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12405
12406         * report.cs (SymbolRelatedToPreviousError): Format the output so
12407         it does not use an open parenthesis that is never closed. 
12408
12409         * driver.cs: Follow coding guidelines
12410
12411 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12412
12413         Fix #72930.
12414         * const.cs (Const.ResolveValue): Check for assigning non-null
12415         value to reference type.
12416
12417 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12418
12419         * anonymous.cs: Implemented ExprClassName.
12420         
12421         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12422         delegate.
12423         
12424         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12425         check.
12426         
12427         * class.cs (StaticClass.DefineContainerMembers): Report protected
12428         members as error.
12429         
12430         * codegen.cs: if(ed) PRODUCTION.
12431         
12432         * convert.cs (Error_CannotImplicitConversion): Better error
12433         distinction.
12434         
12435         * cs-parser.jay: More error checks.
12436         
12437         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12438         
12439         * driver.cs (CSCParseOption): Enabled wrong option check.
12440         
12441         * ecore.cs (Expression.ExprClassName): Turned to property.
12442         (MemberExpr.CheckIntermediateModification): For checking boxed
12443         value types     modification.
12444         
12445         * statement.cs (Fixed.Resolve): Expression type must be
12446         convertible to fixed type.
12447         (CollectionForeach.GetEnumeratorFilter,TryType):
12448         Small refactoring for easier error checking.
12449
12450 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12451
12452         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12453         attributes.
12454         
12455         * class.cs (GeneratedBaseInitializer): New class for customization
12456         compiler generated initializers.
12457         (MemberBase.DoDefine): Check Obsolete attribute here.
12458         (FieldMember.DoDefine): Ditto.
12459         
12460         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12461         constants.
12462         
12463         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12464         (MemberCore.GetObsoleteAttribute): Removed argument.
12465         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12466         (MemberCore.CheckObsoleteType): New helper.
12467         
12468         * delegate.cs,
12469         * enum.cs,
12470         * statement.cs: Updates after MemberCore changes.
12471         
12472         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12473         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12474         
12475         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12476         obsolete attribute for compiler construct.
12477         (As.DoResolve): Cache result.
12478         
12479         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12480
12481 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12482
12483         Fix #76133.
12484         * expression.cs (This.VerifyFixed): In a value type T, the type of
12485         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12486         value type R, 'this' is treated as a value parameter.
12487
12488 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12489
12490         * statement.cs (Lock): Use the TemporaryVariable class instead of
12491         manually using local variables as those do not work when variables
12492         are captured.
12493
12494         * ecore.cs: Moved the TemporaryVariable class from being a nested
12495         class inside Foreach to be a public class that can be employed in
12496         other places. 
12497
12498 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12499
12500         * cs-parser.jay: interface_accessors replaced by
12501         accessor_declarations.
12502
12503         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12504         location.
12505         
12506         * statement.cs (GotoCase.Resolve): Convert null constant to
12507         null case.
12508         (SwitchLabel.ResolveAndReduce): Ditto.
12509         (SwitchLabel.NullStringCase): Custom null stamp.
12510         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12511         
12512         typemanager.cs (CSharpSignature): Don't skip first argument
12513         for full names.
12514
12515 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12516
12517         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12518
12519         * location.cs (InEmacs): in this mode, do not report column
12520         location as it confuses Emacs.
12521
12522 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12523
12524         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12525         expression.cs, iterators.cs, literal.cs: Store constants and
12526         literals location.
12527         
12528         * class.cs (MemberBase.ShortName): Pass location.
12529         
12530         * cs-parser.jay: Some location fixes.
12531         
12532         * ecore.cs (Expression.Location): Made virtual.
12533
12534 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12535
12536         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12537         if the underlying types are the same, otherwise we need to produce
12538         code that will do the proper cast.
12539
12540         This was exposed by Marek's constant rewrite which produced
12541         invalid code for the call site:
12542
12543         enum X : long { a }
12544         void Method (X v) {}
12545
12546         Method ((X) 5)
12547
12548         This fixes test-49.cs
12549
12550 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12551
12552         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12553           Type/Object should be allowed as well. Fixed bug #75968.
12554
12555 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12556
12557         * expression.cs : (Binary.DoResolve): when one is enum constant and
12558           another is constant 0, then return enum one *as enum type*.
12559           Fixed bug 74846.
12560
12561 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12562
12563         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12564         internal.
12565
12566         Fix #75941.
12567         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12568         flow-branching for LocalVariableReferences in case we were invoked
12569         from a MemberAccess.
12570         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12571         Carved out of ...
12572         (LocalVariableReference.DoResolveBase): ... this.
12573         (MemberAccess.Resolve): Do the check that was disabled during
12574         SimpleNameResolve.
12575
12576 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12577
12578         * class.cs :
12579           (PartialContainer.Create): check abstract/sealed/static strictly
12580           but abstract/sealed can exist only at one side. Fixed bug #75883.
12581
12582 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12583
12584         Fix #75945.
12585         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12586         specified, don't default to UnmanagedType.I4.
12587
12588 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12589
12590         * expression.cs : conditional operator should check possibly
12591           incorrect assign expression. Fixed bug #75946.
12592
12593 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12594
12595         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12596           Reverting the change. gmcs is much complex than mcs on this matter.
12597
12598 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12599
12600         * cs-tokenizer.cs : To read another token ahead of the actual 
12601           consumption, use new SavedToken and cache token instead of moving
12602           back the stream with SeekableStreamReader (it seemed problematic).
12603         * cs-parser.jay,
12604           driver.cs : Thus use StreamReader directly.
12605         * support.cs : Thus removed SeekableStreamReader.
12606
12607 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12608
12609         Fix #75934.
12610         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12611         (ScopeInfo.EmitScopeType): Use it to construct field names from
12612         names of captured locals.
12613
12614         Fix #75929.
12615         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12616         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12617         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12618         (ExplicitConversion): Remove enum cases already handled by
12619         implicit conversion.  Move implicit conversion check to the beginning.
12620         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12621         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12622         Don't treat System.Enum as a struct.
12623
12624 2005-08-30  Jb Evain  <jbevain@gmail.com>
12625
12626         * attribute.cs: handles as expression in parameters.
12627
12628 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12629
12630         Fix #75802.
12631         * class.cs (TypeContainer.VerifyClsName): Don't use a
12632         PartialContainer when verifying CLS compliance.
12633         (AbstractPropertyEventMethod): Set Parent here, ...
12634         (PropertyMethod): ... not here.
12635
12636 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12637
12638         * attribute.cs : escaped attribute name should not be allowed to be
12639           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12640
12641 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12642
12643         Fix #75927.
12644         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12645         when converting a long constant to unsigned long.
12646         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12647         detect where IsApplicable and VerifyArgumentsCompat disagree.
12648
12649 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12650         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12651
12652         Fix #75848.
12653         * class.cs (TypeContainer.CanElideInitializer): New helper.
12654         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12655         can safely emitting the initializer of a field.
12656
12657 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12658
12659         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12660           allowed inside a switch (without loop). Fixed bug #75433.
12661
12662 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12663
12664         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12665         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12666
12667 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12668
12669         * driver.cs : kinda reverting the default encoding changes (not exact 
12670           revert since I noticed that "codepage:reset" might not work fine).
12671
12672 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12673
12674         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12675           Location. Now getter and setter store location correctly.
12676           (errors/cs0111-12.cs now reports the expected location.)
12677
12678 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12679
12680         * driver.cs : Use default encoding on the environment.
12681           Removed (now that) extra parameter for SeekableStreamReader.
12682         * support.cs : (SeekableStreamReader) third .ctor() argument for
12683           StreamReader is not required (always true). preamble size could
12684           be acquired in simpler and safe way.
12685
12686 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12687
12688         * cs-parser.jay: report CS0642 at warning level 3
12689           and report CS0642 for an if else statement also
12690           fixes bug #74745. Patch by John Luke (and a bit
12691           modified by me).
12692           Removed extra CS0642 warning check for "while",
12693           "for" and "fixed".
12694         * statement.cs: In Block.Resolve(), CS0642 check
12695           is reimplemented to check a sequence of an empty
12696           statement and a block.
12697
12698           Both fix bug #66777.
12699
12700 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
12701
12702         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
12703         detection until I fix it.
12704         
12705         * cs-tokenizer.cs: Changed error message.
12706         
12707         * cs-parser.jay: Fixed 2 error locations.
12708         
12709         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
12710         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
12711         properties.
12712         
12713         * enum.cs (GetSignatureForError): Fixed.
12714         
12715         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
12716         method detection.
12717         
12718         * class.cs,
12719         * typemanager.cs (RegisterProperty): Removed.
12720         
12721         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
12722
12723 2005-08-24  Raja R Harinath  <rharinath@novell.com>
12724
12725         Fix #75874.
12726         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
12727         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
12728
12729 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12730
12731         * expression.cs : tiny fix is required for not warning positive ulong.
12732           See test-441.cs.
12733
12734 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12735
12736         * expression.cs : add CS0652 check for constant and integral
12737           expression. Fixed bug #53974.
12738
12739 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12740
12741         * expression.cs : in DoNumericPromotions(), check if there is implicit
12742           conversion overload for string (to check CS0034). Fixed bug #52492.
12743
12744 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12745
12746         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
12747
12748 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12749
12750         * ecore.cs : report location when it is *not* Null.
12751
12752 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12753
12754         * codegen.cs,
12755           ecore.cs,
12756           flowanalysis.cs,
12757           expression.cs:
12758           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
12759           correctly. Fixed bug #75721.
12760
12761 2005-08-23  Raja R Harinath  <rharinath@novell.com>
12762
12763         * support.cs (SeekableStreamReader.Position): Avoid an expensive
12764         loop that performs 'min (pos, char_count)'.
12765
12766         Fix #75862.
12767         * expression.cs (Unary.ResolveOperator): Don't discard implicit
12768         converted value in Operator.OnesComplement.
12769
12770 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
12771
12772         * anonymous.cs: If the anon method is pulled into a helper class,
12773         it needs to be `internal' not `private'. Fixes runtime behavior on
12774         msft. bug #75704
12775
12776 2005-08-20  Martin Baulig  <martin@ximian.com>
12777
12778         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12779         scope if we don't already have it.
12780
12781         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
12782         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
12783         fixes #75867.
12784
12785 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
12786
12787         Fix #75803
12788         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
12789         is a partial class.
12790
12791 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
12792
12793         The big constants rewrite
12794         Fix #75746, #75685 and more
12795         As a side effect saved 1MB for MWF ;-)
12796         
12797         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
12798         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
12799         enum based for corlib compilation.
12800         
12801         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
12802         subtractions.
12803         
12804         * class.cs (FixedField.Define): Use ResolveAsConstant.
12805         
12806         * const.cs (IConstant): Interface constants and enums.
12807         (Const.ResolveValue): New method for constant resolvning.
12808         (ExternalConstant): Constants from imported assemblies.
12809         
12810         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
12811         conversion; like enums.
12812         (Constant.ToType): Converts this constant to different type.
12813         (Constant.Increment): Adds 1.
12814         
12815         * convert.cs (ImplicitConversionRequired): Simplified.
12816         
12817         * cs-parser.jay: Create EnumMember directly.
12818         
12819         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
12820         
12821         * doc.cs (GenerateEnumDocComment): Removed.
12822         
12823         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
12824         (ConvertIntLiteral): Removed.
12825         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
12826         
12827         * enum.cs (EnumMember): Implement IConstant.
12828         (Enum.IsValidEnumConstant): Removed.
12829         (Enum.GetNextDefaultValue): Removed.
12830         (Enum.FindMembers): Updated.
12831         (Enum.GenerateDocComment): Iterate enum members.
12832         
12833         * expression.cs (Cast.TryReduce): Handle enums correctly.
12834         (New.Constantify): Made public.
12835         (MemberAccess.DoResolve): Removed contant specific if(s).
12836         
12837         * literal.cs (NullLiteral): Implement new abstract methods.
12838         
12839         * statement.cs (GotoCase.Resolve): Use new constant methods.
12840         (SwitchLabel.ResolveAndReduce): Use new constant methods.
12841         
12842         * typemanager.cs (LookupEnum): Removed.
12843         (IsEnumType): Fixed to work with corlib.
12844         (RegisterConstant): Removed.
12845         (LookupConstant): Removed.
12846         (GetConstant): Changed to work with IConstant.
12847
12848 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
12849
12850         * location.cs : Fixed overflown (>255) column number.
12851
12852 2005-08-03  Raja R Harinath  <rharinath@novell.com>
12853
12854         First cut of the qualified-alias-member feature.
12855         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
12856         token.
12857         * cs-parser.jay (DOUBLE_COLON): New token.
12858         (namespace_or_type_name): Add rule for recognizing
12859         qualified-alias-members.
12860         (primary_expression): Likewise.
12861         (element_access): Allow QualifiedAliasMember as a possible
12862         type-bearing expression.
12863         (local_variable_type, local_variable_pointer_type): Likewise.
12864         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
12865         aliases in the current and enclosing namespace declarations.
12866         (NamespaceEntry.UsingAlias): Add CS0440 warning.
12867         * decl.cs (MemberName.is_double_colon): New.
12868         (MemberName.MemberName): Add new constructor for alias-member.
12869         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
12870         * expression.cs (QualifiedAliasMember): New expression type.
12871
12872 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12873
12874         * location.cs : it borked when no argument was specified.
12875
12876 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12877
12878         * location.cs : tiny ToString() format fix.
12879
12880 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12881
12882         * statement.cs : oops, it was missing.
12883
12884 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12885
12886         A set of fixes for precise line/column location.
12887
12888         * location.cs :
12889           "token" field now holds a file/line "delta", a line number offset 
12890           from the segment, and a column number. See also:
12891           http://lists.ximian.com/pipermail/mono-devel-list/2004-
12892           December/009508.html
12893           Removed static IsNull. Use instance IsNull property instead.
12894         * cs-tokenizer.cs :
12895           For some tokens it stores Location. For Identifier it stores
12896           LocatedToken which is a pair of string name and location.
12897           Column numbers are adjusted only at getChar().
12898         * report.cs :
12899           Use Location.ToString() for reporting (it now contains column).
12900         * cs-parser.jay :
12901           Largely modified to use LocatedToken instead of
12902           string (IDENTIFIER), and to acquire Location from some tokens.
12903         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
12904           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
12905           codegen.cs :
12906           Now MemberName holds Location. DeclSpace.ctor() receives Location
12907           as a parameter. Removed extra parameters to all derived classes.
12908           Replaced Location.IsNull() with instance property.
12909         * assign.cs, expression.cs :
12910           Added .ctor() overload that omits Location.
12911         * attribute.cs :
12912           Added "nameEscaped" flag that indicates the identifier was escaped
12913           in the source file. This fixes bug #57047.
12914
12915 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
12916
12917         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
12918         New method, looking for lo-case imported cls type.
12919
12920         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
12921         here.
12922
12923         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
12924
12925         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
12926
12927         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
12928         all_imported_types.
12929         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
12930
12931         Optimized to save 3.5 MB for SWF compilation.
12932
12933 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12934
12935         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
12936         (PartialContainer.Create): Moved logic AddToContainer.
12937         (PartialContainer.MarkForDuplicationCheck): Shares name.
12938         
12939         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
12940         place.
12941         
12942         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
12943         initialization.
12944         (Namespace.GetSignatureForError): New method.
12945         
12946         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
12947         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
12948
12949 2005-08-01  Raja R Harinath  <rharinath@novell.com>
12950
12951         Fix #75669.
12952         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
12953         member lookup rather than qualifier_type, since qualifier_type can
12954         be null.
12955
12956 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12957
12958         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
12959         enum member.
12960
12961 2005-07-31  Miguel de Icaza  <miguel@novell.com>
12962
12963         * statement.cs: Copy the local exception into the exception
12964         captured local.  Fixes 75674
12965
12966 2005-07-31  Raja R Harinath  <harinath@gmail.com>
12967
12968         Fix #75658.
12969         * expression.cs (Invocation.OverloadResolve): Don't report error
12970         CS1501 if error CS1502 has been reported.
12971         (New.DoResolve): Delegate CS1501 reporting to
12972         Invocation.OverloadResolve.
12973
12974         Fix #75656.
12975         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
12976         invariant-meaning-in-block property in an enclosing block if
12977         necessary.
12978
12979 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
12980
12981         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
12982         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
12983         (Switch.CheckSwitch): Just save 50kb for SWF.
12984
12985 2005-07-27  Martin Baulig  <martin@ximian.com>
12986
12987         * anonymous.cs (CaptureContext.AddField): Added
12988         `AnonymousContainer am' argument; compute its toplevel scope if
12989         it's not already computed.  Fixes #75649.
12990
12991 2005-07-26  Raja R Harinath  <rharinath@novell.com>
12992
12993         Fix #75628.
12994         * class.cs (Constructor.Emit): Reset block to null if the block
12995         resolve fails.
12996
12997 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
12998
12999         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
13000
13001 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13002
13003         * class.cs (MethodData.Define): Check whether accessor implementing
13004         interface is public.
13005
13006         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
13007
13008 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
13009
13010         Fix #57245
13011         * namespace.cs (LookupType): Moved same type check to...
13012         
13013         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
13014         with the same name.
13015
13016 2005-07-21  Raja R Harinath  <rharinath@novell.com>
13017
13018         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
13019         already found a typebuilder.
13020         * class.cs (MethodCore.IsDuplicateImplementation): Compare
13021         MemberNames, not strings.
13022
13023         * const.cs (Error_ExpressionMustBeConst): 
13024         Rename from Error_EpressionMustBeConst.
13025         * const.cs, class.cs, statement.cd: Update.
13026
13027 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
13028
13029         Fix #65573
13030
13031         * const.cs (Const.LookupConstantValue): Report missing contant expression
13032         everytime.
13033         (Error_EpressionMustBeConstant): Only one error method.
13034
13035         * class.cs, statement.c: Updated.
13036
13037 2005-07-20  Raja R Harinath  <rharinath@novell.com>
13038
13039         * statement.cs (Block.Flags): Add back HasVarargs.
13040         (Block.flags): Make protected.
13041         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
13042
13043         * typemanager.cs (types, typecontainers, user_types): Remove.
13044         (UserTypes, TypeContainers): Likewise.
13045         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
13046         (CleanUp, Reset): Update.
13047         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
13048         (GetNestedType): Use Type.GetNestedType.
13049         (CoreLookupType): Take two arguments, the namespace and the
13050         basename of the type.  Update to use the Namespace.Lookup
13051         mechanism.
13052         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
13053         (RealMemberLookup): Use IsNestedChildOf instead of playing with
13054         string concatenation and substring matches.
13055         * class.cs, enum.cs, delegate.cs: Update to changes.
13056
13057 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
13058
13059         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
13060         Expression and made virtual.
13061
13062         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
13063         (ImplicitStandardConversionExists): Fixed `byte' typo ?
13064
13065         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
13066
13067         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
13068         error message.
13069
13070         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
13071         change.
13072
13073 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
13074
13075         Fix #57707
13076         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
13077         AssemblyCultureAttribute is not used on executable.
13078
13079         * rootcontext.cs,
13080         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
13081
13082 2005-07-16  Raja R Harinath  <rharinath@novell.com>
13083
13084         Fix #60638.
13085         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
13086         New.  Reports CS0252/CS0253.
13087         Mostly taken from preliminary patch by Duncak Mak.
13088         (Binary.DoResolveOperator): Store results of operator lookup.
13089         Use them to detect if we need to warn about unintended reference
13090         comparisons.
13091
13092 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13093
13094         Fix #72969.
13095         * namespace.cs (Namespace.Lookup): Add back location parameter.
13096         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13097         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13098
13099         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13100         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13101         (Namespace.LookupType): ... this.
13102         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13103         of namespaces.
13104         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13105         purported to handle pointers.
13106         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13107         CoreLookupType.
13108
13109 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13110
13111         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13112         type as namespace.
13113
13114 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13115
13116         * namespace.cs (Namespace.Lookup): Drop location parameter.
13117         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13118         (NamespaceEntry.Lookup): ... this.
13119         (NamespaceEntry.Error_AmbiguousTypeReference):
13120         Move here from DeclSpace.
13121         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13122         names ...
13123         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13124         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13125         Move to NamespaceEntry.
13126         * delegate.cs, expression.cs: Update to changes.
13127
13128 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13129
13130         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13131         CheckAttributeType and refactored.
13132         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13133         ResolveAsTypeTerminal error handling.
13134         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13135         handling.
13136         (GetSignatureForError): Print errors in same way.
13137
13138         * class.cs,
13139         * codegen.cs: Reflect attribute GetSignatureForError change.
13140
13141         * ecore.cs,
13142         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13143
13144         * namespace.cs (UsingEntry): Refactored to make fields private.
13145
13146         * assign.cs,
13147         statement.cs: Error_UnexpectedKind has extra parameter.
13148
13149 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13150
13151         * ecore.cs (IAlias): Remove.
13152         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13153         that implement the interface.
13154         * namespace.cs (Namespace): Likewise.
13155         (Namespace.declspaces): Renamed from 'defined_names'.
13156         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13157         DeclSpace instead of an IAlias.
13158         * tree.cs (Tree.AddDecl): Update.
13159
13160 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13161
13162         * statement.cs (Block.Flags); Remove HasVarargs.
13163         (Block.HasVarargs): Move to ToplevelBlock.
13164         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13165         (Block.Variables): Make protected.  Initialize variable hashtable
13166         if necessary.
13167         (Block.AddVariable): Update.
13168         (Block.Resolve): Update to changes.
13169         (ToplevelBlock.HasVarargs): New boolean.
13170         (ToplevelBlock.ThisVariable): Move here from Block.
13171         (ToplevelBlock.AddThisVariable): Likewise.
13172         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13173         * expression.cs (This.ResolveBase): Update to changes.
13174         (ArglistAccess.DoResolve): Likewise.
13175
13176 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13177
13178         Fix #75321
13179         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13180
13181         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13182         not used and not used & assigned.
13183         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13184
13185 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13186
13187         Fix #75053
13188         * expression.cs (Is.DoResolve): null is never provided type.
13189
13190 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13191
13192         Fix #52496
13193         * cs-parser.jay: Less strict event error rule to catch more errors.
13194
13195 2005-07-08  Martin Baulig  <martin@ximian.com>
13196
13197         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13198         gettter (allowed) or setter (not allowed).
13199
13200         * class.cs (Accessor): Implement IIteratorContainer.
13201         (Accessor.Yields): New public field.
13202         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13203         per-accessor basis.
13204
13205         * cs-parser.jay
13206         (get_accessor_declaration, set_accessor_declaration): Set the
13207         `yields' flag on the accessor, not the property.
13208         (property_declaration): Do the iterators check on a per-accessor
13209         basis and not for the whole property.
13210
13211 2005-07-08  Martin Baulig  <martin@ximian.com>
13212
13213         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13214         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13215
13216 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13217
13218         Fix #74975
13219         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13220         (ExtractSecurityPermissionSet): Cope with self referencing security
13221         attributes properly.
13222
13223         * driver.cs (SetOutputFile): Made public property OutputFile.
13224
13225 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13226
13227         Fix #75486.
13228         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13229         has_nonstatic_fields.  Make into a FieldBase pointer.
13230         (TypeContainer.AddField): Add CS0282 check.
13231         (TypeContainer.EmitType): Update.
13232
13233 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13234
13235         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13236         compare if they start with __.
13237
13238 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13239
13240         * statement.cs (Switch.SwitchGoverningType): Only look at
13241         UserCasts that don't need implicit standard conversions to one of
13242         the allowed switch types (Fixes test-322.cs).
13243         (LocalInfo.Resolve): Re-enable sanity-test.
13244
13245 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13246
13247         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13248         
13249         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13250         
13251         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13252
13253 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13254
13255         Fix #75472.
13256         * ecore.cs (SimpleName.GetSignatureForError): Add.
13257         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13258         (MemberAccess.GetSignatureForError): Add.
13259
13260 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13261  
13262         The big error and warning messages review.
13263         
13264         * anonymous.cs,
13265         * assign.cs,
13266         * attribute.cs,
13267         * class.cs,
13268         * codegen.cs,
13269         * convert.cs,
13270         * cs-parser.jay,
13271         * cs-tokenizer.cs,
13272         * decl.cs,
13273         * delegate.cs,
13274         * doc.cs,
13275         * driver.cs,
13276         * ecore.cs,
13277         * enum.cs,
13278         * expression.cs,
13279         * flowanalysis.cs,
13280         * iterators.cs,
13281         * literal.cs,
13282         * location.cs,
13283         * modifiers.cs,
13284         * namespace.cs,
13285         * parameter.cs,
13286         * pending.cs,
13287         * report.cs,
13288         * rootcontext.cs,
13289         * statement.cs,
13290         * support.cs,
13291         * tree.cs,
13292         * typemanager.cs: Updated.
13293         
13294         * class.cs: (MethodCore.SetYields): Moved here to share.
13295         (PropertyMethod.Define): Moved iterator setup here.
13296         
13297         * iterators.cs: Add orig_method to have full access to parent
13298         container.
13299
13300 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13301
13302         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13303         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13304         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13305         variable of struct type.
13306         * expression.cs (Unary.ResolveOperator): Update to change.
13307         (Indirection.VerifyFixed): Likewise.
13308         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13309         (ParameterReference.VerifyFixed): Value parameters are fixed.
13310         (This.VerifyFixed): Treat 'this' as a value parameter.
13311         * statement.cs (LocalInfo.IsFixed): Remove.
13312
13313 2005-07-01  Martin Baulig  <martin@ximian.com>
13314
13315         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13316         `ec.EmitThis ()' to get the correct scope.
13317
13318 2005-07-01  Martin Baulig  <martin@ximian.com>
13319
13320         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13321         instance is a ParameterReference; fixes #75299.
13322
13323 2005-07-01  Martin Baulig  <martin@ximian.com>
13324
13325         Reverted Marek's latest patch (r46725):
13326         - it contains structural changes which are neither mentioned in
13327           the ChangeLog nor explained anywhere; for example the additional
13328           argument of EmitContext's and Iterator's .ctor's and the
13329           TypeContainer.DefineMembers() change.
13330         - structural changes like this should go in in seperate patches
13331           and not be hidden in a huge patch which just seems to affect
13332           warnings and errors.
13333           a big and hard to understand patch.
13334         - it breaks iterators and causes regressions, for instance in
13335           test-iter-03.cs.      
13336
13337 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13338
13339         Fix #75412.
13340         * expression.cs (Indexers.map): Remove.
13341         (Indexers.Append): Filter out inaccessible setters and getters.
13342         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13343
13344         Fix #75283.
13345         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13346         Refactored from ...
13347         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13348         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13349         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13350         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13351
13352 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13353
13354         Fix #75322
13355         * class.cs (FieldBase.GetInitializerExpression): One more field
13356         for backup.
13357
13358 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13359
13360         * pending.cs: Do not define a proxy if the base method is virtual,
13361         it will be picked up by the runtime (bug 75270).
13362
13363 2005-06-08  Martin Baulig  <martin@ximian.com>
13364
13365         The big Iterators rewrite :-)
13366
13367         * iterators.cs: Rewrite this to use the anonymous methods framework.
13368
13369         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13370         before the TypeContainers; see 2test-21.cs.
13371
13372         * class.cs
13373         (TypeContainer.DefineType): Don't create a new EmitContext if we
13374         already have one (this only happens if we're an Iterator).
13375         (TypeContainer.Define): Also call Define() on all our iterators.
13376         (Method.CreateEmitContext): Added support for iterators.
13377
13378         * anonymous.cs
13379         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13380         (AnonymousContainer.CreateMethodHost): Moved here from
13381         AnonymousMethod and made abstract.
13382         (AnonymousContainer.CreateScopeType): New abstract method.
13383         (AnonymousContainer.IsIterator): New public property.
13384         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13385         get the ScopeTypeBuilder rather than manually defining it here. 
13386         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13387         iterators here.
13388
13389         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13390         before RootContext.DefineTypes().
13391
13392         * codegen.cs (EmitContext.RemapToProxy): Removed.
13393         (EmitContext.CurrentAnonymousMethod): Changed type from
13394         AnonymousMethod -> AnonymousContainer.
13395         (EmitContext.ResolveTopBlock): Protect from being called twice.
13396         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13397         (EmitContext.EmitThis): Removed the iterators hacks; use the
13398         anonymous methods framework for that.
13399
13400         * statement.cs
13401         (ToplevelBlock.Container): Make this a property, not a field.
13402         (ToplevelBlock.ReParent): New public method; move the
13403         ToplevelBlock into a new container.
13404         (Foreach.TemporaryVariable): Simplify.
13405
13406 2005-06-05  Martin Baulig  <martin@ximian.com>
13407
13408         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13409         (Block.AddTemporaryVariable): New public method; creates a new
13410         `LocalInfo' for a temporary variable.
13411         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13412         variables here.
13413         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13414         non-iterator variables.
13415
13416 2005-06-05  Martin Baulig  <martin@ximian.com>
13417
13418         * statement.cs (Foreach.TemporaryVariable): Create the
13419         LocalBuilder in the Emit phase and not in Resolve since in some
13420         situations, we don't have an ILGenerator during Resolve; see
13421         2test-19.cs for an example.
13422
13423 2005-06-04  Martin Baulig  <martin@ximian.com>
13424
13425         **** Merged r45395 from GCS ****
13426
13427         The big Foreach rewrite - Part II.
13428
13429         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13430         with `PropertyInfo ienumerator_getcurrent'.
13431
13432         * codegen.cs (VariableStorage): Removed.
13433
13434         * statement.cs
13435         (Foreach): Derive from Statement, not ExceptionStatement.
13436         (Foreach.CollectionForeach): New nested class.  Moved all the code
13437         dealing with collection foreach here.
13438         (Foreach.ForeachHelperMethods): Removed.
13439         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13440
13441 2005-05-23  Martin Baulig  <martin@ximian.com>
13442
13443         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13444         don't need to.  Fix #75014.
13445
13446 2005-05-20  Martin Baulig  <martin@ximian.com>
13447
13448         Merged r44808 from GMCS.
13449
13450         * class.cs (TypeContainer.CircularDepException): Removed.
13451         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13452         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13453         (CS0146) and interface (CS0529) dependencies here.
13454
13455 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13456
13457         * expression.cs (Invocation.EmitCall): Fix initialization
13458         'this_call' to reflect current behaviour.  Fix indentation.
13459
13460         * convert.cs (FindMostEncompassedType): Add two trivial special
13461         cases (number_of_types == 0 || number_of_types == 1).
13462         (FindMostEncompasingType): Likewise.
13463
13464 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13465
13466         Some cleanups preparing for the fix of #75283.
13467         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13468         error testing.
13469         (EventExpr.InstanceResolve): Likewise.
13470         (EventExpr.DoResolve): Remove redundant checks.
13471
13472 2005-06-10  Duncan Mak  <duncan@novell.com>
13473
13474         * cs-tokenizer.cs (process_directives): New flag for controlling
13475         the processing of preprocessor directives.
13476         (x_token): After seeing a '#', return Token.NONE instead of going
13477         to handle_preprocessing_directive() when not processing
13478         directives. This avoids unnecessary processing during the token peek in
13479         is_punct().
13480
13481         This fixes #74939.
13482
13483         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13484         the existing error reporting methods instead of Report.Error.
13485
13486         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13487         after Raja's rewrite.
13488
13489 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13490
13491         * class.cs: Small fix.
13492
13493 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13494
13495         Fix #75160.
13496         * class.cs (GetPartialBases): Fix return value check of
13497         part.GetClassBases.
13498
13499 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13500
13501         Ensure that partial classes are registered in their enclosing
13502         namespace.  Initial part of fix of #75160.
13503         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13504         Register declspace with namespace here, not in
13505         DeclSpace.RecordDecl.
13506         * cs-parser.jay: Pass namespace to RecordDecl.
13507         * class.cs (PartialContainer.Create): Likewise.
13508         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13509         called.
13510         * decl.cs (Declspace.RecordDecl): Remove.
13511         * namespace.cs (NamespaceEntry.DefineName): Remove.
13512
13513 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13514
13515         * rootcontext.cs: Reset TargetExt as well.
13516
13517 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13518
13519         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13520         -langversion:ISO-1.
13521
13522 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13523
13524         Fix #75080, cs0119.cs.
13525         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13526         of ...
13527         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13528         allowing ExprClass.Type and ExprClass.Namespace for
13529         ResolveFlags.VariableOrValue.
13530         (Expression.Resolve) [1-argument variant]: Change default resolve
13531         flags based on language version.
13532         (Expression.Error_UnexpectedKind): Use a simple string array
13533         rather than an ArrayList.
13534         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13535         not ExprClass.Type.
13536         (TypeOfVoid.DoResolve): Likewise.
13537         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13538         flags argument -- it always has the same value.
13539
13540 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13541
13542         Fix #75081.
13543         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13544         Use it in the error message.
13545         * assign.cs, expression.cs, statement.cs: Update.
13546
13547 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13548
13549         Fix #75088.
13550         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13551         the "almostMatchedMember" case too.
13552         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13553         that failed the accessibility checks to 'almost_match'.
13554
13555 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13556
13557         * attribute.cs: Use internal MethodBuilder methods to set
13558         ExactSpelling and SetLastError on PInvoke methods, instead
13559         of passing them via charset.  Fixes #75060.
13560
13561 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13562
13563         * parameter.cs (Parameter): Remove TODO comment.
13564         (Parameter.DefineParameter): Remove Location parameter.
13565         (Parameters.LabelParameters): Likewise.
13566         * class.cs (Constructor.Emit): Update to change.
13567         (MethodData.Emit): Likewise.
13568         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13569         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13570
13571 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13572
13573         * parameter.cs,
13574           Removed Parameters.Location and added Parameter.Location instead.
13575           Removed Location parameter from Emit() and GetSignature().
13576         * anonymous.cs,
13577           class.cs,
13578           cs-parser.jay,
13579           delegate.cs,
13580           iterators.cs,
13581           statement.cs :
13582           Modified all related calls.
13583
13584 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13585
13586         Improve user-defined conversion handling.
13587         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13588         applicable operators.
13589         (AddConversionOperators): New.  Helper for GetConversionOperators.
13590         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13591         there is only one most encompassed/encompassing type.
13592         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13593         "applicable operator" handling.
13594         (UserConversion): Move cache here from GetConversionOperators.
13595         Directly cache the chosen operator, rather than the whole
13596         MethodGroup.
13597         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13598         case.  Allow conversion of decimal to sbyte and byte too.
13599         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13600         New static methods.  Used to avoid allocating EmptyExpressions in
13601         convert.cs.
13602
13603 2005-05-24  Duncan Mak  <duncan@novell.com>
13604
13605         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13606         another class, used in Convert.ExplicitNumericConversion.
13607         (CastToDecimal): New class, similar to above, but casts to
13608         System.Decimal, used in Convert.ImplicitNumericConversion and also
13609         in explicit convesion from double/float to decimal.
13610
13611         * convert.cs (ImplicitNumericConversion): Handle implicit
13612         conversions to System.Decimal.
13613         (ExplicitNumericConversion): handle explicit conversions to
13614         System.Decimal.
13615
13616         This fixes #68711.
13617         
13618 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13619
13620         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13621         know the type at this stage, just break through.   Fixes #75008 
13622
13623 2005-05-19  Martin Baulig  <martin@ximian.com>
13624
13625         * delegate.cs
13626         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13627         to disable error reporting.
13628
13629         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13630         here since we don't want to report an error; see the new test-336.cs.
13631
13632 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13633
13634         * statement.cs (ToplevelBlock.GetParameterReference)
13635         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13636         Move here from class Block.
13637         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13638         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13639
13640 2005-05-18  Martin Baulig  <martin@ximian.com>
13641
13642         Fix #74978.
13643
13644         * flowanalysis.cs
13645         (FlowBranching.Reachability): Add non-static public And() and Or()
13646         methods.
13647         (FlowBranchingSwitch): New class; do the `break_origins' thing
13648         like in FlowBranchingLoop.
13649         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13650         reachability, not just locals and parameters.
13651         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13652         switch; MergeBreakOrigins() now takes care of that.
13653
13654 2005-05-18  Martin Baulig  <martin@ximian.com>
13655
13656         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13657         a loop and may leave it, reset the barrier; fixes #74974.
13658
13659 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13660         
13661         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13662         is back.
13663         
13664         * cs-parser.jay: Catch more lexical errors.
13665         
13666         * report.cs: Add one more Error method.
13667         
13668         * rootcontext.cs,
13669         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13670
13671 2005-05-17  Martin Baulig  <martin@ximian.com>
13672
13673         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13674         #70970. 
13675
13676 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13677
13678         Fix test-382.cs.  Emit values of decimal constants.
13679         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13680         Carved out of ...
13681         (TypeContainer.AddField): ... this.
13682         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13683         with initializers to include 'Const's.
13684         (ClassPart.RegisterFieldForInitialization): Forward to
13685         PartialContainer.
13686         * const.cs (Const.Const): Pass initializer to base class.
13687         (Const.Define): In case of decimal constants, register them for
13688         initialization in a static constructor.
13689
13690 2005-05-14  Martin Baulig  <martin@ximian.com>
13691
13692         * statement.cs (Block.Resolve): Correctly handle unreachable code;
13693         do not call ResolveUnreachable() on unreachable statements in
13694         here, see the comment in the source code.
13695
13696 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13697
13698         Fix #74934.
13699         * expression.cs (BinaryResolveOperator): If one of the operands of
13700         an equality comparison is 'null' and the other is a pointer type,
13701         convert the null to a NullPointer.
13702         * convert.cs (ImplicitReferenceConversion): If the expression is a
13703         NullLiteral and the target type is a pointer type, return a
13704         NullPointer instead.
13705         (ImplicitConversionStandard): Likewise.
13706
13707 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
13708         
13709         * cs-parser.jay: Set readonly context based on special constructs.
13710         
13711         * expression.cs (LocalVariableReference.DoResolveBase): Improved
13712         readonly variable error handling.
13713         
13714         * rootcontext.cs (EmitCode): Don't verify members when error
13715         occurred.
13716         
13717         * statement.cs (LocalInfo): Add reaodnly context information.
13718         (SetReadOnlyContext, GetReadOnlyContext): New methods.
13719
13720 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13721
13722         * statement.cs (Block.Resolve): Revert change below.  Modify fix
13723         for #74041 to initialize 'resolved' to false only for explicit
13724         blocks.  Fixes #74873.
13725
13726 2005-05-12  Raja R Harinath  <harinath@gmail.com>
13727
13728         Fix #74920.
13729         * typemanager.cs (unmanaged_enclosing_types): New.
13730         (IsUnmanagedType): Avoid infloops by using
13731         'unmanaged_enclosing_types' to talk with recursive invocations.
13732
13733 2005-05-13  Martin Baulig  <martin@ximian.com>
13734
13735         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
13736         instance variable, not a local.  Fix #74873.
13737         (Block.ResolveUnreachable): Set it to true here.
13738
13739 2005-05-11  Duncan Mak  <duncan@novell.com>
13740
13741         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
13742         continuing to process for 'arg'.
13743         (handle_preprocessing_directive): Check the argument of the #endif
13744         directive and report error CS1025 if there are any trailing
13745         characters.
13746
13747         According to the C# spec, having even whitespace after the #endif
13748         directive is illegal; however, because we call arg.TrimEnd ()
13749         beforehand, we have the same behavior as csc, allowing whitespace
13750         after the directive.
13751
13752         Fixes #74892.
13753
13754 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
13755
13756         Fix #74863.
13757         
13758         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
13759         (Constructor.GetObsoleteAttribute): Implemented correctly.
13760
13761 2005-05-10  Martin Baulig  <martin@ximian.com>
13762
13763         * support.cs (ReflectionParameters.ParameterModifier): Use
13764         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
13765         and `ParameterAttributes.In'.  Fixes #74884.
13766
13767 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
13768
13769         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
13770         
13771         * expression.cs (Argument.GetParameterModifier): Turned to property.
13772         (Invocation.Error_InvalidArguments): Add more descriptive errors.
13773         
13774         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
13775         its C# equivalent.
13776         
13777 2005-05-09  Raja R Harinath  <rharinath@novell.com>
13778
13779         Fix #74852.
13780         * decl.cs (MemberCache.AddMethods): Register override methods,
13781         rather than non-override methods.
13782         * typemanager.cs (RegisterOverride): New.
13783         (IsOverride): Update.
13784
13785 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
13786
13787         Fix #73105.
13788         
13789         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
13790         recursive declaration.
13791         
13792         * statement.cs (Block.ResolveMeta): Report any error in resolving.
13793         
13794 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
13795
13796         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
13797         
13798         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
13799
13800 2005-05-05  Raja R Harinath  <rharinath@novell.com>
13801
13802         Fix #74797.
13803         * decl.cs (DeclSpace.FamilyAccessible): 
13804         Use TypeManager.IsNestedFamilyAccessible.
13805
13806         Fix reopened #64812.
13807         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
13808         internal'.
13809
13810 2005-05-04  Raja R Harinath  <rharinath@novell.com>
13811             Abin Thomas  <projectmonokochi@rediffmail.com>
13812             Anoob V E  <projectmonokochi@rediffmail.com>
13813             Harilal P R  <projectmonokochi@rediffmail.com>
13814
13815         Fix #64812.
13816         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
13817         allow access to all static members.
13818
13819 2005-05-04  Martin Baulig  <martin@ximian.com>
13820
13821         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
13822
13823 2005-05-04  Martin Baulig  <martin@ximian.com>
13824
13825         Fix #74655.
13826
13827         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
13828         section at the end; make things work if `default' is not the last
13829         section.        
13830
13831 2005-05-04  Martin Baulig  <martin@ximian.com>
13832
13833         Fix #70400.
13834
13835         * statement.cs (Switch): Replaced the `got_default' field with a
13836         `default_section' one.
13837         (Switch.CheckSwitch): Set `default_section' here.
13838         (Switch.Resolve): If we're a constant switch and the constant is
13839         not found, use the default section.
13840
13841 2005-05-03  Martin Baulig  <martin@ximian.com>
13842
13843         * expression.cs (ArrayAccess.EmitGetLength): New public method.
13844
13845         * statement.cs (Foreach.ArrayForeach): New nested class.
13846         (Foreach.TemporaryVariable): New nested class.
13847         (Foreach.EmitArrayForeach): Removed; this is now in the new
13848         ArrayForeach class.
13849
13850 2005-05-03  Raja R Harinath  <rharinath@novell.com>
13851
13852         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
13853         more conservative.
13854         (VerifyPendingMethods): Revert change below.
13855
13856         * typemanager.cs (IsOverride, RegisterNonOverride): New.
13857         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
13858         that used to trigger warning -28.  Remove warning -28.
13859         * expression.cs (Invocation.OverloadResolve): Use
13860         TypeManager.IsOverride to distinguish override methods.
13861
13862         Fix #74773.
13863         * pending.cs (VerifyPendingMethods): If a base type implements the
13864         requested interface, don't bother checking individual methods of
13865         the base type.  As a side-effect, this prevents the creation of
13866         unnecessary proxies.
13867
13868 2005-05-02  Martin Baulig  <martin@ximian.com>
13869
13870         Fix #70182.
13871
13872         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
13873         Also `And' the locals if the old vector is null.
13874         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
13875         null; in this case we basically reset all the variables.        
13876
13877 2005-05-02  Martin Baulig  <martin@ximian.com>
13878
13879         Fix #74529.
13880
13881         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
13882         Added `FlowBranching branching' argument; always `and' the
13883         variables instead of `or'ing them unless we're an infinite loop.
13884
13885         * statement.cs (While.Resolve): Create a new sibling unless we're
13886         infinite.       
13887
13888 2005-05-02  Martin Baulig  <martin@ximian.com>
13889
13890         Fix #70140.
13891
13892         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
13893         arguments; use it instead of creating a new TopLevelBlock.
13894         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
13895         our ConstructorInitializer.
13896
13897         * statement.cs
13898         (TopLevelBlock.TopLevelBranching): New public property.
13899         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
13900         and create our `TopLevelBranching'.
13901
13902         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
13903         anonymous method host, use `block.TopLevelBranching' rather than
13904         creating a new branching.
13905
13906 2005-04-20  Miguel de Icaza  <miguel@novell.com>
13907
13908         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
13909         a ScopeInfo, if any of the current children is a child of the new
13910         entry, move those children there.
13911
13912 2005-04-30  Martin Baulig  <martin@ximian.com>
13913
13914         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
13915         at the beginning of a SwitchSection.  Fix #73335.
13916
13917 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
13918
13919         Fix #74378
13920         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
13921         
13922         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
13923         (FieldExpr.DoResolve): Obsolete members are ignored for field
13924         initializers.
13925         
13926 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
13927
13928         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
13929         of arrays detection.
13930
13931         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
13932         verification.
13933         (Field.VerifyClsCompliance): Volatile fields are not compliant.
13934
13935         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
13936         arrays report.
13937
13938 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
13939
13940         * cs-parser.jay: Use the prefered version of -unsafe in error
13941         message.
13942
13943 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
13944
13945         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
13946         circumstances.
13947
13948 2005-04-20  John Luke  <john.luke@gmail.com>
13949
13950         * driver.cs: fix typo in error message, --outout to --output
13951
13952 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
13953
13954         * codegen.cs (InRefOutArgumentResolving): New field.
13955         
13956         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
13957         fields outside contructor.
13958         
13959         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
13960         
13961 2005-04-19  Miguel de Icaza  <miguel@novell.com>
13962
13963         * anonymous.cs (CaptureContext.EmitParameterInstance): The
13964         parameter code was not completed ever, so it was not as up-to-date
13965         as local variables.  Must finish it.
13966
13967         The bug fix was to compare the Toplevel of the block, not the
13968         current block.  Thanks for Ben for pointing this out. 
13969
13970 2005-04-19  Raja R Harinath  <rharinath@novell.com>
13971
13972         * decl.cs (AddMethods): Use the declaring type of the problem
13973         method to determine if we want to squash a warning.
13974
13975 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
13976
13977         * attribute.cs: Removed debug output.
13978
13979         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
13980         
13981         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
13982         Report.Stderr.
13983         
13984 2005-04-18  Raja R Harinath  <rharinath@novell.com>
13985
13986         Fix #74481.
13987         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
13988         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
13989         all null comparisons against reference types.
13990
13991 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
13992
13993         Fix# 74565
13994         * class.cs (TypeContainer.CircularDepException) New nested
13995         exception class.
13996         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
13997         (TypeContainer.DefineType): Removed error, reset InTransit before
13998         exit.
13999         (Class.DefineType): Throw exception when is in Transit.
14000         Catch exception and report error.
14001         (Struct.DefineType): Throw exception when is in Transit.
14002         Catch exception and report error.
14003         (Interface.DefineType): Throw exception when is in Transit.
14004         Catch exception and report error.
14005
14006         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
14007         handle nested exception handlers.
14008
14009         * flowanalysis.cs (InTryWithCatch): New method, search for try with
14010         a catch.
14011
14012         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
14013         InFinally and InCatch storage.
14014
14015         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
14016         (Catch.Resolve): Set and Restore ec.InCatch.
14017         (Try.Resolve): Set and Restore ec.InFinally.
14018         (Try.HasCatch): True when try has catch.
14019
14020 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
14021
14022         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
14023           for the same event member, so exclude such cases from warning 419.
14024           Fixed bug #74633.
14025
14026 2005-04-16  Miguel de Icaza  <miguel@novell.com>
14027
14028         * expression.cs (Binary.ResolveOperator): Apply patch from John
14029         Luke to fix bug 59864: operators &, | and ^ on enumerations
14030         require that the same enum type on both sides.
14031
14032         * driver.cs: Add warnings to old flag usage, this is to assist
14033         people who produce Makefiles and hope that the Makefiles will be
14034         used on Windows.
14035
14036         * class.cs (TypeContainer.EmitType): Moved the definition of the
14037         special $PRIVATE$ field from the resolve phase to the Emit phase.
14038         During resolve we do not know if we are a struct with
14039         HasExplicitLayout, we know this only after the attributes for the
14040         type are emitted.
14041
14042         Set the FieldOffset to zero on the dummy field that we create for
14043         the class.   Fixes 74590.
14044
14045 2005-04-16  Raja R Harinath  <rharinath@novell.com>
14046
14047         Fix #73834.
14048         * ecore.cs (PropertyExpr.resolved): New.
14049         (DoResolve): Use it to handle a case of double resolution here.
14050         Handle a case of identical-name-and-type-name.
14051         * expression.cs (ArrayCreation.CheckIndices): Avoid double
14052         resolution by storing the results of expression resolution back
14053         into the "probes" array.
14054
14055 2005-04-15  Raja R Harinath  <rharinath@novell.com>
14056
14057         Fix cs0208-7.cs and cs0208-8.cs.
14058         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
14059         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
14060         error reporting to point out the reason a struct is not unmanaged.
14061
14062 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14063
14064         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
14065           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
14066
14067 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14068
14069         Fix #74528.
14070         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
14071         IdenticalNameAndTypeName here.
14072         (EventExpr.InstanceResolve): Likewise.
14073
14074 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
14075
14076         C# 2.0 DefaultCharSetAttribute implementation
14077         
14078         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
14079         which allows us to set GlobalNamespace for every resolve.
14080         (Attribute.ResolveArguments): Cut from Resolve.
14081         (Attribute.GetCharSetValue): Returns CharSet named argument.
14082         (Attribute.DefinePInvokeMethod): Gets default charset from
14083         module settings.
14084         (GlobalAttribute.ResolveAsTypeStep): Override.
14085         (GlobalAttribute.ResolveArguments): Override.
14086         
14087         * class.cs (TypeAttr): Is protected.
14088         
14089         * codegen.cs (ModuleClass.DefaultCharSet): New member.
14090         (ModuleClass.DefaultCharSetType): New memeber.
14091         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
14092         
14093         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
14094         charset from module.
14095         
14096         * delegate.cs (TypeAttr): Override.
14097         (Delegate.DefineType): Use this TypeAttr.
14098         
14099         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14100         at very early stage (before types are defined) to resolve model
14101         module attributes. It will probably not work with corlib but it
14102         should be ok.
14103         
14104         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14105         charset from module.
14106         
14107         * typemanager.cs (default_charset_type): New type.
14108
14109 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14110
14111         * decl.cs (MemberCache.AddMethods): Don't warn if
14112         System.Object.Finalize has buggy MethodAttributes.
14113
14114         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14115         removed below.
14116
14117 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14118
14119         * doc.cs : detect ambiguous reference to overloaded members.
14120           Fixed bug #71603. MS 1.1 csc does not detect it.
14121
14122 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14123
14124         * doc.cs : delegates must not be referenced with parameters.
14125           Fixed bug #71605.
14126
14127 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14128
14129         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14130
14131 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14132
14133         * driver.cs (MainDriver): Stop processing if the CLS stage found
14134         errors. 
14135
14136         (CompilerCallableEntryPoint.InvokeCompiler): Always
14137         reset after execution;   Take a TextWriter argument for the
14138         output.
14139
14140         * report.cs: Use the error stream instead of hardcoding stderr. 
14141
14142 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14143
14144         * class.cs: Reduce code paths to test, too small of an
14145         optimization to make it worth the extra testing.  Always perform
14146         it. 
14147
14148 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14149
14150         Fix #74510.
14151         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14152         operators that had errors reported on them.
14153
14154 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14155
14156         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14157         argument types.
14158         (Attribute.Resolve): Add named argument type checking.
14159         
14160         * class.cs (FixedField.Define): Use IsPrimitiveType
14161         
14162         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14163         
14164         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14165         unsafe parameter types.
14166         
14167         * statement.cs (Using.ResolveExpression): Add better error description.
14168         
14169         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14170         
14171 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14172
14173         Fix #74484.
14174         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14175         AttributeUsageAttribute in the emitcontext of the attribute class,
14176         not in the emitcontext of the attributable entity it was attached to.
14177         * cs-parser.jay: Use 'current_class', not 'current_container',
14178         when creating a GlobalAttribute.
14179
14180 2005-04-08  Alp Toker  <alp@atoker.com>
14181
14182         * pending.cs: The fix to #58413 failed to compile methods implementing
14183         interfaces with/without params modifiers and vice versa, even though
14184         params modifiers aren't part of the signature. Make the modifier check
14185         less strict as in csc.
14186
14187 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14188             Anoob V E  <projectmonokochi@rediffmail.com>
14189             Harilal P R  <projectmonokochi@rediffmail.com>
14190
14191         Fix #58413.
14192         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14193         modifiers of pending methods.
14194         (PendingImplementation.PendingImplementation): Initialize it.
14195         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14196         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14197         with ParameterData.  Add check for modifiers.
14198         * class.cs (MethodData.Define): Update to changes.
14199
14200 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14201
14202         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14203
14204 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14205
14206         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14207         property.
14208         
14209         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14210         
14211         * rootcontext.cs,
14212         * typemanager.cs: Registered RequiredAttributeAttribute.
14213         
14214 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14215
14216         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14217         Warning CS0169 is back at level 3.
14218         (IMethodData.SetMemberIsUsed): New method.
14219         
14220         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14221         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14222         
14223         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14224
14225         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14226         contants.
14227         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14228         is used.
14229         
14230         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14231         is used.
14232         
14233         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14234         to avoid the problems with nested types.
14235
14236 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14237             Anoob V.E  <projectmonokochi@rediffmail.com>
14238             Harilal P.R  <projectmonokochi@rediffmail.com>
14239             Raja R Harinath  <rharinath@novell.com>
14240
14241         Fix #73820.
14242         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14243         attribute.
14244         * typemanager (GetConstructor): Make public.
14245
14246 2005-04-05  John Luke  <john.luke@gmail.com>
14247             Raja R Harinath  <rharinath@novell.com>
14248
14249         Fix #62232.
14250         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14251         struct too.  Return false quicker in a few cases.
14252         (VerifyUnManaged): Use it.
14253
14254 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14255
14256         Fix #74041.
14257         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14258         not 'unreachable_seen'.
14259
14260 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14261
14262         * attribute.cs (Attribute.GetValue): Removed unused.
14263         
14264         * codegen.cs (CodeGen.TrimExt): Removed unused.
14265         
14266         * cs-parser.jay (output): Removed unused.
14267         
14268         * cs-tokenizer.cs (hex_digits): Removed unused.
14269         
14270         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14271         
14272         * expression.cs (Indirection.LoadExprValue): Removed unused.
14273         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14274         
14275         * iterators.cs (Iterator.param_types): Removed unused.
14276         
14277         * statement.cs (Goto.block): Removed unused.
14278         (ToplevelBlock.did): Removed unused.
14279         (Switch.ResolveConstantSwitch): Removed unused.
14280
14281 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14282
14283         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14284         resetting thingy.
14285
14286 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14287
14288         Fix #74232 and cs0208-3.cs.
14289         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14290         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14291         unmanaged type.  Don't use FieldBuilders when 't' is a
14292         TypeBuilder.  Use ModFlags and MemberType fields.
14293         * class.cs (MemberBase.member_type): Rename from MemberType.
14294         (MemberBase.MemberType): New property.  Determines member_type on
14295         demand.
14296         (MemberBase.DoDefine): Don't initialize MemberType here.
14297         (FieldMember.Define): Likewise.
14298
14299 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14300
14301         Fix #74241
14302         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14303         Attributes are emitted there.
14304         
14305 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14306
14307         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14308         keyword in 'partial enum' too.
14309         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14310         is not allowed).
14311         Report from Kamil Skalski <nazgul@omega.pl>.
14312
14313         Fix #74309.
14314         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14315         have partial containers too.
14316
14317         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14318         in block' checks to Block.CheckInvariantMeaningInBlock.
14319         * statement.cs (Block.GetKnownVariableInfo): Make private.
14320         (Block.IsVariableUsedInChildBlock): Remove.
14321         (Block.IsVariableUsedInBlock): Likewise.
14322         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14323         conflicting declaration.
14324         (Block.AddVariable): Make error messages less long-winded and more
14325         specific.  Show location of conflicting declaration.
14326         * parameter.cs (Parameters.Location): New readonly property.
14327
14328 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14329
14330         Clean up semantics of invoking ResolveMemberAccess.
14331         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14332         can have an instance, ensure that we pass in a non-TypeExpression
14333         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14334         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14335         argument.  Update to changes and simplify.
14336         (FieldExpr.Emitinstance): Remove CS0120 check.
14337         (PropertyExpr.EmitInstance): Likewise.
14338         * expression.cs (Argument.Resolve): Likewise.
14339         (Invocation.DoResolve): Update to changes in semantics of
14340         InstanceExpression.
14341
14342 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14343
14344         Fix #74241
14345         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14346         customization.
14347         
14348         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14349
14350 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14351
14352         Fix difference in behaviour with commandline invocation.
14353         * driver.cs (Driver.Reset): New.
14354         (CompilerCallableEntryPoint): Call it.
14355
14356         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14357         variable" warnings if the boolean expression failed to resolve.
14358
14359 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14360
14361         * attribute.cs: Fix the union of several permissions when some of them
14362         are unrestricted (so the result isn't an unrestricted permission set).
14363         Fix #74036.
14364
14365 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14366
14367         * ecore.cs (MemberExpr): New class.  Convert from interface
14368         IMemberExpr.
14369         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14370         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14371         error checks.
14372         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14373         (MethodGroupExpr.IsExplicitImpl): Remove.
14374         (Expression.GetFieldFromEvent): Remove.
14375         (SimpleName.MemberStaticCheck): Remove.
14376         (SimpleName.DoSimpleNameResolve): Update to changes.
14377         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14378         (MemberAccess.IdenticalNameAndTypeName): Remove.
14379         (MemberAccess.error176): Move to MemberExpr.
14380         (MemberAccess.DoResolve): Update to changes.
14381         (BaseAccess.DoResolve): Likewise.
14382
14383 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14384
14385         C# 2.0 Conditional attribute class implementation
14386         
14387         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14388         Analyzes class whether it has attribute which has ConditionalAttribute
14389         and its condition is not defined.
14390         
14391         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14392         (Class.IsExcluded): New method. Search for at least one defined
14393         condition in ConditionalAttribute of attribute class.
14394
14395 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14396
14397         * ecore.cs (PropertyExpr): Derive from Expression, not
14398         ExpressionStatement.
14399         (PropertyExpr.EmitStatement): Remove.
14400
14401 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14402
14403         Fix #74060.
14404         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14405         internal field "value__" of an enum be private.  The examples for
14406         "value__" that I found on MSDN all used FieldAttributes.Private.
14407
14408         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14409         Don't mention IL method attribute names.
14410
14411         Fix #47991.  Remove a TODO.
14412         * statement.cs (Block.Toplevel): Make into a field.
14413         (Block.Parameters): Move into ToplevelBlock.
14414         (Block.known_variables): Rename from child_variable_names.
14415         (Block.Block): Remove variants that take Parameters.  Initialize
14416         'Toplevel' with the immediately surrounding toplevel block.
14417         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14418         LocalInfo parameter.
14419         (Block.GetKnownVariableInfo): New.
14420         (Block.IsVariableNameUsedInChildBlock): Update.
14421         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14422         the block, even though it may not be in scope.
14423         (Block.AddVariable): Remove Parameters parameter.  Use
14424         Toplevel.Parameters instead.
14425         (Block.AddConstant): Remove Parameters parameter.
14426         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14427         (Block.IsParamaterReference): Likewise.
14428         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14429         (ToplevelBlock.Parameters): New.  Moved from Block.
14430         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14431         initialize Parameters to a non-null value.
14432         * cs-parser.jay: Update to changes.
14433         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14434         simple names that mean different things in the same block.  Use
14435         Block.IsVariableNameUsedInBlock.
14436
14437 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14438
14439         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14440         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14441         GetTypeHandle.  It is possible for a reflected type to derive from
14442         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14443         System.Array during mscorlib compilation).
14444         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14445         contain a method_hash, don't create one either.  Don't create a
14446         deep copy of the base cache's method_hash.
14447         (MemberCache.SetupCache): Rename back from DeepCopy.
14448         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14449         already initialized.  If we see an override function, add its
14450         underlying base virtual function to the member_hash too.
14451
14452         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14453
14454 2005-03-26  Raja R Harinath  <harinath@acm.org>
14455
14456         Fix #73038.
14457         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14458         fails to resolve, ensure that the LHS is still resolved as an
14459         lvalue.
14460
14461 2005-03-25  Raja R Harinath  <harinath@acm.org>
14462
14463         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14464         ec.ContainerType.
14465         (Enum.current_ec): Remove.
14466         (Enum.LookupEnumValue): Remove EmitContext argument.
14467         Just uses the one created during DefineType.
14468         (Enum.FindMembers): Update.
14469         * expression.cs (MemberAccess.DoResolve): Update.
14470
14471 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14472
14473         * assign.cs (Assign.DoResolve): Check for CS1717 when
14474         source and target are same (uses Equals).
14475
14476         * expression.cs (LocalVariableReference, ParameterReference,
14477         This): Implemented Equals, GetHashCode.
14478
14479         * statement.cs (Block.GetParameterReference): Removed useless
14480         local variable.
14481
14482 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14483
14484         Fix cs0128.cs
14485         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14486         blocks before deciding whether the error is cs0136 or cs0128.
14487
14488         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14489         (using_alias_directive, using_namespace_directive): Pass
14490         MemberName, not an expression to Namespace.UsingAlias and
14491         Namespace.Using.
14492         (MakeName): Use the MemberName of the namespace.
14493         * namespace.cs (Namespace.MemberName): New.
14494         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14495         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14496         Likewise.
14497         * decl.cs (MemberName.Name): Make readonly.
14498         (MemberName.FromDotted): New "constructor".
14499         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14500         (MemberCore.Name): Compute from MemberName on demand.
14501         (MemberCore.SetMemberName): Provide a way to change the
14502         MemberName.
14503         (MemberCore.AddToContainer): Don't take a fullname parameter.
14504         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14505         fully qualified name of the container to the member name.
14506         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14507         only if the type is a member of the root container.
14508         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14509         MemberName.Left rather than searching for an embedded ".".
14510         (PartialContainer.CreatePart): Update to changes in RootContext.
14511         (MemberBase.ShortName): Turn into a property.  Use
14512         MemberCore.SetMemberName.
14513         (MemberBase.ExplicitInterfaceName): Remove.
14514         (MemberBase.UpdateMemberName): Remove.
14515         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14516         (PropertyBase.SetMemberName): New override.
14517         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14518         (Tree.GetDecl): New.
14519         (Tree.AllDecls): Rename from Decls.
14520         * attribute.cs, enum.cs, report.cs: Update to changes.
14521         * driver.cs (MainDriver): Use MemberName.FromDotted on
14522         RootContext.MainClass.
14523
14524 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14525
14526         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14527         checks.
14528
14529         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14530
14531 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14532
14533         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14534         property accessor modifiers.
14535
14536         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14537         fixed buffer attribute (CS1716).
14538         (PropertyMethod.HasCustomAccessModifier): When property accessor
14539         has custom modifier.
14540
14541         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14542         modifiers.
14543         (PropertyExpr.DoResolveLValue): Add CS0272.
14544
14545 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14546
14547         * convert.cs: When converting to a pointer, use the proper Conv.U
14548         or Conv.I depending on the source data type.
14549
14550         * cs-tokenizer.cs: Make the size for large decimal constants,
14551         fixes #72957.
14552
14553 2005-03-17  Martin Baulig  <martin@ximian.com>
14554
14555         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14556         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14557
14558 2005-03-17  Martin Baulig  <martin@ximian.com>
14559
14560         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14561         to bool so we can return an error condition.
14562         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14563         returned an error.
14564
14565 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14566
14567         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14568         attributes.
14569
14570 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14571
14572         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14573         Refactor to avoid traversing the list of assemblies, and to avoid
14574         string concatenation.
14575         * typemanager.cs (guid_attr_type): Remove.
14576         (negative_hits, pointers, references): Remove hashes.
14577         (type_hash): New.
14578         (GetConstructedType): New.  Uses type_hash to handle constructed
14579         types (arrays, references, pointers).
14580         (GetReferenceType, GetPointerType): Use it.
14581         (GetNestedType): New.  Uses type_hash to handle nested types of
14582         reflected types.
14583         (LookupType, LookupTypeDirect): Remove.
14584         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14585         'types' hash and LookupTypeReflection directly.
14586         (params_string, params_object): Use GetConstructedType.
14587         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14588         top-level types.
14589         (Namespace.Lookup): Use cached_types.
14590         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14591         provided by old TypeManager.LookupType.
14592         * rootcontext.cs (MakeFQN): Remove.
14593         * decl.cs (DeclSpace.MakeFQN): Likewise.
14594         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14595         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14596         TypeManager.GetConstructedType.
14597         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14598
14599 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14600
14601         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14602         indexers.
14603
14604         * cs-parser.jay: Reports CS1527 for any namespace element.
14605
14606         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14607         Added CS0407.
14608
14609         * expression.cs (ParameterReference.IsAssigned): Changed error to
14610         CS0269.
14611         (Error_WrongNumArguments): Moved CS0245 detection here.
14612
14613         * statement.cs (Return.Resolve): Add CS1622 report.
14614
14615 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14616
14617         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14618
14619 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14620
14621         * attribute.cs expression.cs: Get rid of some allocations.
14622
14623 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14624
14625         * doc.cs : just eliminate the latest change.
14626
14627 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14628
14629         * doc.cs : commented out the latest change. It breaks xml-030.cs
14630
14631 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14632
14633         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14634           fail. So invoke CreateType() in FindDocumentedType().
14635
14636 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14637
14638         * cs-tokenizer.cs : added IsKeyword().
14639         * doc.cs : Detect keyword incorrectly used as identifier.
14640           Allow identifiers prefixed by @.
14641
14642 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14643
14644         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14645         It caused exception in namespace resolving (again!).
14646         
14647         * class.cs (Class.ctor): Removed exit.
14648         (PropertyMethod.ctor): ditto.
14649         
14650         * codegen.cs (Codegen.Reset): Reset static data.
14651         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14652         
14653         * cs-tokenizer.cs (Cleanup): Removed.
14654         
14655         * driver.cs (GetSystemDir): Rewrote to one line command.
14656         It caused problem with unloaded dynamic modules.
14657         (UnixParseOption): Removed Exit.
14658         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14659         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14660         Now can be mcs used as library.
14661         
14662         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14663         empty location.
14664         
14665         * location.cs (Reset): Reset static data.
14666         
14667         * namespace.cs (Reset): Reset static data.
14668         
14669         * report.cs (Report.Reset): Reset static data.
14670         
14671         * rootcontext.cs (RootContext.Reset): Reset static data.
14672         
14673         * tree.cs (RootTypes.ctor): Use Location.Null
14674         
14675         * typemanager.cs (TypeManager.Reset): Reset static data.
14676         (CoreLookupType): Removed Exit.
14677         (TypeHandle.Reset): Reset static data.
14678         
14679 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14680
14681         Fix #73516.
14682         * typemanager.cs (ComputeNamespaces): Import namespaces from
14683         referenced modules too.
14684
14685 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14686
14687         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
14688         than '.'.
14689
14690 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14691
14692         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
14693         enclosing DeclSpace.  This ensures that a name-lookup populates
14694         more caches and there are fewer 'TypeExpression's.  Carve out
14695         nested type lookup into ...
14696         (LookupNestedTypeInHierarchy): ... this.
14697
14698 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14699
14700         Clean up a few partial-class semantics.  
14701         Fixes test-357.cs and cs1618-2.cs.
14702         * cs-parser.jay (struct_declaration): Use 'current_class' as
14703         parent of newly-created struct.  Remove call to Register ().
14704         Use 'pop_current_class' to complete handing the current struct.
14705         (interface_declaration): Likewise.
14706         (class_declaration): Likewise.
14707         (enum_declaration): Use 'current_class' as parent of newly created
14708         enum.
14709         (delegate_declaration): Likewise.
14710         (pop_current_class): New function.  This is used to handle closing
14711         up the 'current_class' and 'current_container', and pointing them
14712         to the enclosing class/container.
14713         (CSharpParser): Initialize 'current_class' too.
14714         * decl.cs (MemberCore): Add check for invariant: a partial
14715         container is not a parsed entity, and thus does not enclose any
14716         parsed members.
14717         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
14718         (DeclSpace.BaseTypeExpr): Use it.
14719         (DeclSpace.LookupType): Add check for invariant.
14720         * class.cs (TypeContainer): Add check for invariant: a nested
14721         class should have the same NamespaceEntry as its enclosing class.
14722         (TypeContainer.EmitFieldInitializers): Make virtual.
14723         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
14724         MemberCore.
14725         (TypeContainer.Register): Remove.
14726         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
14727         null.  Use TypeResolveEmitContext for resolving base types and
14728         interfaces.  Move initialization of Parts.TypeBuilder here from
14729         ...
14730         (TypeContainer.DefineNestedTypes): ... here.
14731         (PartialContainer): Take a Namespace not a NamespaceEntry.
14732         (PartialContainer.Create): Don't use Register.  Call the
14733         appropriate Add... function directly.
14734         (ClassPart): Take both the PartialContainer and the enclosing
14735         class as constructor arguments.
14736         (ClassPart.EmitFieldInitializers): Override.
14737         (ClassPart.PartFindNestedTypes): Remove.
14738         (FieldBase.GetInitializerExpression): Resolve the initializer
14739         expression in the emit context of the enclosing class.
14740         * tree.cs (RootTypes): Remove Register ().
14741         
14742 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
14743
14744         * cs-parser.jay: Removed CS0134.
14745         
14746         * driver.cs: Removed CS1901.
14747         
14748         * expression.cs (SizeOf.DoResolve): Don't report CS0233
14749         for predefined types.
14750
14751 2005-03-07  Duncan Mak  <duncan@novell.com>
14752
14753         * codegen.cs (Save):  Catch UnauthorizedAccessException as
14754         well. Fixes bug #73454.
14755
14756 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
14757
14758         * cs-tokenizer.cs (xtoken): Add CS1035.
14759         
14760         * class.cs (MethodData.Define): Add CS0683.
14761         (FieldMember.ctor): Add CS0681.
14762
14763 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14764
14765         * ecore.cs (SimpleName.DoResolve): Rename from
14766         SimpleName.DoResolveAllowStatic.
14767         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
14768         Pass 'intermediate' flag to MemberStaticCheck.
14769         (SimpleName.MemberStaticCheck): Skip "static check" only in case
14770         of "intermediate" lookups via MemberAccess.
14771         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
14772         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
14773
14774 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14775
14776         Fix #73394.
14777         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
14778         slipped in because of variable names that are identical to a
14779         builtin type's BCL equivalent ('string String;', 'int Int32;').
14780         (PropertyExpr.EmitInstance): Likewise.
14781
14782 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
14783
14784         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
14785         
14786         * report.cs (warning_ignore_table): Made public.
14787
14788 2005-03-04  Raja R Harinath  <rharinath@novell.com>
14789
14790         Fix #73282.
14791         * class.cs (MethodData.Emit): Pass 'container' to
14792         container.GetObsoleteAttribute instead of 'container.Parent'.
14793
14794 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
14795
14796         * cs-parser.jay: Add 1534 error test.
14797
14798         * iterators.cs (Yield.CheckContext): Add error 1629.
14799         (Iterator.ctor): Save unsafe modifier.
14800         (MoveNextMethod.DoEmit): Restore unsafe context.
14801
14802         * namespace.cs (UsingAlias): Better error message.
14803
14804 2005-03-03  Dan Winship  <danw@novell.com>
14805
14806         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
14807         the warning message [#73219]
14808
14809 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14810
14811         Fix compile with MCS 1.0.0.0.
14812         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
14813         w_restore to not depend on string constant folding.
14814
14815 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14816
14817         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
14818         CS0246 check to users who passed 'silent = false'.
14819         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
14820         check.
14821         (SimpleName.SimpleNameResolve): Update.
14822         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
14823         (MemberAccess.IdenticalNameAndTypeName): Update.
14824         * doc.cs (FindDocumentedTypeNonArray): Update.
14825
14826 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
14827
14828         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
14829         * parameters.cs (ComputeAndDefineParameters): Remove.
14830         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
14831         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
14832         Use GetParameterInfo.
14833
14834 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
14835
14836         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
14837
14838 2005-03-02  Raja R Harinath  <rharinath@novell.com>
14839
14840         Unify DeclSpace.LookupType and DeclSpace.FindType.
14841         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
14842         is in charge of defining nested types on demand.
14843         (DeclSpace.LookupType): Use it when the current_type is a
14844         TypeBuilder.  Use LookupTypeDirect for reflected types.
14845         (DeclSpace.FindType): Remove.
14846         (DeclSpace.LookupInterfaceOrClass): Likewise.
14847         (DeclSpace.DefineTypeAndParents): Likewise.
14848         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
14849         DeclSpace.LookupType.
14850         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
14851         * typemanager.cs (LookupType): Simplify.
14852         (AddUserType): Remove type from negative_hits.
14853         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
14854         * class.cs (TypeContainer.FindMembers): Move handling of nested
14855         types ...
14856         (TypeContainer.FindMembers_NestedTypes): ... here.
14857         (TypeContainer.FindNestedType): Implement override.
14858         (ClassPart.FindNestedType): Delegate to PartialContainer.
14859         (ClassPart.PartFindNestedType): Looks up the nested types of the
14860         part alone.
14861
14862 2005-03-02  Martin Baulig  <martin@ximian.com>
14863
14864         * class.cs (TypeContainer.DoDefineMembers): We also need a default
14865         static constructor in static classes.
14866
14867 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
14868
14869         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
14870         sizeParamIndex is not specified.
14871
14872 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
14873
14874         Fix #73117
14875         * report.cs (WarningMessage.IsEnabled): Missing null check.
14876
14877 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14878
14879         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
14880         in the fields and not in the properties.
14881
14882 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
14883
14884         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
14885         fields as well.
14886
14887 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14888
14889         * attribute.cs: Small refactoring (improved robustness).
14890         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
14891         (ValidateGuid): Removed.
14892         (Resolve): Removed referenced to above mentioned.
14893         (GetAttributeUsage): Made private and changed to work without
14894         class assistance.
14895         (GetIndexerAttributeValue): Don't crash.
14896         (GetConditionalAttributeValue): Ditto.
14897         (GetClsCompliantAttributeValue): Ditto.
14898         (ExtractSecurityPermissionSet): All attributes exceptions are
14899         error 648.
14900         (GetPropertyValue): New helper.
14901         (GetMethodImplOptions): New method.
14902         (DefinePInvokeMethod): Reuse common code. Implemented handling of
14903         some missing properties.
14904         
14905         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
14906         (Method.ApplyAttributeBuilder): Updated.
14907         
14908         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
14909         exception.
14910
14911 2005-02-28  Raja R Harinath  <rharinath@novell.com>
14912
14913         Fix #73052.
14914         * report.cs (Report.SymbolRelatedToPreviousError): Handle
14915         non-simple types (array, pointer, reference).
14916
14917 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14918
14919         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
14920
14921         * class.cs (MethodCore.IsDuplicateImplementation): Special error
14922         for operators.
14923         (Method.CheckBase): Catch wrong destructor here.
14924         (MethodData.Define): Add errors 550, 668.
14925
14926         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
14927
14928         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
14929
14930         * pending.cs (VerifyPendingMethods): Add error 551.
14931
14932         * typemanager.cs (CSharpName): Next error report helper.
14933
14934 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
14935
14936         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
14937         attributes. Removed useless attribute double check.
14938         It saves almost 2MBs for corlib.
14939
14940 2005-02-25  Raja R Harinath  <rharinath@novell.com>
14941
14942         Fix #72924.
14943         * statement.cs (ExpressionStatement.Resolve): Make robust to being
14944         called twice in case of error.
14945
14946 2005-02-23  Chris Toshok  <toshok@ximian.com>
14947
14948         Fix compiler portions of #72827.
14949         * statement.cs (Block.Emit): call Begin/EndScope on the
14950         EmitContext instead of the ILGenerator.
14951
14952         * codegen.cs (EmitContext.BeginScope): new method, call
14953         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
14954         we have one.)
14955         (EmitContext.BeginScope): same, but EndScope and CloseScope
14956
14957         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
14958         offset and call the superclass's OpenScope(int) with it.
14959         (SymbolWriter.CloseScope): get the current il
14960         offset and call superclass's CloseScope(int) with it.
14961
14962 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
14963
14964         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
14965         CS1677 for out and ref as well.
14966
14967         * class.cs (Method.Define): Add error CS1599 detection.
14968         
14969         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
14970         
14971         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
14972         
14973         * delegate.cs (Delegate.Define): Add error CS1599 detection.
14974         
14975         * support.cs.cs (ModifierDesc): New helper method.
14976
14977 2005-02-23  Raja R Harinath  <rharinath@novell.com>
14978             Abin Thomas  <projectmonokochi@rediffmail.com>
14979             Anoob V E  <projectmonokochi@rediffmail.com>
14980             Harilal P R  <projectmonokochi@rediffmail.com>
14981
14982         Fix #57851, #72718.
14983         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
14984         MemberLookup (used for error reporting) actually returns a result.
14985         Fix error report number (122, not 112).
14986
14987 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
14988             Anoob V E  <projectmonokochi@rediffmail.com>
14989             Harilal P R  <projectmonokochi@rediffmail.com>
14990
14991         Fix #71134.
14992         * pending.cs (PendingImplementation.GetAbstractMethods):
14993         Find NonPublic members too.
14994
14995 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
14996
14997         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
14998         Fixed error 217.
14999         
15000         * class.cs (MethodCore.CheckMethodAgainstBase):
15001         Add error 239 report.
15002
15003 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15004
15005         Fix #68955.
15006         * expression.cs (Invocation.IsApplicable): Make public.
15007         (Invocation.IsParamsMethodApplicable): Likewise.
15008         * delegate.cs (Delegate.VerifyApplicability): Don't use
15009         Invocation.VerifyArgumentCompat for parameter applicability
15010         testing.  Use Invocation.IsApplicable and
15011         Invocation.IsParamsMethodApplicable.
15012
15013 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15014
15015         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
15016         
15017         * class.cs (Operator.Define): Add error 217 report.
15018         
15019 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15020
15021         * namespace.cs (UsingEntry.Resolve): Undo change below.
15022
15023 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15024
15025         Fix #72756.
15026         * ecore.cs (Expression.MemberLookupFailed): Add argument to
15027         disable the error message when the extended MemberLookup also
15028         fails.
15029         (Expression.MemberLookupFinal): Update.
15030         (SimpleName.DoSimpleNameResolve): Update.
15031         * expression.cs (MemberAccess.ResolveNamespaceOrType):
15032         Don't use MemberLookupFinal.
15033         (New.DoResolve): Update.
15034         (BaseAccess.CommonResolve): Update.
15035
15036 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15037
15038         Fix #72732.
15039         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
15040         occured previously, don't resolve again.
15041
15042 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15043
15044         Fix #69949
15045         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
15046         argument. Call ResolveAttributeUsage for unresolved.
15047         when types doesn't match ctor arguments.
15048         
15049         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
15050         for nested attribute classes.
15051         (Class.attribute_usage): Removed.
15052         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
15053         for attribute class.
15054         
15055         * ecore.cs (IsAttribute): Removed.
15056         
15057         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
15058         
15059         * rootcontext.cs (RegisterAttribute): Removed, attributes are
15060         now normal types.
15061         (attribute_types): Removed.
15062         (EmitCode): Global attributes are emited as the latest.
15063
15064 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
15065
15066         * class.cs (EmitFieldInitializers): Don't emit field initializer
15067         for default values when optimilization is on.
15068         
15069         * constant.cs (Constant.IsDefaultValue): New property.
15070         
15071         * driver.cs: Add /optimize handling.
15072         
15073         * constant.cs,
15074         * ecore.cs,
15075         * literal.cs: Implement new IsDefaultValue property.
15076         
15077         * rootcontext.cs (Optimize): New field, holds /optimize option.
15078
15079 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15080
15081         Fix crasher in re-opened #72347.
15082         * namespace.cs (Namespace.Lookup): Return null if
15083         DeclSpace.DefineType returns null.
15084
15085         Fix #72678.
15086         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
15087
15088 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15089
15090         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
15091         now returns null if it cannot resolve to an lvalue.
15092         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
15093         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
15094         returned null.  Remove check for SimpleName.
15095         (EventExpr.DoResolveLValue): New.
15096         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15097         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15098         error from ...
15099         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15100         avoid CS0131 error.
15101         (Unary.ResolveOperator): Move CS0211 check ...
15102         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15103         CS0131 error.
15104         (Unary.DoResolveLValue): Simplify.
15105         (AddressOf.DoResolveLValue): New.
15106         (ArrayAccess.DoResolveLValue): New.
15107
15108 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15109
15110         * attribute.cs (Attribute.Resolve): Add arguments casting for
15111         when types doesn't match ctor arguments.
15112
15113 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15114
15115         Fix parts of #63202.
15116         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15117         lookup of operator in base type.  Ensure that all checks happen
15118         when the operator resolves to an "op_..." method.
15119
15120 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15121
15122         Fix #71992.
15123         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15124         'ignore_cs0104' parameter.  Pass it to ...
15125         (NamespaceEntry.Lookup): ... this.
15126         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15127         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15128         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15129         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15130         Update.  Request that cs0104 errors be ignored.
15131         (ComposedCast.ResolveAsTypeStep): Update.
15132
15133 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15134
15135         Fix #59209.
15136         * expression.cs (Invocation.BetterFunction): Remove support for
15137         comparing virtual functions and their overrides.
15138         (Invocation.IsOverride): New.
15139         (Invocation.OverloadResolve): Don't consider 'override' functions
15140         during candidate selection.  Store them in a lookaside list.
15141         If the selected method is a 'virtual' function, use the list to
15142         find any overrides that are closer to the LHS type.
15143
15144 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15145
15146         * expression.cs (New.DoResolve): Add complex core type reduction.
15147         (New.Constantify): Converts complex core type syntax like 'new int ()'
15148         to simple constant.
15149         
15150 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15151
15152         * decl.cs (EntryType.EntryType): New constructor to create an
15153         updated copy of a cache entry.
15154         (MemberCache.AddMethods): Use it.
15155         (MemberCache.ClearDeclaredOnly): Remove.
15156         (MemberCache.MemberCache): Update.
15157
15158 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15159
15160         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15161         variable.  This one is represents the actual low-level declaration
15162         of the method, as opposed to the semantic level `IsStatic'.   
15163
15164         An anonymous method which is hosted into a static method might be
15165         actually an instance method.  IsStatic would reflect the
15166         container, while MethodIsStatic represents the actual code
15167         generated.
15168
15169         * expression.cs (ParameterReference): Use the new MethodIsStatic
15170         instead of IsStatic.
15171
15172         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15173         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15174         set on the current EmitContext. 
15175
15176         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15177         resolve our casted expression as an LValue.  This triggers the
15178         proper LValue processing that is later required by Assign.
15179
15180         This fixes 72347.
15181
15182         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15183
15184 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15185
15186         C# 2.0 Fixed buffer implementation
15187
15188         * anonymous.cs: Update after RegisterHelperClass renaming.
15189
15190         * attribute.cs (AttributeTester.fixed_buffer_cache):
15191         Cache of external fixed buffers.
15192         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15193         implementation if field is fixed buffer else null.
15194
15195         * class.cs
15196         (TypeContainer.AddField): Accept FieldMember instead of Field.
15197         (FieldBase.IsFieldClsCompliant): Extracted code from
15198         VerifyClsCompliance descendant customization.
15199         (FixedField): New class handles fixed buffer fields.
15200         (FixedFieldExternal): Keeps information about imported fixed
15201         buffer.
15202         (IFixedField): Make access to internal or external fixed buffer
15203         same.
15204
15205         * cs-parser.jay: Add fixed buffer parsing.
15206
15207         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15208         buffer.
15209
15210         * expression.cs (Indirection): Extended implementation to accept
15211         fixed buffer field.
15212         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15213         (ElementAccess.MakePointerAccess): Get type as parameter.
15214         (DoResolve): Add fixed buffer field expression conversion.
15215         (DoResolveLValue): Ditto.
15216         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15217         (ArrayPtr): Derives from FixedBufferPtr.
15218         (ArrayPtr.Emit): Add extra emit for array elements.
15219
15220         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15221
15222         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15223         for compiler generated types.
15224         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15225
15226         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15227         and consume less memory.
15228         (Fixed.Resolve): Add fixed buffer case.
15229
15230         * typemanager.cs (compiler_generated_attr_ctor,
15231         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15232         (HasElementType): Add our own implementation to work on every
15233         runtime.
15234
15235 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15236
15237         * anonymous.cs (CaptureContext): Track whether `this' has been
15238         referenced.   
15239
15240         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15241         only captured `this' if it was implicitly done (instance
15242         methods/variables were used). 
15243
15244         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15245         `this' must be captured.
15246
15247 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15248  
15249         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15250         is null it means that there has been no need to capture anything,
15251         so we just create a sibling.
15252
15253         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15254
15255         Just a partial fix.  The other half is fairly elusive.
15256         
15257 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15258
15259         Fix #52586, cs0121-4.cs.
15260         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15261         and return a hashtable.
15262         (MemberCache.ClearDeclaredOnly): New.
15263         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15264         the method_hash of a base type too.
15265         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15266         type methods.  Overwrite entries with the same MethodHandle so
15267         that the ReflectedType is correct.  The process leaves in base
15268         virtual functions and their overrides as distinct entries.
15269         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15270         matters since it was boxed in a ArrayList before.
15271         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15272         modifier.
15273         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15274         case of a virtual function and its override (choose the overload
15275         as better).
15276         (Invocation.OverloadResolve): Avoid 'override' members during
15277         'applicable_type' calculation.
15278
15279 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15280
15281         Combine two near-redundant caches.
15282         * typemanager.cs (method_params): Rename from method_internal_params.
15283         (TypeManager.GetParameterData): New.  Replace
15284         Invocation.GetParameterData.
15285         (TypeManager.LookupParametersByBuilder): Remove.
15286         * expression.cs (Invocation.method_parameter_cache): Remove.
15287         (Invocation.GetParameterData): Remove.
15288         Update to changes.
15289         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15290         Update to changes.
15291
15292 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15293
15294         Fix #72015.
15295         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15296         TypeManager.multicast_delegate_type is null, resolve it by looking
15297         up "System.MulticastDelegate".
15298         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15299
15300 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15301             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15302             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15303
15304         Fix cs0164.cs.
15305         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15306         (LabeledStatement.AddReference): New.  Set 'referenced'.
15307         (Goto.Resolve): Use it.
15308
15309 2005-02-05  John Luke  <john.luke@gmail.com>
15310
15311         * driver.cs: remove duplicate -doc line in Usage ()
15312
15313 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15314
15315         * location.cs (Location.AddFile): Fix CS2002 error report.
15316
15317 2005-02-02  Martin Baulig  <martin@ximian.com>
15318
15319         * delegate.cs (Delegate.DefineType): Report an internal error if
15320         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15321         details.        
15322
15323 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15324
15325         Fix a crasher in a variant of #31984.
15326         * const.cs (Constant.CheckBase): New override that defers the
15327         new-or-override check in case the base type hasn't been populated
15328         yet.
15329         (Constant.Define): Ensure the new-or-override check is performed.
15330
15331 2005-02-01  Duncan Mak  <duncan@ximian.com>
15332
15333         * const.cs (LookupConstantValue): Check that `ce' is not null
15334         before calling GetValue ().
15335
15336 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15337
15338         Fix test-334.cs (#69519).
15339         * cs-parser.jay (using_alias_directive): Pass in an expression to
15340         NamespaceEntry.UsingAlias.
15341         (using_namespace_directive): Pass in an expression to
15342         NamespaceEntry.Using.
15343         (namespace_name): Don't flatten to a string.
15344         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15345         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15346         ResolveAsTypeStep.
15347         (NamespaceEntry.UsingEntry): Likewise.
15348         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15349         changes.
15350         (NamespaceEntry.LookupForUsing): Remove.
15351         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15352         names.
15353         (NamespaceEntry.Lookup): Remove support for dotted names.
15354
15355 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15356
15357         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15358         split into two.
15359         (NamespaceEntry.ImplicitParent): Compute on demand.
15360         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15361         parallels the current.
15362         (NamespaceEntry.LookupForUsing): Use it.
15363         (NamespaceEntry.Lookup): If the current namespace-entry is
15364         implicit, don't search aliases and using tables.
15365
15366 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15367
15368         Fix #31984.
15369         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15370         BaseCache here.
15371         (TypeContainer.BaseCache): Compute on demand.
15372         (TypeContainer.FindMembers): Define constants and types if they're
15373         not already created.
15374         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15375         check.
15376         * const.cs (Constant.Define): Make idempotent.
15377
15378 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15379
15380         * pending.cs: Produce better code (no nops produced by using Ldarg
15381         + value).
15382         
15383         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15384         i - 1' it should be arg + 1.
15385
15386         Fixes bug #71819.
15387
15388 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15389
15390         * attribute.cs (Attribute.CheckAttributeType): Make private
15391         non-virtual.
15392         (Attribute.ResolveType): Make virtual.
15393         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15394         handling of RootContext.Tree.Types.
15395
15396 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15397
15398         Update attribute-handling to use the SimpleName/MemberAccess
15399         mechanisms.
15400         * cs-parser.jay (attribute): Pass in an expression to the
15401         constructors of Attribute and GlobalAttribute.
15402         * attribute.cs (Attribute): Take an expression for the name.
15403         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15404         passed in attribute name expression.
15405         (Attribute.CheckAttributeType): Use it.
15406         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15407         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15408         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15409         argument to prevent error messages if the lookup fails.
15410
15411 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15412
15413         * expression.cs (Indirection): Implemented IVariable interface
15414         to support indirection in AddressOf operator.
15415         (PointerArithmetic.Emit): Add optimalization for case where
15416         result can be precomputed.
15417
15418 2005-01-26  Martin Baulig  <martin@ximian.com>
15419
15420         * class.cs (TypeContainer.AttributeTargets): Return the correct
15421         AttributeTargets depending on our `Kind' instead of throwing an
15422         exception; fixes #71632.
15423
15424 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15425
15426         Fix #71257
15427         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15428         constant members.
15429
15430 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15431
15432         Fix #71602.
15433         * expression.cs (MemberAccess.DoResolve): Don't complain with
15434         cs0572 when the LHS of a member access has identical name and type
15435         name.
15436
15437 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15438
15439         Fix #71651, #71675
15440         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15441         CreatePermission.
15442         Create custom PermissionSet only for PermissionSetAttribute.
15443
15444 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15445
15446         Fix #71649
15447         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15448         delegates in static class.
15449
15450 2005-01-24  Martin Baulig  <martin@ximian.com>
15451
15452         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15453         merging an implicit block, just use its reachability.
15454
15455         * statement.cs (Block.Resolve): Make the unreachable code check
15456         work wrt. implicit blocks; see test-337 from #63842.
15457
15458 2005-01-21  Alp Toker  <alp@atoker.com>
15459  
15460         * cs-parser.jay: destructor_declaration's container is PartialContainer
15461         not Class when partial types are used, so use Kind prop instead of
15462         'is'.
15463         
15464 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15465
15466         * cs-parser.jay: Improve error reporting when an interface
15467         declares new types.
15468
15469 2005-01-20  Dick Porter  <dick@ximian.com>
15470
15471         * support.cs: SeekableStreamReader fix from Sandor Dobos
15472         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15473         chars are read.  Fixes bug 70369.
15474
15475 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15476
15477         * cs-parser.jay (catch_clause): Simplify current_block handling
15478         somewhat.
15479
15480 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15481
15482         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15483         code with ImplicitStandardConversion to handle the implicit
15484         conversion of method groups into valid delegate invocations. 
15485
15486         The problem is that in parameter handling we were using this code
15487         path.  Fixes bug #64698
15488
15489 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15490
15491         * cs-parser.jay: Fix several infelicities.
15492         - Avoid assigning to the parser value stack.  Code like 
15493           '$3 = null' is unclean.  Synthesize a value for the code block
15494           instead. 
15495         - Avoid using oob_stack for storing location information.  Use ...
15496         (_mark_): ... this.  New (empty) rule.  Saves the current location
15497         in $$.
15498         (foreach_statement): Avoid using oob_stack for current_block
15499         handling.  Use technique used in for_statement and
15500         using_statement.  Synthesize a value for the code block to store
15501         additional intermediate information.
15502
15503 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15504
15505         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15506         of a different type is only allowed to private fields of a
15507         containing type, not on fields of a base class.
15508
15509         See test-174.cs and error cs0122-9.cs
15510
15511 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15512
15513         Fix test-335.cs (bug #58126).
15514         * cs-parser.jay (argument): Split out non-expression parts of the
15515         rule into 'non_simple_argument'.
15516         (invocation_expression): Support parenthesized invocations with
15517         multiple arguments, and with single non-simple arguments.
15518
15519 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15520
15521         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15522         places.
15523
15524 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15525
15526         Fix cs0038-1.cs, cs1640-6.cs.
15527         * ecore.cs (Expression.Resolve): Remove special-case for
15528         SimpleName in error-handling.
15529         (Expression.almostMatchedMembers): Relax access permission to
15530         protected.
15531         (Expression.MemberLookupFailed): Handle duplicates in
15532         almostMatchedMembers list.
15533         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15534         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15535         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15536         overload if the passed in MemberInfo is a MethodBase.
15537
15538 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15539
15540         Fix #70749
15541         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15542         for non-CAS & merge permission sets properly.
15543
15544 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15545
15546         Improve standard-compliance of simple name and member access 
15547         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15548         * ecore.cs (FullNamedExpression): New abstract base class 
15549         for Namespaces and TypeExpressions.
15550         (ResolveFlags.SimpleName): Remove.
15551         (SimpleName): Remove support for dotted names.
15552         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15553         DeclSpace.FindType and DeclSpace.LookupType.
15554         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15555         (Expression.ExprClassName): Make member function.
15556         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15557         a namespace.  Remove creation of dotted "SimpleName"s.
15558         (MemberAccess.DoResolve): Likewise.
15559         * decl.cs (DeclSpace.Cache): Make private.
15560         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15561         (DeclSpace.FindType): Update.
15562         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15563         FullNamedExpression.
15564         * namespace.cs (Namespace): Derive from FullNamedExpression
15565         so that it can be part of expression resolution.
15566         (Namespace.Lookup): Return an FullNamedExpression.
15567         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15568         namespace.
15569         * rootcontext.cs (NamespaceLookup): Remove.
15570         (LookupType): Move to DeclSpace.
15571         * attribute.cs (CheckAttributeType): Update.
15572         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15573         (FindDocumentedTypeNonArray): Likewise.
15574
15575 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15576
15577         Fix cs0509.cs, cs1632.cs.
15578         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15579         is the same as IsInterface.
15580         (TypeContainer.GetClassBases): Likewise.
15581         * statement.cs (LabeledStatement.ig): New field.
15582         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15583         label.
15584         (LabeledStatement.DoEmit): Check that the label was created with
15585         the same ILGenerator.
15586
15587 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15588
15589         Fix #71058
15590         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15591         accessors to its properties.
15592
15593         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15594         from accessors to property.
15595         
15596 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15597
15598         Fix #70722
15599         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15600         only for overrides.
15601         
15602 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15603
15604         * attribute.cs: Check for null and empty strings.  
15605
15606         I have lost another battle to Paolo.
15607
15608 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15609
15610         Fix #70942
15611         * class.cs (PropertyMethod): Set Parent field in ctors.
15612         (SetMethod.InternalParameters): Add unsafe switch hack.
15613         Override MarkForDuplicationCheck where it is appropriate.
15614
15615         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15616         It says whether container allows members with the same name.
15617         Base default is no.
15618         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15619         Removed is_method parameter.
15620
15621 2005-01-06  Duncan Mak  <duncan@ximian.com>
15622
15623         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15624         because the previous change led to incorrect reporting of CS1032
15625         ("Cannot define/undefine preprocessor symbols after first token in
15626         file"). Instead of using `tokens_seen' as the only flag that
15627         triggers CS1040, introduce `comments_seen'. This new flag is used
15628         to signify having seen comments on the current line, so it is
15629         unset after a newline.
15630
15631 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15632
15633         * doc.cs : When searching for a type, find nested type too.
15634           This fixes bug #71040.
15635
15636 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15637
15638         * doc.cs :
15639           - Warn missing member comment on those classes which also does not
15640             have doc comments. Fixed bug #71041.
15641           - Don't warn missing doc comment on default constructor.
15642             Fixed bug #71042.
15643
15644 2005-01-06  Duncan Mak  <duncan@ximian.com>
15645
15646         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15647         comments, set `tokens_seen' to true. This allows us to detect
15648         misplaced preprocessor directives (i.e. not at the beginning of
15649         the a line, nor after whitespaces). In that case, report error
15650         CS1040. This fixes bug #56460.
15651
15652         * cs-parser.jay (interface_member_declaration): Add checks for
15653         IsExplicitImpl, and report CS0541 error if an interface member is
15654         defined as an explicit interface declaration.
15655
15656 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15657
15658         Fix #70817
15659         * class.cs (PropertyMethod): Set Parent field in ctors.
15660         (SetMethod.InternalParameters): Add unsafe switch hack.
15661         
15662         * decl.cs (MemberCore.Parent): Cannot be readonly.
15663
15664 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15665
15666         * decl.cs (DeclSpace.ResolveType): Remove.
15667         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15668         Merge in code from ...
15669         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15670         * class.cs, enum.cs: Update to changes.
15671
15672 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15673
15674         * anonymous.cs: Ensure that we init the scope of our parent if it
15675         has not been initialized yet.
15676
15677 2004-12-30  Duncan Mak  <duncan@ximian.com>
15678
15679         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15680         if field.FieldBuilder is null. Fixes #70758.
15681
15682         * convert.cs: Fixed some typos and updated some of the comments.
15683         (ImplicitStandardConversionExists):
15684         (TryImplicitIntConversion): If `target_type' is an interface and
15685         the type of `ic' implements this interface, return true or a new
15686         BoxedCast instead of null. This fixes #70468.
15687
15688 2004-12-29  Duncan Mak  <duncan@ximian.com>
15689
15690         * expression.cs (Argument.Emit): Check that Expr is
15691         IMemoryLocation before casting to it, and report CS1510 otherwise.
15692
15693         This fixes #70402.
15694
15695 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15696
15697         * statement.cs (Block.ThisVariable): remove the recursion here, to
15698         make the --profile more sane.
15699
15700 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
15701
15702         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
15703         assembly, by JB Evain.
15704
15705 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15706
15707         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
15708           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
15709         "parent" refers to enclosing type/class.  "base" refers to superclass.
15710
15711 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15712
15713         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15714         Ensure that we only have GlobalAttributes.
15715         * attribute.cs (Attribute.Emit): Make non-virtual.
15716         (GlobalAttribute.Emit): Remove.
15717         (Attribute.Resolve): Make virtual.
15718         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
15719         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
15720         the argument. Don't create one.
15721         (Attribute.GetObsoleteAttribute): Likewise.
15722         (Attribute.GetClsCompliantAttributeValue): Likewise.
15723         * class.cs, decl.cs: Update to changes.
15724
15725 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
15726
15727         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
15728         
15729         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
15730         
15731         * statement.cs (Foreach.Resolve): Add error 186 report.
15732
15733 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
15734
15735         * expression.cs (Conditional.DoResolve): Add warning 429.
15736         
15737         * statement.cs (If.Resolve): Add warning 665.
15738
15739 2004-12-16  Raja R Harinath  <rharinath@novell.com>
15740
15741         New invariant: RootContext.Tree.Types.NamespaceEntry == null
15742         except when in the parser, and in GlobalAttribute.
15743         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
15744         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
15745         RootContext.Tree.Types.NamespaceEntry once work is done.
15746         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
15747         and resets RootContext.Tree.Types.NamespaceEntry.
15748
15749 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
15750
15751         * cs-parser.jay: Don't create a block for every variable.
15752
15753 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
15754
15755         * location.cs: Provide extra information.
15756
15757         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
15758         variables from the captured environment, it is the ldarg_0.
15759
15760 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15761
15762         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
15763         find a conclusion.
15764         
15765         * class.cs: Changed warning level for 169 to avoid developer
15766         displeasure from warning flooding. It will be changed back when they
15767         fix most of current BCL warnings.
15768         
15769         * RootContext.cs: Pushed default WarningLevel to 3.
15770         
15771         * statement.cs: Removed unused variable.
15772
15773 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15774
15775         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
15776         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
15777         Add error 502 report.
15778         (StaticClass.DefineType): Add error 441 report.
15779         (Class.AllowedModifiersProp): New virtual property as temporary
15780         extension to AllowedModifiers.
15781         (Class.DefineType): Add error 418 report. Moved ModFlags check here
15782         to share implementation with StaticClass and don't call virtual
15783         methods from ctor.
15784         
15785         * driver.cs (MainDriver): Add error 1558 test.
15786
15787         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
15788         report. Moved error 36 test here.
15789
15790         * statement.cs (Throw.Resolve): Add error 724 report.
15791
15792         * typemanager.cs: Add out_attribute_type core type.
15793         
15794 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
15795
15796         * class.cs (TypeContainer.VerifyClsCompliance): Add error
15797         3018 report.
15798         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
15799
15800         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
15801         3017 report.
15802         
15803         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
15804
15805         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
15806         Add error 3023 report.
15807         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
15808
15809         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
15810         implementation.
15811
15812 2004-12-12  John Luke  <john.luke@gmail.com>
15813
15814         * driver.cs (AddArgs): take -- into account when
15815         adding arguments, fixes bug 65710 
15816
15817 2004-12-12  Martin Baulig  <martin@ximian.com>
15818
15819         * expression.cs (Unary.TryReduceNegative): Added support for
15820         SByteConstant and ByteConstant.
15821         (Unary.Reduce): Check error values from TryReduceNegative().
15822
15823 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
15824
15825         * attributes.cs (Attribute.Resolve): Avoid multiple error report
15826         and report exception as error 182.
15827
15828 2004-12-10  Raja R Harinath  <rharinath@novell.com>
15829
15830         * driver.cs (Main): Fix message when there are warnings.
15831
15832 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
15833
15834         * delegate.cs: Fixed my fix from yesterday, sorry about that.
15835
15836 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
15837
15838         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
15839         Reduced number of warnings.
15840         
15841         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
15842
15843 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
15844
15845         * driver.cs: Removed message.
15846
15847         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
15848
15849 2004-12-08    <vargaz@freemail.hu>
15850
15851         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
15852
15853 2004-12-08  Martin Baulig  <martin@ximian.com>
15854
15855         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
15856         instead of a CS3002 for properties and indexer.
15857
15858 2004-12-08  Martin Baulig  <martin@ximian.com>
15859
15860         * decl.cs (MemberName.ToString): Make this work again.
15861
15862 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
15863
15864         * attribute.cs (Resolve): Add error 591 detection.
15865
15866         * class.cs (FieldMember.Define): Add error 1547 detection.
15867         (Indexer.Define): Add error 620 detection.
15868         (Operator.Define): Add error 590 detection.
15869
15870         * ecore.cs: Missing argument for error 79.
15871
15872         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
15873         detection.
15874
15875 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
15876
15877         Fix #70106
15878         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
15879         only.
15880
15881 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
15882
15883         * cs-parser.jay : handle doc comments on implicit/explicit operators.
15884           Some operator comments were suppressed.
15885         * doc.cs : Implicit/explicit operator name in doc comments are like
15886           "op_Explicit(type)~returnType", so added suffix handling.
15887
15888 2004-12-07  Martin Baulig  <martin@ximian.com>
15889
15890         * decl.cs
15891         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
15892         (MemberCore.GetClsCompliantAttributeValue): Likewise.
15893         (DeclSpace.ec): New protected field; store the EmitContext here.
15894         (DeclSpace.EmitContext): New public property; moved here from
15895         `TypeContainer'.
15896         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
15897         EmitContext.
15898
15899         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
15900         (Enum.Emit): Don't create a new EmitContext.
15901
15902         * delegate.cs (Delegate.DefineType): Always create the
15903         EmitContext.
15904
15905         * iterators.cs (Iterators.DefineIterator): Create a new
15906         EmitContext and store it in `ec'.
15907
15908 2004-08-24  Martin Baulig  <martin@ximian.com>
15909
15910         * typemanager.cs
15911         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
15912         this for accessibility checks.
15913         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
15914         IsNestedFamilyAccessible.
15915         (TypeManager.IsSubclassOf): New method, do what the name actually
15916         says.   
15917
15918 2004-12-06  Raja R Harinath  <rharinath@novell.com>
15919
15920         Fix crash on cs0657-17.cs.
15921         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15922         Use RootContext.Tree.Types, not 'new RootTypes ()'.
15923         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
15924         the case where the NamespaceEntry gets overwritten.
15925
15926 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
15927
15928         Fixed #69195, #56821
15929         * ecore.cs (ResolveBoolean): Tiny refactoring.
15930
15931         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
15932         of right expression resolving when left is false constant and
15933         operator is LogicalAnd OR true constant and operator is LogicalOr.
15934
15935         * statement.cs (ResolveUnreachable): Always reports warning.
15936
15937 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
15938
15939         * class.cs: Distinguish between 1721 and 1722 (just a little help
15940         for the programmer).
15941
15942 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
15943
15944         * delegate.cs: Only allow this on new versions of the language. 
15945
15946 2004-12-02  Duncan Mak  <duncan@ximian.com>
15947
15948         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
15949         Expression class.
15950         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
15951         here as a static method. Take an additional bool out parameter
15952         `must_do_cs1540_check' for signaling to InstanceResolve.
15953         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
15954         member field from PropertyExpr class and made it an argument of
15955         the method instead.
15956         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
15957         check for MarshalByRefObject, and report CS0122 instead of CS1540.
15958         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
15959         and `remove_accessor' as well as InstanceResolve: report CS0122
15960         where applicable.
15961
15962         Fixes #70129.
15963
15964 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15965
15966         Fix test-327.cs, test-328.cs, and put in early infrastructure
15967         for eventually fixing #52697.
15968         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
15969         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
15970         from other methods.
15971         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
15972         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
15973         (VerifyUsing, error246): Update.
15974         * rootcontext.cs (RootContext.NamespaceLookup): Just use
15975         'NamespaceEntry.LookupNamespaceOrType'.
15976
15977 2004-12-03  Martin Baulig  <martin@ximian.com>
15978
15979         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15980         method as our child, call AnonymousMethod.Compatible() on it.
15981
15982 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15983
15984         Disable XML documentation support in 'basic' profile.
15985         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
15986         Redirect XmlElement to System.Object.
15987         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
15988         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
15989         * mcs.exe.sources: Add doc-bootstrap.cs.
15990         * doc-bootstrap.cs: New file.  Contains empty stub implementation
15991         of doc.cs.
15992
15993 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
15994
15995         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
15996           comments are allowed.
15997
15998 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15999
16000         * delegate.cs: Add checks for subtypes in paramaters and return values
16001         in VerifyMethod () to add support for Covariance/Contravariance
16002         in delegates.
16003         
16004 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
16005
16006         * report.cs: Remove extra closing parenthesis.
16007
16008         * convert.cs (Error_CannotImplicitConversion): If the name of the
16009         types are the same, provide some extra information.
16010
16011         * class.cs (FieldBase): Use an unused bit field from the field to
16012         encode the `has_offset' property from the FieldMember.  This saves
16013         a couple of Ks on bootstrap compilation.
16014
16015         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16016         method as our child, return the AnonymousMethod resolved
16017         expression.
16018
16019         * expression.cs (New.DoResolve): Allow return values from
16020         NewDelegate to also include AnonymousMethods.
16021
16022         Fixes #70150.
16023
16024 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
16025
16026         Fix bug #70102
16027         * attribute.cs (Resolve): Improved implementation of params
16028         attribute arguments.
16029
16030         * support.cs (ParameterData): Add HasParams to be faster.
16031
16032 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
16033
16034         all things are for /doc support:
16035
16036         * doc.cs: new file that supports XML documentation generation.
16037         * mcs.exe.sources: added doc.cs.
16038         * driver.cs:
16039           Handle /doc command line option.
16040           Report error 2006 instead of 5 for missing file name for /doc.
16041           Generate XML documentation when required, after type resolution.
16042         * cs-tokenizer.cs:
16043           Added support for picking up documentation (/// and /** ... */),
16044           including a new XmlCommentState enumeration.
16045         * cs-parser.jay:
16046           Added lines to fill Documentation element for field, constant,
16047           property, indexer, method, constructor, destructor, operator, event
16048           and class, struct, interface, delegate, enum.
16049           Added lines to warn incorrect comment.
16050         * rootcontext.cs :
16051           Added Documentation field (passed only when /doc was specified).
16052         * decl.cs:
16053           Added DocComment, DocCommentHeader, GenerateDocComment() and
16054           OnGenerateDocComment() and some supporting private members for
16055           /doc feature to MemberCore.
16056         * class.cs:
16057           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
16058         * delegate.cs:
16059           Added overriden DocCommentHeader.
16060         * enum.cs:
16061           Added overriden DocCommentHeader and GenerateDocComment().
16062
16063 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
16064
16065         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
16066         unwrapping the enumeration values, chain to
16067         DoConstantNumericPromotions again, so we can promote things to the
16068         fundamental types (takes care of enums that are bytes, sbytes).
16069
16070         Fixes bug #62054.
16071
16072 2004-12-01  Raja R Harinath  <rharinath@novell.com>
16073
16074         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
16075         Fix long-standing bug in type-lookup.  Use FindType instead of
16076         LookupType when ec.ResolvingTypeTree.
16077         (Attribute.ResolveType, Attribute.Resolve)
16078         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
16079         Update to changes.
16080         (Attributes.Search): Remove internal version.  Update.
16081         (Attributes.SearchMulti): Update.
16082         (Attributes.GetClsCompliantAttribute): Remove.
16083         (Attributes.GetIndexerNameAttribute): Remove.
16084         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
16085         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
16086         * class.cs (Indexer.Define): Likewise.
16087
16088 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
16089
16090         Fix bug #68790
16091         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
16092         MarshallByReference members access.
16093
16094         * expression.cs: Use CheckMarshallByRefAccess;
16095         Better error CS0197 message.
16096
16097         * report.cs: Print whole related error message.
16098
16099 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16100
16101         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16102         the current directory to help debugging.
16103
16104 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16105
16106         * class (GetClassBases): Better error 60 report.
16107         (EventProperty): Disabled warning 67 detection.
16108
16109 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16110
16111         Fix bug #60324
16112         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16113
16114         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16115         precise values.
16116
16117 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16118
16119         Fix bug #49488
16120         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16121
16122         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16123
16124 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16125
16126         * attribute.cs (Attribute.Resolve): Refine error reporting and
16127         report a cs0117 if the identifier does not exist, to distinguish
16128         from 0617 which is a miss-use of the actual identifier.
16129
16130         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16131         between cs0070 and cs0079.
16132
16133         * class.cs (MemberBase.DoDefine): When reporting a wrong
16134         accessibility level, we use MethodCore to compare instead of
16135         Method (this was a regression in some refactoring effort).
16136
16137         So now we correctly report cs0056 again.
16138
16139         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16140         testing the target_type (which was known to be object_type) and
16141         not the source type (which is anonymous_method).
16142
16143         Fixed reporting of error cs1660.
16144
16145         * expression.cs (UserCast.Source): Expose the underlying cast.
16146
16147         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16148         allowed types to find a match to int32 first (most common).
16149
16150         In addition, it ignores any ImplicitUserConversions that did an
16151         internal implicit conversion (as the switch statement allows only
16152         one integral conversion to exist).
16153
16154         * class.cs (PartialContainer.Create): rename `name' to
16155         `member_name' for clarity.  Then replace the string calls with a
16156         call to MemberName.GetPartialName, as now using
16157         MemberName.ToString is an error (this is due to the side effects
16158         it had, that were fixed in the past).
16159
16160         This will restore the error reporting on a number of partial class
16161         errors that were missusing this (and getting an exception as a
16162         results, which is now just a plain textual warning, because
16163         yyparse debug output would crash otherwise).
16164
16165 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16166
16167         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16168
16169 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16170
16171         * rootcontext.cs (LookupType): Make sure to cache lookups that
16172         don't give us a negative result. This saves about 5% of corlib
16173         compilation time.
16174
16175 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16176
16177         * report.cs (AbstractMessage.Print): messages are sent to stderr
16178
16179         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16180         non-interface in the list of interfaces (at this point, either
16181         parent was properly set, or a base class is being listed in the
16182         interfaces section).
16183
16184         This flags error 1722, and resolves the crash from bug 69259.
16185
16186 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16187
16188         * statement.cs (Using.EmitExpressionFinally): make this work right
16189         for valuetypes. Fixes 69926.
16190
16191 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16192
16193         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16194         converted to an enum" here, before we try to change the underlying
16195         type.  This code exists, but it is a different code path than the
16196         one used while encoding constants.
16197
16198         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16199         old bug: when converting from the null literal to a pointer,
16200         return an EmptyCast, not the NullLiteral.
16201
16202         This fixes #69921, the recent null_type changes probably made this
16203         bug more prominent.
16204
16205         (ImplicitReferenceConversionExists): In addition, resynchronized
16206         the code here, so it matches the same code in
16207         ImplicitReferenceConversionExists for the `from any class-type S
16208         to any interface-type T'.
16209         
16210
16211 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16212
16213         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16214
16215 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16216
16217         * cs-parser.jay: Use verbosity accordingly. 
16218
16219 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16220
16221         * expression.cs (Unary.ResolveOperator): Do not report warning;
16222         AddressOf reads from variable.
16223         
16224         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16225
16226 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16227
16228         Fix bug #69462
16229
16230         * attribute.cs (Attributable): Removed CheckTargets.
16231         (Attributes.Emit): Explicit attribute targets are tested here.
16232
16233         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16234         not enabled for interfaces.
16235
16236         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16237         (GetAssemblyName): Ouch next bug there.
16238
16239 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16240
16241         * expression.cs: Error 275 added.
16242         
16243 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16244
16245         Fix bug #69177 (Implemented decimal constant support)
16246
16247         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16248         (BinaryFold): Add DecimalConstant.
16249
16250         * const.cs (Define): Decimal constant 
16251         (is not constant.
16252         (ChangeType): Add decimal type handling.
16253         (LookupConstantValue): Don't set value for decimal type but
16254         emit DecimalConstantAttribute. Needed for constant optimization.
16255
16256         * constant.cs (ToDecimal): New method.
16257         (ConvertToDecimal): New method.
16258         (IntConstant): Implemented ConvertToDecimal.
16259         (DecimalConstant.Emit): Emit optimized version for decimals in
16260         int range.
16261
16262         * expression.cs (ResolveOperator): Changed order of constant
16263         reduction to work correctly with native types which have
16264         overloaded operators.
16265         (ResolveMemberAccess): Extract constant value from attribute
16266         for decimal type.
16267
16268         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16269
16270         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16271         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16272         (ChangeType): Decimal is special.
16273         (TypeToCoreType): Add decimal type.
16274
16275 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16276
16277         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16278         decimal types.
16279
16280 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16281
16282         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16283         test cs1667-5.cs.
16284
16285 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16286
16287         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16288
16289         * pending.cs (PendingImplementation): Grab only interfaces.
16290
16291 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16292
16293         * statement.cs (ForeachHelperMethods): Add location member and
16294         error 202 detection.
16295
16296 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16297
16298         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16299         automatically handled by executable.make.
16300         (PROGRAM): Make profile-specific.
16301
16302 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16303
16304         * expression.cs (DoResolveBase): Fixed wrong warning for out
16305         variables.
16306
16307 2004-11-18  Martin Baulig  <martin@ximian.com>
16308
16309         Merged latest changes into gmcs.  Please keep this comment in
16310         here, it makes it easier for me to see what changed in MCS since
16311         the last time I merged.
16312
16313 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16314
16315         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16316         (TypeHandle.GetMemberCache): New.
16317         (TypeHandle.TypeHandle): Update.
16318         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16319         (TypeManager.LookupParentInterfacesCache):
16320         Rename from LookupInterfaceCache.  Optimize slightly.
16321         (TypeManager.MemberLookup_FindMembers): Update.
16322         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16323         multi-type variant.
16324         (AddCacheContents): Rename from AddHashtable.
16325         * class.cs (TypeContainer.parent_container): Remove.
16326         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16327         (TypeContainer.DoDefineMembers): Don't initialize it.
16328         Update to name changes.
16329         
16330 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16331
16332         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16333         that factors the code to check access modifiers on override.  
16334
16335         (PropertyBase): Use the code here.
16336
16337         Patch from Lluis S'anchez, fixes bug #69361.
16338
16339 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16340
16341         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16342         routine that is used to report the use of a captured variable
16343         whose address has been taken.
16344
16345         There are two checks: one when variables are being captured and
16346         the other check is when the address of a variable is taken. 
16347         
16348         (because an anonymous methods might be resolved before *or* after
16349         the address has been taken) and 
16350
16351         * expression.cs (Conditional.DoResolve): Remove the special
16352         casing that Martin added to trueExpr and falseExpr being both
16353         NullLiteral.  We get the right behavior now just by introducing
16354         the null_type into the compiler. 
16355
16356         * convert.cs (ExplicitConversion): Change the code to use
16357         null_type instead of testing `expr is NullLiteral'.
16358         (ImplicitConversionStandard): use null_type too.
16359         (ImplicitReferenceConversionExists): use null_type too.
16360         (ImplicitReferenceConversion): use null_type too.
16361
16362         * literal.cs: The type of `NullLiteral' is now null_type instead
16363         of object_type. 
16364         (Resolve): Set the type here.
16365
16366         * typemanager.cs: Introduce null_type.
16367
16368 2004-11-17  Martin Baulig  <martin@ximian.com>
16369
16370         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16371         direction, like FindMembers() does.  Fixes #69546, testcase is in
16372         test-315.cs.    
16373
16374 2004-11-16  Martin Baulig  <martin@ximian.com>
16375
16376         This is based on a patch from Marek Safar, see bug #69082.
16377         Fixes bugs #63705 and #67130.
16378
16379         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16380         method; create a MemberCache for an interface type and cache the
16381         result.
16382
16383         * decl.cs (IMemberContainer.ParentContainer): Removed.
16384         (IMemberContainer.ParentCache): New property.
16385         (MemberCache.SetupCacheForInterface): Removed.
16386         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16387         to create a cache for an interface's "parent".
16388
16389         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16390         interfaces too.
16391
16392 2004-11-16  Martin Baulig  <martin@ximian.com>
16393
16394         Merged back from gmcs; these changes already went into gmcs a
16395         couple of weeks ago.
16396
16397         * typemanager.cs
16398         (TypeManager.AddUserType): Removed the `ifaces' argument.
16399         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16400         `TypeExpr []'.
16401         (TypeManager.AddUserInterface): Removed.
16402         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16403         `TypeExpr []'.
16404         (TypeManager.GetInterfaces): Likewise.
16405         (TypeManager.GetExplicitInterfaces): Likewise.
16406
16407         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16408
16409         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16410         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16411
16412 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16413
16414         * statement.cs: Avoid adding bools to a hashtable.
16415
16416 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16417
16418         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16419         calling an unsafe method from a safe location.
16420
16421 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16422
16423         Fix #69167
16424         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16425
16426 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16427
16428         * namespace.cs (VerifyUsing): use GetPartialName instead of
16429         ToString. 
16430
16431 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16432
16433         * statement.cs (Return.Resolve): Fix regression in typo: if
16434         `in_exc', we have to request a NeedReturnLabel, this was a typo
16435         introduced in the anonymous method check-in.  Fixes #69131.
16436
16437         * Indexers were using the ShortName when defining themselves,
16438         causing a regression in the compiler bootstrap when applying the
16439         patch from 2004-11-02 (first part), now they use their full name
16440         and the bug is gone.
16441
16442 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16443
16444         * driver.cs: Strip the path from the names of embedded resources. Fixes
16445         #68519.
16446
16447 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16448
16449         Fix error message regression: cs0104-2.cs.
16450         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16451         (AliasEntry.Resolve): Update.
16452         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16453         'silent' flag.
16454         (RootContext.LookupType): Update.
16455
16456 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16457
16458         * cs-parser.jay: Add support for handling accessor modifiers
16459         * class: Add support port accessor modifiers and error checking,
16460         define PropertyMethod.Define as virtual (not abstract anymore)
16461         * ecore.cs: Add checking for proeprties access with access modifiers
16462         * iterators.cs: Modify Accessor constructor call based in the modified
16463         constructor
16464 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16465
16466         * expression.cs (StringConcat): Handle being called twice,
16467         as when we have a concat in a field init with more than two
16468         ctors in the class
16469
16470 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16471
16472         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16473         special case explicit implementations, we should always produce
16474         the .property or .event declaration.
16475         
16476         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16477         since it will not return correct data if people use this
16478         unresolved in the presence of using statements (see test-313).
16479
16480         * class.cs (MethodData.Define): If we are an explicit interface
16481         implementation, set the method name to the full name of the
16482         interface plus the name of the method.  
16483
16484         Notice that using the method.MethodName.GetFullName() does not
16485         work, as it will only contain the name as declared on the source
16486         file (it can be a shorthand in the presence of using statements)
16487         and not the fully qualifed type name, for example:
16488
16489         using System;
16490
16491         class D : ICloneable {
16492                 object ICloneable.Clone ()  {
16493                 }
16494         }
16495
16496         Would produce a method called `ICloneable.Clone' instead of
16497         `System.ICloneable.Clone'.
16498
16499         * namespace.cs (Alias.Resolve): Use GetPartialName.
16500         
16501 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16502
16503         * cs-parser.jay: Add error 1055 report.
16504
16505 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16506
16507         * assign.cs (Assign.DoResolve): Only do the transform of
16508         assignment into a New if the types are compatible, if not, fall
16509         through and let the implicit code deal with the errors and with
16510         the necessary conversions. 
16511
16512 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16513
16514         * cs-parser.jay: Add error 1031 report.
16515
16516         * cs-tokenizer.cs: Add location for error 1038.
16517
16518 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16519
16520         * cs-parser.jay: Add error 1016 report.
16521
16522 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16523
16524         * cs-parser.jay: Add errors 1575,1611 report.
16525
16526 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16527
16528         * cs-parser.jay: Add error 1001 report.
16529
16530 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16531
16532         Fix #68850
16533         * attribute.cs (GetMarshal): Add method argument for
16534         caller identification.
16535
16536         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16537         agument for GetMarshal and RuntimeMissingSupport.
16538
16539 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16540
16541         * attribute.cs (ExtractSecurityPermissionSet): Removed
16542         TypeManager.code_access_permission_type.
16543
16544         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16545
16546 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16547
16548         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16549         for obsolete use of a variable here.   Fixes regression on errors
16550         cs0619-25 and cs0619-26.
16551
16552 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16553
16554         Fix #62358, implemented security attribute encoding.
16555
16556         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16557         Tests permitted SecurityAction for assembly or other types.
16558         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16559         data from SecurityPermissionAttribute to PermisionSet class.
16560
16561         * class.cs (ApplyAttributeBuilder): Added special handling
16562         for System.Security.Permissions.SecurityAttribute based types.
16563
16564         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16565         special handling for System.Security.Permissions.SecurityAttribute
16566         based types.
16567
16568         * enum.cs (ApplyAttributeBuilder): Added special handling
16569         for System.Security.Permissions.SecurityAttribute based types.
16570
16571         * parameter.cs (ApplyAttributeBuilder): Added special handling
16572         for System.Security.Permissions.SecurityAttribute based types.
16573
16574         * rootcontext.cs: Next 2 core types.
16575
16576         * typemanager.cs (TypeManager.security_permission_attr_type):
16577         Built in type for the SecurityPermission Attribute.
16578         (code_access_permission_type): Build in type.
16579
16580 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16581
16582         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16583         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16584         all of this information into
16585         EmitContext.EmitCapturedVariableInstance.
16586         
16587         * codegen.cs (EmitCapturedVariableInstance): move here the
16588         funcionality of emitting an ldarg.0 in the presence of a
16589         remapping.   This centralizes the instance emit code.
16590
16591         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16592         then emit a load of this: it means that we have reached the
16593         topmost ScopeInfo: the one that contains the pointer to the
16594         instance of the class hosting the anonymous method.
16595
16596         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16597         captures to the topmost CaptureContext.
16598
16599 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16600
16601         * expression.cs (LocalVariableReference): Move the knowledge about
16602         the iterators into codegen's EmitCapturedVariableInstance.
16603
16604 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16605
16606         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16607         all code paths return a value from an anonymous method (it is the
16608         same as the 161 error, but for anonymous methods).
16609
16610 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16611
16612         The introduction of anonymous methods in the compiler changed
16613         various ways of doing things in the compiler.  The most
16614         significant one is the hard split between the resolution phase
16615         and the emission phases of the compiler.
16616
16617         For instance, routines that referenced local variables no
16618         longer can safely create temporary variables during the
16619         resolution phase: they must do so from the emission phase,
16620         since the variable might have been "captured", hence access to
16621         it can not be done with the local-variable operations from the runtime.
16622         
16623         * statement.cs 
16624
16625         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16626         is a toplevel block.
16627
16628         (ToplevelBlock): A new kind of Block, these are the blocks that
16629         are created by the parser for all toplevel method bodies.  These
16630         include methods, accessors and anonymous methods.
16631
16632         These contain some extra information not found in regular blocks:
16633         A pointer to an optional CaptureContext (for tracking captured
16634         local variables and parameters).  A pointer to the parent
16635         ToplevelBlock.
16636         
16637         (Return.Resolve): Catch missmatches when returning a value from an
16638         anonymous method (error 1662).
16639         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16640         phase.
16641
16642         (Break.Resolve): ditto.
16643
16644         (SwitchLabel): instead of defining the labels during the
16645         resolution phase, we now turned the public ILLabel and ILLabelCode
16646         labels into methods called GetILLabelCode() and GetILLabel() that
16647         only define the label during the Emit phase.
16648
16649         (GotoCase): Track the SwitchLabel instead of the computed label
16650         (its contained therein).  Emit the code by using
16651         SwitchLabel.GetILLabelCode ().
16652
16653         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16654         whether the Local has been captured or not.
16655
16656         (LocalInfo.IsCaptured): New property, used to tell whether the
16657         local has been captured.
16658         
16659         * anonymous.cs: Vastly updated to contain the anonymous method
16660         support.
16661
16662         The main classes here are: CaptureContext which tracks any
16663         captured information for a toplevel block and ScopeInfo used to
16664         track the activation frames for various local variables.   
16665
16666         Each toplevel block has an optional capture context associated
16667         with it.  When a method contains an anonymous method both the
16668         toplevel method and the anonymous method will create a capture
16669         context.   When variables or parameters are captured, they are
16670         recorded on the CaptureContext that owns them, for example:
16671
16672         void Demo () {
16673              int a;
16674              MyDelegate d = delegate {
16675                  a = 1;
16676              }
16677         }
16678
16679         Here `a' will be recorded as captured on the toplevel
16680         CapturedContext, the inner captured context will not have anything
16681         (it will only have data if local variables or parameters from it
16682         are captured in a nested anonymous method.
16683
16684         The ScopeInfo is used to track the activation frames for local
16685         variables, for example:
16686
16687         for (int i = 0; i < 10; i++)
16688                 for (int j = 0; j < 10; j++){
16689                    MyDelegate d = delegate {
16690                         call (i, j);
16691                    }
16692                 }
16693
16694         At runtime this captures a single captured variable `i', but it
16695         captures 10 different versions of the variable `j'.  The variable
16696         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
16697         recorded on a child.  
16698
16699         The toplevel ScopeInfo will also track information like the `this'
16700         pointer if instance variables were referenced (this is necessary
16701         as the anonymous method lives inside a nested class in the host
16702         type of the method). 
16703
16704         (AnonymousMethod): Expanded to track the Toplevel, implement
16705         `AnonymousMethod.Compatible' to tell whether an anonymous method
16706         can be converted to a target delegate type. 
16707
16708         The routine now also produces the anonymous method content
16709
16710         (AnonymousDelegate): A helper class that derives from
16711         DelegateCreation, this is used to generate the code necessary to
16712         produce the delegate for the anonymous method that was created. 
16713
16714         * assign.cs: API adjustments for new changes in
16715         Convert.ImplicitStandardConversionExists.
16716
16717         * class.cs: Adjustments to cope with the fact that now toplevel
16718         blocks are of type `ToplevelBlock'. 
16719
16720         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
16721         insteda of standard blocks.
16722
16723         Flag errors if params arguments are passed to anonymous methods.
16724
16725         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
16726         `CurrentAnonymousMethod' which points to the current Anonymous
16727         Method.  The variable points to the AnonymousMethod class that
16728         holds the code being compiled.  It is set in the new EmitContext
16729         created for the anonymous method.
16730
16731         (EmitContext.Phase): Introduce a variable and an enumeration to
16732         assist in enforcing some rules about when and where we are allowed
16733         to invoke certain methods (EmitContext.NeedsReturnLabel is the
16734         only one that enfonces this right now).
16735
16736         (EmitContext.HaveCaptureInfo): new helper method that returns
16737         whether we have a CapturedContext initialized.
16738
16739         (EmitContext.CaptureVariable): New method used to register that a
16740         LocalInfo must be flagged for capturing. 
16741
16742         (EmitContext.CapturedParameter): New method used to register that a
16743         parameters must be flagged for capturing. 
16744         
16745         (EmitContext.CapturedField): New method used to register that a
16746         field must be flagged for capturing. 
16747
16748         (EmitContext.HaveCapturedVariables,
16749         EmitContext.HaveCapturedFields): Return whether there are captured
16750         variables or fields. 
16751
16752         (EmitContext.EmitMethodHostInstance): This is used to emit the
16753         instance for the anonymous method.  The instance might be null
16754         (static methods), this (for anonymous methods that capture nothing
16755         and happen to live side-by-side with the current method body) or a
16756         more complicated expression if the method has a CaptureContext.
16757
16758         (EmitContext.EmitTopBlock): Routine that drives the emission of
16759         code: it will first resolve the top block, then emit any metadata
16760         and then emit the code.  The split is done so that we can extract
16761         any anonymous methods and flag any captured variables/parameters.
16762         
16763         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
16764         during this phase, the ILGenerator should not be used as labels
16765         and local variables declared here might not be accessible to any
16766         code that is part of an anonymous method.  
16767
16768         Exceptions to this include the temporary variables that are
16769         created by some statements internally for holding temporary
16770         variables. 
16771         
16772         (EmitContext.EmitMeta): New routine, in charge of emitting all the
16773         metadata for a cb
16774
16775         (EmitContext.TemporaryReturn): This method is typically called
16776         from the Emit phase, and its the only place where we allow the
16777         ReturnLabel to be defined other than the EmitMeta.  The reason is
16778         that otherwise we would have to duplicate a lot of logic in the
16779         Resolve phases of various methods that today is on the Emit
16780         phase. 
16781
16782         (EmitContext.NeedReturnLabel): This no longer creates the label,
16783         as the ILGenerator is not valid during the resolve phase.
16784
16785         (EmitContext.EmitThis): Extended the knowledge in this class to
16786         work in anonymous methods in addition to iterators. 
16787
16788         (EmitContext.EmitCapturedVariableInstance): This emits whatever
16789         code is necessary on the stack to access the instance to a local
16790         variable (the variable will be accessed as a field).
16791
16792         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
16793         EmitContext.EmitAddressOfParameter): Routines to support
16794         parameters (not completed at this point). 
16795         
16796         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
16797         will also remove the parameters.
16798
16799         * convert.cs (Convert): Define a `ConstantEC' which points to a
16800         null.  This is just to prefity some code that uses
16801         ImplicitStandardConversion code and do not have an EmitContext
16802         handy.
16803
16804         The idea is to flag explicitly that at that point in time, it is
16805         known that the conversion will not trigger the delegate checking
16806         code in implicit conversions (which requires a valid
16807         EmitContext). 
16808
16809         Everywhere: pass new EmitContext parameter since
16810         ImplicitStandardConversionExists now requires it to check for
16811         anonymous method conversions. 
16812
16813         (Convert.ImplicitStandardConversionExists): If the type of an
16814         expression is the anonymous_method_type, and the type is a
16815         delegate, we invoke the AnonymousMethod.Compatible method to check
16816         whether an implicit conversion is possible. 
16817
16818         (Convert.ImplicitConversionStandard): Only do implicit method
16819         group conversions if the language level is not ISO_1.
16820
16821         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
16822         MethodInfo for the Invoke method.  used by Delegate and
16823         AnonymousDelegate.
16824
16825         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
16826         method conversions if the target type is a delegate.
16827
16828         Removed extra debugging nops.
16829
16830         (LocalVariableReference): Turn the `local_info' into a public
16831         field. 
16832
16833         Add `prepared' field, the same hack used for FieldExprs to cope
16834         with composed assignments, as Local variables do not necessarily
16835         operate purely on the stack as they used to: they can be captured
16836         fields. 
16837
16838         Add `temp' for a temporary result, like fields.
16839
16840         Refactor DoResolve and DoResolveLValue into DoResolveBase.
16841
16842         It now copes with Local variables that are captured and emits the
16843         proper instance variable to load it from a field in the captured
16844         case. 
16845
16846         (ParameterReference.DoResolveBase): During the resolve phase,
16847         capture parameters if we are in an anonymous method.
16848
16849         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
16850         anonymous method, use the EmitContext helper routines to emit the
16851         parameter reference.
16852
16853         * iterators.cs: Set RemapToProxy to true/false during the
16854         EmitDispose class.
16855
16856         * parameters.cs (GetParameterByName): New helper method. 
16857
16858         * typemanager.cs (anonymous_method_type) a new type that
16859         represents an anonyous method.  This is always an internal type,
16860         used as a fencepost to test against the anonymous-methodness of an
16861         expression. 
16862         
16863 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
16864
16865         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
16866         561 report.
16867         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
16868
16869 2004-10-18  Martin Baulig  <martin@ximian.com>
16870
16871         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
16872         `Type' directly, but call ResolveType() on it.
16873         (Catch.Resolve): Likewise.
16874         (Foreach.Resolve): Likewise.
16875
16876 2004-10-18  Martin Baulig  <martin@ximian.com>
16877
16878         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
16879         `Type' directly, but call ResolveType() on it.
16880         (Probe.DoResolve): Likewise.
16881         (ArrayCreation.LookupType): Likewise.
16882         (TypeOf.DoResolve): Likewise.
16883         (SizeOf.DoResolve): Likewise.
16884
16885 2004-10-18  Martin Baulig  <martin@ximian.com>
16886
16887         * expression.cs (Invocation.BetterFunction): Put back
16888         TypeManager.TypeToCoreType().
16889
16890 2004-10-18  Raja R Harinath  <rharinath@novell.com>
16891
16892         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
16893         the ResolveType.
16894
16895 2004-10-18  Martin Baulig  <martin@ximian.com>
16896
16897         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
16898         `Type' directly, but call ResolveType() on it.
16899
16900 2004-10-18  Martin Baulig  <martin@ximian.com>
16901
16902         * class.cs (FieldMember.Define): Don't access the TypeExpr's
16903         `Type' directly, but call ResolveType() on it.
16904         (MemberBase.DoDefine): Likewise.
16905
16906         * expression.cs (New.DoResolve): Don't access the TypeExpr's
16907         `Type' directly, but call ResolveType() on it.
16908         (ComposedCast.DoResolveAsTypeStep): Likewise.
16909
16910         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
16911         `Type' directly, but call ResolveType() on it.
16912
16913 2004-10-17  John Luke  <john.luke@gmail.com>
16914
16915         * class.cs (Operator.GetSignatureForError): use CSharpName
16916
16917         * parameter.cs (Parameter.GetSignatureForError): Returns
16918         correct name even if was not defined.
16919
16920 2004-10-13  Raja R Harinath  <rharinath@novell.com>
16921
16922         Fix #65816.
16923         * class.cs (TypeContainer.EmitContext): New property.
16924         (DefineNestedTypes): Create an emitcontext for each part.
16925         (MethodCore.DoDefineParameters): Use container's emitcontext.
16926         Pass type array to InternalParameters.
16927         (MemberBase.DoDefine): Use container's emitcontext.
16928         (FieldMember.Define): Likewise.
16929         (Event.Define): Likewise.
16930         (SetMethod.GetParameterInfo): Change argument to EmitContext.
16931         Pass type array to InternalParameters.
16932         (SetIndexerMethod.GetParameterInfo): Likewise.
16933         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
16934         * delegate.cs (Define): Pass emitcontext to
16935         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
16936         array to InternalParameters.
16937         * expression.cs (ParameterReference.DoResolveBase): Pass
16938         emitcontext to GetParameterInfo.
16939         (ComposedCast.DoResolveAsTypeStep): Remove check on
16940         ec.ResolvingTypeTree.
16941         * parameter.cs (Parameter.Resolve): Change argument to
16942         EmitContext.  Use ResolveAsTypeTerminal.
16943         (Parameter.GetSignature): Change argument to EmitContext.
16944         (Parameters.ComputeSignature): Likewise.
16945         (Parameters.ComputeParameterTypes): Likewise.
16946         (Parameters.GetParameterInfo): Likewise.
16947         (Parameters.ComputeAndDefineParameterTypes): Likewise.
16948         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
16949         * support.cs (InternalParameters..ctor): Remove variant that takes
16950         a DeclSpace.
16951         * typemanager.cs (system_intptr_expr): New.
16952         (InitExpressionTypes): Initialize it.
16953
16954 2004-10-12  Chris Toshok  <toshok@ximian.com>
16955
16956         * cs-parser.jay: fix location for try_statement and catch_clause.
16957
16958 2004-10-11  Martin Baulig  <martin@ximian.com>
16959
16960         * report.cs: Don't make --fatal abort on warnings, we have
16961         -warnaserror for that.
16962
16963 2004-10-07  Raja R Harinath  <rharinath@novell.com>
16964
16965         More DeclSpace.ResolveType avoidance.
16966         * decl.cs (MemberCore.InUnsafe): New property.
16967         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
16968         with newly created EmitContext.
16969         (FieldMember.Define): Likewise.
16970         * delegate.cs (Delegate.Define): Likewise.
16971         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
16972         only if normal name-lookup fails.
16973         (TypeExpr.DoResolve): Enable error-checking.
16974         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
16975         (SizeOf.DoResolve): Likewise.
16976         (ComposedCast.DoResolveAsTypeStep): Likewise.
16977         (StackAlloc.DoResolve): Likewise.
16978         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
16979         (Block.Unsafe): New property.
16980         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
16981         (Unsafe): Set 'unsafe' flag of contained block.
16982         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
16983         (Fixed.Resolve): Likewise.
16984         (Catch.Resolve): Likewise.
16985         (Using.ResolveLocalVariableDecls): Likewise.
16986         (Foreach.Resolve): Likewise.
16987
16988 2004-10-05  John Luke <john.luke@gmail.com>
16989
16990         * cs-parser.jay: add location to error CS0175
16991
16992 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
16993
16994         * ecore.cs (Expression.Constantity): Add support for turning null
16995         into a constant.
16996
16997         * const.cs (Const.Define): Allow constants to be reference types
16998         as long as the value is Null.
16999
17000 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
17001
17002         * namespace.cs (NamespaceEntry.Using): No matter which warning
17003         level is set, check if this namespace name has already been added.
17004
17005 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
17006
17007         * expression.cs: reftype [!=]= null should always use br[true,false].
17008         # 67410
17009
17010 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
17011
17012         Fix #67108
17013         * attribute.cs: Enum conversion moved to 
17014         GetAttributeArgumentExpression to be applied to the all
17015         expressions.
17016
17017 2004-10-01  Raja R Harinath  <rharinath@novell.com>
17018
17019         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
17020         * class.c (TypeContainer.DefineType): Flag error if
17021         base types aren't accessible due to access permissions.
17022         * decl.cs (DeclSpace.ResolveType): Move logic to
17023         Expression.ResolveAsTypeTerminal.
17024         (DeclSpace.ResolveTypeExpr): Thin layer over
17025         Expression.ResolveAsTypeTerminal.
17026         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
17027         Refactor code into NestedAccess.  Use it.
17028         (DeclSpace.NestedAccess): New.
17029         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
17030         argument to silence errors.  Check access permissions.
17031         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
17032         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
17033         (Cast.DoResolve): Likewise.
17034         (New.DoResolve): Likewise.
17035         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
17036         (TypeOf.DoResolve): Likewise.
17037
17038         * expression.cs (Invocation.BetterConversion): Return the Type of
17039         the better conversion.  Implement section 14.4.2.3 more faithfully.
17040         (Invocation.BetterFunction): Make boolean.  Make correspondence to
17041         section 14.4.2.2 explicit.
17042         (Invocation.OverloadResolve): Update.
17043         (Invocation): Remove is_base field.
17044         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
17045         (Invocation.Emit): Likewise.
17046
17047 2004-09-27  Raja R Harinath  <rharinath@novell.com>
17048
17049         * README: Update to changes.
17050
17051 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
17052
17053         * cs-parser.jay: Reverted 642 warning fix.
17054
17055 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17056
17057         Fix bug #66615
17058         * decl.cs (FindMemberWithSameName): Indexer can have more than
17059         1 argument.
17060
17061 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17062
17063         * expression.cs (LocalVariableReference.DoResolveLValue):
17064         Do not report warning 219 for out values.
17065         (EmptyExpression.Null): New member to avoid extra allocations.
17066
17067 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17068
17069         * cs-parser.jay: Fix wrong warning 642 report.
17070
17071         * cs-tokenizer.cs (CheckNextToken): New helper;
17072         Inspect next character if is same as expected.
17073
17074 2004-09-23  Martin Baulig  <martin@ximian.com>
17075
17076         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
17077         (Convert.ImplicitReferenceConversionExists): Likewise.
17078
17079 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17080
17081         * class.cs (Operator.Define): Add error 448 and 559 report.
17082
17083 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17084
17085         * class.cs (MemberBase.IsTypePermitted): New protected
17086         method for checking error CS0610.
17087
17088 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17089
17090         * class.cs (TypeContainer.HasExplicitLayout): New property
17091         Returns whether container has StructLayout attribute set Explicit.
17092         (FieldMember): New abstract class for consts and fields.
17093         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
17094         (Field): Reuse FieldMember.
17095
17096         * const.cs (Const): Reuse FieldMember.
17097
17098         * rootcontext.cs: EmitConstants call moved to class.
17099
17100 2004-09-22  Martin Baulig  <martin@ximian.com>
17101
17102         Thanks to Peter Sestoft for this bug report.
17103
17104         * expression.cs (Conditional): If both the `trueExpr' and the
17105         `falseExpr' is a NullLiteral, return a NullLiteral.
17106
17107 2004-09-22  Martin Baulig  <martin@ximian.com>
17108
17109         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17110         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17111         for the "get_Current" call.
17112
17113 2004-09-22  Martin Baulig  <martin@ximian.com>
17114
17115         Marek and me just fixed one of our oldest bugs: #28562 :-)
17116
17117         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17118
17119         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17120         we're an EnumConstant, just return that.
17121         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17122         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17123         to get the value which'll actually be written into the attribute.
17124         However, we have to use GetValue() to access the attribute's value
17125         in the compiler.        
17126
17127 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17128
17129         * constant.cs (Constant.IsNegative): New abstract property
17130         IsNegative.
17131
17132         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17133         (StackAlloc.DoResolve): Reused IsNegative.
17134
17135 2004-09-21  Martin Baulig  <martin@ximian.com>
17136
17137         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17138         if we're used in an iterator, we may be called from different
17139         methods.
17140
17141         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17142         we actually have an exception block.
17143
17144 2004-09-20  John Luke <jluke@cfl.rr.com>
17145
17146         * class.cs, cs-parser.jay: Improve the error report for 1520:
17147         report the actual line where the error happens, not where the
17148         class was declared.
17149
17150         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17151         Pass location information that was available elsewhere.
17152
17153 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17154
17155         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17156         runtime to delay sign assemblies.
17157
17158 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17159
17160         * cs-parser.jay: Do not report the stack trace, this is barely
17161         used nowadays.
17162
17163 2004-08-22  John Luke  <john.luke@gmail.com>
17164  
17165         * driver.cs : check that a resource id is not already used
17166         before adding it, report CS1508 if it is, bug #63637
17167
17168 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17169
17170         * ecore.cs: Removed dead code.
17171
17172 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17173
17174         * class.cs: Do not report warning CS0067 on the interfaces.
17175
17176 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17177
17178         * cs-parser.jay: Add error 504 report.
17179
17180 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17181
17182         * rootcontext.cs: WarningLevel is 4 by default now.
17183
17184         * statement.cs (Fixed.Resolve): Do not null
17185         VariableInfo.
17186
17187 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17188
17189         Fixed bug #55780
17190         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17191         deep search when property is not virtual.
17192         (PropertyExpr.ResolveAccessors): Make one call for both
17193         accessors.
17194
17195 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17196
17197         Fixed bug #65766
17198         * statement.cs: Error 152 report constains also location.
17199
17200 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17201
17202         Fixed bug #65766
17203         * const.cs: Explicitly set constant as static.
17204
17205 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17206
17207         Fixed bug #64226
17208         * cs-parser.jay: Add error 1017 report.
17209
17210 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17211
17212         Fixed bug #59980, #64224
17213         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17214
17215         * typemanager.cs (IsSpecialMethod): Simplified
17216
17217 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17218
17219         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17220         condition with better params.
17221
17222 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17223
17224         Fixed bug #65238
17225         * attribute.cs (Resolve): Property has to have both
17226         accessors.
17227
17228 2004-09-14  Martin Baulig  <martin@ximian.com>
17229
17230         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17231
17232 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17233
17234         Fixed bug #61902
17235         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17236         called and is obsolete then this member suppress message
17237         when call is inside next [Obsolete] method or type.
17238
17239         * expression.cs: Use TestObsoleteMethodUsage member.
17240
17241 2004-09-14  Martin Baulig  <martin@ximian.com>
17242
17243         * cs-parser.jay: Sync a bit with the GMCS version.
17244
17245 2004-09-14  Martin Baulig  <martin@ximian.com>
17246
17247         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17248         (CSharpParser.yacc_verbose_flag): New public field.
17249
17250         * genericparser.cs: Removed.
17251
17252 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17253
17254         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17255
17256 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17257
17258         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17259
17260 2004-09-10  Martin Baulig  <martin@ximian.com>
17261
17262         Backported my MemberName changes from GMCS into MCS.
17263
17264         - we are now using a special `MemberName' class instead of using
17265         strings; in GMCS, the `MemberName' also contains the type
17266         arguments.
17267
17268         - changed the grammar rules a bit:
17269           * the old `member_name' is now a `namespace_or_type_name':
17270             The rule is that we use `namespace_or_type_name' everywhere
17271             where we expect either a "member name" (GetEnumerator) or a
17272             "member name" with an explicit interface name
17273             (IEnumerable.GetEnumerator).
17274             In GMCS, the explicit interface name may include type arguments
17275             (IEnumerable<T>.GetEnumerator).
17276           * we use `member_name' instead of just `IDENTIFIER' for
17277             "member names":
17278             The rule is that we use `member_name' wherever a member may
17279             have type parameters in GMCS.       
17280
17281         * decl.cs (MemberName): New public class.
17282         (MemberCore.MemberName): New public readonly field.
17283         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17284         (DeclSpace): Likewise.
17285
17286         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17287         * enum.cs (Enum.ctor): Likewise.
17288
17289         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17290         MemberName.     
17291         (AliasEntry.ctor): Take a MemberName, not an Expression.
17292         (AliasEntry.UsingAlias): Likewise.
17293
17294         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17295         (IMethodData.MemberName): Changed type from string to MemberName.
17296         (MemberBase.ExplicitInterfaceName): Likewise.
17297         (AbstractPropertyEventMethod.SetupName): Make this private.
17298         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17299         argument; compute the member name here.
17300         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17301         on the `member.MemberName' and the `prefix'.
17302
17303         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17304         not `type_name'.
17305         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17306         thus, we get a `MemberName' instead of a `string'.  These
17307         declarations may have type parameters in GMCS.
17308         (interface_method_declaration, delegate_declaration): Likewise.
17309         (class_declaration, interface_declaration): Likewise.
17310         (method_header): Use `namespace_or_type_name' instead of
17311         `member_name'.  We may be an explicit interface implementation.
17312         (property_declaration, event_declaration): Likewise.
17313         (member_name): This is now just an `IDENTIFIER', not a
17314         `namespace_or_type_name'.
17315         (type_name, interface_type): Removed.
17316         (namespace_or_type_name): Return a MemberName, not an Expression.
17317         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17318         call GetTypeExpression() on the MemberName to get an expression.
17319         (IndexerDeclaration.interface_type): Changed type from string to
17320         MemberName.
17321         (MakeName): Operate on MemberName's instead of string's.
17322
17323 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17324
17325         Fix bug #55770.
17326         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17327         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17328         lookup to avoid symbols introduced by 'using'.
17329         * rootcontext.cs (NamespaceLookup): Update.
17330
17331 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17332
17333         * class.cs (TypeContainer.DoDefineMembers): Do not call
17334         DefineDefaultConstructor for static classes.
17335
17336 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17337
17338         * attribute.cs (Attribute.Resolve): Add error 653 report.
17339
17340         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17341         report.
17342         (Method.ApplyAttributeBuilder): Add error 685 report.
17343         (Operator.Define): Add error 564 report.
17344
17345         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17346
17347         * expression.cs (Invocation.DoResolve): Add error
17348         245 and 250 report.
17349
17350         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17351         error 674 report.
17352
17353 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17354
17355         * class.cs (ConstructorInitializer.Resolve):
17356         Wrong error number (515->516).
17357
17358 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17359
17360         * class.cs (Indexer.Define): Add error 631 report.
17361
17362 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17363
17364         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17365
17366 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17367
17368         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17369
17370 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17371
17372         * cs-parser.jay: Added error CS0241 report.
17373
17374 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17375
17376         * cs-parser.jay (fixed_statement): Introduce a scope for the
17377         declaration in the 'fixed' statement.
17378
17379 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17380
17381         * cs-parser.jay: Added CS0230 error report.
17382
17383 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17384
17385         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17386
17387 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17388
17389         * expression.cs (Argument.Resolve): Added error CS0192 and
17390         CS0199 report.
17391
17392 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17393
17394         C# 2.0 #pragma warning feature
17395
17396         * cs-tokenizer.cs (PreProcessPragma): New method; 
17397         Handles #pragma directive.
17398
17399         * report.cs (WarningRegions): New class; Support
17400         class for #pragma warning directive. It tests whether
17401         warning is enabled for a given line.
17402
17403 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17404
17405         * const.cs: Add more descriptive error report, tahnks to
17406         Sebastien. 
17407
17408 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17409
17410         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17411
17412 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17413
17414         * expression.cs: Apply patch from Ben: Remove dead code from
17415         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17416         as that code just threw an exception anwyays.
17417
17418         * const.cs: Remove the call to the turnintoconstant, for details
17419         see bug: #63144
17420         
17421         * literal.cs: The type of the null-literal is the null type;  So
17422         we use a placeholder type (literal.cs:System.Null, defined here)
17423         for it.
17424
17425         * expression.cs (Conditional.DoResolve): Remove some old code that
17426         is no longer needed, conversions have been fixed.
17427
17428         (ArrayCreationExpression.DoResolve): Return false if we fail to
17429         resolve the inner expression.
17430
17431 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17432
17433         Fix test-290.cs.
17434         * cs-parser.jay (delegate_declaration): Record a delegate
17435         declaration as a type declaration.
17436         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17437
17438 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17439
17440         * parameter.cs: Do not crash if the type can not be resolved. 
17441
17442         * expression.cs: Report errors with unsafe pointers, fixes #64896
17443
17444 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17445
17446         * expression.cs: Pointer arith always needs to do a conv.i
17447         if the operand is a long. fix 65320
17448
17449 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17450
17451         Fixed cs0619-37.cs, cs0619-38.cs
17452
17453         * enum.cs (GetObsoleteAttribute): Removed.
17454
17455         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17456         on Enum member is double staged. The first is tested member
17457         and then enum.
17458
17459 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17460
17461         Fixed #56986, #63631, #65231
17462
17463         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17464         adds member to name container.
17465         (TypeContainer.AddToTypeContainer): New method, adds type to
17466         name container.
17467         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17468         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17469         AddOperator): Simplified by reusing AddToMemberContainer.
17470         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17471         instead of field.
17472         (Method.CheckForDuplications): Fixed implementation to test all
17473         possibilities.
17474         (MemberBase): Detection whether member is explicit interface
17475         implementation is now in constructor.
17476         (MemberBase.UpdateMemberName): Handles IndexerName.
17477         (Accessor): Changed to keep also location information.
17478         (AbstractPropertyEventMethod): Is derived from MemberCore.
17479         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17480         will be emited or not.
17481         (PropertyBase.AreAccessorsDuplicateImplementation):
17482         Tests whether accessors are not in collision with some method.
17483         (Operator): Is derived from MethodCore to simplify common
17484         operations.
17485
17486         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17487         must be performed.
17488         (DeclSpace.AddToContainer): Adds the member to defined_names
17489         table. It tests for duplications and enclosing name conflicts.
17490
17491         * enum.cs (EnumMember): Clean up to reuse the base structures
17492
17493 2004-09-03  Martin Baulig  <martin@ximian.com>
17494
17495         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17496         into TypeContainer, to make partial classes work again.
17497
17498 2004-09-03  Martin Baulig  <martin@ximian.com>
17499
17500         * rootcontext.cs (RootContext.V2): Removed.
17501
17502 2004-03-23  Martin Baulig  <martin@ximian.com>
17503
17504         * expression.cs (Invocation.OverloadResolve): Added `bool
17505         may_fail' argument and use it instead of the Location.IsNull() hack.
17506
17507 2004-09-03  Martin Baulig  <martin@ximian.com>
17508
17509         Merged latest changes into gmcs.  Please keep this comment in
17510         here, it makes it easier for me to see what changed in MCS since
17511         the last time I merged.
17512
17513 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17514
17515         Fix #61128.
17516         * expression.cs (BetterConversion): Don't allow either conversion 
17517         to be null.  Remove redundant implicit conversion test when 'q ==
17518         null' -- when this function is invoked, we already know that the
17519         implicit conversion exists.
17520         (BetterFunction): Assume that 'best' is non-null.  Remove
17521         redundant reimplementation of IsApplicable when 'best' is null.
17522         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17523         number of arguments.
17524         (IsAncestralType): Extract from OverloadResolve.
17525         (OverloadResolve): Make robust to the MethodGroupExpr being
17526         unsorted.  Implement all the logic of Section 14.5.5.1, and
17527         support overloading of methods from multiple applicable types.
17528         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17529
17530         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17531         (RealError, Warning): Append type of report to related symbol.
17532
17533 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17534
17535         * enum.cs: Fixed CLS-Compliance checks for enum members.
17536         Error tests cs3008-8.cs, cs3014-8.cs
17537
17538 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17539
17540         Fixed bug #62342, #63102
17541         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17542         like ImplementMethod.
17543
17544 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17545
17546         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17547         Fixed bug #65170.
17548
17549 2004-09-02  Martin Baulig  <martin@ximian.com>
17550
17551         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17552         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17553         on the MethodBase.
17554
17555 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17556
17557         C# 2.0 Static classes implemented
17558
17559         * class.cs (TypeContainer): instance_constructors,
17560         initialized_fields, initialized_static_fields,
17561         default_constructor, base_inteface_types are protected to be
17562         accessible from StaticClass.
17563         (TypeContainer.DefineDefaultConstructor): New virtual method
17564         for custom default constructor generating
17565         (StaticClass): New class to handle "Static classes" feature.
17566
17567         * cs-parser.jay: Handle static keyword on class like instance
17568         of StaticClass.
17569
17570         * driver.cs: Added "/langversion" command line switch with two
17571         options (iso-1, default).
17572
17573 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17574
17575         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17576
17577 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17578
17579         * delegate.cs: Style.
17580
17581 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17582
17583         * delegate.cs: Add seperate instance expr field for miguel.
17584
17585 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17586
17587         * PointerArithmetic (Resolve): make sure we are not doing
17588         pointer arith on void*. Also, make sure we are resolved
17589         by not setting eclass until resolve.
17590
17591         All callers: Make sure that PointerArithmetic gets resolved.
17592
17593 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17594
17595         * ArrayCreation (LookupType): If the type does not resolve 
17596         to an array, give an error.
17597
17598 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17599
17600         * statement.cs (Try.Resolve): Fixed bug #64222
17601
17602 2004-08-27  Martin Baulig  <martin@ximian.com>
17603
17604         * class.cs
17605         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17606         crash here.     
17607
17608 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17609
17610         * ecore.cs (Constantify): Get underlying type via
17611         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17612         Windows in special cases.
17613
17614 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17615
17616         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17617         for obtaining also private methods.
17618         (GetRemoveMethod): Used GetRemoveMethod (true)
17619         for obtaining also private methods.
17620
17621 2004-08-24  Martin Baulig  <martin@ximian.com>
17622
17623         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17624         MethodAttributes.HideBySig for operators.
17625
17626 2004-08-23  Martin Baulig  <martin@ximian.com>
17627
17628         Back to the old error reporting system :-)
17629
17630         * report.cs (Message): Removed.
17631         (Report.MessageData, ErrorData, WarningData): Removed.
17632         (Report.Error, Warning): Back to the old system.
17633
17634 2004-08-23  Martin Baulig  <martin@ximian.com>
17635
17636         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17637
17638         * class.cs (TypeContainer.ParentContainer): New public virtual
17639         method; replaces the explicit interface implementation.
17640         (ClassPart.ParentContainer): Override.
17641
17642 2004-08-23  Martin Baulig  <martin@ximian.com>
17643
17644         * statement.cs (Switch): Added support for constant switches; see
17645         #59428 or test-285.cs.
17646
17647 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17648
17649         Fixed bug #62740.
17650         * statement.cs (GetEnumeratorFilter): Removed useless
17651         logic because C# specs is strict. GetEnumerator must be
17652         public.
17653
17654 2004-08-22  Martin Baulig  <martin@ximian.com>
17655
17656         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17657         a switch and may break, reset the barrier.  Fixes #59867.
17658
17659 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17660
17661         CLS-Compliance speed up (~5% for corlib)
17662
17663         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17664         New method. Tests container for CLS-Compliant names
17665
17666         * class.cs (TypeContainer.VerifyClsName): New method.
17667         Checks whether container name is CLS Compliant.
17668         (Constructor): Implements IMethodData.
17669
17670         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17671         low-case table for CLS Compliance test.
17672         (MemberCache.VerifyClsParameterConflict): New method.
17673         Checks method parameters for CS3006 error.
17674
17675         * enum.cs (EnumMember): Is derived from MemberCore.
17676         (Enum.VerifyClsName): Optimized for better performance.
17677
17678 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17679
17680         * report.cs: Renamed Error_T to Error and changed all
17681         references.
17682
17683 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17684
17685         * class.cs (TypeContainer.IndexerArrayList): New inner class
17686         container for indexers.
17687         (TypeContainer.DefaultIndexerName): New constant for default
17688         indexer name. Replaced all "Item" with this constant.
17689         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
17690
17691         * typemanager.cs (TypeManager.default_member_ctor): Cache here
17692         DefaultMemberAttribute constructor.
17693
17694 2004-08-05  Martin Baulig  <martin@ximian.com>
17695
17696         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
17697         Fix bug #59429.
17698
17699 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
17700
17701         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
17702         multi platforms problem.
17703
17704         * compiler.csproj: Included shared files.
17705
17706 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17707
17708         Fix bug 60333, 55971 in the more general way
17709         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17710         Added arg_type argument for constant conversion.
17711         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
17712
17713 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17714
17715         Fix bug #59760
17716         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
17717         OperatorArrayList, MethodCoreArrayList for typecontainer
17718         containers. Changed class member types to these new types.
17719         (MethodArrayList.DefineMembers): Added test for CS0659.
17720
17721 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
17722
17723         * cfold.cs: Synchronize the folding with the code in expression.cs
17724         Binary.DoNumericPromotions for uint operands.
17725
17726         * attribute.cs: Revert patch from Raja, it introduced a regression
17727         while building Blam-1.2.1 (hard to isolate a test case).
17728
17729 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17730
17731         Fix for #55382
17732         * class.cs:
17733         (TypeContainer.Define): Renamed to DefineContainerMembers because of
17734         name collision.
17735         (MethodCore.parent_method): New member. The method we're overriding
17736         if this is an override method.
17737         (MethodCore.CheckBase): Moved from Method class and made common.
17738         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
17739         private.
17740         (MethodCore.CheckForDuplications): New abstract method. For custom
17741         member duplication search in a container
17742         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
17743         method and its return type.
17744         (Event.conflict_symbol): New member. Symbol with same name in the
17745         parent class.
17746
17747         * decl.cs:
17748         (MemberCache.FindMemberWithSameName): New method. The method
17749         is looking for conflict with inherited symbols.
17750
17751 2004-08-04  Martin Baulig  <martin@ximian.com>
17752
17753         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
17754
17755         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
17756
17757 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17758
17759         * report.cs (Message): New enum for better error, warning reference in
17760         the code.
17761         (MessageData): New inner abstract class. It generally handles printing of
17762         error and warning messages.
17763         Removed unused Error, Warning, Message methods.
17764
17765 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17766
17767         Fix for cs0592-8.cs test
17768         * attribute.cs
17769         (Attributable.ValidAttributeTargets): Made public.
17770         (Attribute.ExplicitTarget): New member for explicit target value.
17771         (Attribute.CheckTargets): Now we translate explicit attribute
17772         target to Target here.
17773
17774 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
17775
17776         * ecore.cs (MethodGroupExpr): new IsBase property.
17777
17778         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
17779
17780         * delegate.cs (DelegateCreation): store a MethodGroupExpr
17781         rather than an instance expr.
17782
17783         (DelegateCreation.Emit): Use the method group rather than
17784         the instance expression. Also, if you have base.Foo as the
17785         method for a delegate, make sure to emit ldftn, not ldftnvirt.
17786
17787         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
17788
17789         (NewDelegate.DoResolve): Only check for the existance of Invoke
17790         if the method is going to be needed. Use MethodGroupExpr.
17791
17792         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
17793
17794         * expression.cs: For pointer arith., make sure to use
17795         the size of the type, not the size of the pointer to
17796         the type.
17797
17798 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17799
17800         Fix for #60722
17801         * class.cs (Class): Added error CS0502 test.
17802
17803 2004-08-03  John Luke  <jluke@cfl.rr.com>
17804             Raja R Harinath  <rharinath@novell.com>
17805
17806         Fix for #60997.
17807         * attribute.cs (Attribute.complained_before): New flag.
17808         (Attribute.ResolveType, Attribute.Resolve),
17809         (Attribute.DefinePInvokeMethod): Set it.
17810         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
17811         
17812 2004-08-03  Martin Baulig  <martin@ximian.com>
17813
17814         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
17815         use a user-defined operator; we still need to do numeric
17816         promotions in case one argument is a builtin type and the other
17817         one has an implicit conversion to that type.  Fixes #62322.
17818
17819 2004-08-02  Martin Baulig  <martin@ximian.com>
17820
17821         * statement.cs (LocalInfo.Flags): Added `IsThis'.
17822         (LocalInfo.IsThis): New public property.
17823         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
17824
17825 2004-08-01  Martin Baulig  <martin@ximian.com>
17826
17827         * class.cs (TypeContainer.GetClassBases): Don't set the default
17828         here since we may get called from GetPartialBases().
17829         (TypeContainer.DefineType): If GetClassBases() didn't return a
17830         parent, use the default one.
17831
17832 2004-07-30  Duncan Mak  <duncan@ximian.com>
17833
17834         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
17835
17836 2004-07-30  Martin Baulig  <martin@ximian.com>
17837
17838         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
17839
17840         * class.cs (SourceMethod): New public class, derive from the
17841         symbol writer's ISourceMethod.
17842         (Method): Use the new symbol writer API.
17843
17844         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
17845         as argument and use the new symbol writer.
17846
17847         * location.cs
17848         (SourceFile): Implement the symbol writer's ISourceFile.
17849         (Location.SymbolDocument): Removed.
17850         (Location.SourceFile): New public property.
17851
17852         * symbolwriter.cs: Use the new symbol writer API.
17853
17854 2004-07-30  Raja R Harinath  <rharinath@novell.com>
17855
17856         * Makefile (install-local): Remove.  Functionality moved to
17857         executable.make.
17858
17859 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17860
17861         * Makefile: Install mcs.exe.config file together with mcs.exe.
17862         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
17863         correct runtime version.
17864         
17865 2004-07-25  Martin Baulig  <martin@ximian.com>
17866
17867         * class.cs
17868         (TypeContainer.RegisterOrder): Removed, this was unused.
17869         (TypeContainer, interface_order): Removed.
17870         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
17871         TypeContainer as argument since we can also be called with a
17872         `PartialContainer' for a partial class/struct/interface.
17873         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
17874         of checking whether we're an `Interface' - we could be a
17875         `PartialContainer'.
17876         (PartialContainer.Register): Override; call
17877         AddClass()/AddStruct()/AddInterface() on our parent.
17878
17879         * cs-parser.jay (interface_member_declaration): Add things to the
17880         `current_container', not the `current_class'.
17881
17882         * rootcontext.cs (RegisterOrder): The overloaded version which
17883         takes an `Interface' was unused, removed.
17884
17885         * typemanager.cs (TypeManager.LookupInterface): Return a
17886         `TypeContainer', not an `Interface'.
17887         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
17888         contain a `PartialContainer' for an interface, so check it's
17889         `Kind' to figure out what it is.
17890
17891 2004-07-25  Martin Baulig  <martin@ximian.com>
17892
17893         * class.cs (Class.DefaultTypeAttributes): New public constant.
17894         (Struct.DefaultTypeAttributes): Likewise.
17895         (Interface.DefaultTypeAttributes): Likewise.
17896         (PartialContainer.TypeAttr): Override this and add the
17897         DefaultTypeAttributes.
17898
17899 2004-07-25  Martin Baulig  <martin@ximian.com>
17900
17901         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
17902         we can just use the `Parent' field instead.
17903
17904 2004-07-25  Martin Baulig  <martin@ximian.com>
17905
17906         * class.cs (TypeContainer.Emit): Renamed to EmitType().
17907
17908 2004-07-25  Martin Baulig  <martin@ximian.com>
17909
17910         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
17911         our parts before defining any methods.
17912         (TypeContainer.VerifyImplements): Make this virtual.
17913         (ClassPart.VerifyImplements): Override and call VerifyImplements()
17914         on our PartialContainer.
17915
17916 2004-07-25  Martin Baulig  <martin@ximian.com>
17917
17918         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
17919
17920         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
17921         argument, we can just use the `Parent' field instead.
17922
17923         * class.cs
17924         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
17925         (MemberBase.DoDefine): Likewise.
17926
17927 2004-07-24  Martin Baulig  <martin@ximian.com>
17928
17929         * decl.cs (MemberCore.Parent): New public field.
17930         (DeclSpace.Parent): Moved to MemberCore.
17931
17932         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
17933         (MemberBase.ctor): Added TypeContainer argument, pass it to our
17934         parent's .ctor.
17935         (FieldBase, Field, Operator): Likewise.
17936         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
17937         (EventField, Event): Likewise.
17938
17939 2004-07-23  Martin Baulig  <martin@ximian.com>
17940
17941         * class.cs (PartialContainer): New public class.
17942         (ClassPart): New public class.
17943         (TypeContainer): Added support for partial classes.
17944         (TypeContainer.GetClassBases): Splitted some of the functionality
17945         out into GetNormalBases() and GetPartialBases().
17946
17947         * cs-tokenizer.cs (Token.PARTIAL): New token.
17948         (Tokenizer.consume_identifier): Added some hacks to recognize
17949         `partial', but only if it's immediately followed by `class',
17950         `struct' or `interface'.
17951
17952         * cs-parser.jay: Added support for partial clases.
17953
17954 2004-07-23  Martin Baulig  <martin@ximian.com>
17955
17956         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
17957         a `DeclSpace' and also made it readonly.
17958         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
17959         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
17960         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
17961
17962         * cs-parser.jay: Pass the `current_class', not the
17963         `current_container' (at the moment, this is still the same thing)
17964         to a new Method, Property, Event, Indexer or Constructor.
17965
17966 2004-07-23  Martin Baulig  <martin@ximian.com>
17967
17968         * cs-parser.jay (CSharpParser): Added a new `current_class' field
17969         and removed the `current_interface' one.
17970         (struct_declaration, class_declaration, interface_declaration):
17971         Set `current_class' to the newly created class/struct/interface;
17972         set their `Bases' and call Register() before parsing their body.
17973
17974 2004-07-23  Martin Baulig  <martin@ximian.com>
17975
17976         * class.cs (Kind): New public enum.
17977         (TypeContainer): Made this class abstract.
17978         (TypeContainer.Kind): New public readonly field.
17979         (TypeContainer.CheckDef): New public method; moved here from
17980         cs-parser.jay.
17981         (TypeContainer.Register): New public abstract method.
17982         (TypeContainer.GetPendingImplementations): New public abstract
17983         method.
17984         (TypeContainer.GetClassBases): Removed the `is_class' and
17985         `is_iface' parameters.
17986         (TypeContainer.DefineNestedTypes): Formerly known as
17987         DoDefineType().
17988         (ClassOrStruct): Made this class abstract.
17989
17990         * tree.cs (RootTypes): New public type. 
17991
17992 2004-07-20  Martin Baulig  <martin@ximian.com>
17993
17994         * tree.cs (Tree.RecordNamespace): Removed.
17995         (Tree.Namespaces): Removed.
17996
17997         * rootcontext.cs (RootContext.IsNamespace): Removed.
17998
17999         * cs-parser.jay (namespace_declaration): Just create a new
18000         NamespaceEntry here.
18001
18002 2004-07-20  Martin Baulig  <martin@ximian.com>
18003
18004         * statement.cs (ExceptionStatement): New abstract class.  This is
18005         now used as a base class for everyone who's using `finally'.
18006         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
18007         our local variables before using them.
18008
18009         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
18010         virtual method.  This is used by Yield.Resolve() to "steal" an
18011         outer block's `finally' clauses.
18012         (FlowBranchingException): The .ctor now takes an ExceptionStatement
18013         argument.
18014
18015         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
18016         version which takes an ExceptionStatement.  This version must be
18017         used to create exception branchings.
18018
18019         * iterator.cs
18020         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
18021         (Iterator.EmitMoveNext): Added exception support; protect the
18022         block with a `fault' clause, properly handle 'finally' clauses.
18023         (Iterator.EmitDispose): Run all the `finally' clauses here.
18024
18025 2004-07-20  Martin Baulig  <martin@ximian.com>
18026
18027         * iterator.cs: This is the first of a set of changes in the
18028         iterator code.  Match the spec more closely: if we're an
18029         IEnumerable, then GetEnumerator() must be called.  The first time
18030         GetEnumerator() is called, it returns the current instance; all
18031         subsequent invocations (if any) must create a copy.
18032
18033 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
18034
18035         * expression.cs: Resolve the constant expression before returning
18036         it. 
18037
18038 2004-07-19  Martin Baulig  <martin@ximian.com>
18039
18040         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
18041         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
18042         the return type of the new EmitContext.
18043
18044 2004-07-18  Martin Baulig  <martin@ximian.com>
18045
18046         * class.cs (Property.Define): Fix iterators.
18047
18048         * iterators.cs (Iterator.Define): Moved the
18049         `container.AddInterator (this)' call here from the .ctor; only do
18050         it if we resolved successfully.
18051
18052 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
18053
18054         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
18055         `true' for preprocessing directives that we parse.  The return
18056         value indicates whether we should return to regular tokenizing or
18057         not, not whether it was parsed successfully.
18058
18059         In the past if we were in: #if false ... #line #endif, we would
18060         resume parsing after `#line'.  See bug 61604.
18061
18062         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
18063         building: IsEnumType should return true only for enums, not for
18064         enums or System.Enum itself.  This fixes #61593.
18065
18066         Likely what happened is that corlib was wrong: mcs depended on
18067         this bug in some places.  The bug got fixed, we had to add the
18068         hack, which caused bug 61593.
18069
18070         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
18071         that was a workaround for the older conditions.
18072
18073 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
18074
18075         * assign.cs: IAssignMethod has a new interface, as documented
18076         inline. All assignment code now uses this new api.
18077
18078         * ecore.cs, expression.cs: All classes which implement
18079         IAssignMethod now use the new interface.
18080
18081         * expression.cs (Invocation): add a hack to EmitCall so that
18082         IndexerAccess can be the target of a compound assignment without
18083         evaluating its arguments twice.
18084
18085         * statement.cs: Handle changes in Invocation api.
18086
18087 2004-07-16  Martin Baulig  <martin@ximian.com>
18088
18089         * iterators.cs: Rewrote this.  We're now using one single Proxy
18090         class for both the IEnumerable and the IEnumerator interface and
18091         `Iterator' derives from Class so we can use the high-level API.
18092
18093         * class.cs (TypeContainer.AddIterator): New method.
18094         (TypeContainer.DoDefineType): New protected virtual method, which
18095         is called from DefineType().
18096         (TypeContainer.DoDefineMembers): Call DefineType() and
18097         DefineMembers() on all our iterators.
18098         (TypeContainer.Emit): Call Emit() on all our iterators.
18099         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18100
18101         * codegen.cs (EmitContext.CurrentIterator): New public field.
18102
18103 2004-07-15  Martin Baulig  <martin@ximian.com>
18104
18105         * typemanager.cs
18106         (TypeManager.not_supported_exception_type): New type.   
18107
18108 2004-07-14  Martin Baulig  <martin@ximian.com>
18109
18110         * iterators.cs: Use real error numbers.
18111
18112 2004-07-14  Martin Baulig  <martin@ximian.com>
18113
18114         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18115         requires this to be a System.Collection.IEnumerable and not a
18116         class implementing that interface.
18117         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18118
18119 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18120
18121         * class.cs: Fixed previous fix, it broke some error tests.
18122
18123 2004-07-12  Martin Baulig  <martin@ximian.com>
18124
18125         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18126         Fixes #61293.
18127
18128 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18129
18130         * assign.cs (LocalTemporary): Add new argument: is_address,If
18131         `is_address' is true, then the value that we store is the address
18132         to the real value, and not the value itself.
18133         
18134         * ecore.cs (PropertyExpr): use the new local temporary
18135         stuff to allow us to handle X.Y += z (where X is a struct)
18136
18137 2004-07-08  Martin Baulig  <martin@ximian.com>
18138
18139         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18140         not always return, just like we're doing in Using.Resolve().
18141
18142 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18143
18144         * cs-parser.jay (fixed_statement): flag this as Pinned.
18145
18146 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18147
18148         * typemanager.cs (TypeManager): Removed MakePinned method, this
18149         mechanism is replaced with the .NET 2.x compatible mechanism of
18150         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18151
18152         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18153         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18154         `IsFixed' property which has a different meaning.
18155
18156 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18157
18158         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18159         visible from inside a nested class, not just the names of the
18160         immediately enclosing class.
18161         Fix for bug #60730.
18162
18163 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18164
18165         * expression.cs (BetterConversion): Remove buggy special-case
18166         handling of "implicit constant expression conversions".  At this
18167         point, we already know that the conversion is possible -- we're
18168         only checking to see which is better.
18169
18170 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18171
18172         * cs-parser.jay: Added error CS0210 test.
18173
18174 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18175
18176         * cs-parser.jay: Added error CS0134 test.
18177
18178 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18179
18180         Fix bug #52507
18181         * cs-parser.jay: Added error CS0145 test.
18182
18183 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18184
18185         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18186
18187 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18188         
18189         * expression.cs (StackAlloc.Resolve): The argument may not
18190         be a constant; deal with this case.
18191         
18192 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18193
18194         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18195         GetIndexerAttributeValue.
18196         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18197
18198         * class.cs (Indexer.Define): Added error tests for CS0415,
18199         CS0609.
18200
18201 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18202
18203         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18204         property code.
18205
18206 2004-06-23  Martin Baulig  <martin@ximian.com>
18207
18208         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18209         neither return nor throw, reset the barrier as well.  Fixes #60457.
18210
18211 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18212
18213         * class.cs : EventAttributes is now set to None by default.
18214           This fixes bug #60459.
18215
18216 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18217
18218         Fix bug #60219
18219         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18220         Don't throw exception but return null (it's sufficient now).
18221
18222 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18223
18224         * typemanager.cs (GetArgumentTypes): Faster implementation.
18225
18226 2004-06-18  Martin Baulig  <martin@ximian.com>
18227
18228         * attribute.cs (Attribute.Resolve): Check whether we're an
18229         EmptyCast which a Constant child.  Fixes #60333.
18230
18231 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18232
18233         * statement.cs (EmitCollectionForeach): Account for the fact that
18234         not all valuetypes are in areas which we can take the address of.
18235         For these variables, we store to a temporary variable. Also, make
18236         sure that we dont emit a `callvirt' on a valuetype method.
18237
18238 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18239
18240         * expression.cs (StackAlloc.DoReSolve): Added test for
18241         negative parameter (CS0247).
18242
18243 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18244
18245         Fix bug #59792
18246         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18247
18248 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18249
18250         Fix bug #59781
18251         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18252         ulong.
18253
18254 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18255
18256         Fix bug #58254 & cs1555.cs, cs1556.cs
18257         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18258
18259 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18260
18261         * cs-parser.jay: Added error CS1669 test for indexers.
18262
18263 2004-06-11  Martin Baulig  <martin@ximian.com>
18264
18265         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18266         call this twice: for params and varargs methods.
18267
18268 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18269
18270         * class.cs:
18271         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18272
18273 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18274
18275         * attribute.cs (Attribute.GetValidTargets): Made public.
18276
18277         * class.cs: 
18278         (AbstractPropertyEventMethod): New class for better code sharing.
18279         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18280         CS1667 report.
18281         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18282
18283 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18284
18285         Fix bug #59477.
18286         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18287         that the call to Resolve is part of a MemberAccess.
18288         (Expression.Resolve): Use it for SimpleName resolution.
18289         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18290         Add 'intermediate' boolean argument.
18291         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18292         error message when the SimpleName can be resolved ambiguously
18293         between an expression and a type.
18294         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18295         public.
18296         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18297         call on the left-side.
18298
18299 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18300
18301         * class.cs:
18302         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18303
18304 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18305
18306         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18307
18308 2004-06-11  Martin Baulig  <martin@ximian.com>
18309
18310         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18311         varargs methods if applicable.
18312
18313 2004-06-11  Martin Baulig  <martin@ximian.com>
18314
18315         * expression.cs (Invocation.EmitCall): Don't use
18316         `method.CallingConvention == CallingConventions.VarArgs' since the
18317         method could also have `CallingConventions.HasThis'.
18318
18319 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18320
18321         * class.cs (Event.GetSignatureForError): Implemented.
18322         Fixed crash in error test cs3010.cs
18323
18324 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18325
18326         * cs-tokenizer.cs: Change the way we track __arglist to be
18327         consistent with the other keywords.
18328
18329 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18330
18331         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18332         tomorrow.
18333
18334 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18335
18336         * codegen.cs: Check that all referenced assemblies have a strongname
18337         before strongnaming the compiled assembly. If not report error CS1577.
18338         Fix bug #56563. Patch by Jackson Harper.
18339         * typemanager.cs: Added a method to return all referenced assemblies.
18340         Fix bug #56563. Patch by Jackson Harper.
18341
18342 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18343
18344         * class.cs:
18345         (Method.ApplyAttributeBuilder): Moved and added conditional
18346         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18347
18348         * delegate.cs:
18349         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18350
18351 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18352
18353         Fixed #59640
18354         * class.cs: (EventField.attribute_targets): Changed default target.
18355
18356 2004-06-08  Martin Baulig  <martin@ximian.com>
18357
18358         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18359
18360 2004-06-08  Martin Baulig  <martin@ximian.com>
18361
18362         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18363
18364 2004-06-07  Martin Baulig  <martin@ximian.com>
18365
18366         Added support for varargs methods.
18367
18368         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18369         keyword.
18370
18371         * cs-parser.jay: Added support for `__arglist'.
18372
18373         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18374
18375         * expression.cs (Argument.AType): Added `ArgList'.
18376         (Invocation): Added support for varargs methods.
18377         (ArglistAccess): New public class.
18378         (Arglist): New public class.
18379
18380         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18381
18382         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18383         a method's top-level block if the method has varargs.
18384
18385         * support.cs (ReflectionParameters, InternalParameters): Added
18386         support for varargs methods.    
18387
18388 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18389
18390         * class.cs: Provide location in indexer error report.
18391
18392         * driver.cs: Use standard names.
18393
18394         * namespace.cs: Catch the use of using after a namespace has been
18395         declared also on using aliases.
18396
18397 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18398
18399         Bug #50820.
18400         * typemanager.cs (closure_private_ok, closure_invocation_type)
18401         (closure_qualifier_type, closure_invocation_assembly)
18402         (FilterWithClosure): Move to ...
18403         (Closure): New internal nested class.
18404         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18405         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18406         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18407         (MemberLookup, MemberLookupFailed): Use it.
18408         * expression.cs (New.DoResolve): Treat the lookup for the
18409         constructor as being qualified by the 'new'ed type.
18410         (Indexers.GetIndexersForTypeOrInterface): Update.
18411
18412 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18413
18414         * attribute.cs
18415         (GetConditionalAttributeValue): New method. Returns
18416         condition of ConditionalAttribute.
18417         (SearchMulti): New method.  Returns all attributes of type 't'.
18418         Use it when attribute is AllowMultiple = true.
18419         (IsConditionalMethodExcluded): New method.
18420
18421         * class.cs
18422         (Method.IsExcluded): Implemented. Returns true if method has conditional
18423         attribute and the conditions is not defined (method is excluded).
18424         (IMethodData): Extended interface for ConditionalAttribute support.
18425         (PropertyMethod.IsExcluded): Implemented.
18426
18427         * decl.cs
18428         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18429
18430         * expression.cs
18431         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18432         on the method.
18433
18434 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18435
18436         * expression.cs (ArrayCreationExpression): Make this just an
18437         `expression'. It can't be a statement, so the code here was
18438         dead.
18439
18440 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18441
18442         Fixed #59072
18443         * typemanager.cs (GetFullNameSignature): New method for
18444         MethodBase types.
18445
18446 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18447
18448         Fixed #56452
18449         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18450         Use this method when MethodBuilder is null.
18451         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18452         Added test for error CS0626 (MONO reports error for this situation).
18453         (IMethodData.GetSignatureForError): Extended interface.
18454
18455 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18456
18457         * attribute.cs
18458         (AttributeTester.GetObsoleteAttribute): Returns instance of
18459         ObsoleteAttribute when type is obsolete.
18460
18461         * class.cs
18462         (TypeContainer.VerifyObsoleteAttribute): Override.
18463         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18464         (MethodCode.VerifyObsoleteAttribute): Override.
18465         (MemberBase.VerifyObsoleteAttribute): Override.
18466
18467         * decl.cs
18468         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18469         and report proper error.
18470
18471         *delegate.cs
18472         Delegate.VerifyObsoleteAttribute): Override.
18473
18474         * ecore.cs
18475         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18476         and report proper error.
18477         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18478
18479         * enum.cs
18480         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18481         and enum member.
18482
18483         * expression.cs
18484         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18485         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18486         Added test for ObsoleteAttribute.
18487
18488         * statement.cs
18489         (Catch): Derived from Statement.
18490
18491 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18492  
18493         Fixed bug #59071 & cs0160.cs
18494  
18495         * statement.cs (Try.Resolve): Check here whether order of catch
18496         clauses matches their dependencies.
18497
18498 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18499
18500         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18501         caused a regression: #59343.  Referencing nested classes from an
18502         assembly stopped working.
18503
18504 2004-05-31  Martin Baulig  <martin@ximian.com>
18505
18506         MCS is now frozen for beta 2.
18507
18508 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18509
18510         * convert.cs: add a trivial cache for overload operator resolution.
18511
18512 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18513
18514         * decl.cs: If possible, use lookuptypedirect here. We can only do
18515         this if there is no `.' after the namespace. Avoids using
18516         LookupType, which does lots of slow processing.
18517         (FindNestedType) New method, does what it says :-).
18518         * namespace.cs: use LookupTypeDirect.
18519         * rootcontext.cs: use membercache, if possible.
18520         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18521
18522 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18523
18524         * expression.cs:
18525         According to the spec, 
18526
18527         In a member access of the form E.I, if E is a single identifier,
18528         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18529         field, property, localvariable, or parameter with the same type as
18530         the meaning of E as a type-name (§3.8), then both possible
18531         meanings of E are permitted.
18532
18533         We did not check that E as a simple-name had the same type as E as
18534         a type name.
18535
18536         This trivial check gives us 5-7% on bootstrap time.
18537
18538 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18539
18540         * expression.cs (Invocation.OverloadResolve): Avoid the
18541         use of hashtables and boxing here by allocating on demand.
18542
18543 2004-05-30  Martin Baulig  <martin@ximian.com>
18544
18545         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18546         we're doing a silent lookup.  Don't try to lookup nested types in
18547         TypeManager.object_type (thanks to Ben Maurer).
18548
18549 2004-05-30  Martin Baulig  <martin@ximian.com>
18550
18551         Committing a patch from Ben Maurer.
18552
18553         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18554
18555 2004-05-29  Martin Baulig  <martin@ximian.com>
18556
18557         * class.cs (IMethodData.ShouldIgnore): New method.
18558
18559         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18560         `Location' argument, we don't need it anywhere.  Use
18561         `IMethodData.ShouldIgnore ()' instead of
18562         `MethodData.GetMethodFlags ()'.
18563         (TypeManager.AddMethod): Removed.
18564         (TypeManager.AddMethod2): Renamed to AddMethod.
18565
18566 2004-05-29  Martin Baulig  <martin@ximian.com>
18567
18568         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18569
18570         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18571         converting from a class type S to an interface type and we already
18572         have an object on the stack, don't box it again.  Fixes #52578.
18573
18574 2004-05-29  Martin Baulig  <martin@ximian.com>
18575
18576         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18577         Added support for `params' parameters.  Fixes #59267.
18578
18579 2004-05-29  Martin Baulig  <martin@ximian.com>
18580
18581         * literal.cs (NullPointer): Provide a private .ctor which sets
18582         `type' to TypeManager.object_type.  Fixes #59048.
18583
18584 2004-05-29  Martin Baulig  <martin@ximian.com>
18585
18586         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18587         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18588
18589         * ecore.cs (EventExpr.instance_expr): Make the field private.
18590
18591 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18592
18593         Fixed bug #50080 & cs0214-2.cs
18594         * expression.cs (Cast.DoResolve): Check unsafe context here.
18595         
18596         * statement.cs (Resolve.DoResolve): Likewise.
18597
18598 2004-05-26  Martin Baulig  <martin@ximian.com>
18599
18600         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18601
18602         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18603         (RootContext.LookupType): Pass down the `silent' flag.
18604
18605 2004-05-25  Martin Baulig  <martin@ximian.com>
18606
18607         * expression.cs
18608         (MethodGroupExpr.IdenticalTypeName): New public property.
18609         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18610         expression actually refers to a type.
18611
18612 2004-05-25  Martin Baulig  <martin@ximian.com>
18613
18614         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18615         for #56176 and made it actually work.
18616
18617 2004-05-25  Martin Baulig  <martin@ximian.com>
18618
18619         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18620         (FieldExpr, PropertyExpr): Override and implement
18621         CacheTemporaries.  Fixes #52279.
18622
18623 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18624
18625         * location.cs: In the new compiler listing a file twice is a
18626         warning, not an error.
18627
18628 2004-05-24  Martin Baulig  <martin@ximian.com>
18629
18630         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18631         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18632
18633 2004-05-24  Martin Baulig  <martin@ximian.com>
18634
18635         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18636         walking the `using' list.  Fixes #53921.
18637
18638 2004-05-24  Martin Baulig  <martin@ximian.com>
18639
18640         * const.cs (Const.LookupConstantValue): Added support for
18641         EmptyCast's; fixes #55251.
18642
18643 2004-05-24  Martin Baulig  <martin@ximian.com>
18644
18645         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18646         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18647         which does the CS0135 check.  The reason is that we first need to
18648         check whether the variable actually exists.
18649
18650 2004-05-24  Martin Baulig  <martin@ximian.com>
18651
18652         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18653         than RootContext.LookupType() to find the explicit interface
18654         type.  Fixes #58584.
18655
18656 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18657
18658         * Makefile: Simplify.  Use executable.make.
18659         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18660
18661 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18662
18663         * decl.cs:
18664         * enum.cs:
18665         Use the invariant culture when doing String.Compare for CLS case
18666         sensitivity.
18667         
18668 2004-05-23  Martin Baulig  <martin@ximian.com>
18669
18670         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18671         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18672
18673         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18674         
18675 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18676
18677         * class.cs (MemberBase.Define): Reuse MemberType member for 
18678         resolved type. Other methods can use it too.
18679
18680 2004-05-23  Martin Baulig  <martin@ximian.com>
18681
18682         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18683         the variable also exists in the current block (otherwise, we need
18684         to report a CS0103).  Fixes #58670.
18685
18686 2004-05-23  Martin Baulig  <martin@ximian.com>
18687
18688         * flowanalysis.cs (Reachability.Reachable): Compute this
18689         on-the-fly rather than storing it as a field.
18690
18691 2004-05-23  Martin Baulig  <martin@ximian.com>
18692
18693         * flowanalysis.cs (Reachability.And): Manually compute the
18694         resulting `barrier' from the reachability.      
18695        
18696 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18697
18698         Fix bug #57835
18699         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
18700         instance of ObsoleteAttribute when symbol is obsolete.
18701
18702         * class.cs
18703         (IMethodData): Extended interface for ObsoleteAttribute support.
18704
18705 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18706
18707         * attribute.cs: Fix bug #55970
18708
18709 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18710
18711         Fix bug #52705
18712         * attribute.cs
18713         (GetObsoleteAttribute): New method. Creates the instance of
18714         ObsoleteAttribute.
18715         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
18716         ObsoleteAttribute when member is obsolete.
18717         (AttributeTester.Report_ObsoleteMessage): Common method for
18718         Obsolete error/warning reporting.
18719
18720         * class.cs
18721         (TypeContainer.base_classs_type): New member for storing parent type.
18722
18723         * decl.cs
18724         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
18725         for this MemberCore.
18726
18727 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18728
18729         * attribute.cs, const.cs: Fix bug #58590
18730
18731 2004-05-21  Martin Baulig  <martin@ximian.com>
18732
18733         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
18734         out parameters if the end of the method is unreachable.  Fixes
18735         #58098. 
18736
18737 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18738
18739         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
18740         Hari was right, why extra method.
18741
18742 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18743
18744         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
18745
18746 2004-05-20  Martin Baulig  <martin@ximian.com>
18747
18748         Merged this back from gmcs to keep the differences to a minumum.
18749
18750         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
18751         instead of a Declspace.
18752         (Attribute.ResolveType): Likewise.
18753         (Attributes.Search): Likewise.
18754         (Attributes.Contains): Likewise.
18755         (Attributes.GetClsCompliantAttribute): Likewise.
18756
18757         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
18758         argument.
18759         (MethodData.ApplyAttributes): Take an EmitContext instead of a
18760         DeclSpace.
18761
18762 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
18763
18764         Fix bug #58688 (MCS does not report error when the same attribute
18765         is assigned twice)
18766
18767         * attribute.cs (Attribute.Emit): Distinction between null and default.
18768
18769 2004-05-19  Raja R Harinath  <rharinath@novell.com>
18770
18771         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
18772         of a top-level attribute without an attribute target.
18773         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
18774         Make non-static.
18775         (Attribute.Conditional_GetConditionName), 
18776         (Attribute.Obsolete_GetObsoleteMessage): Update.
18777         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
18778         part of ScanForIndexerName.
18779         (Attribute.CanIgnoreInvalidAttribute): New function.
18780         (Attribute.ScanForIndexerName): Move to ...
18781         (Attributes.ScanForIndexerName): ... here.
18782         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
18783         (Attributes.Search): New internal variant that can choose not to
18784         complain if types aren't resolved.  The original signature now
18785         complains.
18786         (Attributes.GetClsCompliantAttribute): Use internal variant, with
18787         complaints suppressed.
18788         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
18789         only if it not useful.
18790         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
18791         top-level for attributes that are shared between the assembly
18792         and a top-level class.
18793         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
18794         * class.cs: Update to reflect changes.
18795         (DefineIndexers): Fuse loops.
18796         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
18797         a couple more variants of attribute names.
18798
18799 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
18800
18801         Fix bug #52585 (Implemented explicit attribute declaration)
18802
18803         * attribute.cs:
18804         (Attributable.ValidAttributeTargets): New abstract method. It gets
18805         list of valid attribute targets for explicit target declaration.
18806         (Attribute.Target): It holds target itself.
18807         (AttributeSection): Removed.
18808         (Attribute.CheckTargets): New method. It checks whether attribute
18809         target is valid for the current element.
18810
18811         * class.cs:
18812         (EventProperty): New class. For events that are declared like
18813         property (with add and remove accessors).
18814         (EventField): New class. For events that are declared like field.
18815         class.cs
18816
18817         * cs-parser.jay: Implemented explicit attribute target declaration.
18818
18819         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
18820         Override ValidAttributeTargets.
18821
18822         * parameter.cs:
18823         (ReturnParameter): Class for applying custom attributes on 
18824         the return type.
18825         (ParameterAtribute): New class. Class for applying custom
18826         attributes on the parameter type.
18827
18828 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
18829
18830         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
18831         definitions. 
18832
18833         (Method): Allow UNSAFE here.
18834
18835         * modifiers.cs: Support unsafe reporting.
18836
18837 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
18838
18839         * decl.cs: Fix bug #58478.
18840
18841 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18842
18843         * statement.cs: When checking for unreachable code on an EmptyStatement,
18844         set the location. Fixes bug #58488.
18845
18846 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
18847
18848         * driver.cs: Add -pkg handling.
18849
18850         From Gonzalo: UseShelLExecute=false
18851
18852 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
18853
18854         * attribute.cs:
18855         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
18856         for attribute.
18857         (Attribute.IsClsCompliaceRequired): Moved to base for better
18858         accesibility.
18859         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
18860         when attribute is AttributeUsageAttribute.
18861         (Attribute.GetValidTargets): Simplified.
18862         (Attribute.GetAttributeUsage): New method returns AttributeUsage
18863         attribute for this type.
18864         (Attribute.ApplyAttributes): Method renamed to Emit and make
18865         non-static.
18866         (GlobalAttributeSection): New class for special handling of global
18867         attributes (assembly, module).
18868         (AttributeSection.Emit): New method.
18869
18870         * class.cs: Implemented Attributable abstract methods.
18871         (MethodCore.LabelParameters): Moved to Parameter class.
18872         (Accessor): Is back simple class.
18873         (PropertyMethod): Implemented Attributable abstract class.
18874         (DelegateMethod): Implemented Attributable abstract class.
18875         (Event): New constructor for disctintion between normal Event
18876         and Event with accessors.
18877
18878         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
18879
18880         * codegen.cs, const.cs, decl.cs, delegate.cs:
18881         (CommonAssemblyModulClass): Implemented Attributable abstract class
18882         and simplified.
18883
18884         * enum.cs: Implement IAttributeSupport interface.
18885         (EnumMember): New class for emum members. Implemented Attributable
18886         abstract class
18887
18888         * parameter.cs:
18889         (ParameterBase): Is abstract.
18890         (ReturnParameter): New class for easier [return:] attribute handling.
18891
18892         * typemanager.cs: Removed builder_to_attr.
18893
18894 2004-05-11  Raja R Harinath  <rharinath@novell.com>
18895
18896         Fix bug #57151.
18897         * attribute.cs (Attribute.GetPositionalValue): New function.
18898         * class.cs (TypeContainer.VerifyMembers): New function.
18899         (TypeContainer.Emit): Use it.
18900         (ClassOrStruct): New base class for Class and Struct.
18901         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
18902         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
18903         class.
18904         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
18905         then each non-static field should have a FieldOffset attribute.
18906         Otherwise, none of the fields should have a FieldOffset attribute.
18907         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
18908         and FieldOffset attributes.
18909         * typemanager.cs (TypeManager.struct_layout_attribute_type)
18910         (TypeManager.field_offset_attribute_type): New core types.
18911         (TypeManager.InitCoreTypes): Initialize them.
18912
18913 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
18914
18915         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
18916         Return correct type.
18917         From bug #58270.
18918
18919 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
18920
18921         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
18922         be implicitly converted to ulong.
18923         
18924         * expression.cs: The logic for allowing operator &, | and ^ worked
18925         was wrong, it worked before because we did not report an error in
18926         an else branch.  Fixes 57895.
18927
18928         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
18929         allow volatile fields to be reference types.
18930
18931 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
18932
18933         * driver.cs: Add support for /debug-
18934
18935 2004-05-07  Raja R Harinath  <rharinath@novell.com>
18936
18937         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
18938         Add a 'complain' parameter to silence errors.
18939         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
18940         silently overlooked type-resolutions.
18941         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
18942         to reflect changes.
18943         (Attributes.Search): New function.
18944         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
18945         (Attributes.GetAttributeFullName): Remove hack.
18946         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
18947         Update to reflect changes.
18948         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
18949         Use Attributes.Search instead of nested loops.
18950
18951 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
18952
18953         * decl.cs:
18954         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
18955         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
18956         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
18957
18958         * report.cs: (Report.Warning): Renamed to Warning_T because of
18959         parameter collision.
18960
18961 2004-05-05  Raja R Harinath  <rharinath@novell.com>
18962
18963         * expression.cs (MemberAccess.ResolveMemberAccess):
18964         Exit with non-zero status after Report.Error.
18965         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
18966         Likewise.
18967         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
18968
18969 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18970
18971         * support.cs: Don't hang when the file is empty.
18972
18973 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18974
18975         * support.cs: In SeekableStreamReader, compute the preamble size of the
18976           underlying stream. Position changes should take into account that initial
18977           count of bytes.
18978
18979 2004-05-03  Todd Berman  <tberman@sevenl.net>
18980
18981         * driver.cs: remove unused GetSysVersion function.
18982
18983 2004-05-03  Todd Berman  <tberman@sevenl.net>
18984
18985         * driver.cs: Remove the hack from saturday, as well as the hack
18986         from jackson (LoadAssemblyFromGac), also adds the CWD to the
18987         link_paths to get that bit proper.
18988
18989 2004-05-01  Todd Berman  <tberman@sevenl.net>
18990
18991         * driver.cs: Try a LoadFrom before a Load, this checks the current
18992         path. This is currently a bug in mono that is be fixed, however, this
18993         provides a workaround for now. This will be removed when the bug
18994         is fixed.
18995
18996 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
18997
18998         * CryptoConvert.cs: Updated to latest version. Fix issue with 
18999         incomplete key pairs (#57941).
19000
19001 2004-05-01  Todd Berman  <tberman@sevenl.net>
19002
19003         * driver.cs: Remove '.' from path_chars, now System.* loads properly
19004         from the GAC
19005
19006 2004-04-30  Jackson Harper  <jackson@ximian.com>
19007
19008         * codegen.cs: Open keys readonly.
19009         
19010 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19011
19012         * typemanager.cs: don't report cyclic struct layout when a struct
19013         contains 2 or more fields of the same type. Failed for Pango.AttrShape
19014         which has 2 Pango.Rectangle fields.
19015
19016 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19017
19018         * expression.cs: Handle IntPtr comparisons with IL code
19019         rather than a method call.
19020
19021 2004-04-29  Martin Baulig  <martin@ximian.com>
19022
19023         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
19024         the list of PropertyInfo's in class hierarchy and find the
19025         accessor.  Fixes #56013.
19026
19027 2004-04-29  Martin Baulig  <martin@ximian.com>
19028
19029         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
19030
19031 2004-04-29  Martin Baulig  <martin@ximian.com>
19032
19033         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19034
19035         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
19036
19037 2004-04-29  Martin Baulig  <martin@ximian.com>
19038
19039         * class.cs (ConstructorInitializer.Resolve): Check whether the
19040         parent .ctor is accessible.  Fixes #52146.
19041
19042 2004-04-29  Martin Baulig  <martin@ximian.com>
19043
19044         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19045
19046         * statement.cs (Using.EmitLocalVariableDecls): Use
19047         TypeManager.idisposable_type, not typeof (IDisposable).
19048         (Foreach.EmitCollectionForeach): Added support for valuetypes.
19049
19050 2004-04-29  Martin Baulig  <martin@ximian.com>
19051
19052         * class.cs (Event.Define): Don't emit the field and don't set
19053         RTSpecialName and SpecialName for events on interfaces.  Fixes
19054         #57703. 
19055
19056 2004-04-29  Raja R Harinath  <rharinath@novell.com>
19057
19058         Refactor Attribute.ApplyAttributes.
19059         * attribute.cs (Attributable): New base class for objects that can
19060         have Attributes applied on them.
19061         (Attribute): Make AttributeUsage fields public.
19062         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
19063         (Attribute.IsInternalCall): New property.
19064         (Attribute.UsageAttr): Convert to a public read-only property.
19065         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
19066         (Attribute.ResolveType, Attribute.Resolve)
19067         (Attribute.ScanForIndexerName): Update to reflect changes.
19068         (Attribute.CheckAttributeTarget): Re-format.
19069         (Attribute.ApplyAttributes): Refactor, to various
19070         Attributable.ApplyAttributeBuilder methods.
19071         * decl.cs (MemberCore): Make Attributable.
19072         * class.cs (Accessor): Make Attributable.
19073         (MethodData.ApplyAttributes): Use proper attribute types, not
19074         attribute names.
19075         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
19076         (TypeContainer.ApplyAttributeBuilder)
19077         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
19078         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
19079         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
19080         (Operator.ApplyAttributeBuilder): New factored-out methods.
19081         * const.cs (Const.ApplyAttributeBuilder): Likewise.
19082         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
19083         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
19084         * parameter.cs (ParameterBase): New Attributable base class
19085         that can also represent Return types.
19086         (Parameter): Update to the changes.
19087
19088 2004-04-29  Jackson Harper  <jackson@ximian.com>
19089
19090         * driver.cs: Prefer the corlib system version when looking for
19091         assemblies in the GAC. This is still a hack, but its a better hack
19092         now.
19093         
19094 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19095
19096         * decl.cs, enum.cs: Improved error 3005 reporting.
19097   
19098         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19099         (related_symbols): New private member for list of symbols
19100         related to reported error/warning.
19101         
19102         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19103
19104 2004-04-29  Martin Baulig  <martin@ximian.com>
19105
19106         * ecore.cs (Expression.Constantify): If we're an enum and
19107         TypeManager.TypeToCoreType() doesn't give us another type, use
19108         t.UnderlyingSystemType.  Fixes #56178.  
19109
19110 2004-04-29  Martin Baulig  <martin@ximian.com>
19111
19112         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19113         interfaces and for each interface, only add members directly
19114         declared in that interface.  Fixes #53255.
19115
19116 2004-04-28  Martin Baulig  <martin@ximian.com>
19117
19118         * expression.cs (ConditionalLogicalOperator): Use a temporary
19119         variable for `left' to avoid that we evaluate it more than once;
19120         bug #52588.
19121
19122 2004-04-28  Martin Baulig  <martin@ximian.com>
19123
19124         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19125         `void[]' (CS1547).
19126
19127 2004-04-28  Martin Baulig  <martin@ximian.com>
19128
19129         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19130         void (CS1547).
19131
19132         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19133         whether the type is not void (CS1547).
19134
19135 2004-04-28  Martin Baulig  <martin@ximian.com>
19136
19137         * expression.cs (Unary.DoResolveLValue): Override this and report
19138         CS0131 for anything but Operator.Indirection.
19139
19140 2004-04-28  Martin Baulig  <martin@ximian.com>
19141
19142         Committing a patch from Ben Maurer; see bug #50820.
19143
19144         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19145         check for classes.
19146
19147         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19148         classes.        
19149
19150 2004-04-28  Martin Baulig  <martin@ximian.com>
19151
19152         Committing a patch from Ben Maurer; see bug #50820.
19153
19154         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19155         check for classes.
19156
19157         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19158         classes.        
19159
19160 2004-04-28  Martin Baulig  <martin@ximian.com>
19161
19162         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19163         (Block.AddLabel): Call DoLookupLabel() to only search in the
19164         current block.
19165
19166 2004-04-28  Martin Baulig  <martin@ximian.com>
19167
19168         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19169         comparing StringConstants and NullLiterals in Equality and Inequality.
19170
19171 2004-04-28  Jackson Harper  <jackson@ximian.com>
19172
19173         * driver.cs: Attempt to load referenced assemblies from the
19174         GAC. This is the quick and dirty version of this method that
19175         doesnt take into account versions and just takes the first
19176         canidate found. Will be good enough for now as we will not have more
19177         then one version installed into the GAC until I update this method.
19178
19179 2004-04-28  Martin Baulig  <martin@ximian.com>
19180
19181         * typemanager.cs (TypeManager.CheckStructCycles): New public
19182         static method to check for cycles in the struct layout.
19183
19184         * rootcontext.cs (RootContext.PopulateTypes): Call
19185         TypeManager.CheckStructCycles() for each TypeContainer.
19186         [Note: We only need to visit each type once.]
19187
19188 2004-04-28  Martin Baulig  <martin@ximian.com>
19189
19190         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19191
19192         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19193         success and added `out object value'.  Use a `bool resolved' field
19194         to check whether we've already been called rather than
19195         `ConstantValue != null' since this breaks for NullLiterals.
19196
19197 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19198
19199         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19200         setting of this flag, since the 'set' method may be non-public.
19201
19202 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19203
19204         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19205         check on current_vector.Block.
19206
19207 2004-04-27  Martin Baulig  <martin@ximian.com>
19208
19209         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19210         a field initializer.  Fixes #56459.
19211
19212 2004-04-27  Martin Baulig  <martin@ximian.com>
19213
19214         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19215         we're not attempting to use an indexer.  Fixes #52154.
19216
19217 2004-04-27  Martin Baulig  <martin@ximian.com>
19218
19219         * statement.cs (Return): Don't create a return label if we don't
19220         need it; reverts my change from January 20th.  Thanks to Ben
19221         Maurer for this.
19222
19223 2004-04-27  Martin Baulig  <martin@ximian.com>
19224
19225         According to the spec, `goto' can only leave a nested scope, but
19226         never enter it.
19227
19228         * statement.cs (Block.LookupLabel): Only lookup in the current
19229         block, don't recurse into parent or child blocks.
19230         (Block.AddLabel): Check in parent and child blocks, report
19231         CS0140/CS0158 if we find a duplicate.
19232         (Block): Removed this indexer for label lookups.
19233         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19234         this already does the error reporting for us.
19235
19236         * flowanalysis.cs
19237         (FlowBranching.UsageVector.Block): New public variable; may be null.
19238         (FlowBranching.CreateSibling): Added `Block' argument.
19239         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19240         label for the target of a `goto' and check whether we're not
19241         leaving a `finally'.
19242
19243 2004-04-27  Martin Baulig  <martin@ximian.com>
19244
19245         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19246         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19247         just for returns).
19248
19249 2004-04-27  Martin Baulig  <martin@ximian.com>
19250
19251         * statement.cs (Block.AddLabel): Also check for implicit blocks
19252         and added a CS0158 check.
19253
19254 2004-04-27  Martin Baulig  <martin@ximian.com>
19255
19256         * flowanalysis.cs (FlowBranchingLoop): New class.
19257         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19258         UsageVector's instead of an ArrayList.
19259         (FlowBranching.Label): Likewise.
19260         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19261         (FlowBranching.AddBreakVector): New method.
19262
19263 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19264
19265         * attribute.cs: Small regression fix: only convert the type if we
19266         the type is different, fixes System.Drawing build.
19267
19268 2004-04-27  Martin Baulig  <martin@ximian.com>
19269
19270         * attribute.cs (Attribute.Resolve): If we have a constant value
19271         for a named field or property, implicity convert it to the correct
19272         type.
19273
19274 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19275
19276         * statement.cs (Block.Block): Implicit blocks share
19277         'child_variable_names' fields with parent blocks.
19278         (Block.AddChildVariableNames): Remove.
19279         (Block.AddVariable): Mark variable as "used by a child block" in
19280         every surrounding block.
19281         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19282         been used in a child block, complain about violation of "Invariant
19283         meaning in blocks" rule.
19284         * cs-parser.jay (declare_local_variables): Don't use
19285         AddChildVariableNames.
19286         (foreach_statement): Don't create an implicit block: 'foreach'
19287         introduces a scope.
19288
19289 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19290
19291         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19292         converting from 0L to ulong.  Fixes 57522.
19293
19294 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19295
19296         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19297         derived class hides via 'new' keyword field from base class (test-242.cs).
19298         TODO: Handle this in the more general way.
19299         
19300         * class.cs (CheckBase): Ditto.
19301
19302 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19303
19304         * decl.cs (caching_flags): New member for storing cached values
19305         as bit flags.
19306         (MemberCore.Flags): New enum where bit flags for caching_flags
19307         are defined.
19308         (MemberCore.cls_compliance): Moved to caching_flags.
19309         (DeclSpace.Created): Moved to caching_flags.
19310
19311         * class.cs: Use caching_flags instead of DeclSpace.Created
19312         
19313 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19314
19315         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19316         if we are only a derived class, not a nested class.
19317
19318         * typemanager.cs: Same as above, but do this at the MemberLookup
19319         level (used by field and methods, properties are handled in
19320         PropertyExpr).   Allow for the qualified access if we are a nested
19321         method. 
19322
19323 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19324
19325         * class.cs: Refactoring.
19326         (IMethodData): New inteface; Holds links to parent members
19327         to avoid member duplication (reduced memory allocation).
19328         (Method): Implemented IMethodData interface.
19329         (PropertyBase): New inner classes for get/set methods.
19330         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19331         (Event): New inner classes for add/remove methods.
19332         (Event.DelegateMethod): Implemented IMethodData interface.
19333
19334         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19335         EmitContext (related to class.cs refactoring).
19336
19337 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19338
19339         * delegate.cs (Delegate.VerifyApplicability): If the number of
19340         arguments are the same as the number of parameters, first try to
19341         verify applicability ignoring  any 'params' modifier on the last
19342         parameter.
19343         Fixes #56442.
19344
19345 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19346
19347         * class.cs (TypeContainer.AddIndexer): Use
19348         'ExplicitInterfaceName' to determine if interface name was
19349         explicitly specified.  'InterfaceType' is not initialized at this time.
19350         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19351         Indexers array is already in the required order.  Initialize
19352         'IndexerName' only if there are normal indexers.
19353         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19354         (TypeContainer.Emit): Emit DefaultMember attribute only if
19355         IndexerName is initialized.
19356         Fixes #56300.
19357
19358 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19359
19360         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19361         Fixes #57007
19362
19363 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19364
19365         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19366         attributes.
19367         Fix for #56456.
19368
19369         * attribute.cs (Attribute.Resolve): Check for duplicate named
19370         attributes.
19371         Fix for #56463.
19372
19373 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19374
19375         * iterators.cs (MarkYield): track whether we are in an exception,
19376         and generate code accordingly.  Use a temporary value to store the
19377         result for our state.
19378
19379         I had ignored a bit the interaction of try/catch with iterators
19380         since their behavior was not entirely obvious, but now it is
19381         possible to verify that our behavior is the same as MS .NET 2.0
19382
19383         Fixes 54814
19384
19385 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19386
19387         * iterators.cs: Avoid creating temporaries if there is no work to
19388         do. 
19389
19390         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19391         Enumerations, use TypeManager.EnumToUnderlying and call
19392         recursively. 
19393
19394         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19395         bug #57013
19396
19397         (This.Emit): Use EmitContext.EmitThis to emit our
19398         instance variable.
19399
19400         (This.EmitAssign): Ditto.
19401
19402         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19403         codepaths, we will move all the functionality into
19404         Mono.CSharp.This 
19405
19406         (FieldExpr.EmitAssign): Ditto.
19407
19408         This fixes several hidden bugs that I uncovered while doing a code
19409         review of this today.
19410
19411         * codegen.cs (EmitThis): reworked so the semantics are more clear
19412         and also support value types "this" instances.
19413
19414         * iterators.cs: Changed so that for iterators in value types, we
19415         do not pass the value type as a parameter.  
19416
19417         Initialization of the enumerator helpers is now done in the caller
19418         instead of passing the parameters to the constructors and having
19419         the constructor set the fields.
19420
19421         The fields have now `assembly' visibility instead of private.
19422
19423 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19424
19425         * expression.cs (Argument.Resolve): Check if fields passed as ref
19426         or out are contained in a MarshalByRefObject.
19427
19428         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19429         another compiler type.
19430
19431 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19432
19433         * class.cs (Indexer.Define): use the new name checking method.
19434         Also, return false on an error.
19435         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19436         (is_identifier_[start/part]_character): make static.
19437
19438 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19439
19440         * expression.cs (Binary.ResolveOperator): Do no append strings
19441         twice: since we can be invoked more than once (array evaluation)
19442         on the same concatenation, take care of this here.  Based on a fix
19443         from Ben (bug #56454)
19444
19445 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19446
19447         * codegen.cs: Fix another case where CS1548 must be reported (when 
19448         delay-sign isn't specified and no private is available #56564). Fix
19449         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19450         error when MCS is used on the MS runtime and we need to delay-sign 
19451         (which seems unsupported by AssemblyBuilder - see #56621).
19452
19453 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19454
19455         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19456         (TypeManager.ComputeNamespaces): Faster implementation for
19457         Microsoft runtime.
19458
19459         * compiler.csproj: Updated AssemblyName to mcs.
19460
19461 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19462
19463         * rootcontext.cs: Add new types to the boot resolution.
19464
19465         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19466         MulticastDelegate is not allowed.
19467
19468         * typemanager.cs: Add new types to lookup: System.TypedReference
19469         and ArgIterator.
19470
19471         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19472         check for TypedReference or ArgIterator, they are not allowed. 
19473
19474         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19475         makes us properly catch 1510 in some conditions (see bug 56016 for
19476         details). 
19477
19478 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19479
19480         * CryptoConvert.cs: update from corlib version
19481         with endian fixes.
19482
19483 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19484
19485         * class.cs (Indexer.Define): Check indexername declaration
19486
19487 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19488
19489         * attribute.cs (IsClsCompliant): Fixed problem with handling
19490         all three states (compliant, not-compliant, undetected).
19491
19492 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19493
19494         * attribute.cs (Attribute): Location is now public.
19495         (Resolve): Store resolved arguments (pos_values) in attribute class.
19496         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19497         (GetClsCompliantAttributeValue): New method that gets
19498         CLSCompliantAttribute value.
19499         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19500         if exists else null.
19501         (AttributeTester): New class for CLS-Compliant verification routines.
19502
19503         * class.cs (Emit): Add CLS-Compliant verification.
19504         (Method.GetSignatureForError): Implemented.
19505         (Constructor.GetSignatureForError): Implemented
19506         (Constructor.HasCompliantArgs): Returns if constructor has
19507         CLS-Compliant arguments.
19508         (Constructor.Emit): Override.
19509         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19510         is needed to test only parameters.
19511         (FieldBase.GetSignatureForError): Implemented.
19512         (TypeContainer): New member for storing base interfaces.
19513         (TypeContainer.FindMembers): Search in base interfaces too.
19514
19515         * codegen.cs (GetClsComplianceAttribute): New method that gets
19516         assembly or module CLSCompliantAttribute value.
19517         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19518         for assembly.
19519         (ModuleClass.Emit): Add error 3012 test.
19520
19521         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19522
19523         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19524         state for all decl types.
19525         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19526         if CLS-Compliant tests are required.
19527         (IsClsCompliaceRequired): New method. Analyze whether code
19528         must be CLS-Compliant.
19529         (IsExposedFromAssembly): New method. Returns true when MemberCore
19530         is exposed from assembly.
19531         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19532         value or gets cached value.
19533         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19534         is explicitly marked with CLSCompliantAttribute.
19535         (IsIdentifierClsCompliant): New abstract method. This method is
19536         used to testing error 3005.
19537         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19538         for identifier and parameters CLS-Compliant testing.
19539         (VerifyClsCompliance): New method. The main virtual method for
19540         CLS-Compliant verifications.
19541         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19542         null. I don't know why is null (too many public members !).
19543         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19544         and get value of first CLSCompliantAttribute that found.
19545
19546         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19547         (VerifyClsCompliance): Override and add extra tests.
19548
19549         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19550         clscheck- disable CLS-Compliant verification event if assembly is has
19551         CLSCompliantAttribute(true).
19552
19553         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19554         ApllyAttribute is now called in emit section as in the other cases.
19555         Possible future Emit integration.
19556         (IsIdentifierClsCompliant): New override.
19557         (VerifyClsCompliance): New override.
19558         (GetEnumeratorName): Returns full enum name.
19559
19560         * parameter.cs (GetSignatureForError): Implemented.
19561
19562         * report.cs (WarningData): New struct for Warning message information.
19563         (LocationOfPreviousError): New method.
19564         (Warning): New method. Reports warning based on the warning table.
19565         (Error_T): New method. Reports error based on the error table.
19566
19567         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19568         verifications are done here.
19569
19570         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19571
19572         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19573         CLSCompliantAttribute.
19574         (all_imported_types): New member holds all imported types from other
19575         assemblies.
19576         (LoadAllImportedTypes): New method fills static table with exported types
19577         from all referenced assemblies.
19578         (Modules): New property returns all assembly modules.
19579
19580 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19581
19582         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19583         throwing a parser error.
19584
19585         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19586         which removes the hardcoded get_/set_ prefixes for properties, as
19587         IL allows for the properties to be named something else.  
19588
19589         Bug #56013
19590
19591         * expression.cs: Do not override operand before we know if it is
19592         non-null.  Fix 56207
19593
19594 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19595
19596         * typemanager.cs: support for pinned variables.
19597
19598 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19599
19600         * decl.cs, typemanager.cs: Avoid using an arraylist
19601         as a buffer if there is only one result set.
19602
19603 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19604
19605         * expression.cs: Make sure you cant call a static method
19606         with an instance expression, bug #56174.
19607
19608 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19609
19610         * class.cs (IsDuplicateImplementation): Improve error reporting to
19611         flag 663 (method only differs in parameter modifier).
19612
19613         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19614         in preprocessor directives.
19615
19616         * location.cs (LookupFile): Allow for the empty path.
19617
19618         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19619         better approach for some of that patch, but its failing with the
19620         CharSet enumeration.  For now try/catch will do.
19621
19622         * typemanager.cs: Do not crash if a struct does not have fields.
19623         Fixes 56150.
19624
19625 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19626
19627         * expression.cs: cs0213, cant fix a fixed expression.
19628         fixes 50231.
19629
19630 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19631
19632         * cs-parser.jay: detect invalid embeded statements gracefully.
19633         bug #51113.
19634
19635 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19636
19637         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19638         As a regex:
19639         s/
19640         the invocation type may not be a subclass of the tye of the item/
19641         The type of the item must be a subclass of the invocation item.
19642         /g
19643
19644         Fixes bug #50820.
19645
19646 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19647
19648         * attribute.cs: Added methods to get a string and a bool from an
19649         attribute. Required to information from AssemblyKeyFileAttribute,
19650         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19651         * codegen.cs: Modified AssemblyName creation to include support for
19652         strongnames. Catch additional exceptions to report them as CS1548.
19653         * compiler.csproj: Updated include CryptoConvert.cs.
19654         * compiler.csproj.user: Removed file - user specific configuration.
19655         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19656         Mono.Security assembly. The original class is maintained and tested in
19657         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19658         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19659         like CSC 8.0 (C# v2) supports.
19660         * Makefile: Added CryptoConvert.cs to mcs sources.
19661         * rootcontext.cs: Added new options for strongnames.
19662
19663 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19664
19665         * driver.cs: For --expect-error, report error code `2'
19666         if the program compiled with no errors, error code `1' if
19667         it compiled with an error other than the one expected.
19668
19669 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19670
19671         * compiler.csproj: Updated for Visual Studio .NET 2003.
19672         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19673         * compiler.sln: Updated for Visual Studio .NET 2003.
19674
19675 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19676
19677         * expression.cs: Fix bug #47234. We basically need to apply the
19678         rule that we prefer the conversion of null to a reference type
19679         when faced with a conversion to 'object' (csc behaviour).
19680
19681 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19682
19683         * statement.cs: Shorter form for foreach, eliminates
19684         a local variable. r=Martin.
19685
19686 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19687
19688         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
19689         checks if we can use brtrue/brfalse to test for 0.
19690         * expression.cs: use the above in the test for using brtrue/brfalse.
19691         cleanup code a bit.
19692
19693 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19694
19695         * expression.cs: Rewrite string concat stuff. Benefits:
19696
19697         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
19698         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
19699         rather than a concat chain.
19700
19701         * typemanager.cs: Add lookups for more concat overloads.
19702
19703 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19704
19705         * expression.cs: Emit shorter il code for array init.
19706
19707         newarr
19708         dup
19709         // set 1
19710
19711         // set 2
19712
19713         newarr
19714         stloc.x
19715
19716         ldloc.x
19717         // set 1
19718
19719         ldloc.x
19720         // set 2
19721
19722 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
19723
19724         * statement.cs: Before, two switch blocks would be merged if the
19725         total size of the blocks (end_item - begin_item + 1) was less than
19726         two times the combined sizes of the blocks.
19727
19728         Now, it will only merge if after the merge at least half of the
19729         slots are filled.
19730
19731         fixes 55885.
19732
19733 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
19734
19735         * class.cs : csc build fix for GetMethods(). See bug #52503.
19736
19737 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19738
19739         * expression.cs: Make sure fp comparisons work with NaN.
19740         This fixes bug #54303. Mig approved this patch a long
19741         time ago, but we were not able to test b/c the runtime
19742         had a related bug.
19743
19744 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
19745
19746         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
19747
19748 2004-03-19  Martin Baulig  <martin@ximian.com>
19749
19750         * class.cs (MemberCore.IsDuplicateImplementation): Report the
19751         error here and not in our caller.
19752
19753 2004-03-19  Martin Baulig  <martin@ximian.com>
19754
19755         * interface.cs: Completely killed this file.
19756         (Interface): We're now a TypeContainer and live in class.cs.
19757
19758         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
19759         argument; we're now also called for interfaces.
19760         (TypeContainer.DefineMembers): Allow this method being called
19761         multiple times.
19762         (TypeContainer.GetMethods): New public method; formerly known as
19763         Interface.GetMethod().  This is used by PendingImplementation.
19764         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
19765         it's now private and non-static.
19766         (Interface): Moved this here; it's now implemented similar to
19767         Class and Struct.
19768         (Method, Property, Event, Indexer): Added `bool is_interface'
19769         argument to their .ctor's.
19770         (MemberBase.IsInterface): New public field.
19771
19772         * cs-parser.jay: Create normal Method, Property, Event, Indexer
19773         instances instead of InterfaceMethod, InterfaceProperty, etc.
19774         (opt_interface_base): Removed; we now use `opt_class_base' instead.
19775         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
19776
19777 2004-03-19  Martin Baulig  <martin@ximian.com>
19778
19779         * class.cs (MethodCore.IsDuplicateImplementation): New private
19780         method which does the CS0111 checking.
19781         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
19782         Use IsDuplicateImplementation().
19783
19784 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19785
19786         * decl.cs (FindMemberToOverride): New method to find the correct
19787         method or property to override in the base class.
19788         * class.cs
19789             - Make Method/Property use the above method to find the
19790               version in the base class.
19791             - Remove the InheritableMemberSignatureCompare as it is now
19792               dead code.
19793
19794         This patch makes large code bases much faster to compile, as it is
19795         O(n) rather than O(n^2) to do this validation.
19796
19797         Also, it fixes bug 52458 which is that nested classes are not
19798         taken into account when finding the base class member.
19799
19800         Reviewed/Approved by Martin.
19801
19802 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
19803
19804         * interface.cs: In all interface classes removed redundant
19805         member initialization.
19806
19807 2004-03-16  Martin Baulig  <martin@ximian.com>
19808
19809         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
19810
19811 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
19812
19813         * decl.cs (DefineTypeAndParents): New helper method to define a
19814         type's containers before the type itself is defined;  This is a
19815         bug exposed by the recent changes to Windows.Forms when an
19816         implemented interface was defined inside a class that had not been
19817         built yet.   
19818
19819         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
19820
19821         (Check): Loop correctly to report errors modifiers
19822         (UNSAFE was not in the loop, since it was the same as TOP).
19823
19824         * interface.cs: Every interface member now takes a ModFlags,
19825         instead of a "is_new" bool, which we set on the base MemberCore. 
19826
19827         Every place where we called "UnsafeOk" in the interface, now we
19828         call the proper member (InterfaceMethod.UnsafeOK) instead to get
19829         the unsafe settings from the member declaration instead of the
19830         container interface. 
19831
19832         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
19833
19834         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
19835         `set_indexer_name' to the pending bits (one per type).
19836
19837         We fixed a bug today that was picking the wrong method to
19838         override, since for properties the existing InterfaceMethod code
19839         basically ignored the method name.  Now we make sure that the
19840         method name is one of the valid indexer names.
19841
19842 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
19843  
19844         * support.cs (SeekableStreamReader): Keep track of stream byte
19845         positions and don't mix them with character offsets to the buffer.
19846
19847         Patch from Gustavo Giráldez
19848
19849 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
19850
19851         * interface.cs (InterfaceSetGetBase): Removed double member
19852         initialization, base class does it as well.
19853
19854 2004-03-13  Martin Baulig  <martin@ximian.com>
19855
19856         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
19857         when compiling corlib.
19858
19859 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
19860
19861         * convert.cs (ExplicitConversion): We were reporting an error on
19862         certain conversions (object_type source to a value type, when the
19863         expression was `null') before we had a chance to pass it through
19864         the user defined conversions.
19865
19866         * driver.cs: Replace / and \ in resource specifications to dots.
19867         Fixes 50752
19868
19869         * class.cs: Add check for duplicate operators.  Fixes 52477
19870
19871 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
19872
19873         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
19874         that are in the middle of the statements, not only at the end.
19875         Fixes #54987
19876
19877         * class.cs (TypeContainer.AddField): No longer set the
19878         `HaveStaticConstructor' flag, now we call it
19879         `UserDefineStaticConstructor' to diferentiate the slightly
19880         semantic difference.
19881
19882         The situation is that we were not adding BeforeFieldInit (from
19883         Modifiers.TypeAttr) to classes that could have it.
19884         BeforeFieldInit should be set to classes that have no static
19885         constructor. 
19886
19887         See:
19888
19889         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
19890
19891         And most importantly Zoltan's comment:
19892
19893         http://bugzilla.ximian.com/show_bug.cgi?id=44229
19894
19895         "I think beforefieldinit means 'it's ok to initialize the type sometime 
19896          before its static fields are used', i.e. initialization does not need
19897          to be triggered by the first access to the type. Setting this flag
19898          helps the JIT to compile better code, since it can run the static
19899          constructor at JIT time, and does not need to generate code to call it
19900          (possibly lots of times) at runtime. Unfortunately, mcs does not set
19901          this flag for lots of classes like String. 
19902          
19903          csc sets this flag if the type does not have an explicit static 
19904          constructor. The reasoning seems to be that if there are only static
19905          initalizers for a type, and no static constructor, then the programmer
19906          does not care when this initialization happens, so beforefieldinit
19907          can be used.
19908          
19909          This bug prevents the AOT compiler from being usable, since it 
19910          generates so many calls to mono_runtime_class_init that the AOT code
19911          is much slower than the JITted code. The JITted code is faster, 
19912          because it does not generate these calls if the vtable is type is
19913          already initialized, which is true in the majority of cases. But the
19914          AOT compiler can't do this."
19915
19916 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
19917
19918         * class.cs (MethodData.Emit): Refactor the code so symbolic
19919         information is generated for destructors;  For some reasons we
19920         were taking a code path that did not generate symbolic information
19921         before. 
19922
19923 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
19924
19925         * class.cs: Create a Constructor.CheckBase method that
19926         takes care of all validation type code. The method
19927         contains some code that was moved from Define.
19928
19929         It also includes new code that checks for duplicate ctors.
19930         This fixes bug #55148.
19931
19932 2004-03-09  Joshua Tauberer <tauberer@for.net>
19933
19934         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
19935         a { ... }-style array creation invokes EmitStaticInitializers
19936         which is not good for reference-type arrays.  String, decimal
19937         and now null constants (NullCast) are not counted toward
19938         static initializers.
19939
19940 2004-03-05  Martin Baulig  <martin@ximian.com>
19941
19942         * location.cs (SourceFile.HasLineDirective): New public field;
19943         specifies whether the file contains or is referenced by a "#line"
19944         directive.
19945         (Location.DefineSymbolDocuments): Ignore source files which
19946         either contain or are referenced by a "#line" directive.        
19947
19948 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
19949
19950         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
19951         direct access to our parent, so check the method inline there.
19952
19953 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19954
19955         * expression.cs (Invocation.EmitCall): Miguel's last commit
19956         caused a regression. If you had:
19957
19958             T t = null;
19959             t.Foo ();
19960
19961         In Foo the implict this would be null.
19962
19963 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
19964
19965         * expression.cs (Invocation.EmitCall): If the method is not
19966         virtual, do not emit a CallVirt to it, use Call.
19967
19968         * typemanager.cs (GetFullNameSignature): Improve the method to
19969         cope with ".ctor" and replace it with the type name.
19970
19971         * class.cs (ConstructorInitializer.Resolve): Now the method takes
19972         as an argument the ConstructorBuilder where it is being defined,
19973         to catch the recursive constructor invocations.
19974
19975 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
19976
19977         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
19978         routines to check if a type is an enumerable/enumerator allow
19979         classes that implement the IEnumerable or IEnumerator interfaces.
19980
19981         * class.cs (Property, Operator): Implement IIteratorContainer, and
19982         implement SetYields.
19983
19984         (Property.Define): Do the block swapping for get_methods in the
19985         context of iterators.   We need to check if Properties also
19986         include indexers or not.
19987
19988         (Operator): Assign the Block before invoking the
19989         OperatorMethod.Define, so we can trigger the Iterator code
19990         replacement. 
19991
19992         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
19993         Property and Operator classes are not created when we parse the
19994         declarator but until we have the block completed, so we use a
19995         singleton SimpleIteratorContainer.Simple to flag whether the
19996         SetYields has been invoked.
19997
19998         We propagate this setting then to the Property or the Operator to
19999         allow the `yield' to function.
20000
20001 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
20002
20003         * codegen.cs: Implemented attribute support for modules.
20004         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
20005         Assembly/Module functionality.
20006
20007         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
20008         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
20009         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
20010
20011 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
20012
20013         * interface.cs (FindMembers): The operation is performed on all base
20014         interfaces and not only on the first. It is required for future CLS Compliance patch.
20015
20016 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20017
20018         * statement.cs, codegen.cs:
20019         This patch deals with patterns such as:
20020
20021         public class List : IEnumerable {
20022
20023                 public MyEnumerator GetEnumerator () {
20024                         return new MyEnumerator(this);
20025                 }
20026
20027                 IEnumerator IEnumerable.GetEnumerator () {
20028                         ...
20029                 }
20030                 
20031                 public struct MyEnumerator : IEnumerator {
20032                         ...
20033                 }
20034         }
20035
20036         Before, there were a few things we did wrong:
20037         1) we would emit callvirt on a struct, which is illegal
20038         2) we emited ldarg when we needed to emit ldarga
20039         3) we would mistakenly call the interface methods on an enumerator
20040         type that derived from IEnumerator and was in another assembly. For example:
20041
20042         public class MyEnumerator : IEnumerator
20043
20044         Would have the interface methods called, even if there were public impls of the
20045         method. In a struct, this lead to invalid IL code.
20046
20047 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
20048
20049         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
20050           renamed to Emit.
20051
20052         * delegate.cs (Define): Fixed crash when delegate type is undefined.
20053
20054 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
20055
20056         * cs-parser.jay: Fix small regression: we were not testing V2
20057         compiler features correctly.
20058
20059         * interface.cs: If the emit context is null, then create one
20060
20061 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
20062
20063         * decl.cs (GetSignatureForError): New virtual method to get full name
20064           for error messages.
20065
20066         * attribute.cs (IAttributeSupport): New interface for attribute setting.
20067           Now it is possible to rewrite ApplyAttributes method to be less if/else.
20068
20069         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
20070           Duplicated members and code in these classes has been removed.
20071           Better encapsulation in these classes.
20072
20073 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
20074
20075         * assign.cs (Assign.DoResolve): When dealing with compound
20076         assignments, there is a new rule in ECMA C# 2.4 (might have been
20077         there before, but it is documented here) that states that in:
20078
20079         a op= b;
20080
20081         If b is of type int, and the `op' is a shift-operator, then the
20082         above is evaluated as:
20083
20084         a = (int) a op b 
20085
20086         * expression.cs (Binary.ResolveOperator): Instead of testing for
20087         int/uint/long/ulong, try to implicitly convert to any of those
20088         types and use that in pointer arithmetic.
20089
20090         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
20091         method to print information for from the type, not from the
20092         null-method we were given.
20093
20094 2004-02-01  Duncan Mak  <duncan@ximian.com>
20095
20096         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20097         parsing for cmd, fixes bug #53694.
20098
20099 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20100
20101         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20102         in the member name duplication tests. Property and operator name duplication
20103         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20104
20105 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20106
20107         * interface.cs (PopulateMethod): Fixed crash when interface method
20108         returns not existing type (error test cs0246-3.cs).
20109
20110 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20111
20112         * cs-parser.jay (interface_accessors): Re-write actions to also
20113         store attributes attached to get and set methods. Fix spelling
20114         while at it.
20115
20116         (inteface_property_declaration): Modify accordingly.
20117
20118         (InterfaceAccessorInfo): New helper class to store information to pass
20119         around between rules that use interface_accessors.
20120
20121         * interface.cs (Emit): Apply attributes on the get and set
20122         accessors of properties and indexers too.
20123
20124         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20125         right MethodBuilder when applying attributes to the get and set accessors.
20126
20127 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20128
20129         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20130
20131 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20132
20133         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20134
20135 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20136
20137         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20138         changes that treat `yield' specially when present before `break'
20139         or `return' tokens.
20140
20141         * cs-tokenizer.cs: yield is no longer a keyword.
20142
20143 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20144
20145         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20146         setting for default constructors.
20147         For default constructors are almost every time set wrong Modifier. The
20148         generated IL code has been alright. But inside mcs this values was
20149         wrong and this was reason why several of my CLS Compliance tests
20150         failed.
20151
20152 2004-01-22  Martin Baulig  <martin@ximian.com>
20153
20154         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20155         not a QualifiedIdentifier.  This is what `type_name_expression'
20156         was previously doing.
20157         (type_name_expression): Removed; the code is now in
20158         `namespace_or_type_name'.
20159         (qualified_identifier): Removed, use `namespace_or_type_name'
20160         instead.
20161         (QualifiedIdentifier): Removed this class.      
20162
20163 2004-01-22  Martin Baulig  <martin@ximian.com>
20164
20165         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20166         not a string as alias name.
20167
20168 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20169
20170         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20171         #52730 bug, and instead compute correctly the need to use a
20172         temporary variable when requesting an address based on the
20173         static/instace modified of the field and the constructor.
20174  
20175 2004-01-21  Martin Baulig  <martin@ximian.com>
20176
20177         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20178         class and namespace before looking up aliases.  Fixes #52517.
20179
20180 2004-01-21  Martin Baulig  <martin@ximian.com>
20181
20182         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20183         assinged in a 'try'; fixes exception4.cs.
20184
20185 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20186         * class.cs : Implemented parameter-less constructor for TypeContainer
20187
20188         * decl.cs: Attributes are now stored here. New property OptAttributes
20189
20190         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20191
20192         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20193
20194 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20195
20196         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20197           (CSharpSignature): New method for indexer and property signature.
20198
20199 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20200
20201         * pending.cs (IsVirtualFilter): Faster implementation.
20202
20203 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20204
20205         * typemanager.cs: Avoid inclusion of same assembly more than once.
20206
20207 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20208
20209         * cs-parser.jay: Fixed problem where the last assembly attribute
20210           has been applied also to following declaration (class, struct, etc.)
20211           
20212 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20213
20214         * class.cs: Added error CS0538, CS0539 reporting.
20215         Fixed crash on Microsoft runtime when field type is void.
20216
20217         * cs-parser.jay: Added error CS0537 reporting.
20218
20219         * pending.cs: Added error CS0535 reporting.
20220         Improved error report for errors CS0536, CS0534.
20221
20222 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20223
20224         Merge a few bits from the Anonymous Method MCS tree.
20225
20226         * statement.cs (ToplevelBlock): New class for toplevel methods,
20227         will hold anonymous methods, lifted variables.
20228
20229         * cs-parser.jay: Create toplevel blocks for delegates and for
20230         regular blocks of code. 
20231
20232 2004-01-20  Martin Baulig  <martin@ximian.com>
20233
20234         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20235         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20236         and `NeedExplicitReturn'; added `IsLastStatement'.
20237         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20238         have a `ReturnLabel' or we're not unreachable.
20239
20240         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20241         child's reachability; don't just override ours with it.  Fixes
20242         #58058 (lluis's example).
20243         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20244         InFinally(), InLoop(), InSwitch() and
20245         BreakCrossesTryCatchBoundary() methods.
20246
20247         * statement.cs (Return): Do all error checking in Resolve().
20248         Unless we are the last statement in a top-level block, always
20249         create a return label and jump to it.
20250         (Break, Continue): Do all error checking in Resolve(); also make
20251         sure we aren't leaving a `finally'.
20252         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20253         statement in a top-level block.
20254         (Block.Flags): Added `IsDestructor'.
20255         (Block.IsDestructor): New public property.
20256
20257 2004-01-20  Martin Baulig  <martin@ximian.com>
20258
20259         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20260
20261 2004-01-20  Martin Baulig  <martin@ximian.com>
20262
20263         * statement.cs (Statement.ResolveUnreachable): New public method.
20264         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20265         (Block.Resolve): Resolve unreachable statements.
20266
20267 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20268
20269         * expression.cs: We need to fix the case where we do
20270         not have a temp variable here.
20271
20272         * assign.cs: Only expression compound assignments need
20273         temporary variables.
20274
20275 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20276
20277         * flowanalysis.cs: Reduce memory allocation in a few ways:
20278           - A block with no variables should not allocate a bit
20279             vector for itself.
20280           - A method with no out parameters does not need any tracking
20281             for assignment of the parameters, so we need not allocate
20282             any data for it.
20283           - The arrays:
20284                 public readonly Type[] VariableTypes;
20285                 public readonly string[] VariableNames;
20286             Are redundant. The data is already stored in the variable
20287             map, so we need not allocate another array for it.
20288           - We need to add alot of checks for if (params | locals) == null
20289             due to the first two changes.
20290
20291 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20292
20293         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20294         implement IMemoryLocation, we store a copy on a local variable and
20295         take the address of it.  Patch from Benjamin Jemlich
20296
20297         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20298         to use a special "type_name_expression" rule which reduces the
20299         number of "QualifiedIdentifier" classes created, and instead
20300         directly creates MemberAccess expressions.
20301
20302 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20303
20304         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20305         that fixes #52853.  Null literal assignment to ValueType
20306
20307         * class.cs (MethodData.Emit): Instead of checking the name of the
20308         method to determine if its a destructor, create a new derived
20309         class from Method called Destructor, and test for that.  
20310
20311         * cs-parser.jay: Create a Destructor object instead of a Method.  
20312
20313         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20314
20315         Fixes: 52933
20316
20317 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20318
20319         * expression.cs (Binary.ResolveOperator): Perform an implicit
20320         conversion from MethodGroups to their delegate types on the
20321         Addition operation.
20322
20323         * delegate.cs: Introduce a new class DelegateCreation that is the
20324         base class for `NewDelegate' and `ImplicitDelegateCreation',
20325         factor some code in here.
20326
20327         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20328         conversion from MethodGroups to compatible delegate types. 
20329
20330         * ecore.cs (Expression.Resolve): Do not flag error 654
20331         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20332         we allow conversions from MethodGroups to delegate types now.
20333
20334         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20335         assignments in v2 either.
20336
20337 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20338
20339         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20340         static read-only fields in ctors.
20341
20342         Applied patch from Benjamin Jemlich 
20343
20344         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20345
20346 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20347
20348         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20349         here to return true, as they can be used like this:
20350
20351                 (XXX) int.MEMBER ()
20352
20353         Fixed 49836 and all the other dups
20354
20355 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20356
20357         * driver.cs: Implement /win32res and /win32icon.
20358
20359 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20360
20361         * cs-parser.jay: Add a rule to improve error handling for the
20362         common mistake of placing modifiers after the type.
20363
20364 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20365
20366         * cs-parser.jay (interface_event_declaration): Catch
20367         initialization of events on interfaces, and report cs0068
20368
20369         * cs-parser.jay (interface_event_declaration): Catch
20370         initialization of events. 
20371
20372         * ecore.cs: Better report missing constructors.
20373
20374         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20375         the error reporting done in the wrong place.  Fix.
20376
20377         * expression.cs (Binary.ResolveOperator): Catch the 
20378         operator + (E x, E y) error earlier, and later allow for implicit
20379         conversions in operator +/- (E e, U x) from U to the underlying
20380         type of E.
20381
20382         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20383         52596, if the container class is abstract, the default constructor
20384         is protected otherwise its public (before, we were always public).
20385
20386         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20387         fixed statement.
20388
20389         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20390         Jemlich that fixes bug #52597, MCS was generating invalid code for
20391         idisposable structs.   Thanks to Ben for following up with this
20392         bug as well.
20393
20394 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20395
20396         * driver.cs: Allow assemblies without code to be generated, fixes
20397         52230.
20398
20399 2004-01-07  Nick Drochak <ndrochak@gol.com>
20400
20401         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20402
20403 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20404
20405         * cs-parser.jay: Add rules to improve error reporting if fields or
20406         methods are declared at the namespace level (error 116)
20407
20408         * Add rules to catch event add/remove
20409
20410 2004-01-04  David Sheldon <dave-mono@earth.li>
20411
20412   * expression.cs: Added matching ")" to error message for 
20413   CS0077
20414
20415 2004-01-03 Todd Berman <tberman@gentoo.org>
20416
20417         * ecore.cs, attribute.cs:
20418         Applying fix from #52429.
20419
20420 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20421
20422         * ecore.cs, expression.cs, statement.cs:
20423         Total rewrite of how we handle branching. We
20424         now handle complex boolean expressions with fewer
20425         jumps. As well if (x == 0) no longer emits a ceq.
20426
20427         if (x is Foo) is much faster now, because we generate
20428         better code.
20429
20430         Overall, we get a pretty big improvement on our benchmark
20431         tests. The code we generate is smaller and more readable.
20432
20433         I did a full two-stage bootstrap. The patch was reviewed
20434         by Martin and Miguel.
20435
20436 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20437
20438         * cs-parser.jay: Make primary_expression not take a QI.
20439         we dont need this because the member_access rule covers
20440         us here. So we replace the rule with just IDENTIFIER.
20441
20442         This has two good effects. First, we remove a s/r conflict.
20443         Second, we allocate many fewer QualifiedIdentifier objects.
20444
20445 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20446
20447         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20448         set the correct information via SRE. This prevents
20449         hanging on the MS runtime. Fixes #29374.
20450
20451 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20452
20453         * convert.cs: correctly handle conversions to value types
20454         from Enum and ValueType as unboxing conversions.
20455
20456         Fixes bug #52569. Patch by Benjamin Jemlich.
20457
20458 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20459
20460         * expression.cs (BetterConversion): Prefer int -> uint
20461         over int -> ulong (csc's behaviour). This fixed bug #52046.
20462
20463 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20464
20465         * decl.cs (MemberCache.FindMembers): now returns a
20466         MemberInfo [].
20467
20468         * typemanager.cs: In general, go with with ^^.
20469         (CopyNewMethods): take an IList.
20470         (RealMemberLookup): Only allocate an arraylist
20471         if we copy from two sets of methods.
20472
20473         This change basically does two things:
20474         1) Fewer array lists allocated due to CopyNewMethods.
20475         2) the explicit cast in MemberList costed ALOT.
20476
20477 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20478
20479         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20480         a hashtable to avoid needless string allocations when an identifier is
20481         used more than once (the common case).
20482
20483 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20484
20485         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20486         is broken, it will not return anything. So, we
20487         have to use the information we have in mcs to
20488         do the task.
20489
20490         * typemanager.cs: Add a cache for GetInterfaces,
20491         since this will now be used more often (due to ^^)
20492
20493         (GetExplicitInterfaces) New method that gets the
20494         declared, not effective, interfaces on a type
20495         builder (eg, if you have interface IFoo, interface
20496         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20497         { IBar }.
20498
20499         This patch makes MCS able to bootstrap itself on
20500         Windows again.
20501
20502 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20503
20504         * expression.cs: Remove the Nop's that Miguel put
20505         in by mistake.
20506
20507 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20508
20509         * report.cs, codegen.cs: Give the real stack trace to
20510         the error when an exception is thrown.
20511
20512 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20513
20514         * decl.cs: only allocate hashtables for ifaces if 
20515         it is an iface!
20516
20517 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20518
20519         * expression.cs: fix the error from cs0121-2.cs
20520         (a parent interface has two child interfaces that
20521         have a function with the same name and 0 params
20522         and the function is called through the parent).
20523
20524 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20525
20526         * class.cs, rootcontext.cs, typmanager.cs: do not
20527         leak pointers.
20528
20529 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20530
20531         * codegen.cs: remove stack for the ec flow branching.
20532         It is already a linked list, so no need.
20533
20534 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20535
20536         * Makefile: Allow custom profiler here.
20537
20538 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20539
20540         * typemanager.cs (LookupType):
20541           - Use a static char [], because split takes
20542             a param array for args, so it was allocating
20543             every time.
20544           - Do not store true in a hashtable, it boxes.
20545
20546 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20547
20548         * flowanalysis.cs: bytify common enums.
20549
20550 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20551
20552         * modifiers.cs: Add a new set of flags for the
20553         flags allowed on explicit interface impls.
20554         * cs-parser.jay: catch the use of modifiers in
20555         interfaces correctly.
20556         * class.cs: catch private void IFoo.Blah ().
20557
20558         All related to bug #50572.
20559
20560 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20561
20562         * decl.cs: Rewrite the consistant accessability checking.
20563         Accessability is not linear, it must be implemented in
20564         a tableish way. Fixes #49704.
20565
20566 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20567
20568         * expression.cs: Handle negation in a checked context.
20569         We must use subtraction from zero. Fixes #38674.
20570
20571 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20572
20573         * class.cs: Ignore static void main in DLLs.
20574         * rootcontext.cs: Handle the target type here,
20575         since we are have to access it from class.cs
20576         * driver.cs: account for the above.
20577
20578 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20579
20580         * report.cs: Give line numbers and files if available.
20581
20582 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20583
20584         * driver.cs: Implement /addmodule.
20585
20586         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20587         ModuleBuilders.
20588
20589 2003-12-20  Martin Baulig  <martin@ximian.com>
20590
20591         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20592         (FieldBase.IsAssigned): Removed this field.
20593         (FieldBase.SetAssigned): New public method.
20594         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20595
20596 2003-12-20  Martin Baulig  <martin@ximian.com>
20597
20598         * expression.cs (LocalVariableReference.DoResolve): Don't set
20599         `vi.Used' if we're called from DoResolveLValue().
20600
20601         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20602         returns the usage vector it just merged into the current one -
20603         pass this one to UsageWarning().
20604         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20605         of the `EmitContext', don't call this recursively on our children.
20606
20607 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20608
20609         * driver.cs: Implement /target:module.
20610
20611 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20612
20613         * support.cs (CharArrayHashtable): New helper class.
20614
20615         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20616         char arrays, not strings, so we can avoid creating a string in
20617         consume_identifier if the identifier is a keyword.
20618
20619 2003-12-16  Martin Baulig  <martin@ximian.com>
20620
20621         * statement.cs (LocalInfo.Assigned): Removed this property.
20622         (LocalInfo.Flags): Removed `Assigned'.
20623         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20624         and uses flow analysis.
20625         (Block.UsageWarning): Made this method private.
20626         (Block.Resolve): Call UsageWarning() if appropriate.
20627
20628         * expression.cs (LocalVariableReference.DoResolve): Always set
20629         LocalInfo.Used here.
20630
20631 2003-12-13  Martin Baulig  <martin@ximian.com>
20632
20633         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20634         any value here; we're now using flow analysis to figure out
20635         whether a statement/block returns a value.
20636
20637 2003-12-13  Martin Baulig  <martin@ximian.com>
20638
20639         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20640         working again.
20641         (FlowBranching.MergeFinally): Don't call
20642         `branching.CheckOutParameters()' here, this is called in
20643         MergeTopBlock().
20644         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20645         when adding the `finally' vector.       
20646
20647 2003-12-13  Martin Baulig  <martin@ximian.com>
20648
20649         * flowanalysis.cs
20650         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20651         actually work and also fix #48962.
20652
20653 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20654
20655         * decl.cs: Do not check System.Object for nested types,
20656         since we know it does not have any. Big bang for buck:
20657
20658         BEFORE:
20659            Run 1:   8.35 seconds
20660            Run 2:   8.32 seconds
20661            corlib:  17.99 seconds
20662         AFTER:
20663            Run 1:   8.17 seconds
20664            Run 2:   8.17 seconds
20665            corlib:  17.39 seconds
20666
20667 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20668
20669         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20670         time we are returning 0 members, so we save alot here.
20671
20672 2003-12-11  Martin Baulig  <martin@ximian.com>
20673
20674         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20675         `MergeChild()', also just take the `FlowBranching' as argument;
20676         call Merge() on it and return the result.
20677         (FlowBranching.Merge): We don't need to do anything if we just
20678         have one sibling.
20679
20680 2003-12-11  Martin Baulig  <martin@ximian.com>
20681
20682         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20683         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20684         Maurer for this idea.
20685
20686 2003-12-11  Martin Baulig  <martin@ximian.com>
20687
20688         * flowanalysis.cs (MergeResult): This class is now gone; we now
20689         use the `UsageVector' for this.  The reason for this is that if a
20690         branching just has one sibling, we don't need to "merge" them at
20691         all - that's the next step to do.
20692         (FlowBranching.Merge): We now return a `UsageVector' instead of a
20693         `MergeResult'.
20694
20695 2003-12-11  Martin Baulig  <martin@ximian.com>
20696
20697         Reworked flow analyis and made it more precise and bug-free.  The
20698         most important change is that we're now using a special `Reachability'
20699         class instead of having "magic" meanings of `FlowReturns'.  I'll
20700         do some more cleanups and optimizations and also add some more
20701         documentation this week.
20702
20703         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
20704         largely reworked this class.
20705         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
20706         the new `Reachability' class instead of having "magic" values here.
20707         (FlowBranching): We're now using an instance of `Reachability'
20708         instead of having separate `Returns', `Breaks' etc. fields.
20709
20710         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
20711         based on flow analysis; ignore the return value of block.Emit ().
20712
20713 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
20714
20715         * driver.cs typemanager.cs: Find the mono extensions to corlib even
20716         if they are private.
20717
20718 2003-12-09  Martin Baulig  <martin@ximian.com>
20719
20720         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
20721         call them directly on the UsageVector.
20722
20723 2003-12-09  Martin Baulig  <martin@ximian.com>
20724
20725         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
20726         Changed return type from `FlowReturns' to `Reachability'.
20727
20728 2003-12-09  Martin Baulig  <martin@ximian.com>
20729
20730         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
20731         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
20732         `Reachable' fields with a single `Reachability' one.
20733
20734 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20735
20736         * class.cs (FindMembers): Remove foreach's.
20737
20738         Bootstrap times:
20739
20740         BEFORE
20741                 Run 1:   8.74 seconds
20742                 Run 2:   8.71 seconds
20743
20744         AFTER
20745                 Run 1:   8.64 seconds
20746                 Run 2:   8.58 seconds
20747
20748
20749 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20750
20751         * cs-parser.jay:
20752         * gen-treedump.cs:
20753         * statement.cs:
20754         This patch does a few things:
20755                 1. EmptyStatement is now a singleton, so it is never reallocated.
20756                 2. All blah is EmptyStatement constructs have been changed to
20757                    blah == EmptyStatement.Value, which is much faster and valid
20758                    now that EmptyStatement is a singleton.
20759                 3. When resolving a block, rather than allocating a new array for
20760                    the non-empty statements, empty statements are replaced with
20761                    EmptyStatement.Value
20762                 4. Some recursive functions have been made non-recursive.
20763         Mainly the performance impact is from (3), however (1) and (2) are needed for
20764         this to work. (4) does not make a big difference in normal situations, however
20765         it makes the profile look saner.
20766
20767         Bootstrap times:
20768
20769         BEFORE
20770         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20771         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20772         Total memory allocated: 56397 KB
20773
20774         AFTER
20775         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
20776         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
20777         Total memory allocated: 55666 KB
20778
20779 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20780
20781         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
20782         than the hashtable in a hashtable version
20783
20784         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
20785         we always end up concating a string. This results in a huge perf
20786         loss, because many strings have to be tracked by the GC. In this
20787         patch, we first use a hashtable that works with two keys, so that
20788         the strings do not need to be concat'ed.
20789
20790         Bootstrap times:
20791         BEFORE
20792                 Run 1:   8.74 seconds
20793                 Run 2:   8.71 seconds
20794
20795         AFTER
20796                 Run 1:   8.65 seconds
20797                 Run 2:   8.56 seconds
20798
20799 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20800
20801         * Makefile: Add a new target `do-time' that does a quick and simple
20802         profile, leaving easy to parse output.
20803
20804 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20805
20806         * codegen.cs (Init): Create the dynamic assembly with 
20807         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
20808
20809 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20810
20811         * support.cs: Make the PtrHashtable use only one
20812         instance of its comparer.
20813
20814 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
20815
20816         * typemanager.cs: Fix lookup of GetNamespaces.
20817
20818 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
20819
20820         * expression.cs: Removed redundant line.
20821
20822         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
20823         ArrayLists, use for loops with bounds.  
20824
20825         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
20826         arraylist.
20827
20828         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
20829         arraylists, use for loop with bounds.
20830
20831         The above three changes give us a 0.071 second performance
20832         improvement out of 3.294 seconds down to 3.223.  On my machine
20833         the above changes reduced the memory usage by 1,387 KB during
20834         compiler bootstrap.
20835
20836         * cs-parser.jay (QualifiedIdentifier): New class used to represent
20837         QualifiedIdentifiers.  Before we created a new string through
20838         concatenation, and mostly later on, the result would be
20839         manipulated by DecomposeQI through string manipulation.
20840
20841         This reduced the compiler memory usage for bootstrapping from
20842         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
20843         compile times in 0.05 seconds.
20844
20845 2003-11-28  Dick Porter  <dick@ximian.com>
20846
20847         * support.cs: Do string compares with the Invariant culture.
20848
20849         * rootcontext.cs: 
20850         * gen-treedump.cs: 
20851         * expression.cs: 
20852         * driver.cs: 
20853         * decl.cs: 
20854         * codegen.cs: 
20855         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
20856         the comparison is done with the Invariant culture.
20857
20858 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
20859
20860         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
20861         GetEnumerator method.
20862
20863         (ProbeCollectionType): Iterate starting at the most specific type
20864         upwards looking for a GetEnumerator
20865
20866         * expression.cs: Shift count can be up to 31 for int/uint and 63
20867         for long/ulong.
20868
20869 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
20870
20871         * statement.cs (Block.LookupLabel): Also look for the label on the
20872         children blocks.  Use a hash table to keep track of visited
20873         nodes. 
20874
20875         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
20876         we actually did transform the other operand, otherwise fall back
20877         to the common codepath that casts to long.
20878
20879         * cs-tokenizer.cs: Use the same code pattern as the int case.
20880         Maybe I should do the parsing myself, and avoid depending on the
20881         Parse routines to get this done.
20882
20883 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
20884
20885         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20886         which fixes bug 51347.  This time test it.
20887
20888         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
20889         attributes for example can not tell the difference between these.
20890         The difference was only a syntax feature of the language. 
20891
20892         * attribute.cs: Apply attributes to delegates.
20893
20894         * delegate.cs: Call the apply attributes method.
20895
20896 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
20897
20898         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
20899         comparing 0 vs Byte.MinValue, not the value
20900
20901         (ImplicitConversionRequired): When reporting a conversion error,
20902         use error 31 to print out the constant error instead of the
20903         simpler 29.
20904
20905         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20906         which fixes bug 51347.
20907
20908 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
20909
20910         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
20911         which fixes the -warnaserror command line option.
20912
20913 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
20914
20915         * cfold.cs (DoNumericPromotions): During constant folding of
20916         additions on UIntConstant, special case intconstants with
20917         IntConstants like we do on the expression binary operator. 
20918
20919 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
20920
20921         * convert.cs (ImplicitReferenceConversion): We were missing a case
20922         (System.Enum are not value types or class types, so we need to
20923         classify them separatedly).
20924
20925         * driver.cs: We do not support error 2007.
20926
20927 2003-11-12 Jackson Harper <jackson@ximian.com>
20928
20929         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
20930         system directory. Also use the full file name so users can
20931         libraries names mscorlib-o-tron.dll in a non system dir.
20932
20933 2003-11-10  Martin Baulig  <martin@ximian.com>
20934
20935         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
20936         (TypeManager.InitCoreTypes): Initialize them here, but instead of
20937         calling `ResolveType()' on them, directly assign their `Type'.
20938
20939 2003-11-08  Martin Baulig  <martin@ximian.com>
20940
20941         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
20942         return value and the `out parent' parameter.
20943         (TypeContainer.DefineType): Moved the CS0644 check into
20944         GetClassBases().  Don't pass the interface types to the
20945         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
20946         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
20947
20948         * ecore.cs (TypeExpr.IsAttribute): New property.
20949         (TypeExpr.GetInterfaces): New method.
20950
20951         * interface.cs (Interface.GetInterfaceTypeByName): Return a
20952         TypeExpr instead of a Type.
20953         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
20954         (Interface.DefineType): Don't pass the interface types to the
20955         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
20956         them later and then call `TypeBulider.AddInterfaceImplementation()'.
20957
20958         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
20959         instead of a `Type[]'.
20960         (TypeManager.RegisterBuilder): Likewise.
20961         (TypeManager.AddUserInterface): Likewise.
20962         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
20963         `Type[]' and also return a `TypeExpr[]'.
20964         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
20965
20966 2003-11-08  Martin Baulig  <martin@ximian.com>
20967
20968         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
20969         Expression.     
20970
20971 2003-11-08  Martin Baulig  <martin@ximian.com>
20972
20973         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
20974         TypeManager.ResolveExpressionTypes().
20975
20976         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
20977         instead of an Expression.
20978         (TypeExpr): This is now an abstract base class for `TypeExpression'.
20979         (TypeExpression): New public class; formerly known as `TypeExpr'.
20980
20981         * expression.cs (ComposedCast): Derive from TypeExpr.
20982
20983         * typemanager.cs (TypeManager.system_*_expr): These are now
20984         TypExpr's instead of Expression's.
20985         (TypeManager.ResolveExpressionTypes): New public static function;
20986         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
20987         of them.        
20988
20989 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
20990
20991         * expression.cs (New.DoResolve): Do not dereference value that
20992         might be a null return.
20993
20994         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
20995         sure that the constant value has the right type.  Fixes an
20996         unreported bug, similar to 50425.
20997
20998         * const.cs (Const.LookupConstantValue): Call
20999         ImplicitStandardConversionExists before doing a conversion to
21000         avoid havng the TypeManager.ChangeType do conversions.
21001
21002         Reduced the number of casts used
21003
21004         (Const.ChangeType): New routine to enable reuse of the constant
21005         type changing code from statement.
21006
21007         * typemanager.cs (ChangeType): Move common initialization to
21008         static global variables.
21009
21010         Fixes #50425.
21011
21012         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
21013         every value type to go through, even if it was void.  Fix that. 
21014
21015         * cs-tokenizer.cs: Use is_identifier_start_character on the start
21016         character of the define, and the is_identifier_part_character for
21017         the rest of the string.
21018
21019 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
21020
21021         * expression.cs (UnaryMutator.EmitCode): When I updated
21022         LocalVariableReference.DoResolve, I overdid it, and dropped an
21023         optimization done on local variable references.
21024
21025 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
21026
21027         * ecore.cs: Convert the return from Ldlen into an int.
21028
21029 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
21030
21031         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
21032         the accessibility, this is a special case for toplevel non-public
21033         classes (internal for instance).
21034
21035 2003-10-20  Nick Drochak <ndrochak@gol.com>
21036
21037         * ecore.cs: Fix typo and build.  Needed another right paren.
21038
21039 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
21040
21041         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
21042         `internal' case regular and protected, but not allowing protected
21043         to be evaluated later.  Bug 49840
21044
21045 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
21046
21047         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
21048         to kb.Nlast, and not the kb.nFirst to isolate the switch
21049         statement.
21050
21051         Extract the underlying type, so enumerations of long/ulong are
21052         treated like long/ulong.
21053
21054 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
21055
21056         * expression.cs (New): Overload the meaning of RequestedType to
21057         track the possible creation of the NewDelegate type, since
21058         DoResolve is invoked more than once for new constructors on field
21059         initialization.
21060
21061         See bugs: #48800 and #37014
21062
21063         * cs-parser.jay (declare_local_constants): Take an arraylist
21064         instead of a single constant.
21065
21066         (local_constant_declaration): It should take a
21067         constant_declarators, not a constant_declarator.  Fixes 49487
21068
21069         * convert.cs: Fix error report.
21070
21071 2003-10-13 Jackson Harper <jackson@ximian.com>
21072
21073         * typemanager.cs (TypeToCoreType): Add float and double this fixes
21074         bug #49611
21075
21076 2003-10-09  Martin Baulig  <martin@ximian.com>
21077
21078         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
21079         to the .ctor.
21080         (MethodCore.DoDefineParameters): Removed the TypeContainer
21081         argument; use the DeclSpace which was passed to the .ctor instead.
21082         (MethodCore.CheckParameter): Take a DeclSpace instead of a
21083         TypeContainer; we only need a DeclSpace here.
21084
21085 2003-10-09  Martin Baulig  <martin@ximian.com>
21086
21087         * class.cs (MethodData): Added additional `DeclSpace ds' argument
21088         to the .ctor.
21089         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
21090         EmitContext's .ctor.    
21091
21092 2003-10-09  Martin Baulig  <martin@ximian.com>
21093
21094         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21095         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21096         AsAccessible(), moved them as well.
21097
21098         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21099
21100 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21101
21102         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21103
21104 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21105
21106         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21107         generation for >=, as spotted by Paolo, bug 48679.  
21108         Patch from David Waite.
21109
21110         * cs-tokenizer.cs: Add handling for #pragma.
21111
21112         * cs-parser.jay: Allow for both yield and yield return in the
21113         syntax.  The anti-cobolization of C# fight will go on!
21114
21115         * class.cs (TypeBuilder.DefineType): Catch error condition here
21116         (Parent.DefineType erroring out and returning null).
21117
21118         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21119         coping with enumerations variables, we were mistakenly processing
21120         them as a regular value type instead of built-in types.  Fixes the
21121         bug #48063
21122
21123         * typemanager.cs (IsBuiltinOrEnum): New method.
21124
21125 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21126
21127         * cs-parser.jay: Upgrade: yield now needs the return clause.
21128
21129 2003-09-19  Martin Baulig  <martin@ximian.com>
21130
21131         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21132         `MemberCache parent' argument.  Normally, an interface doesn't
21133         have a parent type except System.Object, but we use this in gmcs
21134         for generic type parameters.
21135
21136 2003-09-18  Martin Baulig  <martin@ximian.com>
21137
21138         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21139         on `type.IsInterface'; don't check whether the type has a parent
21140         to determine whether it's an interface.
21141
21142 2003-09-15  Martin Baulig  <martin@ximian.com>
21143
21144         * class.cs (TypeContainer.DefineType): Added an error flag to
21145         avoid reporting duplicate CS0146's ("class definition is
21146         circular.").
21147
21148         * driver.cs (Driver.MainDriver): Abort if
21149         RootContext.ResolveTree() reported any errors.
21150
21151 2003-09-07  Martin Baulig  <martin@ximian.com>
21152
21153         * report.cs (Error, Warning): Added overloaded versions which take
21154         a `params object[] args' and call String.Format().
21155
21156 2003-09-07  Martin Baulig  <martin@ximian.com>
21157
21158         * decl.cs (DeclSpace..ctor): Don't call
21159         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21160         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21161         (DeclSpace.RecordDecl): New method.
21162
21163         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21164
21165 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21166
21167         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21168         value attributes to be applied to ParameterBuilders.
21169
21170         * class.cs (MethodCore.LabelParameters): Make static and more
21171         generic so that it can be used from other places - like interface
21172         methods, for instance.
21173
21174         * interface.cs (Interface.Emit): Call LabelParameters before
21175         emitting attributes on the InterfaceMethod.
21176
21177 2003-08-26  Martin Baulig  <martin@ximian.com>
21178
21179         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21180         resolving aliases; fixes #47927.
21181
21182 2003-08-26  Martin Baulig  <martin@ximian.com>
21183
21184         * statement.cs (Using.DoResolve): This is internally emitting a
21185         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21186         do not always return.  Fixes #47681.
21187
21188 2003-08-26  Martin Baulig  <martin@ximian.com>
21189
21190         * decl.cs (MemberCore): Moved WarningNotHiding(),
21191         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21192         into MemberBase.
21193         (AdditionResult): Make this nested in DeclSpace.
21194         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21195         argument; call NamespaceEntry.Define() unless we're nested in a
21196         class or struct.
21197
21198         * namespace.cs (Namespace.DefineName): New public function.  This
21199         is called from DeclSpace's .ctor to add 
21200         (Namespace.Lookup): Include DeclSpaces in the lookup.
21201
21202         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21203
21204         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21205
21206 2003-08-25  Martin Baulig  <martin@ximian.com>
21207
21208         * convert.cs (Convert.ExplicitReferenceConversion): When
21209         converting from an interface type to a class, unbox if the target
21210         type is a struct type.  Fixes #47822.
21211
21212 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21213
21214         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21215         #47854.
21216
21217 2003-08-22  Martin Baulig  <martin@ximian.com>
21218
21219         * class.cs (TypeManager.DefineType): When defining a nested type,
21220         call DefineType() on our parent; fixes #47801.
21221
21222 2003-08-22  Martin Baulig  <martin@ximian.com>
21223
21224         * class.cs (MethodData.Define): While checking if a method is an
21225         interface implementation, improve the test a bit more to fix #47654.
21226
21227 2003-08-22  Martin Baulig  <martin@ximian.com>
21228
21229         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21230         correctly; fixes #47722.
21231
21232 2003-08-22  Martin Baulig  <martin@ximian.com>
21233
21234         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21235         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21236
21237         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21238
21239 2003-08-22  Martin Baulig  <martin@ximian.com>
21240
21241         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21242         can only be assigned in static constructors.  Fixes #47161.
21243
21244 2003-08-22  Martin Baulig  <martin@ximian.com>
21245
21246         Rewrote and improved the flow analysis code.
21247
21248         * flowbranching.cs (FlowBranching): Make this class abstract.
21249         (FlowBranching.CreateBranching): New static function to create a
21250         new flow branching.
21251         (FlowBranchingBlock, FlowBranchingException): New classes.
21252         (FlowBranching.UsageVector.Type): New public readonly field.
21253         (FlowBranching.UsageVector.Breaks): Removed the setter.
21254         (FlowBranching.UsageVector.Returns): Removed the setter.
21255         (FlowBranching.UsageVector): Added Break(), Return(),
21256         NeverReachable() and Throw() methods to modify the reachability.
21257         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21258         done by FlowBranching.Merge().
21259         (FlowBranching.UsageVector.MergeChild): New method; merges the
21260         merge result into the current vector.
21261         (FlowBranching.Merge): New abstract method to merge a branching.
21262
21263 2003-08-12  Martin Baulig  <martin@ximian.com>
21264
21265         * expression.cs (Indirection.CacheTemporaries): Create the
21266         LocalTemporary with the pointer type, not its element type.
21267
21268 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21269
21270         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21271         token was a keyword or not.
21272
21273         Add `error' options where an IDENTIFIER was expected;  Provide
21274         CheckToken and CheckIdentifierToken convenience error reporting
21275         functions. 
21276
21277         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21278
21279         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21280         NameSpaceEntry NameSpaceEntry.
21281
21282         (LookupInterfaceOrClass): Avoid creating a full qualified name
21283         from namespace and name: avoid doing lookups when we know the
21284         namespace is non-existant.   Use new Tree.LookupByNamespace which
21285         looks up DeclSpaces based on their namespace, name pair.
21286
21287         * driver.cs: Provide a new `parser verbose' to display the
21288         exception thrown during parsing.  This is turned off by default
21289         now, so the output of a failure from mcs is more graceful.
21290
21291         * namespace.cs: Track all the namespaces defined in a hashtable
21292         for quick lookup.
21293
21294         (IsNamespace): New method
21295
21296 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21297
21298         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21299         we know that we need to concatenate (full typename can never be
21300         null). 
21301
21302         * class.cs: ditto.
21303
21304         * statement.cs: Use a bitfield;  Do not initialize to null things
21305         which are done by the constructor by default.
21306
21307         * cs-parser.jay: bug fix, parameter was 4, not 3.
21308
21309         * expression.cs: Just use the property;
21310
21311         * statement.cs: No need for GetVariableInfo method.
21312
21313 2003-08-08  Martin Baulig  <martin@ximian.com>
21314
21315         * flowanalysis.cs (FlowReturns): This is now nested in the
21316         `FlowBranching' class.
21317         (MyBitVector): Moved this here from statement.cs.
21318         (FlowBranching.SiblingType): New enum type.
21319         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21320
21321 2003-08-07  Martin Baulig  <martin@ximian.com>
21322
21323         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21324         `FlowBranching' class and called `BranchingType'.
21325
21326 2003-08-07  Martin Baulig  <martin@ximian.com>
21327
21328         * flowanalysis.cs: Moved all the control flow analysis code into
21329         its own file.
21330
21331 2003-08-07  Martin Baulig  <martin@ximian.com>
21332
21333         * assign.cs (Assign.DoResolve): `target' must either be an
21334         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21335         #37319.
21336
21337 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21338
21339         * expression.cs (BinaryMethod): This kind of expression is created by the
21340         Binary class if it determines that the operator has to be handled
21341         by a method.
21342
21343         (BinaryDelegate): This kind of expression is created if we are
21344         dealing with a + or - operator on delegates.
21345
21346         (Binary): remove method, argumetns, and DelegateOperator: when
21347         dealing with methods, 
21348
21349         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21350
21351         * statement.cs (Block): use bitfields for the three extra booleans
21352         we had in use.   Remove unused topblock parameter.
21353
21354         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21355
21356         * assign.cs: Drop extra unneeded tests.
21357
21358 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21359
21360         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21361
21362         * statement.cs (Foreach): Use VariableStorage instead of
21363         LocalBuilders.   
21364
21365         * codegen.cs (VariableStorage): New class used by clients that
21366         require a variable stored: locals or fields for variables that
21367         need to live across yield.
21368
21369         Maybe provide a convenience api for EmitThis+EmitLoad?
21370
21371         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21372         these bad boys.
21373
21374 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21375
21376         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21377         RemapParameterLValue): New methods that are used to turn a
21378         precomputed FieldInfo into an expression like this:
21379
21380                 instance.FieldInfo
21381
21382         The idea is to use this instead of making LocalVariableReference
21383         have more than one meaning.
21384
21385         * cs-parser.jay: Add error production to BASE.
21386
21387         * ecore.cs: Deal with TypeManager.GetField returning null, which
21388         is now a valid return value.
21389
21390         (FieldExprNoAddress): New expression for Fields whose address can
21391         not be taken.
21392
21393         * expression.cs (LocalVariableReference): During the resolve
21394         phases, create new expressions if we are in a remapping context.
21395         Remove code that dealt with remapping here.
21396
21397         (ParameterReference): same.
21398
21399         (ProxyInstance): New expression, like the `This' expression, but
21400         it is born fully resolved.  We know what we are doing, so remove
21401         the errors that are targeted to user-provided uses of `this'.
21402
21403         * statement.cs (Foreach): our variable is now stored as an
21404         Expression;  During resolution, follow the protocol, dont just
21405         assume it will return this.
21406
21407 2003-08-06  Martin Baulig  <martin@ximian.com>
21408
21409         * support.cs (SeekableStreamReader.cs): New public class.
21410
21411         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21412         SeekableStreamReader instead of the normal StreamReader.
21413
21414 2003-08-04  Martin Baulig  <martin@ximian.com>
21415
21416         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21417         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21418         deambiguate casts and delegate invocations.
21419         (parenthesized_expression): Use the new tokens to ensure this is
21420         not a cast of method invocation.
21421
21422         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21423         when reading a `)' and Deambiguate_CloseParens () was previously
21424         called.
21425
21426         * expression.cs (ParenthesizedExpression): New class.  This is
21427         just used for the CS0075 test.
21428         (Binary.DoResolve): Check for CS0075.   
21429
21430 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21431
21432         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21433         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21434         reference comparison.
21435
21436         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21437         examine the ReturnType for equality - this is necessary in the
21438         cases of implicit and explicit operators whose signature also
21439         includes the return type.
21440
21441 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21442
21443         * namespace.cs: Cache the result of the namespace computation,
21444         instead of computing it every time.
21445
21446 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21447
21448         * decl.cs: Use a global arraylist that we reuse over invocations
21449         to avoid excesive memory consumption.  Reduces memory usage on an
21450         mcs compile by one meg (45 average).
21451
21452         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21453         private, work around that.
21454
21455 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21456
21457         * literal.cs (IntLiteral): Define Zero and One static literals. 
21458
21459         * cs-parser.jay (integer_literal): use static literals to reduce
21460         memory usage for the most used literals (0, 1 and -1).  211kb
21461         reduced in memory usage.
21462
21463         Replace all calls to `new ArrayList' with `new
21464         ArrayList(4)' which is a good average number for most allocations,
21465         and also requires only 16 bytes of memory for its buffer by
21466         default. 
21467
21468         This reduced MCS memory usage in seven megabytes for the RSS after
21469         bootstrapping.
21470
21471 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21472
21473         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21474         handle params methods the correct way by forming only one
21475         applicable set with params and normal methods in them. Earlier we
21476         were looking at params methods only if we found no normal methods
21477         which was not the correct thing to do.
21478
21479         (Invocation.BetterFunction): Take separate arguments indicating
21480         when candidate and the best method are params methods in their
21481         expanded form.
21482
21483         This fixes bugs #43367 and #46199.
21484
21485         * attribute.cs: Documentation updates.
21486
21487         (CheckAttribute): Rename to CheckAttributeTarget.
21488         (GetValidPlaces): Rename to GetValidTargets.
21489
21490         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21491         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21492
21493         Fixes bug #44468.
21494
21495 2003-07-28  Martin Baulig  <martin@ximian.com>
21496
21497         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21498         name when looking up the base class of a nested class.  Fixes #46977.
21499
21500 2003-07-26  Martin Baulig  <martin@ximian.com>
21501
21502         * expression.cs (Indexers.Indexer): New nested struct; contains
21503         getter, setter and the indexer's type.
21504         (Indexers.Properties): This is now an ArrayList of
21505         Indexers.Indexer's.
21506         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21507         indexer doesn't have any getters.
21508
21509         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21510         for embedded property and indexer assignments.
21511
21512 2003-07-26  Martin Baulig  <martin@ximian.com>
21513
21514         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21515         preprocessor directive is not the first non-whitespace character
21516         on a line.
21517
21518 2003-07-26  Martin Baulig  <martin@ximian.com>
21519
21520         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21521         namespace parsing, follow the spec more closely.
21522
21523         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21524         NamespaceEntry.Lookup().
21525
21526 2003-07-25  Martin Baulig  <martin@ximian.com>
21527
21528         * MethodCore.cs (OverridesSomething): New public field; it's set
21529         from TypeContainer.DefineMembers if this method overrides
21530         something (which doesn't need to be a method).  Fix #39462.
21531
21532 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21533
21534         * typemanager.cs (GetMembers): Ensure that the list of members is
21535         reversed. This keeps things in sync.
21536
21537         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21538         find an AttributeUsage attribute.
21539
21540         * expression.cs (Invocation.OverloadResolve): Perform the check
21541         which disallows Invoke to be directly called on a Delegate.
21542
21543         (Error_InvokeOnDelegate): Report error cs1533.
21544
21545 2003-07-25  Martin Baulig  <martin@ximian.com>
21546
21547         * expression.cs (Indexers.GetIndexersForType): Only look in the
21548         interface hierarchy if the requested type is already an
21549         interface.  Fixes #46788 while keeping #46502 fixed.
21550
21551 2003-07-25  Martin Baulig  <martin@ximian.com>
21552
21553         * class.cs (TypeContainer.DefineMembers): Check whether all
21554         readonly fields have been assigned and report warning CS0649 if
21555         not.
21556
21557         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21558         a valuetype.
21559
21560 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21561
21562         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21563         returned from GetMethods to make things consistent with the
21564         assumptions MCS makes about ordering of methods.
21565
21566         This should comprehensively fix bug #45127 and it does :-)
21567
21568         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21569         ordering is actually reverse.
21570
21571         * Clean up some debug messages I left lying around.
21572
21573         * interface.cs (Populate*): Get rid of code which emits attributes
21574         since the stage in which we emit attributes is the 'Emit' stage,
21575         not the define stage.
21576
21577         (Emit): Move attribute emission for interface members here.
21578
21579 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21580
21581         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21582         closely: we eliminate methods in base types when we have an
21583         applicable method in a top-level type.
21584
21585         Please see section 14.5.5.1 for an exact description of what goes
21586         on. 
21587
21588         This fixes bug #45127 and a host of other related to corlib compilation.
21589
21590         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21591         array is the method corresponding to the top-level type (this is
21592         because of the changes made to icall.c) so we change this
21593         accordingly.
21594
21595         (MethodGroupExpr.Name): This too.
21596
21597         * typemanager.cs (GetElementType): New method which does the right
21598         thing when compiling corlib. 
21599
21600         * everywhere: Make use of the above in the relevant places.
21601
21602 2003-07-22  Martin Baulig  <martin@ximian.com>
21603
21604         * cs-parser.jay (invocation_expression): Moved
21605         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21606         `cast_expression', but create a InvocationOrCast which later
21607         resolves to either an Invocation or a Cast.
21608
21609         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21610         method; call this before EmitStatement() to make sure that this
21611         expression can be used as a statement.
21612
21613         * expression.cs (InvocationOrCast): New class; resolves to either
21614         an Invocation or a Cast.
21615
21616         * statement.cs (StatementExpression): Call ResolveStatement() on
21617         the ExpressionStatement before emitting it.
21618
21619 2003-07-21  Martin Baulig  <martin@ximian.com>
21620
21621         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21622         `ref' and `out' attributes match; fixes #46220.
21623         (MemberAccess.ResolveMemberAccess): You can't reference a type
21624         through an expression; fixes #33180.
21625         (Indexers.GetIndexersForType): Don't return the indexers from
21626         interfaces the class implements; fixes #46502.
21627
21628 2003-07-21  Martin Baulig  <martin@ximian.com>
21629
21630         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21631         CS0661 checks; fixes bug #30442.
21632
21633 2003-07-21  Martin Baulig  <martin@ximian.com>
21634
21635         * decl.cs (AdditionResult): Added `Error'.
21636
21637         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21638
21639         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21640         makes cs0031.cs actually work.
21641
21642 2003-07-20  Martin Baulig  <martin@ximian.com>
21643
21644         * namespace.cs: Fixed that bug which caused a crash when compiling
21645         the debugger's GUI.
21646
21647 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21648
21649         * typemanager.cs (LookupTypeReflection): Never expose types which
21650         are NotPublic, NestedPrivate, NestedAssembly, or
21651         NestedFamANDAssem.  We used to return these, and later do a check
21652         that would report a meaningful error, but the problem is that we
21653         would not get the real match, if there was a name override.
21654
21655 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21656
21657         * namespace.cs (Namespace, Name): Do not compute the namespace
21658         name dynamically, compute it in the constructor.  This reduced
21659         memory usage by 1697 KB.
21660
21661         * driver.cs: Use --pause to pause at the end.
21662
21663 2003-07-17  Peter Williams  <peter@newton.cx>
21664
21665         * Makefile: Change the name of the test target so that it doesn't
21666         conflict with the recursive test target.
21667
21668 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21669
21670         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21671         AddressOf): Do not use EmitThis, that was wrong, use the actual
21672         this pointer.
21673
21674 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21675
21676         * class.cs (MethodData.Define): While checking if a method is an
21677         interface implementation, improve the test: If we are not public
21678         (use new test here: use the computed MethodAttributes directly,
21679         instead of the parsed modifier flags) check if the `implementing'
21680         method comes from an interface or not.
21681
21682         * pending.cs (VerifyPendingMethods): Slightly better error
21683         message.
21684
21685         * makefile: add test target that does the mcs bootstrap.
21686
21687 2003-07-16  Ravi Pratap  <ravi@ximian.com>
21688
21689         * interface.cs (Define): Do nothing here since there are no
21690         members to populate etc. Move the attribute emission out of here
21691         since this was just totally the wrong place to put it. Attribute
21692         application happens during the 'Emit' phase, not in the 'Define'
21693         phase.
21694
21695         (Emit): Add this method and move the attribute emission here
21696
21697         * rootcontext.cs (EmitCode): Call the Emit method on interface
21698         types too.
21699
21700 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21701
21702         * expression.cs (OverloadResolve): Report error only if Location
21703         is not 'Null' which means that there was a probe going on.
21704
21705 2003-07-14  Martin Baulig  <martin@ximian.com>
21706
21707         * expression.cs (ConditionalLogicalOperator): New public class to
21708         implement user defined conditional logical operators.
21709         This is section 14.11.2 in the spec and bug #40505.
21710
21711 2003-07-14  Martin Baulig  <martin@ximian.com>
21712
21713         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
21714
21715 2003-07-14  Martin Baulig  <martin@ximian.com>
21716
21717         * codegen.cs (EmitContext.InFixedInitializer): New public field.
21718
21719         * ecore.cs (IVariable.VerifyFixed): New interface method.
21720
21721         * expression.cs (Unary.ResolveOperator): When resolving the `&'
21722         operator, check whether the variable is actually fixed.  Fixes bug
21723         #36055.  Set a variable definitely assigned when taking its
21724         address as required by the spec.
21725
21726         * statement.cs (LocalInfo.IsFixed): New field.
21727         (LocalInfo.MakePinned): Set `IsFixed' to true.
21728
21729 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21730
21731         * attribute.cs (Attribute.Resolve): While doing a Member lookup
21732         for .ctors, ensure that we only ask for members declared in the
21733         attribute type (BindingFlags.DeclaredOnly).
21734
21735         Fixes bug #43632.
21736
21737         * expression.cs (Error_WrongNumArguments): Report error 1501
21738         correctly the way CSC does.
21739
21740 2003-07-13  Martin Baulig  <martin@ximian.com>
21741
21742         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
21743         lookup on the fully qualified name, to make things like "X.X" work
21744         where "X.X" is a fully qualified type name, but we also have a
21745         namespace "X" in the using list.  Fixes #41975.
21746
21747 2003-07-13  Martin Baulig  <martin@ximian.com>
21748
21749         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
21750         function. If we're a CompoundAssign, we need to create an embedded
21751         CompoundAssign, not an embedded Assign.
21752         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
21753         Fixes #45854.
21754
21755 2003-07-13  Martin Baulig  <martin@ximian.com>
21756
21757         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
21758         work to fix bug #46088.
21759
21760 2003-07-13  Ravi Pratap <ravi@ximian.com>
21761
21762         * class.cs (Operator.Emit): Do not emit attributes here - it is
21763         taken care of by the Method class that we delegate too. This takes
21764         care of bug #45876.
21765
21766 2003-07-10  Martin Baulig  <martin@ximian.com>
21767
21768         * expression.cs (TypeOfVoid): New class.
21769         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
21770
21771 2003-07-10  Martin Baulig  <martin@ximian.com>
21772
21773         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
21774         bug #35957.
21775
21776 2003-07-10  Martin Baulig  <martin@ximian.com>
21777
21778         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
21779         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
21780
21781         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
21782
21783         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
21784
21785 2003-07-10  Martin Baulig  <martin@ximian.com>
21786
21787         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
21788         of decimal.  Fixes #42850.
21789
21790         NOTE: I also fixed the created byte blob, but this doesn't work on
21791         the MS runtime and csc never produces any byte blobs for decimal
21792         arrays.
21793
21794 2003-07-10  Martin Baulig  <martin@ximian.com>
21795
21796         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
21797         structs; fixes #32068.
21798         (Block.AddChildVariableNames): Fixed #44302.
21799
21800 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21801
21802         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
21803
21804 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21805
21806         * attribute.cs: And this test is onger needed.
21807
21808 2003-07-08  Martin Baulig  <martin@ximian.com>
21809
21810         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
21811         inaccessible types.  Fixes #36313.
21812
21813         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
21814
21815         * namespace.cs (NamespaceEntry): Create implicit entries for all
21816         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
21817         implicit entries for N1.N2 and N1.
21818
21819 2003-07-08  Martin Baulig  <martin@ximian.com>
21820
21821         Rewrote the handling of namespaces to fix a lot of the issues
21822         wrt. `using' aliases etc.
21823
21824         * namespace.cs (Namespace): Splitted this class into a
21825         per-assembly `Namespace' and a per-file `NamespaceEntry'.
21826
21827         * typemanager.cs (TypeManager.IsNamespace): Removed.
21828         (TypeManager.ComputeNamespaces): Only compute namespaces from
21829         loaded assemblies here, not the namespaces from the assembly we're
21830         currently compiling.
21831
21832 2003-07-08  Martin Baulig  <martin@ximian.com>
21833
21834         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
21835
21836 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21837
21838         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
21839         already fixed it.  
21840
21841         I thought about the memory savings here, but LookupTypeReflection
21842         is used under already very constrained scenarios.  Compiling
21843         corlib or mcs only exposes one hit, so it would not really reduce
21844         any memory consumption.
21845
21846 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21847
21848         * typemanager.cs: fixes bug #45889 by only adding public types from
21849         other assemblies to the list of known types.
21850
21851 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21852
21853         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
21854         on the type we resolved.
21855
21856 2003-07-05  Martin Baulig  <martin@ximian.com>
21857
21858         * pending.cs (PendingImplementation.ParentImplements): Don't
21859         create the proxy if the parent is abstract.
21860
21861         * class.cs (TypeContainer.DefineIndexers): Process explicit
21862         interface implementations first.  Fixes #37714.
21863
21864 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
21865
21866         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
21867         defined recursively;  but since we modify the input parameters
21868         (left is set to `this' temporarily), we reset this value if the
21869         left_is_explicit is false, which gives the original semantics to
21870         the code.  
21871
21872         * literal.cs (NullPointer): new class used to represent a null
21873         literal in a pointer context.
21874
21875         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
21876         type is a pointer, use a NullPointer object instead of a
21877         NullLiteral.   Closes 43687
21878
21879         (ExplicitConversion): Convert pointer values using
21880         the conv opcode to the proper type.
21881
21882         * ecore.cs (New): change ValueTypeVariable property into a method,
21883         that returns whether the valuetype is suitable for being used.
21884
21885         * expression.cs (Binary.DoNumericPromotions): Only return if we
21886         the int constant was a valid uint, and we can return both left and
21887         right as uints.  If not, we continue processing, to trigger the
21888         type conversion.  This fixes 39018.
21889
21890         * statement.cs (Block.EmitMeta): During constant resolution, set
21891         the CurrentBlock property on the emitcontext, so that we resolve
21892         constants propertly.
21893
21894 2003-07-02  Martin Baulig  <martin@ximian.com>
21895
21896         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
21897         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
21898
21899         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
21900         than emitting it here.
21901
21902         * statement.cs: Fixed some more flow analysis bugs.
21903
21904 2003-07-02  Martin Baulig  <martin@ximian.com>
21905
21906         * class.cs (MethodData.Define): When implementing interface
21907         methods, set Final unless we're Virtual.
21908
21909         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
21910         check work for interface methods.
21911
21912 2003-07-01  Martin Baulig  <martin@ximian.com>
21913
21914         * ecore.cs (EmitContext.This): Replaced this property with a
21915         GetThis() method which takes a Location argument.  This ensures
21916         that we get the correct error location for a CS0188.
21917
21918 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
21919
21920         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
21921         ImplicitStandardConversion.
21922
21923         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
21924
21925 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
21926
21927         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
21928         optimization.
21929
21930 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
21931
21932         * class.cs (Constructor.Define): Turn off initlocals for unsafe
21933         constructors.
21934
21935         (MethodData.Define): Turn off initlocals for unsafe methods.
21936
21937 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
21938
21939         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
21940         complete;  Fixes #37521.
21941
21942         * delegate.cs: Use Modifiers.TypeAttr to compute the
21943         TypeAttributes, instead of rolling our own.  This makes the flags
21944         correct for the delegates.
21945
21946 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
21947
21948         * class.cs (Constructor.Define): Set the private flag for static
21949         constructors as well.
21950
21951         * cs-parser.jay (statement_expression): Set the return value to
21952         null, to avoid a crash when we catch an error.
21953
21954 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
21955
21956         * cs-parser.jay: Applied patch from Jackson that adds support for
21957         extern and unsafe modifiers to destructor declarations.
21958
21959         * expression.cs: Report error 21 if the user is trying to index a
21960         System.Array.
21961
21962         * driver.cs: Add an error message, suggested by the bug report.
21963
21964         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
21965         if we do not have a ": this ()" constructor initializer.  Fixes 45149
21966
21967 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
21968
21969         * namespace.cs: Add some information to reduce FAQs.
21970
21971 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
21972
21973         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
21974         underlying enumeration types.  Fixes #43915.
21975
21976         * expression.cs: Treat ushort/short as legal values to be used in
21977         bitwise operations.
21978
21979 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
21980
21981         * delegate.cs: transfer custom attributes for paramenters from
21982         the delegate declaration to Invoke and BeginInvoke.
21983
21984 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21985
21986         * attribute.cs: handle custom marshalers and emit marshal info
21987         for fields, too.
21988
21989 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
21990
21991         * makefile.gnu: Added anonymous.cs to the compiler sources.
21992
21993 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
21994
21995         * iterators.cs: Change the name of the proxy class to include two
21996         underscores.
21997
21998         * cs-parser.jay: Update grammar to include anonymous methods.
21999
22000         * anonymous.cs: new file.
22001
22002 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
22003
22004         * class.cs (Field.Define): Add missing test for pointers and
22005         safety. 
22006
22007 2003-05-27  Ravi Pratap  <ravi@ximian.com>
22008
22009         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
22010         we use the stobj opcode.
22011
22012         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
22013         since it wasn't the correct fix. 
22014
22015         It still is puzzling that we are required to use stobj for IntPtr
22016         which seems to be a ValueType.
22017
22018 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
22019
22020         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
22021         during regular simple name resolution.   Now, the trick is that
22022         instead of returning for processing the simplename, we do a
22023         TypeManager.LookupType (ie, a rooted lookup as opposed to a
22024         contextual lookup type).   If a match is found, return that, if
22025         not, return for further composition.
22026
22027         This fixes long-standing 30485.
22028
22029         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
22030         using the address to initialize an object, do an Stobj instead of
22031         using the regular Stelem.
22032
22033         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
22034         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
22035         Because if we are a BaseIndexerAccess that value will be true.
22036         Fixes 43643.
22037
22038         * statement.cs (GotoCase.Resolve): Return after reporting an
22039         error, do not attempt to continue. 
22040
22041         * expression.cs (PointerArithmetic.Emit): If our operand is a
22042         long, convert our constants to match the operand before
22043         multiplying.  Convert to I type before adding.   Fixes 43670.
22044
22045 2003-05-14  Ravi Pratap  <ravi@ximian.com>
22046
22047         * enum.cs (ImplicitConversionExists) : Rename to
22048         ImplicitEnumConversionExists to remove ambiguity. 
22049
22050         * ecore.cs (NullCast): New type of cast expression class which
22051         basically is very similar to EmptyCast with the difference being
22052         it still is a constant since it is used only to cast a null to
22053         something else
22054         (eg. (string) null)
22055
22056         * convert.cs (ImplicitReferenceConversion): When casting a null
22057         literal, we return a NullCast.
22058
22059         * literal.cs (NullLiteralTyped): Remove - I don't see why this
22060         should be around anymore.
22061
22062         The renaming (reported was slightly wrong). Corrections:
22063
22064         ConvertImplicitStandard -> ImplicitConversionStandard
22065         ConvertExplicitStandard -> ExplicitConversionStandard
22066
22067         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
22068         before passing them in !
22069
22070         * convert.cs (ImplicitConversionStandard): When comparing for
22071         equal expr and target types, ensure that expr is not a
22072         NullLiteral.
22073
22074         In general, we must not be checking (expr_type ==
22075         target_type) in the top level conversion methods
22076         (ImplicitConversion, ExplicitConversion etc). This checking is
22077         done in the methods that they delegate to.
22078
22079 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
22080
22081         * convert.cs: Move Error_CannotConvertType,
22082         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
22083         ImplicitNumericConversion, ImplicitConversionExists,
22084         ImplicitUserConversionExists, StandardConversionExists,
22085         FindMostEncompassedType, FindMostSpecificSource,
22086         FindMostSpecificTarget, ImplicitUserConversion,
22087         ExplicitUserConversion, GetConversionOperators,
22088         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
22089         TryImplicitIntConversion, Error_CannotConvertImplicit,
22090         ConvertImplicitRequired, ConvertNumericExplicit,
22091         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
22092         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
22093         its own file.
22094
22095         Perform the following renames:
22096
22097         StandardConversionExists -> ImplicitStandardConversionExists
22098         ConvertImplicit -> ImplicitConversion
22099         ConvertImplicitStandard -> ImplicitStandardConversion
22100         TryImplicitIntConversion -> ImplicitIntConversion
22101         ConvertImplicitRequired -> ImplicitConversionRequired
22102         ConvertNumericExplicit -> ExplicitNumericConversion
22103         ConvertReferenceExplicit -> ExplicitReferenceConversion
22104         ConvertExplicit -> ExplicitConversion
22105         ConvertExplicitStandard -> ExplicitStandardConversion
22106
22107 2003-05-19  Martin Baulig  <martin@ximian.com>
22108
22109         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22110         (TypeInfo): Added support for structs having structs as fields.
22111
22112         * ecore.cs (FieldExpr): Implement IVariable.
22113         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22114         VariableInfo for the field.
22115
22116 2003-05-18  Martin Baulig  <martin@ximian.com>
22117
22118         * expression.cs (This.DoResolve): Report a CS0027 if we're
22119         emitting a field initializer.
22120
22121 2003-05-18  Martin Baulig  <martin@ximian.com>
22122
22123         * expression.cs (This.ResolveBase): New public function.
22124         (This.DoResolve): Check for CS0188.
22125
22126         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22127         This.Resolve().
22128
22129         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22130         `instance_expression' to null if we don't have any non-static
22131         methods.
22132
22133 2003-05-18  Martin Baulig  <martin@ximian.com>
22134
22135         Reworked the way how local variables and parameters are handled by
22136         the flow analysis code.
22137
22138         * statement.cs (TypeInfo, VariableMap): New public classes.
22139         (VariableInfo): New public class.  This is now responsible for
22140         checking whether a variable has been assigned.  It is used for
22141         parameters and local variables.
22142         (Block.EmitMeta): Take the InternalParameters as argument; compute
22143         the layout of the flow vectors here.
22144         (Block.LocalMap, Block.ParameterMap): New public properties.
22145         (FlowBranching): The .ctor doesn't get the InternalParameters
22146         anymore since Block.EmitMeta() now computes the layout of the flow
22147         vector.
22148         (MyStructInfo): This class is now known as `StructInfo' and nested
22149         in `TypeInfo'; we don't access this directly anymore.
22150
22151         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22152         property and removed IsAssigned(), IsFieldAssigned(),
22153         SetAssigned() and SetFieldAssigned(); we now call them on the
22154         VariableInfo so we don't need to duplicate this code everywhere.
22155
22156         * expression.cs (ParameterReference): Added `Block block' argument
22157         to the .ctor.
22158         (LocalVariableReference, ParameterReference, This): The new
22159         VariableInfo class is now responsible for all the definite
22160         assignment stuff.
22161
22162         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22163         IsParameterAssigned, SetParameterAssigned): Removed.
22164
22165 2003-05-18  Martin Baulig  <martin@ximian.com>
22166
22167         * typemanager.cs (InitCoreTypes): Try calling
22168         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22169         the 3-args-version.  Corlib now also needs our `void_type'.
22170         (GetMethod): Added overloaded version which takes an optional
22171         `bool report_errors' to allow lookups of optional methods.
22172
22173 2003-05-12  Martin Baulig  <martin@ximian.com>
22174
22175         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22176         only used for locals and not for parameters.
22177
22178 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22179
22180         * support.cs (InternalParameters.ParameterType): Return the
22181         ExternalType of the parameter.
22182
22183         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22184         they were unused.
22185
22186 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22187
22188         * class.cs (MethodData.Define): Do not set the `newslot' on
22189         interface members, if they are also flagged as "override".
22190
22191         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22192         better code for ++i and i++.  This only works for static fields
22193         and local variables.
22194
22195         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22196         want to pull the DeclSpace out of the builder_to_declspace instead
22197         of the TypeBuilder (like in TypeContainer.FindMembers).
22198
22199         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22200         instead of LookupTypeContainer.  Fixes the crash on .NET for
22201         looking up interface members.
22202
22203         * const.cs: Create our own emit context during the Definition
22204         stage, so that constants are evaluated in the proper context, when
22205         a recursive definition happens.
22206
22207 2003-05-11  Martin Baulig  <martin@ximian.com>
22208
22209         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22210         new block for a switch section.
22211         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22212         the adding/lookup in the switch block.  Fixes #39828.
22213
22214 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22215
22216         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22217         functionality: I needed to convert the data after I had performed
22218         the add/sub operation into the operands type size.
22219
22220         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22221         pass the type for the box operation, otherwise the resulting
22222         object would have been of type object.
22223
22224         (BoxedCast): Add constructor to specify the type to box as.
22225
22226 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22227
22228         * iterators.cs: I was reusing the `count' variable inadvertently,
22229         take steps to not allow this to happen.
22230
22231 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22232
22233         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22234         by creating an array at the point where the params starts and
22235         putting all those arguments there, then adjusting the size of the
22236         array.
22237
22238 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22239
22240         * expression.cs (New.AddressOf): Implement interface
22241         IMemoryLocation.  This is used when the `new' operator is used in
22242         the context of an invocation to a method on a value type.
22243
22244         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22245         example. 
22246
22247         * namespace.cs: Also check the using aliases here.
22248
22249         * driver.cs: Move the test for using validity after the types have
22250         been entered, so we do a single pass that also includes the using
22251         aliases. 
22252
22253         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22254         in the regular case.   CreateSiblingForFinally is doing extra
22255         error checking.
22256
22257         * attribute.cs (GetAttributeArgumentExpression): Store the result
22258         on an out value, and use the return value to indicate failure
22259         instead of using null (which is a valid return for Constant.GetValue).
22260
22261         * statement.cs: Perform the analysis flow for the increment
22262         portion after the statement, because this will be the real flow of
22263         execution.  Fixes #42385
22264
22265         * codegen.cs (EmitContext.EmitArgument,
22266         EmitContext.EmitStoreArgument): New helper functions when the
22267         RemapToProxy flag is set.
22268
22269         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22270         function.
22271
22272         Add support for remapping parameters. 
22273
22274         * iterators.cs: Propagate parameter values;  Store parameter
22275         values in the proxy classes.
22276
22277 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22278
22279         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22280         need a proxy reference;  I do not know what I was thinking
22281
22282         * cs-parser.jay (constructor_initializer): catch another error,
22283         and display nice message.
22284
22285         (field_declaration): catch void field declaration
22286         to flag a better error. 
22287
22288         * class.cs (MemberBase.CheckBase): Report an error instead of a
22289         warning if a new protected member is declared in a struct. 
22290         (Field.Define): catch the error of readonly/volatile.
22291
22292         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22293
22294         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22295         volatile variable is taken
22296
22297 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22298
22299         * statement.cs (Fixed.Resolve): Report an error if we are not in
22300         an unsafe context.
22301
22302 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22303
22304         * typemanager.cs: reuse the code that handles type clashes for
22305         delegates and enumerations.
22306
22307         * class.cs (Report28): Always report.
22308
22309         * expression.cs (EncodeAsAttribute): Allow nulls here.
22310
22311 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22312
22313         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22314         the functionality for testing whether an expression is valid for
22315         an attribute here.  Also handle the case of arrays of elements
22316         being stored. 
22317
22318         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22319         encoding a linear array into an array of objects that are suitable
22320         to be passed to an CustomAttributeBuilder.
22321
22322         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22323
22324         * ecore.cs: (FieldExpr): Handle field remapping here.
22325
22326         * iteratators.cs: Pass the instance variable (if the method is an
22327         instance method) to the constructors, so we can access the field
22328         variables on the class.
22329
22330         TODO: Test this with structs.  I think the THIS variable on
22331         structs might have to be a pointer, and not a refenrece
22332
22333 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22334
22335         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22336         local variables to fields in a proxy class.
22337
22338         * iterators.cs (PopulateProxy): Rename our internal fields to
22339         <XXX>.  
22340         Create a <THIS> field if we are an instance method, so we can
22341         reference our parent container variables.
22342         (MapVariable): Called back from the EmitContext code to enter a
22343         new variable to field mapping into the proxy class (we just create
22344         a FieldBuilder).
22345
22346         * expression.cs
22347         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22348         for using the remapped locals to fields.
22349
22350         I placed the code here, because that gives the same semantics to
22351         local variables, and only changes the Emit code.
22352
22353         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22354         statements inside iterators.
22355         (VariableInfo): Add a FieldBuilder for the cases when we are
22356         remapping local variables to fields in a proxy class
22357
22358         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22359         current_block != null.
22360
22361         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22362         not cope with strings, as it has been moved to the
22363         TableSwitchEmit.  Fixed bug in switch generation.
22364
22365         * expression.cs (New.DoResolve): Provide more context for the user
22366         when reporting an error.
22367
22368         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22369         pointers. 
22370
22371         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22372         check the permissions for it.  Note than in a type-resolution
22373         context the check was already present in DeclSpace.ResolveType,
22374         but was missing from the MemberAccess.
22375
22376         (ArrayCreation.CheckIndices): warn if the user has
22377         more nested levels of expressions, but there are no more
22378         dimensions specified.  Avoids crash on bug 41906.
22379
22380 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22381
22382         * statement.cs (Block): replace Implicit bool, for a generic
22383         flags.   
22384         New flag: `Unchecked'.  This is used during the EmitMeta phase
22385         (which is out-of-line with the regular Resolve/Emit process for a
22386         statement, as this is done ahead of time, but still gets a chance
22387         to call constant resolve).
22388
22389         (Block.Flags): new enum for adding a new flag.
22390
22391         (Block.EmitMeta): track the state of unchecked.
22392
22393         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22394         to enable constant resolution to work there as well.
22395
22396 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22397
22398         * typemanager.cs (ienumerable_type): Also look up
22399         System.Collections.IEnumerable. 
22400
22401 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22402
22403         TODO: Test more than one conditional per method.
22404
22405         * class.cs (Indexer.Define): Report the location where the user is
22406         referencing the unsupported feature.
22407
22408         (MethodData): Overload the use of `conditionals' to
22409         minimize the creation of needless ArrayLists.   This saves roughly
22410         212kb on my machine.
22411
22412         (Method): Implement the new IIteratorContainer interface.
22413         (Method.SetYields): Implement the method by setting the ModFlags
22414         to contain METHOD_YIELDS.
22415
22416         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22417         which just got set to null.
22418
22419         * iterators.cs: New file.
22420
22421         (Yield, YieldBreak): New statements.
22422
22423         * statement.cs (Return.Resolve): Flag an error if we are used in
22424         an iterator method.
22425
22426         * codegen.cs (InIterator): New flag set if the code is being
22427         compiled in an iterator method.
22428
22429         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22430         internal modifier, and we just use it to avoid adding extra
22431         fields, as this is seldom used.  
22432
22433         * cs-parser.jay: Add yield_statement (yield and yield break).
22434
22435         * driver.cs: New flag -v2 to turn on version 2 features. 
22436
22437         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22438         hashtable when v2 is enabled.
22439
22440 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22441
22442         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22443         there is already a namespace defined with this name.
22444
22445         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22446         people upgraded their corlibs.
22447
22448         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22449         always use fully qualified types, no need to use the compiler
22450         front end.
22451
22452         (TypeManager.IsNamespace): Use binarysearch.
22453
22454         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22455         AddDelegate): I did not quite use the new IsValid API properly: I
22456         have to pass the short-name and the fullname.  I was passing only
22457         the basename instead of the fullname sometimes. 
22458
22459         (TypeContainer.DefineType): call NamespaceClash.
22460
22461         * interface.cs (Interface.DefineType): use NamespaceClash before
22462         defining the type.
22463
22464         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22465         defining the type.
22466
22467         * enum.cs: (Enum.DefineType): use NamespaceClash before
22468         defining the type.
22469
22470         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22471         speed increase.  First, use the negative_hits cache when we get a
22472         negative.  Second, add the type with its full original name
22473         instead of the new . and + encoded name (reflection uses + to
22474         separate type from a nested type).  Use LookupTypeReflection
22475         directly which bypasses the type->name hashtable (that we already
22476         know does not contain the type.
22477
22478         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22479         location/container type. 
22480
22481         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22482
22483 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22484
22485         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22486
22487         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22488         method is being referenced in the method group from a static
22489         context, and report error 120 if so.
22490
22491         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22492         Error118. 
22493
22494         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22495         is created, we create the A namespace).
22496
22497         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22498         Fixes #41591
22499
22500 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22501
22502         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22503         invocation to ModuleBuilder.GetType with the same values will
22504         return a new type instance, so we need to cache its return
22505         values. 
22506
22507         * expression.cs (Binary.ResolveOperator): Only allow the compare
22508         operators on enums if they are of the same type.
22509
22510         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22511         types of ValueType on their own case.  Before we were giving them
22512         the same treatment as objects.
22513
22514         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22515         fullname.  Short name is used to compare against container name.
22516         Fullname is used to check against defined namespace names.
22517
22518         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22519         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22520
22521         (Method.CheckBase): Call parent.
22522         (MemberBase.CheckBase): Check for protected members on sealed
22523         classes.
22524         (PropertyBase.CheckBase): Call parent.
22525         (Field.Define): Call parent.
22526
22527         * report.cs: Negative error codes are now mapped to 8000 - code,
22528         so that the display is render more nicely.
22529
22530         * typemanager.cs: Do not use try/catch, instead report a regular
22531         error. 
22532
22533         (GetPointerType, GetReferenceType): These methods provide
22534         mechanisms to obtain the T* and T& from a T.  We had the code
22535         previously scattered around the code base, and it also used
22536         TypeManager.LookupType that would go through plenty of caches.
22537         This one goes directly to the type source.
22538
22539         In some places we did the Type.GetType followed by
22540         ModuleBuilder.GetType, but not in others, so this unifies the
22541         processing as well.
22542
22543         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22544         statements now that we have namespace information.
22545
22546         * typemanager.cs (IsNamespace): New method, returns whether the
22547         string presented is a namespace or not.
22548
22549         (ComputeNamespaces): New public entry point, computes the list of
22550         available namespaces, using the GetNamespaces API call in Mono, or
22551         the slower version in MS.NET.   
22552
22553         Now before we start the semantic analysis phase, we have a
22554         complete list of namespaces including everything that the user has
22555         provided.
22556
22557         Deleted old code to cache namespaces in .nsc files.
22558
22559 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22560
22561         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22562         class/struct location definition Location for the implicit
22563         constructor location.
22564
22565         (Operator.Define): Use the location of the operator for the
22566         implicit Method definition.
22567
22568         (Constructor.Emit): use the constructor location for the implicit
22569         base initializer constructor.
22570
22571         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22572         and the Expression class now contains two new methods:
22573
22574         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22575         isolate type lookup from the rest of the resolution process.
22576
22577         Since we use Expressions to hold type definitions due to the way
22578         we parse the input we have historically overloaded Resolve to
22579         perform the Type lookups if a special flag is passed.  Now this is
22580         eliminated and two methods take their place. 
22581
22582         The differences in the two methods between xStep and xTerminal is
22583         that xStep is involved in our current lookup system that uses
22584         SimpleNames to compose a name, while xTerminal is used just to
22585         catch the case where the simplename lookup failed.
22586
22587 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22588
22589         * expression.cs (ResolveMemberAccess): Remove redundant code.
22590         TypeExpr expressions are always born fully resolved.
22591
22592         * interface.cs (PopulateMethod): Do not lookup the types twice.
22593         We were doing it once during SemanticAnalysis and once during
22594         PopulateMethod.
22595
22596         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22597         in local variable type definitions, were being returned as a
22598         SimpleName (we decomposed everything into a string), that is
22599         because primary_expression was being used instead of a type in the
22600         grammar (reduce/reduce conflicts).
22601
22602         The part that was wrong is that we converted the expression into a
22603         string (an oversimplification in one hand, compounded with primary
22604         expressions doing string concatenation).
22605
22606         So things like:
22607
22608         A.B.C [] x;
22609
22610         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22611         using clauses from working on this particular context.  And a type
22612         was being matched directly against "A.B.C[]".
22613
22614         We now use the correct approach, and allow for ComposedCast to be
22615         part of the unary expression.  So the "A.B.C []" become a composed
22616         cast of "A.B.C" (as a nested group of MemberAccess with a
22617         SimpleName at the end) plus the rank composition "[]". 
22618
22619         Also fixes 35567
22620
22621 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22622
22623         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22624         for the access level checking.
22625
22626         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22627         `TypeContainer container', because I kept getting confused when I
22628         was debugging this code.
22629
22630         * expression.cs (Indexers): Instead of tracking getters/setters,
22631         we now track them in parallel.  We create one arraylist less, but
22632         most importantly it is possible now for the LValue code to find a
22633         matching get for a set.
22634
22635         (IndexerAccess.DoResolveLValue): Update the code.
22636         GetIndexersForType has been modified already to extract all the
22637         indexers from a type.  The code assumed it did not.
22638
22639         Also make the code set the correct return type for the indexer.
22640         This was fixed a long time ago for properties, but was missing for
22641         indexers.  It used to be void_type.
22642
22643         (Binary.Emit): Test first for doubles instead of
22644         floats, as they are more common.
22645
22646         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22647         when dealing with floats and the <=, >= operators.  This fixes bug
22648         #39314 
22649
22650         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22651         to load the array value by emitting a load on the foreach variable
22652         type.  This was incorrect.  
22653
22654         We now emit the code to load an element using the the array
22655         variable type, and then we emit the conversion operator.
22656
22657         Fixed #40176
22658
22659 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22660
22661         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22662
22663 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22664
22665         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22666         test for protection before we test for signatures. 
22667
22668         (MethodSignature.ToString): implement.
22669
22670         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22671         to the case where we reduced into a LongConstant.
22672
22673         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22674         depend on whether the information is acurrate, because the
22675         Microsoft runtime will always claim that the array type is public,
22676         regardless of the real state.
22677
22678         If the type is a pointer, another problem happens: the type is
22679         reported as non-public in Microsoft.  
22680
22681         In both cases we have to call CheckAccessLevel recursively with
22682         the underlying type as the argument to be tested.
22683
22684 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22685
22686         * assign.cs (Assign.Emit): If we are dealing with a compound
22687         assignment expression, we should use the code path that stores the
22688         intermediate result in a temporary value.  This fixes #40903.
22689
22690         *expression.cs (Indirection.ToString): Provide ToString method for
22691         debugging. 
22692
22693 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
22694
22695         * class.cs: Null out fields holding references to Block objects so
22696         they can be garbage collected.
22697
22698         * expression.cs (OverloadResolve): Remove unused local.
22699
22700 2003-04-07  Martin Baulig  <martin@ximian.com>
22701
22702         * codegen.cs (EmitContext.CurrentFile): New public field.
22703         (EmitContext.Mark): Use the CurrentFile to check whether the
22704         location is in the correct file.
22705         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
22706
22707 2003-04-07  Martin Baulig  <martin@ximian.com>
22708
22709         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
22710
22711         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
22712         location.  [FIXME: The location argument which gets passed to this
22713         method is sometimes wrong!]
22714
22715 2003-04-07  Nick Drochak <ndrochak@gol.com>
22716
22717         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
22718
22719 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
22720
22721         * expression.cs (Indirection.EmitAssign): We were using the
22722         temporary, but returning immediately instead of continuing the
22723         EmitAssing flow.
22724
22725 2003-04-06  Martin Baulig  <martin@ximian.com>
22726
22727         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
22728         if it's a nested child, but also deriving from the outer class.
22729         See test 190.cs.
22730
22731         * typemanager.cs (IsNestedChildOf): Make this work if it's a
22732         nested child, but also deriving from the outer class.  See
22733         test-190.cs.
22734         (FilterWithClosure): We may access private members of the outer
22735         class if we're a nested child and deriving from the outer class.
22736         (RealMemberLookup): Only set `closure_private_ok' if the
22737         `original_bf' contained BindingFlags.NonPublic.
22738
22739 2003-04-05  Martin Baulig  <martin@ximian.com>
22740
22741         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
22742
22743 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
22744
22745         * class.cs (Event.Define): Do not allow abstract events to have
22746         initializers. 
22747
22748 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
22749
22750         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
22751         block in event declarations.
22752
22753         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
22754         value type, get its address.
22755
22756         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
22757         leaving a class on the stack instead of a boolean value (int
22758         0/1).  Change the code so we compare against null, and then the
22759         result against zero.
22760
22761         * class.cs (TypeContainer.GetClassBases): We were checking for the
22762         parent class being sealed too late.
22763
22764         * expression.cs (Binary.Emit): For <= and >= when dealing with
22765         floating point values, use cgt.un and clt.un instead of cgt and
22766         clt alone.
22767
22768 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
22769
22770         * statement.cs: Apply the same optimization as MS: skip the 
22771         GetEnumerator returning an IEnumerator, and use the one returning a 
22772         CharEnumerator instead. This allows us to avoid the try-finally block 
22773         and the boxing.
22774
22775 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
22776
22777         * cs-parser.jay: Attributes cannot be applied to
22778                          namespaces. Fixes #40473
22779
22780 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22781
22782         * class.cs:
22783         (Add*): check if the name is valid using the full name for constants,
22784         fields, properties and events.
22785
22786 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
22787
22788         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
22789         char constants to be part of the enumeration.
22790
22791         * expression.cs (Conditional.DoResolve): Add support for operator
22792         true. Implements the missing functionality from 14.12
22793
22794         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
22795         operator true/false as required by the spec.
22796
22797         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
22798         implicit conversion to boolean.
22799
22800         * statement.cs (Statement.ResolveBoolean): A boolean expression is
22801         also one where the type implements `operator true'. 
22802
22803         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
22804         get an expression that will invoke operator true based on an
22805         expression.  
22806
22807         (GetConversionOperators): Removed the hack that called op_True
22808         here.  
22809
22810         (Expression.ResolveBoolean): Move this from Statement.
22811
22812 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
22813
22814         * ecore.cs (FieldExpr): do not allow initialization of initonly
22815         fields on derived classes
22816
22817 2003-03-13  Martin Baulig  <martin@ximian.com>
22818
22819         * statement.cs (Block.Emit): Call ig.BeginScope() and
22820         ig.EndScope() when compiling with debugging info; call
22821         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
22822
22823 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
22824
22825         * expression.cs (Indexers): Do not construct immediately, allow
22826         for new members to be appended as we go.  Fixes 38143
22827
22828 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22829
22830         * expression.cs: save/restore context when resolving an unchecked
22831         expression.
22832
22833 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
22834
22835         * cfold.cs: Catch division by zero in modulus operator during
22836         constant folding.
22837
22838 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
22839
22840         * interface.cs (Interface.DefineMembers): Avoid defining members
22841         twice. 
22842
22843 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
22844
22845         * driver.cs: handle the +/- options for -noconfig
22846
22847         * statement.cs (Unckeched.Resolve): Also track the state of
22848         unchecked in the Resolve phase.
22849
22850 2003-02-27  Martin Baulig  <martin@ximian.com>
22851
22852         * ecore.cs (Expression.MemberLookup): Don't create a
22853         MethodGroupExpr for something which is not a method.  Fixes #38291.
22854
22855 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
22856
22857         * class.cs (MemberBase.CheckParameters): Also check that the type
22858         is unmanaged if it is a pointer.
22859
22860         * expression.cs (SizeOf.Resolve): Add location information.
22861
22862         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
22863         a managed type is declared.
22864
22865         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
22866         parameter modifiers as well.  Fixes bug 38606
22867
22868         * class.cs: Very sad.  Am backing out the speed up changes
22869         introduced by the ArrayList -> Array in the TypeContainer, as they
22870         were not actually that much faster, and introduced a bug (no error
22871         reports on duplicated methods).
22872
22873         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
22874         source first, this will guarantee that we have a valid expression
22875         before calling in lower levels functions that will require a
22876         resolved object.  Then use this original_source in the
22877         target.ResolveLValue instead of the original source that was
22878         passed to us.
22879
22880         Another change.  Use target.Resolve instead of LValueResolve.
22881         Although we are resolving for LValues, we will let the Assign code
22882         take care of that (it will be called again from Resolve).  This
22883         basically allows code like this:
22884
22885         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
22886         class Y { void A (X x) { x [0] += o; }
22887
22888         The problem was that the indexer was trying to resolve for
22889         set_Item (idx, object o) and never finding one.  The real set_Item
22890         was set_Item (idx, X).  By delaying the process we get the right
22891         semantics. 
22892
22893         Fixes bug 36505
22894
22895 2003-02-23  Martin Baulig  <martin@ximian.com>
22896
22897         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
22898         while calling DoEmit ().
22899
22900         * codegen.cs (EmitContext.Mark): Don't mark locations in other
22901         source files; if you use the #line directive inside a method, the
22902         compiler stops emitting line numbers for the debugger until it
22903         reaches the end of the method or another #line directive which
22904         restores the original file.
22905
22906 2003-02-23  Martin Baulig  <martin@ximian.com>
22907
22908         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
22909
22910 2003-02-23  Martin Baulig  <martin@ximian.com>
22911
22912         * statement.cs (Block.AddChildVariableNames): We need to call this
22913         recursively, not just for our immediate children.
22914
22915 2003-02-23  Martin Baulig  <martin@ximian.com>
22916
22917         * class.cs (Event.Define): Always make the field private, like csc does.
22918
22919         * typemanager.cs (TypeManager.RealMemberLookup): Make events
22920         actually work, fixes bug #37521.
22921
22922 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
22923
22924         * delegate.cs: When creating the various temporary "Parameters"
22925         classes, make sure that we call the ComputeAndDefineParameterTypes
22926         on those new parameters (just like we do with the formal ones), to
22927         allow them to be resolved in the context of the DeclSpace.
22928
22929         This fixes the bug that Dick observed in Bugzilla #38530.
22930
22931 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
22932
22933         * expression.cs (ResolveMemberAccess): When resolving a constant,
22934         do not attempt to pull a constant if the value was not able to
22935         generate a valid constant.
22936
22937         * const.cs (LookupConstantValue): Do not report more errors than required.
22938
22939 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22940
22941         * expression.cs: fixes bug #38328.
22942
22943 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22944
22945         * class.cs: Changed all the various members that can be part of a
22946         class from being an ArrayList to be an Array of the right type.
22947         During the DefineType type_list, interface_list, delegate_list and
22948         enum_list are turned into types, interfaces, delegates and enums
22949         arrays.  
22950
22951         And during the member population, indexer_list, event_list,
22952         constant_list, field_list, instance_constructor_list, method_list,
22953         operator_list and property_list are turned into their real arrays.
22954
22955         Although we could probably perform this operation earlier, for
22956         good error reporting we need to keep the lists and remove the
22957         lists for longer than required.
22958
22959         This optimization was triggered by Paolo profiling the compiler
22960         speed on the output of `gen-sample-program.pl' perl script. 
22961
22962         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
22963         not crash in methods like MemberLookupFailed that use this field.  
22964
22965         This problem arises when the compiler fails to resolve a type
22966         during interface type definition for example.
22967
22968 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22969
22970         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
22971         inherit from System.Object, so we have to stop at null, not only
22972         when reaching System.Object.
22973
22974 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
22975
22976         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
22977         DeclaredOnly because the parent indexer might have had a different
22978         name, but did not loop until the top of the hierarchy was reached.
22979
22980         The problem this one fixes is 35492: when a class implemented an
22981         indexer from an interface, we were getting the interface method
22982         (which was abstract) and we were flagging an error (can not invoke
22983         abstract method).
22984
22985         This also keeps bug 33089 functioning, and test-148 functioning.
22986
22987         * typemanager.cs (IsSpecialMethod): The correct way of figuring
22988         out if a method is special is to see if it is declared in a
22989         property or event, or whether it is one of the predefined operator
22990         names.   This should fix correctly #36804.
22991
22992 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
22993
22994         The goal here is to remove the dependency on EmptyCast.Peel ().
22995         Killing it completely.
22996
22997         The problem is that currently in a number of places where
22998         constants are expected, we have to "probe" for an EmptyCast, and
22999         Peel, which is not the correct thing to do, as this will be
23000         repetitive and will likely lead to errors. 
23001
23002         The idea is to remove any EmptyCasts that are used in casts that
23003         can be reduced to constants, so we only have to cope with
23004         constants. 
23005
23006         This bug hunt was triggered by Bug 37363 and the desire to remove
23007         the duplicate pattern where we were "peeling" emptycasts to check
23008         whether they were constants.  Now constants will always be
23009         constants.
23010
23011         * ecore.cs: Use an enumconstant here instead of wrapping with
23012         EmptyCast.  
23013
23014         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
23015         throwing me off.  By handling this we can get rid of a few hacks.
23016
23017         * statement.cs (Switch): Removed Peel() code.
23018
23019 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
23020
23021         * class.cs: Location information for error 508
23022
23023         * expression.cs (New.DoResolve): Add a guard against double
23024         resolution of an expression.  
23025
23026         The New DoResolve might be called twice when initializing field
23027         expressions (see EmitFieldInitializers, the call to
23028         GetInitializerExpression will perform a resolve on the expression,
23029         and later the assign will trigger another resolution
23030
23031         This leads to bugs (#37014)
23032
23033         * delegate.cs: The signature for EndInvoke should contain any ref
23034         or out parameters as well.  We were not doing this in the past. 
23035
23036         * class.cs (Field.Define): Do not overwrite the type definition
23037         inside the `volatile' group.  Turns out that volatile enumerations
23038         were changing the type here to perform a validity test, which
23039         broke conversions. 
23040
23041 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
23042
23043         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
23044         and structs, we do not want to load the instance variable
23045
23046         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
23047         enum_type has to be handled like an object reference (implicit
23048         conversions exists from this to object), but the regular IsClass
23049         and IsValueType tests will never return true for this one.
23050
23051         Also we use TypeManager.IsValueType instead of type.IsValueType,
23052         just for consistency with the rest of the code (this is only
23053         needed if we ever use the construct exposed by test-180.cs inside
23054         corlib, which we dont today).
23055
23056 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
23057
23058         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
23059         just InternalCall.
23060
23061 2003-02-09  Martin Baulig  <martin@ximian.com>
23062
23063         * namespace.cs (Namespace..ctor): Added SourceFile argument.
23064         (Namespace.DefineNamespaces): New static public method; this is
23065         called when we're compiling with debugging to add all namespaces
23066         to the symbol file.
23067
23068         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
23069         pass it to the Namespace's .ctor.
23070
23071         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
23072         and MethodBase arguments; pass the namespace ID to the symwriter;
23073         pass the MethodBase instead of the token to the symwriter.
23074         (SymbolWriter.DefineNamespace): New method to add a namespace to
23075         the symbol file.
23076
23077 2003-02-09  Martin Baulig  <martin@ximian.com>
23078
23079         * symbolwriter.cs: New file.  This is a wrapper around
23080         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
23081         methods here in near future.
23082
23083 2003-02-09  Martin Baulig  <martin@ximian.com>
23084
23085         * codegen.cs (EmitContext.Mark): Just pass the arguments to
23086         ILGenerator.MarkSequencePoint() which are actually used by the
23087         symbol writer.
23088
23089 2003-02-09  Martin Baulig  <martin@ximian.com>
23090
23091         * location.cs (SourceFile): New public sealed class.  This
23092         contains the name and an index which is used in the location's token.
23093         (Location): Reserve an appropriate number of bits in the token for
23094         the source file instead of walking over that list, this gives us a
23095         really huge performance improvement when compiling with debugging.
23096
23097         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23098         `SourceFile' argument instead of a string.
23099         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23100         but don't parse/tokenize here, we need to generate the list of all
23101         source files before we do that.
23102         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23103         the files.
23104
23105         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23106         instead of a string.
23107
23108         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23109         of a string.
23110
23111 2003-02-09  Martin Baulig  <martin@ximian.com>
23112
23113         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23114         filename on `#line default'.
23115
23116 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23117
23118         * statement.cs: don't clear the pinned var when the fixed statement
23119         returns from the method (fixes bug#37752).
23120
23121 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23122
23123         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23124         to IsValueType.
23125
23126 2003-02-07  Martin Baulig  <martin@ximian.com>
23127
23128         * driver.cs: Removed the `--debug-args' command line argument.
23129
23130         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23131         automatically by the AsssemblyBuilder.
23132         (CodeGen.InitializeSymbolWriter): We don't need to call any
23133         initialization function on the symbol writer anymore.  This method
23134         doesn't take any arguments.
23135
23136 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23137
23138         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23139         from referenced assemblies as well.
23140
23141 2003-02-02  Martin Baulig  <martin@ximian.com>
23142
23143         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23144
23145 2003-02-02  Martin Baulig  <martin@ximian.com>
23146
23147         * class.cs (Constructor.Emit): Open the symbol writer before
23148         emitting the constructor initializer.
23149         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23150         single-stepping through constructor initializers.
23151
23152 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23153
23154         * class.cs: Handle error 549: do not allow virtual methods in
23155         sealed classes. 
23156
23157 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23158
23159         * decl.cs: Check access levels when resolving types
23160
23161 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23162
23163         * statement.cs: Add parameters and locals set in catch blocks that might 
23164         return to set vector
23165
23166 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23167
23168         * class.cs (Operator): Set the SpecialName flags for operators.
23169
23170         * expression.cs (Invocation.DoResolve): Only block calls to
23171         accessors and operators on SpecialName methods.
23172
23173         (Cast.TryReduce): Handle conversions from char constants.
23174
23175
23176 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23177
23178         * statement.cs: small memory and time optimization in FlowBranching.
23179
23180 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23181
23182         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23183         problem that the last fix but in the other sid (Set).
23184
23185         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23186         access when there is no indexer in the hierarchy.
23187
23188 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23189
23190         * class.cs: Combine some if statements.
23191
23192 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23193
23194         * driver.cs: fixed bug #37187.
23195
23196 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23197
23198         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23199         any indexer, it's needed to build a list with all the indexers in the
23200         hierarchy (AllGetters), else we have problems. Fixes #35653.
23201
23202 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23203
23204         * class.cs (MethodData.Define): It is wrong for an interface
23205         implementation to be static in both cases: explicit and implicit.
23206         We were only handling this in one case.
23207
23208         Improve the if situation there to not have negations.
23209
23210         * class.cs (Field.Define): Turns out that we do not need to check
23211         the unsafe bit on field definition, only on usage.  Remove the test.
23212
23213 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23214
23215         * driver.cs: use assembly.Location instead of Codebase (the latest
23216         patch made mcs fail when using MS assemblies).
23217
23218 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23219
23220         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23221         get the path to *corlib.dll.
23222
23223 2003-01-21  Nick Drochak <ndrochak@gol.com>
23224
23225         * cs-tokenizer.cs:
23226         * pending.cs:
23227         * typemanager.cs: Remove compiler warnings
23228
23229 2003-01-20  Duncan Mak  <duncan@ximian.com>
23230
23231         * AssemblyInfo.cs: Bump the version number to 0.19.
23232
23233 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23234
23235         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23236
23237 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23238
23239         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23240
23241 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23242
23243         * cs-parser.jay: Small fix: we were not comparing the constructor
23244         name correctly.   Thanks to Zoltan for the initial pointer.
23245
23246 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23247
23248         * cs-tokenizer.cs: Set file name when specified with #line
23249
23250 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23251
23252         * cs-parser.jay: Only perform the constructor checks here if we
23253         are named like the class;  This will help provider a better
23254         error.  The constructor path is taken when a type definition is
23255         not found, but most likely the user forgot to add the type, so
23256         report that rather than the constructor error.
23257
23258 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23259
23260         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23261         allocations.
23262
23263 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23264
23265         * cs-parser.jay: Add cleanup call.
23266
23267 2003-01-13  Duncan Mak  <duncan@ximian.com>
23268
23269         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23270         consistent with other methods.
23271
23272 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23273
23274         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23275
23276 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23277
23278         * attribute.cs: only set GuidAttr to true when we have a
23279         GuidAttribute.
23280
23281 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23282
23283         * ecore.cs:
23284         * expression.cs:
23285         * typemanager.cs: fixes to allow mcs compile corlib with the new
23286         Type.IsSubclassOf fix.
23287
23288 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23289
23290         * expression.cs (LocalVariableReference.DoResolve): Classify a
23291         constant as a value, not as a variable.   Also, set the type for
23292         the variable.
23293
23294         * cs-parser.jay (fixed_statement): take a type instead of a
23295         pointer_type, so we can produce a better error message later.
23296
23297         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23298         as an error.  
23299
23300         (For.DoEmit): Make inifinite loops have a
23301         non-conditional branch back.
23302
23303         (Fixed.DoEmit): First populate the pinned variables, then emit the
23304         statement, then clear the variables.  Before I was emitting the
23305         code once for each fixed piece.
23306
23307
23308 2003-01-08  Martin Baulig  <martin@ximian.com>
23309
23310         * statement.cs (FlowBranching.MergeChild): A break in a
23311         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23312
23313 2003-01-08  Martin Baulig  <martin@ximian.com>
23314
23315         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23316         lives in the same number space than `param_map'.  Fixes #36154.
23317
23318 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23319
23320         * cs-parser.jay (constructor_declaration): Set the
23321         Constructor.ModFlags before probing for it.  This makes the
23322         compiler report 514, 515 and 132 (the code was there, but got
23323         broken). 
23324
23325         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23326         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23327         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23328
23329 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23330
23331         * enum.cs: create the enum static fields using the enum type.
23332
23333 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23334
23335         * class.cs: don't try to create the ParamBuilder for the return
23336         type if it's not needed (and handle it breaking for the ms runtime
23337         anyway).
23338
23339 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23340
23341         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23342
23343 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23344
23345         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23346         the command.   This showed up while compiling the JANET source
23347         code, which used \r as its only newline separator.
23348
23349 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23350
23351         * class.cs (Method.Define): If we are an operator (because it
23352         reuses our code), then set the SpecialName and HideBySig.  #36128
23353
23354 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23355
23356         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23357         exception, report error 120 `object reference required'.
23358
23359         * driver.cs: Add --pause option, used during to measure the size
23360         of the process as it goes with --timestamp.
23361
23362         * expression.cs (Invocation.DoResolve): Do not allow methods with
23363         SpecialName to be invoked.
23364
23365 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23366
23367         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23368         number before adding it.
23369
23370 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23371
23372         * ecore.cs (StandardImplicitConversion): When in an unsafe
23373         context, we allow conversion between void * to any other pointer
23374         type. This fixes bug #35973.
23375
23376 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23377
23378         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23379         is not thrown when extensionless outputs are used 
23380
23381 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23382
23383         * rootcontext.cs: fixed compilation of corlib.
23384
23385 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23386
23387         * attribute.cs (Attributes.Contains): Add new method.
23388
23389         * class.cs (MethodCore.LabelParameters): if the parameter is an
23390         `out' parameter, check that no attribute `[In]' has been passed.
23391
23392         * enum.cs: Handle the `value__' name in an enumeration.
23393
23394 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23395
23396         * decl.cs: Added special case to allow overrides on "protected
23397         internal" methods
23398
23399 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23400
23401         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23402         since it makes much more sense.
23403
23404         (Attributes.ctor): Don't require a Location parameter.
23405
23406         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23407
23408         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23409         since we already have that information per attribute.
23410
23411         * everywhere : make appropriate changes.
23412
23413         * class.cs (LabelParameters): Write the code which actually
23414         applies attributes to the return type. We can't do this on the MS
23415         .NET runtime so we flag a warning in the case an exception is
23416         thrown.
23417
23418 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23419
23420         * const.cs: Handle implicit null conversions here too.
23421
23422 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23423
23424         * class.cs (MethodCore.LabelParameters): Remove the extra
23425         Type [] parameter since it is completely unnecessary. Instead
23426         pass in the method's attributes so that we can extract
23427         the "return" attribute.
23428
23429 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23430
23431         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23432         of ignoring it and letting the compile continue.
23433
23434         * typemanager.cs (ChangeType): use an extra argument to return an
23435         error condition instead of throwing an exception.
23436
23437 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23438
23439         * expression.cs (Unary.TryReduce): mimic the code for the regular
23440         code path.  Perform an implicit cast in the cases where we can
23441         implicitly convert to one of the integral types, and then reduce
23442         based on that constant.   This fixes bug #35483.
23443
23444 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23445
23446         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23447
23448 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23449
23450         * namespace.cs: fixed bug #35489.
23451
23452 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23453
23454         * class.cs: Remove some dead code.
23455
23456         * cs-parser.jay: Estimate the number of methods needed
23457         (RootContext.MethodCount);
23458
23459         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23460         numbers instead of StringBuilders.
23461
23462         * support.cs (PtrHashtable): Add constructor with initial size;
23463         We can now reduce reallocations of the method table.
23464
23465 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23466
23467         * attribute.cs (ApplyAttributes): Keep track of the emitted
23468         attributes on a per-target basis. This fixes bug #35413.
23469
23470 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23471
23472         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23473         default to the Windows 1252 encoding.
23474
23475         (UnixParseOption): Support version, thanks to Alp for the missing
23476         pointer. 
23477
23478         * AssemblyInfo.cs: Add nice assembly information.
23479
23480         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23481         (bug 35169).
23482
23483         * cs-parser.jay: Allow a trailing comma before the close bracked
23484         in the attribute_section production.
23485
23486         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23487         address of the instance was being taken, I will take this out,
23488         because we take the address of the object immediately here.
23489
23490 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23491
23492         * typemanager.cs (AreMultipleAllowed): Take care of the most
23493         obvious case where attribute type is not in the current assembly -
23494         stupid me ;-)
23495
23496 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23497
23498         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23499         definitions, instead of doing that afterwards.  
23500
23501         Also we use a nice little hack, depending on the constructor, we
23502         know if we are a "composed" name or a simple name.  Hence, we
23503         avoid the IndexOf test, and we avoid 
23504
23505         * codegen.cs: Add code to assist in a bug reporter to track down
23506         the source of a compiler crash. 
23507
23508 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23509
23510         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23511         types have been emitted for a given element and flag an error
23512         if something which does not have AllowMultiple set is used more
23513         than once.
23514
23515         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23516         attribute types and their corresponding AllowMultiple properties
23517
23518         (AreMultipleAllowed): Check the property for a given type.
23519
23520         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23521         property in the case we have a TypeContainer.
23522
23523         (Attributes.AddAttribute): Detect duplicates and just skip on
23524         adding them. This trivial fix catches a pretty gross error in our
23525         attribute emission - global attributes were being emitted twice!
23526
23527         Bugzilla bug #33187 is now fixed.
23528
23529 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23530
23531         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23532         instead of pp_and).
23533
23534         * expression.cs (Binary.ResolveOperator): I can only use the
23535         Concat (string, string, string) and Concat (string, string,
23536         string, string) if the child is actually a concatenation of
23537         strings. 
23538
23539 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23540
23541         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23542         context where we need a 2-character lookahead.
23543
23544         * pending.cs (PendingImplementation): Rework so we can keep track
23545         of interface types all the time, and flag those which were
23546         implemented by parents as optional.
23547
23548 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23549
23550         * expression.cs (Binary.ResolveOperator): Use
23551         String.Concat(string,string,string) or
23552         String.Concat(string,string,string,string) when possible. 
23553
23554         * typemanager: More helper methods.
23555
23556
23557 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23558
23559         * pending.cs: remove the bogus return from GetMissingInterfaces()
23560         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23561
23562 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23563
23564         * namespace.cs: avoid duplicated 'using xxx' being added to
23565         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23566         when we get more than one 'using' statement for the same namespace.
23567         Report a CS0105 warning for it.
23568
23569 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23570
23571         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23572         of calling getChar/putback, uses internal knowledge of it.    
23573
23574         (xtoken): Reorder tokenizer so most common patterns are checked
23575         first.  This reduces the compilation time in another 5% (from 8.11s
23576         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23577
23578         The parsing time is 22% of the compilation in mcs, and from that
23579         64% is spent on the tokenization process.  
23580
23581         I tried using a binary search for keywords, but this is slower
23582         than the hashtable.  Another option would be to do a couple of
23583         things:
23584
23585                 * Not use a StringBuilder, instead use an array of chars,
23586                   with a set value.  Notice that this way we could catch
23587                   the 645 error without having to do it *afterwards*.
23588
23589                 * We could write a hand-parser to avoid the hashtable
23590                   compares altogether.
23591
23592         The identifier consumption process takes 37% of the tokenization
23593         time.  Another 15% is spent on is_number.  56% of the time spent
23594         on is_number is spent on Int64.Parse:
23595
23596                 * We could probably choose based on the string length to
23597                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23598                   computations. 
23599
23600         Another 3% is spend on wrapping `xtoken' in the `token' function.
23601
23602         Handle 0xa0 as whitespace (#34752)
23603
23604 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23605
23606         * typemanager.cs (IsCLRType): New routine to tell whether a type
23607         is one of the builtin types.  
23608
23609         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23610         typecode in more places instead of doing pointer comparissions.
23611         We could leverage some knowledge about the way the typecodes are
23612         laid out.
23613
23614         New code to cache namespaces in assemblies, it is currently not
23615         invoked, to be used soon.
23616
23617         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23618
23619         * expression.cs (Binary.ResolveOperator): specially handle
23620         strings, and do not perform user-defined operator overloading for
23621         built-in types.
23622
23623 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23624
23625         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23626         internalcall as it is a pretty simple operation;  Avoid whenever
23627         possible to call Char.IsLetter.
23628
23629         (consume_identifier): Cut by half the number of
23630         hashtable calls by merging the is_keyword and GetKeyword behavior.
23631
23632         Do not short-circuit, because if we do, we
23633         report errors (ie, #if false && true would produce an invalid
23634         directive error);
23635
23636
23637 2002-11-24  Martin Baulig  <martin@ximian.com>
23638
23639         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23640         check constant ranges and report a CS0221.  Fixes #33186.
23641
23642 2002-11-24  Martin Baulig  <martin@ximian.com>
23643
23644         * cs-parser.jay: Make this work for uninitialized variable
23645         declarations in the `for' initializer.  Fixes #32416.
23646
23647 2002-11-24  Martin Baulig  <martin@ximian.com>
23648
23649         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23650         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23651
23652 2002-11-24  Martin Baulig  <martin@ximian.com>
23653
23654         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23655         argument; if true, we also check for user-defined conversions.
23656         This is only needed if both arguments are of a user-defined type.
23657         Fixes #30443, added test-175.cs.
23658         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23659
23660         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23661
23662 2002-11-24  Martin Baulig  <martin@ximian.com>
23663
23664         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23665         function to get the store opcode.
23666         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23667         only emit the Ldelema if the store opcode is Stobj.  You must run
23668         both test-34 and test-167 to test this.  Fixes #34529.
23669
23670 2002-11-23  Martin Baulig  <martin@ximian.com>
23671
23672         * ecore.cs (Expression.MemberLookup): Added additional
23673         `qualifier_type' argument which is used when we're being called
23674         from MemberAccess.DoResolve() and null if we're called from a
23675         SimpleName lookup.
23676         (Expression.MemberLookupFailed): New method to report errors; this
23677         does the CS1540 check and reports the correct error message.
23678
23679         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23680         argument for the CS1540 check and redone the way how we're dealing
23681         with private members.  See the comment in the source code for details.
23682         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23683         `closure_start_type' to `closure_qualifier_type' and check whether
23684         it's not null.  It was not this filter being broken, it was just
23685         being called with the wrong arguments.
23686
23687         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
23688         and pass it the correct `qualifier_type'; this also does the error
23689         handling for us.
23690
23691 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
23692
23693         * expression.cs (Invocation.EmitParams): If the we are dealing
23694         with a non-built-in value type, load its address as well.
23695
23696         (ArrayCreation): Use a a pretty constant instead
23697         of the hardcoded value 2.   Use 6 instead of 2 for the number of
23698         static initializers.  
23699
23700         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
23701         because they are not really value types, just glorified integers. 
23702
23703         * driver.cs: Do not append .exe, the CSC compiler does not do it.
23704
23705         * ecore.cs: Remove redundant code for enumerations, make them use
23706         the same code path as everything else, fixes the casting issue
23707         with enumerations in Windows.Forms.
23708
23709         * attribute.cs: Do only cast to string if it is a string, the
23710         validation happens later.
23711
23712         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
23713         people upgrade their corlibs.
23714
23715         * ecore.cs: Oops, enumerations were not following the entire code path
23716
23717 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
23718
23719         * typemanager.cs (FilterWithClosure): Commented out the test for
23720         1540 in typemanager.cs, as it has problems when accessing
23721         protected methods from a parent class (see test-174.cs). 
23722
23723         * attribute.cs (Attribute.ValidateGuid): new method.
23724         (Attribute.Resolve): Use above.
23725
23726 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
23727
23728         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
23729
23730         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
23731         handling for enumerations, as we only needed the TypeContainer
23732         functionality to begin with (this is required for the fix below to
23733         work for enums that reference constants in a container class for
23734         example). 
23735
23736         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
23737
23738         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
23739         a valid TypeBuilder to perform lookups on.o
23740
23741         * class.cs (InheritableMemberSignatureCompare): Use true in the
23742         call to GetGetMethod and GetSetMethod, because we are comparing
23743         the signature, and we need to get the methods *even* if they are
23744         private. 
23745
23746         (PropertyBase.CheckBase): ditto.
23747
23748         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
23749         GotoCase.Resolve): Use Peel on EmpytCasts.
23750
23751         * ecore.cs (EmptyCast): drop child, add Peel method.
23752
23753 2002-11-17  Martin Baulig  <martin@ximian.com>
23754
23755         * ecore.cs (EmptyCast.Child): New public property.
23756
23757         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
23758         label resolved to an EmptyCast.  Fixes #34162.
23759         (GotoCase.Resolve): Likewise.
23760         (Block.EmitMeta): Likewise.
23761
23762 2002-11-17  Martin Baulig  <martin@ximian.com>
23763
23764         * expression.cs (Invocation.BetterConversion): Prefer int over
23765         uint; short over ushort; long over ulong for integer literals.
23766         Use ImplicitConversionExists instead of StandardConversionExists
23767         since we also need to check for user-defined implicit conversions.
23768         Fixes #34165.  Added test-173.cs.
23769
23770 2002-11-16  Martin Baulig  <martin@ximian.com>
23771
23772         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
23773         with the `true' and `false' literals.  Fixes #33151.
23774
23775 2002-11-16  Martin Baulig  <martin@ximian.com>
23776
23777         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
23778         October 22nd; don't do the cs1540 check for static members.
23779
23780         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
23781         now using our own filter here and doing the cs1540 check again.
23782
23783 2002-11-16  Martin Baulig  <martin@ximian.com>
23784
23785         * support.cs (InternalParameters): Don't crash if we don't have
23786         any fixed parameters.  Fixes #33532.
23787
23788 2002-11-16  Martin Baulig  <martin@ximian.com>
23789
23790         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
23791         when looking up static methods to make this work on Windows.
23792         Fixes #33773.
23793
23794 2002-11-16  Martin Baulig  <martin@ximian.com>
23795
23796         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
23797         a setter rather than using PropertyInfo.CanWrite.
23798
23799 2002-11-15  Nick Drochak  <ndrochak@gol.com>
23800
23801         * class.cs: Allow acces to block member by subclasses. Fixes build
23802         breaker.
23803
23804 2002-11-14  Martin Baulig  <martin@ximian.com>
23805
23806         * class.cs (Constructor.Emit): Added the extern/block check.
23807         Fixes bug #33678.
23808
23809 2002-11-14  Martin Baulig  <martin@ximian.com>
23810
23811         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
23812         iteration while looking for indexers, this is needed because the
23813         indexer may have a different name in our base classes.  Fixed the
23814         error reporting (no indexers at all, not get accessor, no
23815         overloaded match).  Fixes bug #33089.
23816         (IndexerAccess.DoResolveLValue): Likewise.
23817
23818 2002-11-14  Martin Baulig  <martin@ximian.com>
23819
23820         * class.cs (PropertyBase.CheckBase): Make this work for multiple
23821         indexers.  Fixes the first part of bug #33089.
23822         (MethodSignature.InheritableMemberSignatureCompare): Added support
23823         for properties.
23824
23825 2002-11-13  Ravi Pratap  <ravi@ximian.com>
23826
23827         * attribute.cs (Attribute.Resolve): Catch the
23828         NullReferenceException and report it since it isn't supposed to
23829         happen. 
23830
23831 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
23832
23833         * expression.cs (Binary.EmitBranchable): Also handle the cases for
23834         LogicalOr and LogicalAnd that can benefit from recursively
23835         handling EmitBranchable.  The code now should be nice for Paolo.
23836
23837 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
23838
23839         * typemanager.cs (LookupType): Added a negative-hit hashtable for
23840         the Type lookups, as we perform quite a number of lookups on
23841         non-Types.  This can be removed once we can deterministically tell
23842         whether we have a type or a namespace in advance.
23843
23844         But this might require special hacks from our corlib.
23845
23846         * TODO: updated.
23847
23848         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
23849         and double which avoids a conversion from an integer to a double.
23850
23851         * expression.cs: tiny optimization, avoid calling IsConstant,
23852         because it effectively performs the lookup twice.
23853
23854 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
23855
23856         But a bogus return here to keep the semantics of the old code
23857         until the Mono runtime is fixed.
23858
23859         * pending.cs (GetMissingInterfaces): New method used to remove all
23860         the interfaces that are already implemented by our parent
23861         classes from the list of pending methods. 
23862
23863         * interface.cs: Add checks for calls after ResolveTypeExpr.
23864
23865 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
23866
23867         * class.cs (Class.Emit): Report warning 67: event not used if the
23868         warning level is beyond 3.
23869
23870         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
23871         being a NullLiteral.
23872
23873         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
23874         specifiers. 
23875
23876         * class.cs (TypeContainer.GetClassBases): Cover a missing code
23877         path that might fail if a type can not be resolved.
23878
23879         * expression.cs (Binary.Emit): Emit unsigned versions of the
23880         operators. 
23881
23882         * driver.cs: use error 5.
23883
23884 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23885
23886         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
23887
23888 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
23889
23890         * cs-parser.jay (switch_section): A beautiful patch from Martin
23891         Baulig that fixed 33094.
23892
23893 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
23894
23895         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
23896         Check whether the base is abstract and report an error if so.
23897
23898         * expression.cs (IndexerAccess.DoResolveLValue,
23899         IndexerAccess.DoResolve): ditto. 
23900
23901         (Invocation.DoResolve): ditto.
23902
23903         (Invocation.FullMethodDesc): Improve the report string.
23904
23905         * statement.cs (Block): Eliminate IsVariableDefined as it is
23906         basically just a wrapper for GetVariableInfo.
23907
23908         * ecore.cs (SimpleName): Use new 
23909
23910         * support.cs (ReflectionParamter.ParameterType): We unwrap the
23911         type, as we return the actual parameter ref/unref state on a
23912         different call.
23913
23914 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
23915
23916         * support.cs: Return proper flags REF/OUT fixing the previous
23917         commit.  
23918
23919         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
23920         not used to mean `ref' but `ref or out' in ParameterReference
23921
23922         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
23923         full type signature instead of calling TypeManger.CSharpName
23924         ourselves. 
23925
23926         * support.cs (InternalParameters.ParameterDesc): Do not compare
23927         directly to the modflags, because REF/OUT will actually be bitsets
23928         if set. 
23929
23930         * delegate.cs (VerifyMethod): Check also the modifiers.
23931
23932         * cs-tokenizer.cs: Fix bug where floating point values with an
23933         exponent where a sign was missing was ignored.
23934
23935         * driver.cs: Allow multiple assemblies to be specified in a single
23936         /r: argument
23937
23938 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
23939
23940         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
23941         because identifiers after a parenthesis would end up in this kind
23942         of production, and we needed to desamiguate it for having casts
23943         like:
23944
23945                 (UserDefinedType *) xxx
23946
23947 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
23948
23949         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
23950         we should set on the Bindingflags.NonPublic, but not turn on
23951         private_ok.  private_ok controls whether a Private member is
23952         returned (this is chekced on the filter routine), while the
23953         BindingFlags.NonPublic just controls whether private/protected
23954         will be allowed.   This fixes the problem part of the problem of
23955         private properties being allowed to be used in derived classes.
23956
23957         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
23958         so we can call the children DoResolveLValue method (this will
23959         properly signal errors on lvalue assignments to base properties)
23960
23961         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
23962         getter are null, and we have a property info, we know that this
23963         happened because the lookup failed, so we report an error 122 for
23964         protection level violation.
23965
23966         We also silently return if setter and getter are null in the
23967         resolve functions, this condition only happens if we have flagged
23968         the error before.  This is the other half of the problem. 
23969
23970         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
23971         not have accessibility information, that is why we were returning
23972         true in the filter function in typemanager.cs.
23973
23974         To properly report 122 (property is inaccessible because of its
23975         protection level) correctly, we report this error in ResolveAccess
23976         by failing if both the setter and the getter are lacking (ie, the
23977         lookup failed). 
23978
23979         DoResolve and DoLResolve have been modified to check for both
23980         setter/getter being null and returning silently, the reason being
23981         that I did not want to put the knowledge about this error in upper
23982         layers, like:
23983
23984         int old = Report.Errors;
23985         x = new PropertyExpr (...);
23986         if (old != Report.Errors)
23987                 return null;
23988         else
23989                 return x;
23990
23991         So the property expr is returned, but it is invalid, so the error
23992         will be flagged during the resolve process. 
23993
23994         * class.cs: Remove InheritablePropertySignatureCompare from the
23995         class, as we no longer depend on the property signature to compute
23996         whether it is possible to implement a method or not.
23997
23998         The reason is that calling PropertyInfo.GetGetMethod will return
23999         null (in .NET, in Mono it works, and we should change this), in
24000         cases where the Get Method does not exist in that particular
24001         class.
24002
24003         So this code:
24004
24005         class X { public virtual int A { get { return 1; } } }
24006         class Y : X { }
24007         class Z : Y { public override int A { get { return 2; } } }
24008
24009         Would fail in Z because the parent (Y) would not have the property
24010         defined.  So we avoid this completely now (because the alternative
24011         fix was ugly and slow), and we now depend exclusively on the
24012         method names.
24013
24014         (PropertyBase.CheckBase): Use a method-base mechanism to find our
24015         reference method, instead of using the property.
24016
24017         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
24018         routines are gone now.
24019
24020         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
24021         names, they were incorrectly named.
24022
24023         * cs-tokenizer.cs: Return are more gentle token on failure. 
24024
24025         * pending.cs (PendingImplementation.InterfaceMethod): This routine
24026         had an out-of-sync index variable, which caused it to remove from
24027         the list of pending methods the wrong method sometimes.
24028
24029 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
24030
24031         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
24032         CanWrite, because those refer to this particular instance of the
24033         property, and do not take into account the fact that we can
24034         override single members of a property.
24035
24036         Constructor requires an EmitContext.  The resolution process does
24037         not happen here, but we need to compute the accessors before,
24038         because the resolution does not always happen for properties.
24039
24040         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
24041         subclass, before we did not update this flag, but we did update
24042         bindingflags. 
24043
24044         (GetAccessors): Drop this routine, as it did not work in the
24045         presence of partially overwritten set/get methods. 
24046
24047         Notice that this broke the cs1540 detection, but that will require
24048         more thinking. 
24049
24050 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24051
24052         * class.cs:
24053         * codegen.cs:
24054         * driver.cs: issue a warning instead of an error if we don't support
24055         debugging for the platform. Also ignore a couple of errors that may
24056         arise when trying to write the symbols. Undo my previous patch.
24057
24058 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24059
24060         * driver.cs: ignore /debug switch except for Unix platforms.
24061
24062 2002-10-23  Nick Drochak  <ndrochak@gol.com>
24063
24064         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
24065
24066 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
24067
24068         * driver.cs: Do not make mcs-debug conditional, so we do not break
24069         builds that use it.
24070
24071         * statement.cs (UsageVector.MergeChildren): I would like Martin to
24072         review this patch.  But basically after all the children variables
24073         have been merged, the value of "Breaks" was not being set to
24074         new_breaks for Switch blocks.  I think that it should be set after
24075         it has executed.  Currently I set this to the value of new_breaks,
24076         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
24077         conservative, but I do not understand this code very well.
24078
24079         I did not break anything in the build, so that is good ;-)
24080
24081         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
24082
24083 2002-10-20  Mark Crichton  <crichton@gimp.org>
24084
24085         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
24086
24087 2002-10-20  Nick Drochak  <ndrochak@gol.com>
24088
24089         * cfold.cs: Fixed compile blocker.
24090
24091 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
24092
24093         * driver.cs: I was chekcing the key, not the file.
24094
24095 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24096
24097         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24098         message that we were generating - we just need to silently return
24099         a null.
24100
24101 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24102
24103         * class.cs (Event.Define): Change my previous commit, as this
24104         breaks the debugger.  This is a temporary hack, as it seems like
24105         the compiler is generating events incorrectly to begin with.
24106
24107         * expression.cs (Binary.ResolveOperator): Added support for 
24108         "U operator - (E x, E y)"
24109
24110         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24111         y)".
24112
24113         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24114         init-only variables, but this path did not take into account that
24115         there might be also instance readonly variables.  Correct this
24116         problem. 
24117
24118         This fixes bug 32253
24119
24120         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24121         delegates as well.
24122
24123         * driver.cs: Change the extension for modules to `netmodule'
24124
24125         * cs-parser.jay: Improved slightly the location tracking for
24126         the debugger symbols.
24127
24128         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24129         modifiers that were specified instead of the hardcoded value
24130         (FamAndAssem).  This was basically ignoring the static modifier,
24131         and others.  Fixes 32429.
24132
24133         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24134         fixed a bug in the process (32476)
24135
24136         * expression.cs (ArrayAccess.EmitAssign): Patch from
24137         hwang_rob@yahoo.ca that fixes bug 31834.3
24138
24139 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24140
24141         * driver.cs: Make the module extension .netmodule.
24142
24143 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24144
24145         * driver.cs: Report an error if the resource file is not found
24146         instead of crashing.
24147
24148         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24149         false, like Emit does.
24150
24151 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24152
24153         * typemanager.cs: Remove unused private member.  Also reported mcs
24154         bug to report this as a warning like csc.
24155
24156 2002-10-15  Martin Baulig  <martin@gnome.org>
24157
24158         * statement.cs (Statement.Emit): Made this a virtual method; emits
24159         the line number info and calls DoEmit().
24160         (Statement.DoEmit): New protected abstract method, formerly knows
24161         as Statement.Emit().
24162
24163         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24164
24165 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24166
24167         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24168         have fixed a remaining problem: not every AddXXXX was adding a
24169         fully qualified name.  
24170
24171         Now everyone registers a fully qualified name in the DeclSpace as
24172         being defined instead of the partial name.  
24173
24174         Downsides: we are slower than we need to be due to the excess
24175         copies and the names being registered this way.  
24176
24177         The reason for this is that we currently depend (on the corlib
24178         bootstrap for instance) that types are fully qualified, because
24179         we dump all the types in the namespace, and we should really have
24180         types inserted into the proper namespace, so we can only store the
24181         basenames in the defined_names array.
24182
24183 2002-10-10  Martin Baulig  <martin@gnome.org>
24184
24185         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24186         from bug #31834, see the bug report for a testcase which is
24187         miscompiled.
24188
24189 2002-10-10  Martin Baulig  <martin@gnome.org>
24190
24191         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24192         flow analysis code for this.
24193
24194         * statement.cs (Do, While, For): Tell the flow analysis code about
24195         infinite loops.
24196         (FlowBranching.UsageVector): Added support for infinite loops.
24197         (Block.Resolve): Moved the dead code elimination here and use flow
24198         analysis to do it.
24199
24200 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24201
24202         * class.cs (Field.Define): Catch cycles on struct type
24203         definitions. 
24204
24205         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24206         fields if the fields are static.  We only need to check instance
24207         fields. 
24208
24209         * expression.cs (As.DoResolve): Test for reference type.
24210
24211         * statement.cs (Using.ResolveExpression): Use
24212         ConvertImplicitRequired, not ConvertImplicit which reports an
24213         error on failture
24214         (Using.ResolveLocalVariableDecls): ditto.
24215
24216         * expression.cs (Binary.ResolveOperator): Report errors in a few
24217         places where we had to.
24218
24219         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24220
24221 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24222
24223         * expression.cs: Use StoreFromPtr instead of extracting the type
24224         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24225
24226         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24227         an enumeration value to a System.Enum, but System.Enum is not a
24228         value type, but an class type, so we need to box.
24229
24230         (Expression.ConvertExplicit): One codepath could return
24231         errors but not flag them.  Fix this.  Fixes #31853
24232
24233         * parameter.cs (Resolve): Do not allow void as a parameter type.
24234
24235 2002-10-06  Martin Baulig  <martin@gnome.org>
24236
24237         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24238         if it's a class type and not a struct.  Fixes #31815.
24239
24240 2002-10-06  Martin Baulig  <martin@gnome.org>
24241
24242         * statement.cs: Reworked the flow analysis code a bit to make it
24243         usable for dead code elimination.
24244
24245 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24246
24247         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24248
24249 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24250
24251         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24252         to fix the test 165, will investigate deeper.
24253
24254 2002-10-04  Martin Baulig  <martin@gnome.org>
24255
24256         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24257         finally blocks actually work.
24258         (Try.Resolve): We don't need to create a sibling for `finally' if
24259         there is no finally block.
24260
24261 2002-10-04  Martin Baulig  <martin@gnome.org>
24262
24263         * class.cs (Constructor.Define): The default accessibility for a
24264         non-default constructor is private, not public.
24265
24266 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24267
24268         * class.cs (Constructor): Make AllowedModifiers public, add
24269         EXTERN.
24270
24271         * cs-parser.jay: Perform the modifiers test here, as the
24272         constructor for the Constructor class usually receives a zero
24273         because of the way we create it (first we create, later we
24274         customize, and we were never checking the modifiers).
24275
24276         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24277         is a version of LookupTypeReflection that includes the type-name
24278         cache.  This can be used as a fast path for functions that know
24279         the fully qualified name and are only calling into *.GetType() to
24280         obtain a composed type.
24281
24282         This is also used by TypeManager.LookupType during its type
24283         composition.
24284
24285         (LookupType): We now also track the real type name, as sometimes
24286         we can get a quey for the real type name from things like
24287         ComposedCast.  This fixes bug 31422.
24288
24289         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24290         complete type fullname, it does not have to go through the type
24291         resolution system to obtain the composed version of the type (for
24292         obtaining arrays or pointers).
24293
24294         (Conditional.Emit): Use the EmitBoolExpression to
24295         generate nicer code, as requested by Paolo.
24296
24297         (ArrayCreation.CheckIndices): Use the patch from
24298         hwang_rob@yahoo.ca to validate the array initializers. 
24299
24300 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24301
24302         * class.cs (ConstructorInitializer.Emit): simplify code by using
24303         Invocation.EmitCall, and at the same time, fix the bugs in calling
24304         parent constructors that took variable arguments. 
24305
24306         * ecore.cs (Expression.ConvertNumericExplicit,
24307         Expression.ImplicitNumericConversion): Remove the code that
24308         manually wrapped decimal (InternalTypeConstructor call is now gone
24309         as well).
24310
24311         * expression.cs (Cast.TryReduce): Also handle decimal types when
24312         trying to perform a constant fold on the type.
24313
24314         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24315
24316         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24317         that only turned off an error report, and did nothing else. 
24318
24319 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24320
24321         * driver.cs: Handle and ignore /fullpaths
24322
24323 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24324
24325         * expression.cs (Binary.ResolveOperator): Catch the case where
24326         DoNumericPromotions returns true, 
24327
24328         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24329
24330 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24331
24332         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24333         report error 70.
24334
24335 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24336
24337         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24338         conversion exists, but it is also required that the conversion be
24339         performed.  This manifested in "(Type64Enum) 2".  
24340
24341         * class.cs (TypeManager.AddMethod): The fix is not to change
24342         AddEnum, because that one was using a fully qualified name (every
24343         DeclSpace derivative does), but to change the AddMethod routine
24344         that was using an un-namespaced name.  This now correctly reports
24345         the duplicated name.
24346
24347         Revert patch until I can properly fix it.  The issue
24348         is that we have a shared Type space across all namespaces
24349         currently, which is wrong.
24350
24351         Options include making the Namespace a DeclSpace, and merge
24352         current_namespace/current_container in the parser.
24353
24354 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24355
24356         * cs-parser.jay: Improve error reporting when we get a different
24357         kind of expression in local_variable_type and
24358         local_variable_pointer_type. 
24359
24360         Propagate this to avoid missleading errors being reported.
24361
24362         * ecore.cs (ImplicitReferenceConversion): treat
24363         TypeManager.value_type as a target just like object_type.   As
24364         code like this:
24365
24366         ValueType v = 1;
24367
24368         Is valid, and needs to result in the int 1 being boxed before it
24369         is assigned to the value type v.
24370
24371         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24372         to validate the enumeration name.
24373
24374         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24375         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24376         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24377
24378         * ecore.cs (TryImplicitIntConversion): When doing an
24379         implicit-enumeration-conversion, check if the type is 64-bits and
24380         perform a conversion before passing to EnumConstant.
24381
24382 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24383
24384         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24385         report ambiguous type references.  Unlike the MS version, we
24386         report what the ambiguity is.   Innovation at work ;-)
24387
24388         (DeclSpace.FindType): Require a location argument to
24389         display when we display an ambiguous error.
24390
24391         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24392
24393         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24394
24395         * expression.cs (EmitDynamicInitializers): Apply patch from
24396         hwang_rob@yahoo.ca that fixes the order in which we emit our
24397         initializers. 
24398
24399 2002-09-21  Martin Baulig  <martin@gnome.org>
24400
24401         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24402         delegate takes no arguments.
24403
24404 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24405
24406         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24407         from integers.
24408
24409         * expression.cs: Extract the underlying type.
24410
24411         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24412
24413         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24414
24415 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24416
24417         * class.cs (TypeContainer.DefineType): We can not use the nice
24418         PackingSize with the size set to 1 DefineType method, because it
24419         will not allow us to define the interfaces that the struct
24420         implements.
24421
24422         This completes the fixing of bug 27287
24423
24424         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24425         means also structs.  This fixes part of the problem. 
24426         (Expresion.ImplicitReferenceConversionExists): ditto.
24427
24428         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24429         error if there were no errors reported during the type lookup
24430         process, to avoid duplicates or redundant errors.  Without this
24431         you would get an ambiguous errors plus a type not found.  We have
24432         beaten the user enough with the first error.  
24433
24434         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24435         reference. 
24436
24437         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24438         during the resolution process, stop the lookup, this avoids
24439         repeated error reports (same error twice).
24440
24441         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24442
24443         * typemanager.cs (LookupType): Redo the type lookup code to match
24444         the needs of System.Reflection.  
24445
24446         The issue is that System.Reflection requires references to nested
24447         types to begin with a "+" sign instead of a dot.  So toplevel
24448         types look like: "NameSpace.TopLevelClass", and nested ones look
24449         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24450         levels. 
24451
24452 2002-09-19  Martin Baulig  <martin@gnome.org>
24453
24454         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24455         says that a method always returns or always throws an exception,
24456         don't report the CS0161.
24457
24458         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24459         set `Returns = new_returns'.
24460
24461 2002-09-19  Martin Baulig  <martin@gnome.org>
24462
24463         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24464         to an enum constant, check for a CS0176.
24465
24466 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24467
24468         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24469         for operators that must be in pairs and report errors.
24470
24471         * ecore.cs (SimpleName.DoResolveType): During the initial type
24472         resolution process, when we define types recursively, we must
24473         check first for types in our current scope before we perform
24474         lookups in the enclosing scopes.
24475
24476         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24477
24478         (Invocation.VerifyArgumentsCompat): Call
24479         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24480         I thought we were supposed to always call this, but there are a
24481         few places in the code where we dont do it.
24482
24483 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24484
24485         * driver.cs: Add support in -linkres and -resource to specify the
24486         name of the identifier.
24487
24488 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24489
24490         * ecore.cs (StandardConversionExists): Sync with the conversion
24491         code: allow anything-* to void* conversions.
24492
24493         (FindMostSpecificSource): Use an Expression argument
24494         instead of a Type, because we might be handed over a Literal which
24495         gets a few more implicit conversions that plain types do not.  So
24496         this information was being lost.
24497
24498         Also, we drop the temporary type-holder expression when not
24499         required.
24500
24501 2002-09-17  Martin Baulig  <martin@gnome.org>
24502
24503         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24504         this is an explicit interface implementation.
24505
24506 2002-09-17  Martin Baulig  <martin@gnome.org>
24507
24508         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24509         different `IndexerName' attributes.
24510
24511         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24512         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24513         virtual CommonResolve().
24514
24515 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24516
24517         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24518         and convert that to the UnderlyingType.
24519
24520         * statement.cs (Foreach.Resolve): Indexers are just like variables
24521         or PropertyAccesses.
24522
24523         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24524         inside quoted strings, we were not doing this before.
24525
24526 2002-09-16  Martin Baulig  <martin@gnome.org>
24527
24528         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24529         resolve it.  This is needed for the definite assignment check of the
24530         instance expression, fixes bug #29846.
24531         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24532
24533 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24534
24535         * parameter.cs: Fix compile error.  Cannot reference static member
24536         from an instance object.  Is this an mcs bug?
24537
24538 2002-09-14  Martin Baulig  <martin@gnome.org>
24539
24540         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24541         multiple times.  Fixes bug #30295, added test-166.cs.
24542
24543 2002-09-14  Martin Baulig  <martin@gnome.org>
24544
24545         * statement.cs (Block.Emit): Don't emit unreachable code.
24546         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24547         `break' statements.
24548         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24549
24550 2002-09-14  Martin Baulig  <martin@gnome.org>
24551
24552         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24553         is set.
24554
24555 2002-09-14  Martin Baulig  <martin@gnome.org>
24556
24557         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24558         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24559         be false on the ms runtime.
24560
24561 2002-09-13  Martin Baulig  <martin@gnome.org>
24562
24563         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24564         the CS0038 error message.
24565
24566 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24567
24568         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24569         constant inside, return it.
24570
24571 2002-09-12  Martin Baulig  <martin@gnome.org>
24572
24573         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24574         implicit conversion can be done between enum types.
24575
24576         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24577         check whether an implicit conversion to the current enum's UnderlyingType
24578         exists and report an error if not.
24579
24580         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24581         without debugging support.
24582
24583         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24584         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24585
24586 2002-09-12  Martin Baulig  <martin@gnome.org>
24587
24588         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24589
24590         * ecore.cs (IMemberExpr.DeclaringType): New property.
24591         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24592         nonstatic member of an outer type (CS0038).
24593
24594 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24595
24596         * driver.cs: Activate the using-error detector at warning level
24597         4 (at least for MS-compatible APIs).
24598
24599         * namespace.cs (VerifyUsing): Small buglett fix.
24600
24601         * pending.cs (PendingImplementation): pass the container pointer. 
24602
24603         * interface.cs (GetMethods): Allow for recursive definition.  Long
24604         term, I would like to move every type to support recursive
24605         definitions, not the current ordering mechanism that we have right
24606         now.
24607
24608         The situation is this: Attributes are handled before interfaces,
24609         so we can apply attributes to interfaces.  But some attributes
24610         implement interfaces, we will now handle the simple cases
24611         (recursive definitions will just get an error).  
24612
24613         * parameter.cs: Only invalidate types at the end if we fail to
24614         lookup all types.  
24615
24616 2002-09-09  Martin Baulig  <martin@gnome.org>
24617
24618         * ecore.cs (PropertyExpr.Emit): Also check for
24619         TypeManager.system_int_array_get_length so this'll also work when
24620         compiling corlib.  Fixes #30003.
24621
24622 2002-09-09  Martin Baulig  <martin@gnome.org>
24623
24624         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24625         and throw an exception if we can't get the type's size.  Fixed #30040,
24626         added test-165.cs.
24627
24628 2002-09-09  Martin Baulig  <martin@gnome.org>
24629
24630         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24631
24632         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24633         context.  Fixes bug #30027.
24634
24635         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24636         virtual functions.  Fixes bug #30043, added test-164.cs.
24637
24638 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24639
24640         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24641
24642 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24643
24644         * driver.cs: Use an object to get the windows codepage since it's not a
24645         static property.
24646
24647 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24648
24649         * statement.cs (For.Emit): for infinite loops (test == null)
24650         return whether there is a break inside, not always "true".
24651
24652         * namespace.cs (UsingEntry): New struct to hold the name of the
24653         using definition, the location where it is defined, and whether it
24654         has been used in a successful type lookup.
24655
24656         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24657         strings.
24658
24659         * decl.cs: ditto.
24660
24661 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24662
24663         * attribute.cs : Fix incorrect code which relied on catching
24664         a NullReferenceException to detect a null being passed in
24665         where an object was expected.
24666
24667 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24668
24669         * statement.cs (Try): flag the catch variable as assigned
24670
24671         * expression.cs (Cast): Simplified by using ResolveType instead of
24672         manually resolving.
24673
24674         * statement.cs (Catch): Fix bug by using ResolveType.
24675
24676 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24677
24678         * expression.cs (BetterConversion): Special case for when we have
24679         a NullLiteral as the argument and we have to choose between string
24680         and object types - we choose string the way csc does.
24681
24682         * attribute.cs (Attribute.Resolve): Catch the
24683         NullReferenceException and report error #182 since the Mono
24684         runtime no more has the bug and having this exception raised means
24685         we tried to select a constructor which takes an object and is
24686         passed a null.
24687
24688 2002-09-05  Ravi Pratap  <ravi@ximian.com>
24689
24690         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
24691         message (1502, 1503) when we can't locate a method after overload
24692         resolution. This is much more informative and closes the bug
24693         Miguel reported.
24694
24695         * interface.cs (PopulateMethod): Return if there are no argument
24696         types. Fixes a NullReferenceException bug.
24697
24698         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
24699         expressions too. Previously we were checking only in one place for
24700         positional arguments leaving out named arguments.
24701
24702         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
24703         type to the enum type is not allowed. Remove code corresponding to
24704         that.
24705
24706         (ConvertNumericExplicit): Allow explicit conversions from
24707         the underlying type to enum type. This precisely follows the spec
24708         and closes a bug filed by Gonzalo.
24709
24710 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24711
24712         * compiler.csproj:
24713         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
24714
24715 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
24716
24717         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
24718         it was important that we stored the right value after the
24719         reduction in `converted'.
24720
24721 2002-09-04  Martin Baulig  <martin@gnome.org>
24722
24723         * location.cs (Location.SymbolDocument): Use full pathnames for the
24724         source files.
24725
24726 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
24727
24728         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
24729         of the expression resolve mechanism, because that will catch the
24730         SimpleName error failures.
24731
24732         (Conditional): If we can not resolve the
24733         expression, return, do not crash.
24734
24735 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24736
24737         * cs-tokenizer.cs:
24738         (location): display token name instead of its number.
24739
24740 2002-08-28  Martin Baulig  <martin@gnome.org>
24741
24742         * expression.cs (Binary.ResolveOperator): Don't silently return
24743         but return an error if an operator cannot be applied between two
24744         enum types.
24745
24746 2002-08-28  Martin Baulig  <martin@gnome.org>
24747
24748         * class.cs (Constructor.Define): Set the permission attributes
24749         correctly instead of making all constructors public.
24750
24751 2002-08-28  Martin Baulig  <martin@gnome.org>
24752
24753         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
24754         for private members before reporting a CS0103; if we find anything,
24755         it's a CS0122.
24756
24757 2002-08-28  Martin Baulig  <martin@gnome.org>
24758
24759         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
24760         to check whether `closure_start_type == closure_invocation_type',
24761         we also need to check whether `m.DeclaringType == closure_invocation_type'
24762         before bypassing the permission checks.  We might be accessing
24763         protected/private members from the base class.
24764         (TypeManager.RealMemberLookup): Only set private_ok if private
24765         members were requested via BindingFlags.NonPublic.
24766
24767         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
24768
24769         * expression.cs (MemberAccess.ResolveMemberAccess): Set
24770         MethodGroupExpr.IsExplicitImpl if appropriate.
24771         (Invocation.DoResolve): Don't report the CS0120 for explicit
24772         interface implementations.
24773
24774 2002-08-27  Martin Baulig  <martin@gnome.org>
24775
24776         * expression.cs (Invocation.DoResolve): If this is a static
24777         method and we don't have an InstanceExpression, we must report
24778         a CS0120.
24779
24780 2002-08-25  Martin Baulig  <martin@gnome.org>
24781
24782         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
24783         `==' between a valuetype and an object.
24784
24785 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
24786
24787         * ecore.cs (TypeExpr): Provide a ToString method.
24788
24789 2002-08-24  Martin Baulig  <martin@gnome.org>
24790
24791         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
24792         now called proggie.dbg and it's a binary file.
24793
24794 2002-08-23  Martin Baulig  <martin@gnome.org>
24795
24796         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
24797
24798 2002-08-23  Martin Baulig  <martin@gnome.org>
24799
24800         * struct.cs (MyStructInfo.ctor): Make this work with empty
24801         structs; it's not allowed to use foreach() on null.
24802
24803 2002-08-23  Martin Baulig  <martin@gnome.org>
24804
24805         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
24806         writer the full pathname of the generated assembly.
24807
24808 2002-08-23  Martin Baulig  <martin@gnome.org>
24809
24810         * statements.cs (FlowBranching.UsageVector.MergeChildren):
24811         A `finally' block never returns or breaks; improved handling of
24812         unreachable code.
24813
24814 2002-08-23  Martin Baulig  <martin@gnome.org>
24815
24816         * statement.cs (Throw.Resolve): Allow `throw null'.
24817
24818 2002-08-23  Martin Baulig  <martin@gnome.org>
24819
24820         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
24821         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
24822         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
24823         MemberLookup would return a wrong event if this is an explicit
24824         interface implementation and the class has an event with the same
24825         name.
24826
24827 2002-08-23  Martin Baulig  <martin@gnome.org>
24828
24829         * statement.cs (Block.AddChildVariableNames): New public method.
24830         (Block.AddChildVariableName): Likewise.
24831         (Block.IsVariableNameUsedInChildBlock): Likewise.
24832         (Block.AddVariable): Check whether a variable name has already
24833         been used in a child block.
24834
24835         * cs-parser.jay (declare_local_variables): Mark all variable names
24836         from the current block as being used in a child block in the
24837         implicit block.
24838
24839 2002-08-23  Martin Baulig  <martin@gnome.org>
24840
24841         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
24842         find the symbol writer.
24843
24844         * driver.cs: csc also allows the arguments to /define being
24845         separated by commas, not only by semicolons.
24846
24847 2002-08-23  Martin Baulig  <martin@gnome.org>
24848
24849         * interface.cs (Interface.GetMembers): Added static check for events.
24850
24851 2002-08-15  Martin Baulig  <martin@gnome.org>
24852
24853         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
24854         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
24855
24856         * ecore.cs (Expression.MemberLookup): Added documentation and explained
24857         why the MethodData.EmitDestructor() change was necessary.
24858
24859 2002-08-20  Martin Baulig  <martin@gnome.org>
24860
24861         * class.cs (TypeContainer.FindMembers): Added static check for events.
24862
24863         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
24864
24865         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
24866         use Type.GetEvents(), not Type.FindMembers().
24867
24868 2002-08-20  Martin Baulig  <martin@gnome.org>
24869
24870         * decl.cs (MemberCache): Added a special method cache which will
24871         be used for method-only searched.  This ensures that a method
24872         search will return a MethodInfo with the correct ReflectedType for
24873         inherited methods.      
24874
24875 2002-08-20  Martin Baulig  <martin@gnome.org>
24876
24877         * decl.cs (DeclSpace.FindMembers): Made this public.
24878
24879 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24880
24881         * delegate.cs: fixed build on windows.
24882         [FIXME:  Filed as bug #29150: MCS must report these errors.]
24883
24884 2002-08-19  Ravi Pratap  <ravi@ximian.com>
24885
24886         * ecore.cs (StandardConversionExists): Return a false
24887         if we are trying to convert the void type to anything else
24888         since that is not allowed.
24889
24890         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
24891         we flag error 70 in the event an event is trying to be accessed
24892         directly from outside the declaring type.
24893
24894 2002-08-20  Martin Baulig  <martin@gnome.org>
24895
24896         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
24897         MemberCache from typemanager.cs to decl.cs.
24898
24899 2002-08-19  Martin Baulig  <martin@gnome.org>
24900
24901         * class.cs (TypeContainer): Implement IMemberContainer.
24902         (TypeContainer.DefineMembers): Create the MemberCache.
24903         (TypeContainer.FindMembers): Do better BindingFlags checking; only
24904         return public members if BindingFlags.Public was given, check
24905         whether members are static.
24906
24907 2002-08-16  Martin Baulig  <martin@gnome.org>
24908
24909         * decl.cs (DeclSpace.Define): Splitted this in Define and
24910         DefineMembers.  DefineMembers is called first and initializes the
24911         MemberCache.
24912
24913         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
24914         DefineMembers() on all our DeclSpaces.
24915
24916         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
24917         but call DefineMembers() on all nested interfaces.  We call their
24918         Define() in our new Define() function.
24919
24920         * interface.cs (Interface): Implement IMemberContainer.
24921         (Interface.Define): Moved all code except the attribute stuf to
24922         DefineMembers().
24923         (Interface.DefineMembers): Initialize the member cache.
24924
24925         * typemanager.cs (IMemberFinder): Removed this interface, we don't
24926         need this anymore since we can use MemberCache.FindMembers directly.
24927
24928 2002-08-19  Martin Baulig  <martin@gnome.org>
24929
24930         * typemanager.cs (MemberCache): When creating the cache for an
24931         interface type, add all inherited members.
24932         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
24933         to `out bool used_cache' and documented it.
24934         (TypeManager.MemberLookup): If we already used the cache in the first
24935         iteration, we don't need to do the interfaces check.
24936
24937 2002-08-19  Martin Baulig  <martin@gnome.org>
24938
24939         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
24940         here from IMemberFinder and don't implement this interface anymore.
24941         (DeclSpace.MemberCache): Moved here from IMemberFinder.
24942
24943         * typemanager.cs (IMemberFinder): This interface is now only used by
24944         classes which actually support the member cache.
24945         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
24946         since we only put DeclSpaces into this Hashtable.
24947         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
24948         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
24949
24950 2002-08-16  Martin Baulig  <martin@gnome.org>
24951
24952         * typemanager.cs (ICachingMemberFinder): Removed.
24953         (IMemberFinder.MemberCache): New property.
24954         (TypeManager.FindMembers): Merged this with RealFindMembers().
24955         This function will never be called from TypeManager.MemberLookup()
24956         so we can't use the cache here, just the IMemberFinder.
24957         (TypeManager.MemberLookup_FindMembers): Check whether the
24958         IMemberFinder has a MemberCache and call the cache's FindMembers
24959         function.
24960         (MemberCache): Rewrote larger parts of this yet another time and
24961         cleaned it up a bit.
24962
24963 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
24964
24965         * driver.cs (LoadArgs): Support quoting.
24966
24967         (Usage): Show the CSC-like command line arguments.
24968
24969         Improved a few error messages.
24970
24971 2002-08-15  Martin Baulig  <martin@gnome.org>
24972
24973         * typemanager.cs (IMemberContainer.Type): New property.
24974         (IMemberContainer.IsInterface): New property.
24975
24976         The following changes are conditional to BROKEN_RUNTIME, which is
24977         defined at the top of the file.
24978
24979         * typemanager.cs (MemberCache.MemberCache): Don't add the base
24980         class'es members, but add all members from TypeHandle.ObjectType
24981         if we're an interface.
24982         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
24983         is the current type.
24984         (MemberCache.CacheEntry.Container): Removed this field.
24985         (TypeHandle.GetMembers): Include inherited members.
24986
24987 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24988
24989         * typemanager.cs: fixed compilation and added a comment on a field that
24990         is never used.
24991
24992 2002-08-15  Martin Baulig  <martin@gnome.org>
24993
24994         * class.cs (ConstructorInitializer.Resolve): In the
24995         Expression.MemberLookup call, use the queried_type as
24996         invocation_type.
24997
24998         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
24999         declared' attribute, it's always true.
25000         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
25001         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
25002         temporary wrapper for FindMembers which tells MemberLookup whether
25003         members from the base classes are included in the return value.
25004         This will go away soon.
25005         (TypeManager.MemberLookup): Use this temporary hack here; once the
25006         new MemberCache is completed, we don't need to do the DeclaredOnly
25007         looping here anymore since the MemberCache will take care of this.
25008         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
25009         (MemberCache): When creating the MemberCache for a class, get
25010         members from the current class and all its base classes.
25011         (MemberCache.CacheEntry.Container): New field.  This is a
25012         temporary hack until the Mono runtime is fixed to distinguish
25013         between ReflectedType and DeclaringType.  It allows us to use MCS
25014         with both the MS runtime and the unfixed Mono runtime without
25015         problems and without accecting performance.
25016         (MemberCache.SearchMembers): The DeclaredOnly looping from
25017         TypeManager.MemberLookup is now done here.      
25018
25019 2002-08-14  Martin Baulig  <martin@gnome.org>
25020
25021         * statement.cs (MyStructInfo.MyStructInfo): Don't call
25022         Type.GetFields on dynamic types but get the fields from the
25023         corresponding TypeContainer.
25024         (MyStructInfo.GetStructInfo): Added check for enum types.
25025
25026         * typemanager.cs (MemberList.IsSynchronized): Implemented.
25027         (MemberList.SyncRoot): Implemented.
25028         (TypeManager.FilterWithClosure): No need to check permissions if
25029         closure_start_type == closure_invocation_type, don't crash if
25030         closure_invocation_type is null.
25031
25032 2002-08-13  Martin Baulig  <martin@gnome.org>
25033
25034         Rewrote TypeContainer.FindMembers to use a member cache.  This
25035         gives us a speed increase of about 35% for the self-hosting MCS
25036         build and of about 15-20% for the class libs (both on GNU/Linux).
25037
25038         * report.cs (Timer): New class to get enhanced profiling.  This
25039         whole class is "TIMER" conditional since it remarkably slows down
25040         compilation speed.
25041
25042         * class.cs (MemberList): New class.  This is an IList wrapper
25043         which we're now using instead of passing MemberInfo[]'s around to
25044         avoid copying this array unnecessarily.
25045         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
25046         (ICachingMemberFinder, IMemberContainer): New interface.
25047         (TypeManager.FilterWithClosure): If `criteria' is null, the name
25048         has already been checked, otherwise use it for the name comparision.
25049         (TypeManager.FindMembers): Renamed to RealMemberFinder and
25050         provided wrapper which tries to use ICachingMemberFinder.FindMembers
25051         if possible.  Returns a MemberList, not a MemberInfo [].
25052         (TypeHandle): New class, implements IMemberContainer.  We create
25053         one instance of this class per type, it contains a MemberCache
25054         which is used to do the member lookups.
25055         (MemberCache): New class.  Each instance of this class contains
25056         all members of a type and a name-based hash table.
25057         (MemberCache.FindMembers): This is our new member lookup
25058         function.  First, it looks up all members of the requested name in
25059         the hash table.  Then, it walks this list and sorts out all
25060         applicable members and returns them.
25061
25062 2002-08-13  Martin Baulig  <martin@gnome.org>
25063
25064         In addition to a nice code cleanup, this gives us a performance
25065         increase of about 1.4% on GNU/Linux - not much, but it's already
25066         half a second for the self-hosting MCS compilation.
25067
25068         * typemanager.cs (IMemberFinder): New interface.  It is used by
25069         TypeManager.FindMembers to call FindMembers on a TypeContainer,
25070         Enum, Delegate or Interface.
25071         (TypeManager.finder_to_member_finder): New PtrHashtable.
25072         (TypeManager.finder_to_container): Removed.
25073         (TypeManager.finder_to_delegate): Removed.
25074         (TypeManager.finder_to_interface): Removed.
25075         (TypeManager.finder_to_enum): Removed.
25076
25077         * interface.cs (Interface): Implement IMemberFinder.
25078
25079         * delegate.cs (Delegate): Implement IMemberFinder.
25080
25081         * enum.cs (Enum): Implement IMemberFinder.
25082
25083         * class.cs (TypeContainer): Implement IMemberFinder.
25084
25085 2002-08-12  Martin Baulig  <martin@gnome.org>
25086
25087         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
25088
25089 2002-08-12  Martin Baulig  <martin@gnome.org>
25090
25091         * ecore.cs (ITypeExpression): New interface for expressions which
25092         resolve to a type.
25093         (TypeExpression): Renamed to TypeLookupExpression.
25094         (Expression.DoResolve): If we're doing a types-only lookup, the
25095         expression must implement the ITypeExpression interface and we
25096         call DoResolveType() on it.
25097         (SimpleName): Implement the new ITypeExpression interface.
25098         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25099         hack, the situation that we're only looking up types can't happen
25100         anymore when this method is called.  Moved the type lookup code to
25101         DoResolveType() and call it.
25102         (SimpleName.DoResolveType): This ITypeExpression interface method
25103         is now doing the types-only lookup.
25104         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25105         (ResolveFlags): Added MaskExprClass.
25106
25107         * expression.cs (MemberAccess): Implement the ITypeExpression
25108         interface.
25109         (MemberAccess.DoResolve): Added support for a types-only lookup
25110         when we're called via ITypeExpression.DoResolveType().
25111         (ComposedCast): Implement the ITypeExpression interface.
25112
25113         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25114         Expression.Resolve() with ResolveFlags.Type instead.
25115
25116 2002-08-12  Martin Baulig  <martin@gnome.org>
25117
25118         * interface.cs (Interface.Define): Apply attributes.
25119
25120         * attribute.cs (Attribute.ApplyAttributes): Added support for
25121         interface attributes.
25122
25123 2002-08-11  Martin Baulig  <martin@gnome.org>
25124
25125         * statement.cs (Block.Emit): Only check the "this" variable if we
25126         do not always throw an exception.
25127
25128         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25129         whether the property has a set accessor.
25130
25131 2002-08-11  Martin Baulig  <martin@gnome.org>
25132
25133         Added control flow analysis support for structs.
25134
25135         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25136         with control flow analysis turned off.
25137         (IVariable): New interface.
25138         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25139         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25140         (FieldExpr.DoResolve): Resolve the instance expression with flow
25141         analysis turned off and do the definite assignment check after the
25142         resolving when we know what the expression will resolve to.
25143
25144         * expression.cs (LocalVariableReference, ParameterReference):
25145         Implement the new IVariable interface, only call the flow analysis
25146         code if ec.DoFlowAnalysis is true.
25147         (This): Added constructor which takes a Block argument.  Implement
25148         the new IVariable interface.
25149         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25150         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25151         This does the definite assignment checks for struct members.
25152
25153         * class.cs (Constructor.Emit): If this is a non-static `struct'
25154         constructor which doesn't have any initializer, call
25155         Block.AddThisVariable() to tell the flow analysis code that all
25156         struct elements must be initialized before control returns from
25157         the constructor.
25158
25159         * statement.cs (MyStructInfo): New public class.
25160         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25161         argument to this indexer.  If non-zero, check an individual struct
25162         member, not the whole struct.
25163         (FlowBranching.CheckOutParameters): Check struct members.
25164         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25165         overloaded versions of these methods which take an additional
25166         `int field_idx' argument to check struct members.
25167         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25168         overloaded versions of these methods which take an additional
25169         `string field_name' argument to check struct member.s
25170         (VariableInfo): Implement the IVariable interface.
25171         (VariableInfo.StructInfo): New public property.  Returns the
25172         MyStructInfo instance of the variable if it's a struct or null.
25173         (Block.AddThisVariable): New public method.  This is called from
25174         Constructor.Emit() for non-static `struct' constructor which do
25175         not have any initializer.  It creates a special variable for the
25176         "this" instance variable which will be checked by the flow
25177         analysis code to ensure that all of the struct's fields are
25178         initialized before control returns from the constructor.
25179         (UsageVector): Added support for struct members.  If a
25180         variable/parameter is a struct with N members, we reserve a slot
25181         in the usage vector for each member.  A struct is considered fully
25182         initialized if either the struct itself (slot 0) or all its
25183         members are initialized.
25184
25185 2002-08-08  Martin Baulig  <martin@gnome.org>
25186
25187         * driver.cs (Driver.MainDriver): Only report an error CS5001
25188         if there were no compilation errors.
25189
25190         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25191         `UnsafeContext' property to determine whether the parent is in
25192         unsafe context rather than checking the parent's ModFlags:
25193         classes nested in an unsafe class are unsafe as well.
25194
25195 2002-08-08  Martin Baulig  <martin@gnome.org>
25196
25197         * statement.cs (UsageVector.MergeChildren): Distinguish between
25198         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25199         we return.  Added test17() and test18() to test-154.cs.
25200
25201 2002-08-08  Martin Baulig  <martin@gnome.org>
25202
25203         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25204         Family access, make sure the invoking type isn't a subclass of the
25205         queried type (that'd be a CS1540).
25206
25207         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25208         this method which takes an additional `Type invocation_type'.
25209
25210         * expression.cs (BaseAccess.DoResolve): Use the base type as
25211         invocation and query type.
25212         (MemberAccess.DoResolve): If the lookup failed and we're about to
25213         report a CS0122, try a lookup with the ec.ContainerType - if this
25214         succeeds, we must report a CS1540.
25215
25216 2002-08-08  Martin Baulig  <martin@gnome.org>
25217
25218         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25219         (MethodGroupExpr): Implement the IMemberExpr interface.
25220
25221         * expression (MemberAccess.ResolveMemberAccess): No need to have
25222         any special code for MethodGroupExprs anymore, they're now
25223         IMemberExprs.   
25224
25225 2002-08-08  Martin Baulig  <martin@gnome.org>
25226
25227         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25228         Family, FamANDAssem and FamORAssem permissions.
25229         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25230
25231 2002-08-08  Martin Baulig  <martin@gnome.org>
25232
25233         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25234         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25235         or loop block.
25236
25237 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25238
25239         * driver.cs: implemented /resource option to embed managed resources.
25240
25241 2002-08-07  Martin Baulig  <martin@gnome.org>
25242
25243         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25244         (FieldBase.HasFieldInitializer): New public property.
25245         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25246         returns the field initializer and makes sure it is only resolved once.
25247         (TypeContainer.EmitFieldInitializers): Call
25248         FieldBase.GetInitializerExpression to get the initializer, this ensures
25249         that it isn't resolved multiple times.
25250
25251         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25252         the resolving process (SimpleName/MemberLookup) that we're currently
25253         emitting a field initializer (which must not access any instance members,
25254         this is an error CS0236).
25255
25256         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25257         argument, if the `IsFieldInitializer' flag is set, we must report and
25258         error CS0236 and not an error CS0120.   
25259
25260 2002-08-07  Martin Baulig  <martin@gnome.org>
25261
25262         * ecore.cs (IMemberExpr): New public interface.
25263         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25264         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25265         if the expression is an IMemberExpr.
25266
25267         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25268         to be null, implicitly default to `this' if we're non-static in
25269         this case.  Simplified the code a lot by using the new IMemberExpr
25270         interface.  Also fixed bug #28176 here.
25271
25272 2002-08-06  Martin Baulig  <martin@gnome.org>
25273
25274         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25275         ParameterReferences during semantic analysis so that we can do a
25276         type-only search when resolving Cast, TypeOf and SizeOf.
25277         (block): Pass the `current_local_parameters' to the Block's
25278         constructor.
25279
25280         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25281         argument to the constructor.
25282         (ConstructorInitializer.Resolve): Create a temporary implicit
25283         block with the parameters.
25284
25285         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25286         references here if we aren't doing a type-only search.
25287
25288         * statement.cs (Block): Added constructor which takes a
25289         `Parameters parameters' argument.
25290         (Block.Parameters): New public property.
25291
25292         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25293         to `Parameters' and made it public readonly.
25294
25295 2002-08-06  Martin Baulig  <martin@gnome.org>
25296
25297         * ecore.cs (Expression.Warning): Made this public as well.
25298
25299         * report.cs (Report.Debug): Print the contents of collections.
25300
25301 2002-08-06  Martin Baulig  <martin@gnome.org>
25302
25303         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25304         used to tell Resolve() which kinds of expressions it may return.
25305         (Expression.Resolve): Added overloaded version of this method which
25306         takes a `ResolveFlags flags' argument.  This can be used to tell
25307         Resolve() which kinds of expressions it may return.  Reports a
25308         CS0118 on error.
25309         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25310         ResolveFlags.SimpleName.
25311         (Expression.Error118): Added overloaded version of this method which
25312         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25313         which kinds of expressions are allowed.
25314
25315         * expression.cs (Argument.ResolveMethodGroup): New public method.
25316         Resolves an argument, but allows a MethodGroup to be returned.
25317         This is used when invoking a delegate.
25318
25319         * TODO: Updated a bit.
25320
25321 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25322
25323         Fixed compilation with csc.
25324
25325         * ecore.cs: Expression.Error made public. Is this correct? Should
25326         Warning be made public too?
25327
25328         * expression.cs: use ea.Location instead of ea.loc.
25329         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25330
25331 2002-08-06  Martin Baulig  <martin@gnome.org>
25332
25333         * ecore.cs (Expression.loc): Moved the location here instead of
25334         duplicating it in all derived classes.
25335         (Expression.Location): New public property.
25336         (Expression.Error, Expression.Warning): Made them non-static and
25337         removed the location argument.
25338         (Expression.Warning): Added overloaded version which takes an
25339         `int level' argument.
25340         (Expression.Error118): Make this non-static and removed the
25341         expression and location arguments.
25342         (TypeExpr): Added location argument to the constructor.
25343
25344         * expression.cs (StaticCallExpr): Added location argument to
25345         the constructor.
25346         (Indirection, PointerArithmetic): Likewise.
25347         (CheckedExpr, UnCheckedExpr): Likewise.
25348         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25349         (StringPtr): Likewise.
25350
25351
25352 2002-08-05  Martin Baulig  <martin@gnome.org>
25353
25354         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25355
25356         * assign.cs (Assign.DoResolve): Check whether the source
25357         expression is a value or variable.
25358
25359         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25360         while resolving the corresponding blocks.
25361
25362         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25363         an error, don't silently return null.
25364
25365         * statement.cs (Block.AddVariable): Do the error reporting here
25366         and distinguish between CS0128 and CS0136.
25367         (Block.DoResolve): Report all unused labels (warning CS0164).
25368         (LabeledStatement): Pass the location to the constructor.
25369         (LabeledStatement.HasBeenReferenced): New property.
25370         (LabeledStatement.Resolve): Set it to true here.
25371
25372         * statement.cs (Return.Emit): Return success even after reporting
25373         a type mismatch error (CS0126 or CS0127), this is what csc does and
25374         it avoids confusing the users with any consecutive errors.
25375
25376 2002-08-05  Martin Baulig  <martin@gnome.org>
25377
25378         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25379
25380         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25381
25382         * expression.cs (MemberAccess.DoResolve): Silently return if an
25383         error has already been reported.
25384
25385         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25386         error has already been reported.
25387
25388 2002-08-05  Martin Baulig  <martin@gnome.org>
25389
25390         * statement.cs (UsageVector): Only initialize the `parameters'
25391         vector if we actually have any "out" parameters.
25392
25393 2002-08-05  Martin Baulig  <martin@gnome.org>
25394
25395         * expression.cs (Binary.ResolveOperator): When combining delegates,
25396         they must have the same type.
25397
25398 2002-08-05  Martin Baulig  <martin@gnome.org>
25399
25400         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25401         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25402         work with the ms runtime and we also don't need it: if we're a
25403         PropertyBuilder and not in the `indexer_arguments' hash, then we
25404         are a property and not an indexer.
25405
25406         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25407         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25408         since the latter one doesn't work with the ms runtime.
25409
25410 2002-08-03  Martin Baulig  <martin@gnome.org>
25411
25412         Fixed bugs #27998 and #22735.
25413
25414         * class.cs (Method.IsOperator): New public field.
25415         (Method.CheckBase): Report CS0111 if there's already a method
25416         with the same parameters in the current class.  Report CS0508 when
25417         attempting to change the return type of an inherited method.
25418         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25419         and it's not marked abstract or extern.
25420         (PropertyBase): New abstract base class for Property and Indexer.
25421         (PropertyBase.CheckBase): Moved here from Property and made it work
25422         for indexers.
25423         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25424         the same so we can reuse it there.
25425         (Property, Indexer): Derive from PropertyBase.
25426         (MethodSignature.inheritable_property_signature_filter): New delegate
25427         to find properties and indexers.
25428
25429         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25430         argument and improved error reporting.
25431
25432         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25433         EmptyReadOnlyParameters and made it a property.
25434
25435         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25436         version of this method which takes a `PropertyInfo indexer'.
25437         (TypeManager.RegisterIndexer): New method.
25438
25439         * class.cs: Added myself as author of this file :-)
25440
25441 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25442
25443         * class.cs: fixed compilation on windoze.
25444
25445 2002-08-03  Martin Baulig  <martin@gnome.org>
25446
25447         * interface.cs (Interface.GetInterfaceBases): Check whether all
25448         base interfaces are at least as accessible than the current one.
25449
25450         * class.cs (TypeContainer.GetClassBases): Check whether base types
25451         are at least as accessible than the current type.
25452         (TypeContainer.AsAccessible): Implemented and made non-static.
25453         (MemberBase.CheckParameters): Report errors if the accessibility
25454         checks fail.
25455
25456         * delegate.cs (Delegate.Delegate): The default visibility is
25457         internal for top-level types and private for nested types.
25458         (Delegate.Define): Report errors if the accessibility checks fail.
25459
25460         * enum.cs (Enum.Enum): The default visibility is internal for
25461         top-level types and private for nested types.
25462         (Enum.DefineType): Compute the correct visibility.
25463
25464         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25465         function which takes a `bool is_toplevel' instead of a TypeContainer.
25466
25467         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25468         builtin type.
25469
25470 2002-08-02  Martin Baulig  <martin@gnome.org>
25471
25472         * expression.cs (LocalVariableReferenc): Added constructor which
25473         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25474         (LocalVariableReference.IsReadOnly): New property.
25475         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25476         variable is readonly, use our own readonly flag to do this; you can
25477         use the new constructor to get a writable reference to a read-only
25478         variable.
25479
25480         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25481         reference to the local variable.
25482
25483 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25484
25485         * rootcontext.cs (ResolveCore): Also include System.Exception
25486
25487         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25488         we reach an EmptyStatement.
25489
25490         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25491         is also fine.
25492
25493         * expression.cs (Binary.ResolveOperator): Check error result in
25494         two places.
25495
25496         use brtrue/brfalse directly and avoid compares to null.
25497
25498 2002-08-02  Martin Baulig  <martin@gnome.org>
25499
25500         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25501         Fixes bug #28407, added test-155.cs.
25502
25503 2002-08-01  Martin Baulig  <martin@gnome.org>
25504
25505         * class.cs (Event.EmitDefaultMethod): Make this work with static
25506         events.  Fixes #28311, added verify-3.cs.
25507
25508 2002-08-01  Martin Baulig  <martin@gnome.org>
25509
25510         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25511         `is_disposable' fields.
25512         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25513         `hm.is_disposable' if we're using the collection pattern.
25514         (Foreach.EmitCollectionForeach): Use the correct type for the
25515         enumerator's local variable, only emit the try/finally block if
25516         necessary (fixes #27713).
25517
25518 2002-08-01  Martin Baulig  <martin@gnome.org>
25519
25520         * ecore.cs (Expression.report118): Renamed to Error118 and made
25521         it public static.
25522
25523         * statement.cs (Throw.Resolve): Check whether the expression is of
25524         the correct type (CS0118) and whether the type derives from
25525         System.Exception (CS0155).
25526         (Catch.Resolve): New method.  Do the type lookup here and check
25527         whether it derives from System.Exception (CS0155).
25528         (Catch.CatchType, Catch.IsGeneral): New public properties.
25529
25530         * typemanager.cs (TypeManager.exception_type): Added.
25531
25532 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25533
25534         * driver.cs: Updated About function.
25535
25536 2002-07-31  Martin Baulig  <martin@gnome.org>
25537
25538         Implemented Control Flow Analysis.
25539
25540         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25541         (EmitContext.CurrentBranching): Added.
25542         (EmitContext.StartFlowBranching): Added.
25543         (EmitContext.EndFlowBranching): Added.
25544         (EmitContext.KillFlowBranching): Added.
25545         (EmitContext.IsVariableAssigned): Added.
25546         (EmitContext.SetVariableAssigned): Added.
25547         (EmitContext.IsParameterAssigned): Added.
25548         (EmitContext.SetParameterAssigned): Added.
25549         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25550         Added control flow analysis stuff here.
25551
25552         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25553         resolve the expression as lvalue.
25554         (LocalVariableReference.DoResolve): Check whether the variable has
25555         already been assigned.
25556         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25557         the parameter as assigned here.
25558         (ParameterReference.DoResolve): Check whether the parameter has already
25559         been assigned.
25560         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25561         expression as lvalue.
25562
25563         * statement.cs (FlowBranching): New class for the flow analysis code.
25564         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25565         (LabeledStatement.IsDefined): New public property.
25566         (LabeledStatement.AddUsageVector): New public method to tell flow
25567         analyis that the label may be reached via a forward jump.
25568         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25569         flow analysis.
25570         (VariableInfo.Number): New public field.  This is used by flow analysis
25571         to number all locals of a block.
25572         (Block.CountVariables): New public property.  This is the number of
25573         local variables in this block (including the locals from all parent
25574         blocks).
25575         (Block.EmitMeta): Number all the variables.
25576
25577         * statement.cs: Added flow analysis support to all classes.
25578
25579 2002-07-31  Martin Baulig  <martin@gnome.org>
25580
25581         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25582         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25583         then use this argument.
25584
25585         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25586
25587         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25588         use this to specify /define options.
25589
25590 2002-07-29  Martin Baulig  <martin@gnome.org>
25591
25592         * statement.cs (Fixed): Moved all code that does variable lookups
25593         and resolvings from Emit to Resolve.
25594
25595         * statement.cs (For): Moved all code that does variable lookups
25596         and resolvings from Emit to Resolve.
25597
25598         * statement.cs (Using): Moved all code that does variable lookups
25599         and resolvings from Emit to Resolve.
25600
25601 2002-07-29  Martin Baulig  <martin@gnome.org>
25602
25603         * attribute.cs (Attribute.Resolve): Explicitly catch a
25604         System.NullReferenceException when creating the
25605         CustromAttributeBuilder and report a different warning message.
25606
25607 2002-07-29  Martin Baulig  <martin@gnome.org>
25608
25609         * support.cs (ParameterData.ParameterName): Added method to
25610         get the name of a parameter.
25611
25612         * typemanager.cs (TypeManager.IsValueType): New public method.
25613
25614 2002-07-29  Martin Baulig  <martin@gnome.org>
25615
25616         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25617         is a flag which specifies that it's either ref or out.
25618         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25619         the out parameter to `out Parameter.Modifier mod', also set the
25620         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25621
25622         * support.cs (InternalParameters.ParameterModifier): Distinguish
25623         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25624         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25625
25626         * expression.cs (Argument.GetParameterModifier): Distinguish
25627         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25628         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25629
25630 2002-07-29  Martin Baulig  <martin@gnome.org>
25631
25632         * expression.cs (ParameterReference.ParameterReference): Added
25633         `Location loc' argument to the constructor.
25634
25635         * cs-parser.jay: Pass location to ParameterReference.
25636
25637 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25638
25639         * statement.cs (Try): Initialize the location.
25640
25641         * cs-parser.jay: pass location to Try.
25642
25643         * expression.cs (Unary.Reduce): Change the prototype to return
25644         whether a constant fold could be performed or not.  The result is
25645         returned in an out parameters.  In the case of Indirection and
25646         AddressOf, we want to perform the full tests.
25647
25648 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25649
25650         * statement.cs (Statement.Emit): Flag dead code.
25651
25652 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25653
25654         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25655
25656 2002-07-27  Martin Baulig  <martin@gnome.org>
25657
25658         * class.cs (MethodData.Define): Put back call to
25659         TypeManager.AddMethod(), accidentally commented this out.
25660
25661         * report.cs (Debug): New public method to print debugging information,
25662         this is `[Conditional ("DEBUG")]'.
25663
25664 2002-07-26  Martin Baulig  <martin@gnome.org>
25665
25666         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25667         (switch_statement): Push the current_block to the switch_stack and
25668         pop it again when we're done with the switch.
25669         (switch_section): The new block is a child of the current_block.
25670         Fixes bug #24007, added test-152.cs.
25671
25672 2002-07-27  Martin Baulig  <martin@gnome.org>
25673
25674         * expression.cs (Invocation.EmitArguments): When calling a varargs
25675         function with only its fixed arguments, we need to pass an empty
25676         array.
25677
25678 2002-07-27  Martin Baulig  <martin@gnome.org>
25679
25680         Mono 0.13 has been released.
25681
25682 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25683
25684         * driver.cs: Rename --resource to --linkres, because that is what
25685         we do currently, we dont support --resource yet.
25686
25687         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
25688
25689 2002-07-25  Martin Baulig  <martin@gnome.org>
25690
25691         * class.cs (MethodData): New public class.  This is a `method builder'
25692         class for a method or one accessor of a Property/Indexer/Event.
25693         (MethodData.GetMethodFlags): Moved here from MemberBase.
25694         (MethodData.ApplyAttributes): Likewise.
25695         (MethodData.ApplyObsoleteAttribute): Likewise.
25696         (MethodData.ApplyConditionalAttribute): Likewise.
25697         (MethodData.ApplyDllImportAttribute): Likewise.
25698         (MethodData.CheckAbstractAndExternal): Likewise.
25699         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
25700         (MethodData.Emit): Formerly known as Method.Emit().
25701         (MemberBase): Moved everything which was specific to a single
25702         accessor/method to MethodData.
25703         (Method): Create a new MethodData and call Define() and Emit() on it.
25704         (Property, Indexer, Event): Create a new MethodData objects for each
25705         accessor and call Define() and Emit() on them.
25706
25707 2002-07-25  Martin Baulig  <martin@gnome.org>
25708
25709         Made MethodCore derive from MemberBase to reuse the code from there.
25710         MemberBase now also checks for attributes.
25711
25712         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
25713         (MemberBase.GetMethodFlags): Moved here from class Method and marked
25714         as virtual.
25715         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
25716         `CallingConventions cc' and `Attributes opt_attrs' arguments.
25717         (MemberBase.ApplyAttributes): New virtual method; applies the
25718         attributes to a method or accessor.
25719         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
25720         (MemberBase.ApplyConditionalAttribute): Likewise.
25721         (MemberBase.ApplyDllImportAttribute): Likewise.
25722         (MemberBase.CheckAbstractAndExternal): Likewise.
25723         (MethodCore.ParameterTypes): This is now a property instead of a
25724         method, it's initialized from DoDefineParameters().
25725         (MethodCore.ParameterInfo): Removed the set accessor.
25726         (MethodCore.DoDefineParameters): New protected virtual method to
25727         initialize ParameterTypes and ParameterInfo.
25728         (Method.GetReturnType): We can now simply return the MemberType.
25729         (Method.GetMethodFlags): Override the MemberBase version and add
25730         the conditional flags.
25731         (Method.CheckBase): Moved some code from Define() here, call
25732         DoDefineParameters() here.
25733         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
25734         here to avoid some larger code duplication.
25735         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
25736         ensure that abstract and external accessors don't declare a body.
25737
25738         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
25739         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
25740         lookup in the attribute's parent classes, so we need to abort as soon
25741         as we found the first match.
25742         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
25743         the attribute has no arguments.
25744
25745         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
25746         of a Method.
25747
25748 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25749
25750         * cs-parser.jay: reverted previous patch.
25751
25752 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25753
25754         * cs-parser.jay: fixed bug #22119.
25755
25756 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25757
25758         * attribute.cs: fixed compilation. The error was:
25759         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
25760         be assigned to before control leaves the current method."
25761         [FIXME:  Filed as bug #28186: MCS must report this error.]
25762
25763 2002-07-25  Martin Baulig  <martin@gnome.org>
25764
25765         * attribute.cs (Attribute.Conditional_GetConditionName): New static
25766         method to pull the condition name ouf of a Conditional attribute.
25767         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
25768         the obsolete message and error flag out of an Obsolete attribute.
25769
25770         * class.cs (Method.GetMethodFlags): New public method to get the
25771         TypeManager.MethodFlags for this method.
25772         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
25773         private methods.
25774         (Method.Define): Get and apply the Obsolete and Conditional attributes;
25775         if we're overriding a virtual function, set the new private variable
25776         `parent_method'; call the new TypeManager.AddMethod().
25777
25778         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
25779         the MethodBuilder and the Method in a PtrHashtable.
25780         (TypeManager.builder_to_method): Added for this purpose.
25781         (TypeManager.MethodFlags): Added IsObsoleteError.
25782         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
25783         Obsolete and Conditional arguments in MethodBuilders.  If we discover
25784         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
25785         the message from the attribute.
25786
25787 2002-07-24  Martin Baulig  <martin@gnome.org>
25788
25789         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
25790         preprocessor directives, ensure that the argument to #define/#undef is
25791         exactly one identifier and that it's actually an identifier.
25792
25793         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
25794         did not work ....
25795
25796 2002-07-24  Martin Baulig  <martin@gnome.org>
25797
25798         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
25799         initialize it to TypeManager.object_type in the constructor.
25800         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
25801         of the `hm.get_current' method if we're using the collection pattern.
25802         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
25803         for the explicit conversion to make it work when we're using the collection
25804         pattern and the `Current' property has a different return type than `object'.
25805         Fixes #27713.
25806
25807 2002-07-24  Martin Baulig  <martin@gnome.org>
25808
25809         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
25810         does not match, but don't report any errors.  This method is called in
25811         order for all methods in a MethodGroupExpr until a matching method is
25812         found, so we don't want to bail out if the first method doesn't match.
25813         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
25814         matches, report the 123.  Fixes #28070.
25815
25816 2002-07-24  Martin Baulig  <martin@gnome.org>
25817
25818         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
25819         TypeManager.TypeToCoreType() to the top of the method so the
25820         following equality checks will work.  Fixes #28107.
25821
25822 2002-07-24  Martin Baulig  <martin@gnome.org>
25823
25824         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
25825         operand is of type uint, and the other operand is of type sbyte,
25826         short or int, the operands are converted to type long." -
25827         Actually do what this comment already told us.  Fixes bug #28106,
25828         added test-150.cs.
25829
25830 2002-07-24  Martin Baulig  <martin@gnome.org>
25831
25832         * class.cs (MethodBase): New abstract class.  This is now a base
25833         class for Property, Indexer and Event to avoid some code duplication
25834         in their Define() and DefineMethods() methods.
25835         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
25836         generic methods for Define() and DefineMethods().
25837         (FieldBase): Derive from MemberBase, not MemberCore.
25838         (Property): Derive from MemberBase, not MemberCore.
25839         (Property.DefineMethod): Moved all the code from this method to the
25840         new MethodBase.DefineAccessor(), just call it with appropriate
25841         argumetnts.
25842         (Property.Define): Call the new Property.DoDefine(), this does some
25843         sanity checks and we don't need to duplicate the code everywhere.
25844         (Event): Derive from MemberBase, not MemberCore.
25845         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
25846         accessors, this will also make them work with interface events.
25847         (Indexer): Derive from MemberBase, not MemberCore.
25848         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
25849         (Indexer.Define): Use the new MethodBase functions.
25850
25851         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
25852         argument to the constructor.
25853         (Interface.FindMembers): Added support for interface events.
25854         (Interface.PopluateEvent): Implemented.
25855
25856         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
25857
25858 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
25859
25860         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
25861         but this is required to check for a method name being the same as
25862         the containing class.  
25863
25864         Handle this now.
25865
25866 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25867
25868         * interface.cs: initialize variable.
25869
25870 2002-07-23  Martin Baulig  <martin@gnome.org>
25871
25872         Implemented the IndexerName attribute in interfaces.
25873
25874         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
25875         name if this is an explicit interface implementation.
25876         (Indexer.InterfaceIndexerName): New public variable.  If we're
25877         implementing an interface indexer, this is the IndexerName in that
25878         interface.  Otherwise, it's the IndexerName.
25879         (Indexer.DefineMethod): If we're implementing interface indexer,
25880         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
25881         and Pending.ImplementIndexer methods.
25882         (Indexer.Define): Also define the PropertyBuilder if we're
25883         implementing an interface indexer and this is neither an explicit
25884         interface implementation nor do the IndexerName match the one in
25885         the interface.
25886
25887         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
25888         If a method is defined here, then we always need to create a proxy
25889         for it.  This is used when implementing interface indexers.
25890         (Pending.IsInterfaceIndexer): New public method.
25891         (Pending.ImplementIndexer): New public method.
25892         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
25893         This is used when implementing interface indexers to define a proxy
25894         if necessary.
25895         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
25896         define a proxy if necessary.
25897
25898         * interface.cs (Interface.IndexerName): New public variable.
25899         (Interface.PopulateIndexer): Set the IndexerName.
25900         (Interface.DefineIndexers): New private method.  Populate all the
25901         indexers and make sure their IndexerNames match.
25902
25903         * typemanager.cs (IndexerPropertyName): Added support for interface
25904         indexers.
25905
25906 2002-07-22  Martin Baulig  <martin@gnome.org>
25907
25908         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
25909         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
25910         ret if HasReturnLabel.
25911         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
25912         variables.
25913
25914         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
25915         and set the ec.LoopBeginTryCatchLevel.
25916         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
25917         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
25918         the current ec.TryCatchLevel, the branch goes out of an exception
25919         block.  In this case, we need to use Leave and not Br.
25920
25921 2002-07-22  Martin Baulig  <martin@gnome.org>
25922
25923         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
25924         block unless the block does not always return or it is contained in
25925         another try { ... } catch { ... } block.  Fixes bug #26506.
25926         Added verify-1.cs to the test suite.
25927
25928 2002-07-22  Martin Baulig  <martin@gnome.org>
25929
25930         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
25931         then we do not always return.  Fixes bug #24985.
25932
25933 2002-07-22  Martin Baulig  <martin@gnome.org>
25934
25935         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
25936         lookup on a per-class level; ie. walk up the class hierarchy until we
25937         found at least one applicable method, then choose the best among them.
25938         Fixes bug #24463 and test-29.cs.
25939
25940 2002-07-22  Martin Baulig  <martin@gnome.org>
25941
25942         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
25943         return types of the methods.  The return type is not part of the
25944         signature and we must not check it to make the `new' modifier work.
25945         Fixes bug #27999, also added test-147.cs.
25946         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
25947
25948         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
25949         on the method's return type.
25950
25951 2002-07-21  Martin Baulig  <martin@gnome.org>
25952
25953         * assign.cs: Make this work if the rightmost source is a constant and
25954         we need to do an implicit type conversion.  Also adding a few more tests
25955         to test-38.cs which should have caught this.
25956
25957         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
25958         target in the makefile for this.  The makefile.gnu is primarily intended
25959         for end-users who don't want to debug the compiler.
25960
25961 2002-07-21  Martin Baulig  <martin@gnome.org>
25962
25963         * assign.cs: Improved the Assign class so it can now handle embedded
25964         assignments (X = Y = Z = something).  As a side-effect this'll now also
25965         consume less local variables.  test-38.cs now passes with MCS, added
25966         a few new test cases to that test.
25967
25968 2002-07-20  Martin Baulig  <martin@gnome.org>
25969
25970         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
25971         instructions.  Fixes bug #27977, also added test-146.cs.
25972
25973 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25974
25975         * cs-tokenizer.cs: fixed getHex ().
25976
25977 2002-07-19  Martin Baulig  <martin@gnome.org>
25978
25979         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
25980         not Type.GetType() to lookup the array type.  This is needed when
25981         we're constructing an array of a user-defined type.
25982         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
25983         single-dimensional arrays, but also for single-dimensial arrays of
25984         type decimal.
25985
25986 2002-07-19  Martin Baulig  <martin@gnome.org>
25987
25988         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
25989         this function is called, it's not allowed to share LocalBuilders
25990         among ILGenerators.
25991
25992 2002-07-19  Martin Baulig  <martin@gnome.org>
25993
25994         * expression.cs (Argument.Resolve): Report an error 118 when trying
25995         to pass a type as argument.
25996
25997 2002-07-18  Martin Baulig  <martin@gnome.org>
25998
25999         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
26000         Conv_R_Un for the signed `long' type.
26001
26002 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
26003
26004         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
26005         `expr' for the temporary result, as that will fail if we do
26006         multiple resolves on the same expression.
26007
26008 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
26009
26010         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
26011         ec.TypeContainer for looking up aliases. 
26012
26013         * class.cs (TypeContainer): Remove LookupAlias from here.
26014
26015         * decl.cs (DeclSpace); Move here.
26016
26017 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
26018
26019         * class.cs (FindMembers): Only call filter if the constructor
26020         bulider is not null.
26021
26022         Also handle delegates in `NestedTypes' now.  Now we will perform
26023         type lookups using the standard resolution process.  This also
26024         fixes a bug.
26025
26026         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
26027         This uses Expressions (the limited kind that can be parsed by the
26028         tree) instead of strings.
26029
26030         * expression.cs (ComposedCast.ToString): Implement, used to flag
26031         errors since now we have to render expressions.
26032
26033         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
26034         FormArrayType. 
26035
26036         * ecore.cs (SimpleName.ToString): ditto.
26037
26038         * cs-parser.jay: Instead of using strings to assemble types, use
26039         Expressions to assemble the type (using SimpleName, ComposedCast,
26040         MemberAccess).  This should fix the type lookups in declarations,
26041         because we were using a different code path for this.
26042
26043         * statement.cs (Block.Resolve): Continue processing statements
26044         even when there is an error.
26045
26046 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
26047
26048         * class.cs (Event.Define): Also remove the `remove' method from
26049         the list of pending items.
26050
26051         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
26052         generate more compact code. 
26053
26054 2002-07-17  Martin Baulig  <martin@gnome.org>
26055
26056         * const.cs (Const.LookupConstantValue): Add support for constant
26057         `unchecked' and `checked' expressions.
26058         Also adding test case test-140.cs for this.
26059
26060 2002-07-17  Martin Baulig  <martin@gnome.org>
26061
26062         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
26063         check whether mi.ReturnType implements the IEnumerator interface; the
26064         `==' and the IsAssignableFrom() will fail in this situation.
26065
26066 2002-07-16  Ravi Pratap  <ravi@ximian.com>
26067
26068         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
26069         here too.
26070
26071 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26072
26073         * expression.cs: fixed bug #27811.
26074
26075 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
26076
26077         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
26078         Molaro: when we are a ref, the value already contains a pointer
26079         value, do not take the address of it.
26080
26081 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
26082         * removed mb-parser.jay and mb-tokenizer.cs
26083
26084 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26085
26086         * expression.cs: check against the building corlib void type.
26087
26088 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26089
26090         * ecore.cs: fix for valuetype static readonly fields: when 
26091         initializing them, we need their address, not the address of a copy.
26092
26093 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26094
26095         * typemanager.cs: register also enum_type in corlib.
26096
26097 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26098
26099         * class.cs: allow calling this (but not base) initializers in structs.
26100
26101 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26102
26103         * ecore.cs: make sure we compare against the building base types
26104         in GetTypeSize ().
26105
26106 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26107
26108         * typemanager.cs: fix TypeToCoreType() to handle void and object
26109         (corlib gets no more typerefs after this change).
26110
26111 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26112
26113         * expression.cs (ArrayCreation.EmitArrayArguments): use
26114         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26115
26116         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26117         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26118         array indexes, the runtime actually forbids them.
26119
26120         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26121         for array arguments here.
26122
26123         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26124         instead of the default for ValueTypes.
26125
26126         (New.DoEmit): Use IsValueType instead of
26127         IsSubclassOf (value_type)
26128         (New.DoResolve): ditto.
26129         (Invocation.EmitCall): ditto.
26130
26131         * assign.cs (Assign): ditto.
26132
26133         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26134         Statements *are* currently doing part of their resolution during
26135         Emit.  
26136
26137         Expressions do always resolve during resolve, but statements are
26138         only required to propagate resolution to their children.
26139
26140 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26141
26142         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26143
26144         (LoadAssembly): Do not add the dll if it is already specified
26145
26146         (MainDriver): Add the System directory to the link path at the end,
26147         after all the other -L arguments. 
26148
26149         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26150         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26151         ldelem.u1) and using the opposite for sbytes.
26152
26153         This fixes Digger, and we can finally run it.
26154
26155         * driver.cs (UnixParseOption): Move the option parsing here.  
26156         (CSCParseOption): Implement CSC-like parsing of options.
26157
26158         We now support both modes of operation, the old Unix way, and the
26159         new CSC-like way.  This should help those who wanted to make cross
26160         platform makefiles.
26161
26162         The only thing broken is that /r:, /reference: and /lib: are not
26163         implemented, because I want to make those have the same semantics
26164         as the CSC compiler has, and kill once and for all the confussion
26165         around this.   Will be doing this tomorrow.
26166
26167         * statement.cs (Unsafe.Resolve): The state is checked during
26168         resolve, not emit, so we have to set the flags for IsUnsfe here.
26169
26170 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26171
26172         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26173         not catch the Error_ObjectRefRequired in SimpleName (as it is
26174         possible to have a class/instance variable name that later gets
26175         deambiguated), we have to check this here.      
26176
26177 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26178
26179         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26180         make static and put into Expression.
26181
26182         (Event.Define): Register the private field of the event with the 
26183         TypeManager so that GetFieldFromEvent can get at it.
26184
26185         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26186         keep track of the private field associated with an event which
26187         has no accessors.
26188
26189         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26190         private field.
26191
26192         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26193
26194 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26195
26196         * expression.cs (Binary.EmitBranchable): this routine emits the
26197         Binary expression in a branchable context.  This basically means:
26198         we need to branch somewhere, not just get the value on the stack.
26199
26200         This works together with Statement.EmitBoolExpression.
26201
26202         * statement.cs (Statement.EmitBoolExpression): Use
26203         EmitBranchable. 
26204
26205 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26206
26207         * statement.cs (For): Reduce the number of jumps in loops.
26208
26209         (For): Implement loop inversion for the For statement.
26210
26211         (Break): We can be breaking out of a Try/Catch controlled section
26212         (foreach might have an implicit try/catch clause), so we need to
26213         use Leave instead of Br.
26214
26215         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26216         now).  If the instace expression supports IMemoryLocation, we use
26217         the AddressOf method from the IMemoryLocation to extract the
26218         address instead of emitting the instance.
26219
26220         This showed up with `This', as we were emitting the instance
26221         always (Emit) instead of the Address of This.  Particularly
26222         interesting when This is a value type, as we dont want the Emit
26223         effect (which was to load the object).
26224
26225 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26226
26227         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26228
26229         * statement.cs (Checked): Set the CheckedState during the resolve
26230         process too, as the ConvCast operations track the checked state on
26231         the resolve process, and not emit.
26232
26233         * cs-parser.jay (namespace_member_declaration): Flag that we have
26234         found a declaration when we do.  This is used to flag error 1529
26235
26236         * driver.cs: Report ok when we display the help only.
26237
26238 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26239
26240         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26241
26242 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26243
26244         * cs-tokenizer.cs (define): We also have to track locally the
26245         defines.  AllDefines is just used for the Conditional Attribute,
26246         but we also need the local defines for the current source code. 
26247
26248 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26249
26250         * statement.cs (While, For, Do): These loops can exit through a
26251         Break statement, use this information to tell whether the
26252         statement is the last piece of code.
26253
26254         (Break): Flag that we break.
26255
26256         * codegen.cs (EmitContexts): New `Breaks' state variable.
26257
26258 2002-07-03  Martin Baulig  <martin@gnome.org>
26259
26260         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26261         modifiers in method declarations in structs.  Otherwise, you won't
26262         be able to override things like Object.Equals().
26263
26264 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26265
26266         * class.cs (Method, Property, Indexer): Do not allow the public
26267         modifier to be used in explicit interface implementations.
26268
26269         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26270         override modifiers in method declarations in structs
26271
26272 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26273
26274         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26275         integer or real overflow, report an error
26276
26277 2002-07-02  Martin Baulig  <martin@gnome.org>
26278
26279         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26280         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26281         to tell the runtime about our newly created System.Object and
26282         System.ValueType types.
26283
26284 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26285
26286         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26287         struct instead of Ldarg/Starg.
26288
26289 2002-07-02  Martin Baulig  <martin@gnome.org>
26290
26291         * expression.cs (Indirection.Indirection): Call
26292         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26293
26294 2002-07-02  Martin Baulig  <martin@gnome.org>
26295
26296         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26297         ValueType, call TypeManager.TypeToCoreType() on it.
26298         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26299         the OpCodes.Newarr argument.
26300
26301 2002-07-02  Martin Baulig  <martin@gnome.org>
26302
26303         * expression.cs (Invocation.EmitCall): When compiling corlib,
26304         replace all calls to the system's System.Array type to calls to
26305         the newly created one.
26306
26307         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26308         System.Array methods.
26309         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26310         from the system's System.Array type which must be replaced.
26311
26312 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26313
26314         * typemanager.cs: load unverifiable_code_ctor so we can build
26315         corlib using the correct type. Avoid using GetTypeCode() with
26316         TypeBuilders.
26317         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26318         TypeManager.object_type to allow building corlib.
26319
26320 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26321
26322         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26323
26324 2002-07-01  Martin Baulig  <martin@gnome.org>
26325
26326         * class.cs: Make the last change actually work, we need to check
26327         whether `ifaces != null' to avoid a crash.
26328
26329 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26330
26331         * class.cs: when we build structs without fields that implement
26332         interfaces, we need to add the interfaces separately, since there is
26333         no API to both set the size and add the interfaces at type creation
26334         time.
26335
26336 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26337
26338         * expression.cs: the dimension arguments to the array constructors
26339         need to be converted if they are a long.
26340
26341 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26342
26343         * class.cs: don't emit ldarg.0 if there is no parent constructor
26344         (fixes showstopper for corlib).
26345
26346 2002-06-29  Martin Baulig  <martin@gnome.org>
26347
26348         MCS now compiles corlib on GNU/Linux :-)
26349
26350         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26351         ie. check for MethodImplOptions.InternalCall.
26352
26353         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26354         and TypeManager.attribute_type are null, so we must explicitly check
26355         whether parent is not null to find out whether it's an attribute type.
26356         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26357         and SetBuilder, not only if the property is neither abstract nor external.
26358         This is necessary to set the MethodImplOptions on the accessor methods.
26359         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26360         SetBuilder, see Property.Emit().
26361
26362         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26363         populate "System.Object", "System.ValueType" and "System.Attribute" since
26364         they've already been populated from BootCorlib_PopulateCoreTypes().
26365
26366 2002-06-29  Martin Baulig  <martin@gnome.org>
26367
26368         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26369         is the NullLiteral, we also need to make sure that target_type is not
26370         an enum type.   
26371
26372 2002-06-29  Martin Baulig  <martin@gnome.org>
26373
26374         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26375         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26376         before calling BootstrapCorlib_ResolveDelegate ().
26377
26378 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26379
26380         * statement.cs: fixed build-breaker. All tests passed ok.
26381
26382 2002-06-27  Martin Baulig  <martin@gnome.org>
26383
26384         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26385         for System.Decimal when compiling corlib.
26386
26387 2002-06-27  Martin Baulig  <martin@gnome.org>
26388
26389         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26390         switch blocks which contain nothing but a default clause.
26391
26392 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26393
26394        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26395
26396 2002-06-27  Martin Baulig  <martin@gnome.org>
26397
26398         * ecore.cs (PropertyExpr.PropertyExpr): Call
26399         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26400
26401         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26402         is already a TypeBuilder.
26403
26404 2002-06-27  Martin Baulig  <martin@gnome.org>
26405
26406         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26407         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26408         the "from an array-type to System.Array" case.  This makes it work
26409         when compiling corlib.
26410
26411 2002-06-27  Martin Baulig  <martin@gnome.org>
26412
26413         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26414         non-static PropertyExpr, set its InstanceExpression.  This makes
26415         the `ICollection.Count' property work in System/Array.cs.
26416
26417 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26418
26419         * driver.cs: Made error handling more consistent.  Errors now
26420         tracked by Report class, so many methods which used to return int
26421         now return void.  Main() now prints success/failure and 
26422         errors/warnings message.
26423
26424         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26425         the magic number return values (123 and 124).  Now, if the
26426         expected error occurs, the compiler exits with success (exit value
26427         0).  If the compilation completes without seeing that particular
26428         error, the compiler exits with failure (exit value 1).  The
26429         makefile in mcs/errors has been changed to handle the new behaviour.
26430
26431         * report.cs: Made 'expected error' number a property and renamed
26432         it from 'Probe' to 'ExpectedError'.
26433
26434         * genericparser.cs: Removed error handling support, since it is
26435         now all done by Report class.
26436
26437         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26438         class, so parse() no longer returns an int.
26439
26440         * namespace.cs: Use Report.Error instead of GenericParser.error
26441
26442 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26443
26444         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26445         TypeContainer.AddOperator): At the front of the list put the
26446         explicit implementations, so they get resolved/defined first. 
26447
26448 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26449
26450         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26451         interface type is implemented by this TypeContainer.  Used during
26452         explicit interface implementation.
26453
26454         (Property.Define, Indexer.Define, Method.Define): Validate that
26455         the given interface in the explicit implementation is one of the
26456         base classes for the containing type.
26457
26458         Also if we are explicitly implementing an interface, but there is
26459         no match in the pending implementation table, report an error.
26460
26461         (Property.Define): Only define the property if we are
26462         not explicitly implementing a property from an interface.  Use the
26463         correct name also for those properties (the same CSC uses,
26464         although that is really not needed).
26465
26466         (Property.Emit): Do not emit attributes for explicitly implemented
26467         properties, as there is no TypeBuilder.
26468
26469         (Indexer.Emit): ditto.
26470
26471         Hiding then means that we do not really *implement* a pending
26472         implementation, which makes code fail.
26473
26474 2002-06-22  Martin Baulig  <martin@gnome.org>
26475
26476         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26477         the return value of Object.GetType().  [FIXME: we need to do this whenever
26478         we get a type back from the reflection library].
26479
26480 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26481
26482         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26483
26484 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26485
26486         * attribute.cs: Return null if we can not look up the type.
26487
26488         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26489         the interface types found.
26490
26491         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26492         interface types found.
26493
26494         * typemanager.cs (GetInterfaces): Make this routine returns alll
26495         the interfaces and work around the lame differences between
26496         System.Type and System.Reflection.Emit.TypeBuilder in the results
26497         result for GetInterfaces.
26498
26499         (ExpandInterfaces): Given an array of interface types, expand and
26500         eliminate repeated ocurrences of an interface.  This expands in
26501         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26502         be IA, IB, IC.
26503
26504 2002-06-21  Martin Baulig  <martin@gnome.org>
26505
26506         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26507         on System.Enum.
26508
26509 2002-06-21  Martin Baulig  <martin@gnome.org>
26510
26511         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26512         and called with one of the core types, return the corresponding typebuilder for
26513         that type.
26514
26515         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26516         element type.
26517
26518 2002-06-21  Martin Baulig  <martin@gnome.org>
26519
26520         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26521         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26522         (Expression.ConvertReferenceExplicit): Likewise.
26523
26524         * expression.cs (ElementAccess.DoResolve): Likewise.
26525         (ElementAccess.DoResolveLValue): Likewise.
26526
26527 2002-06-10  Martin Baulig  <martin@gnome.org>
26528
26529         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26530         add the "value" parameter to the parameter list.
26531
26532         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26533         to our caller.
26534
26535 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26536
26537         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26538         the argument to an int, uint, long or ulong, per the spec.  Also
26539         catch negative constants in array creation.
26540
26541 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26542
26543         * class.cs: do not allow the same interface to appear twice in
26544         the definition list.
26545
26546 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26547
26548         * ecore.cs: don't use ldlen with System.Array.
26549
26550 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26551
26552         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26553
26554 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26555
26556         * modifiers.cs: produce correct field attributes for protected
26557         internal. Easy fix so miguel can work on ther harder stuff:-)
26558
26559 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26560
26561         * pending.cs: New file.  Move the code from class.cs here.
26562         Support clearning the pending flag for all methods (when not doing
26563         explicit interface implementation).
26564
26565 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26566
26567         * rootcontext.cs: added a couple more types needed to bootstrap.
26568
26569 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26570
26571         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26572         constructor in the type, instead of any constructor in the type
26573         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26574         a bug in the Mono runtime when applying the params attribute). 
26575
26576 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26577         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26578
26579 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26580
26581         * expression.cs (Unary.ResolveOperator): Use TypeManager
26582         to resolve the type.
26583
26584 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26585
26586         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26587         attached.
26588
26589         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26590         with each member too.
26591
26592         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26593         field builders too - this takes care of the enum member case.
26594
26595 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26596
26597         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26598         address-of operator on both value types and pointers.
26599
26600 2002-06-10  Martin Baulig  <martin@gnome.org>
26601
26602         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26603         PropertyBuilder to the `property_builders' list.
26604
26605         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26606         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26607         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26608         find any indexers which are inherited from an interface.
26609
26610 2002-06-09  Martin Baulig  <martin@gnome.org>
26611
26612         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26613         the same type as the constant if necessary.  There's also a test-130.cs
26614         for this.
26615
26616         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26617
26618         * typemanager.cs (TypeManager.ChangeType): Previously known as
26619         Enum.ChangeEnumType().
26620
26621 2002-06-09  Martin Baulig  <martin@gnome.org>
26622
26623         * expression.cs (Cast.TryReduce): Added support for consts.
26624
26625 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26626
26627         * class.cs (Accessor): Hold attributes information so we can pass
26628         it along.
26629
26630         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26631         Modify to pass in attributes attached to the methods.
26632
26633         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26634
26635         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26636         to handle the Accessor kind :-)
26637
26638         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26639
26640 2002-06-08  Martin Baulig  <martin@gnome.org>
26641
26642         * expression.cs (Unary.TryReduceNegative): Added support for
26643         ULongConstants.
26644
26645 2002-06-08  Martin Baulig  <martin@gnome.org>
26646
26647         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26648         name can't be found in the `defined_names' - the caller will do a
26649         MemberLookup in this case and thus find methods in System.Enum
26650         such as Enum.IsDefined().
26651
26652 2002-06-08  Martin Baulig  <martin@gnome.org>
26653
26654         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26655         Convert.ChangeType() which works with TypeBuilder created types.
26656         (Enum.LookupEnumValue, Enum.Define): Use it here.
26657
26658         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26659         `TypeBuilder.BaseType != null' check.
26660         (TypeContainer.FindMembers): Only lookup parent members if we
26661         actually have a parent.
26662         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26663         (ConstructorInitializer.Resolve): Likewise.
26664
26665         * interface.cs (Interface.FindMembers): Added
26666         `TypeBuilder.BaseType != null' check.
26667
26668         * rootcontext.cs (RootContext.ResolveCore): Added
26669         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26670         classes_second_stage.
26671
26672         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26673         debug_type and trace_type when compiling with --nostdlib.       
26674
26675 2002-06-07  Martin Baulig  <martin@gnome.org>
26676
26677         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26678         (AddField): Set it to true when adding a non-static field.
26679         (DefineType): Use `have_nonstatic_fields' to find out whether we
26680         have non-static fields, not `Fields != null'.
26681
26682 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26683
26684         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26685         dereferencing a null on the static-field code path)
26686
26687 2002-05-30  Martin Baulig  <martin@gnome.org>
26688
26689         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
26690         to take command line arguments.  Use reflection to call the new
26691         custom `Initialize' function on the symbol writer and pass it the
26692         command line arguments.
26693
26694         * driver.cs (--debug-args): New command line argument to pass command
26695         line arguments to the symbol writer.
26696
26697 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
26698
26699         * assign.cs (DoResolve): Forgot to do the implicit conversion to
26700         the target type for indexers and properties.  Thanks to Joe for
26701         catching this.
26702
26703 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
26704
26705         * typemanager.cs (MethodFlags): returns the method flags
26706         (Obsolete/ShouldIgnore) that control warning emission and whether
26707         the invocation should be made, or ignored. 
26708
26709         * expression.cs (Invocation.Emit): Remove previous hack, we should
26710         not do this on matching a base type, we should do this based on an attribute
26711
26712         Only emit calls to System.Diagnostics.Debug and
26713         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
26714         on the command line.
26715
26716         * rootcontext.cs: Global settings for tracing and debugging.
26717
26718         * cs-tokenizer.cs (define): New utility function to track
26719         defines.   Set the global settings for TRACE and DEBUG if found.
26720
26721 2002-05-25  Ravi Pratap  <ravi@ximian.com>
26722
26723         * interface.cs (Populate*): Pass in the TypeContainer as well as
26724         the DeclSpace as parameters so that we can create EmitContexts and
26725         then use that to apply attributes etc.
26726
26727         (PopulateMethod, PopulateEvent, PopulateProperty)
26728         (PopulateIndexer): Apply attributes everywhere.
26729
26730         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
26731         etc.
26732
26733         (ApplyAttributes): Update accordingly.
26734
26735         We now apply interface attributes for all members too.
26736
26737 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
26738
26739         * class.cs (Indexer.Define); Correctly check if we are explicit
26740         implementation (instead of checking the Name for a ".", we
26741         directly look up if the InterfaceType was specified).
26742
26743         Delay the creation of the PropertyBuilder.
26744
26745         Only create the PropertyBuilder if we are not an explicit
26746         interface implementation.   This means that explicit interface
26747         implementation members do not participate in regular function
26748         lookups, and hence fixes another major ambiguity problem in
26749         overload resolution (that was the visible effect).
26750
26751         (DefineMethod): Return whether we are doing an interface
26752         implementation. 
26753
26754         * typemanager.cs: Temporary hack until we get attributes in
26755         interfaces (Ravi is working on that) and we get IndexerName
26756         support in interfaces.
26757
26758         * interface.cs: Register the indexers as properties.
26759
26760         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
26761         warning, I have verified that this is a bug in the .NET runtime
26762         (JavaScript suffers of the same problem).
26763
26764         * typemanager.cs (MemberLookup): When looking up members for
26765         interfaces, the parent of an interface is the implicit
26766         System.Object (so we succeed in searches of Object methods in an
26767         interface method invocation.  Example:  IEnumerable x;  x.ToString
26768         ()) 
26769
26770 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
26771
26772         * class.cs (Event): Events should also register if they do
26773         implement the methods that an interface requires.
26774
26775         * typemanager.cs (MemberLookup); use the new GetInterfaces
26776         method. 
26777
26778         (GetInterfaces): The code used to lookup interfaces for a type is
26779         used in more than one place, factor it here. 
26780
26781         * driver.cs: Track the errors at the bottom of the file, we kept
26782         on going.
26783
26784         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
26785         instance if the method we are calling is static!
26786
26787 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
26788
26789         * attribute.cs (ApplyAttributes): Make this function filter out
26790         the IndexerName attribute (as that attribute in reality is never
26791         applied) and return the string constant for the IndexerName
26792         attribute. 
26793
26794         * class.cs (TypeContainer.Emit): Validate that all the indexers
26795         have the same IndexerName attribute, and if so, set the
26796         DefaultName attribute on the class. 
26797
26798         * typemanager.cs: The return value might contain other stuff (not
26799         only methods).  For instance, consider a method with an "Item"
26800         property and an Item method.
26801
26802         * class.cs: If there is a problem with the parameter types,
26803         return. 
26804
26805 2002-05-24  Ravi Pratap  <ravi@ximian.com>
26806
26807         * ecore.cs (ImplicitConversionExists): Wrapper function which also
26808         looks at user defined conversion after making a call to 
26809         StandardConversionExists - we need this for overload resolution.
26810
26811         * expression.cs : Update accordingly the various method calls.
26812
26813         This fixes 2 bugs filed against implicit user defined conversions 
26814
26815 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
26816
26817         * statement.cs: Track the result of the assignment.
26818
26819 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
26820
26821         * expression.cs (MemberAccess): Improved error reporting for
26822         inaccessible members.
26823
26824 2002-05-22  Martin Baulig  <martin@gnome.org>
26825
26826         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
26827         itself with debugging support.
26828
26829 2002-05-22  Martin Baulig  <martin@gnome.org>
26830
26831         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
26832         Removed, this isn't needed anymore.
26833
26834 2002-05-20  Martin Baulig  <martin@gnome.org>
26835
26836         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
26837         be underlying type for an enum.
26838
26839 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
26840
26841         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
26842         that splits out the loading of just the core types.
26843
26844         * rootcontext.cs (ResolveCore): Split the struct resolution in
26845         two, so we can load the enumeration underlying types before any
26846         enums are used.
26847
26848         * expression.cs (Is): Bandaid until we fix properly Switch (see
26849         bug #24985 for details).
26850
26851         * typemanager.cs (ImplementsInterface): The hashtable will contain
26852         a null if there are no interfaces implemented.
26853
26854 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
26855
26856         * cs-parser.jay (indexer_declarator): It is fine to have array
26857         parameters
26858
26859 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26860
26861         * typemanager.cs: (RegisterBuilder): New function used to register
26862         TypeBuilders that implement interfaces.  Since
26863         TypeBuilder.GetInterfaces (as usual) does not work with lame
26864         Reflection.Emit. 
26865         (AddUserType): register interfaces.
26866
26867         (ImplementsInterface): Use the builder_to_ifaces hash if we are
26868         dealing with TypeBuilder.  Also, arrays are showing up as
26869         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
26870         methods can not be invoked on them!
26871
26872         * ecore.cs (ExplicitReferenceConversionExists): Made public.
26873         (ImplicitReferenceConversionExists): Split out from
26874         StandardConversionExists. 
26875
26876         * expression.cs (As): We were only implementing one of the three
26877         cases for the as operator.  We now implement them all.
26878         (Is): Implement the various other cases for Is as well.
26879
26880         * typemanager.cs (CACHE): New define used to control if we want or
26881         not the FindMembers cache.  Seems to have a negative impact on
26882         performance currently
26883
26884         (MemberLookup): Nested types have full acess to
26885         enclosing type members
26886
26887         Remove code that coped with instance/static returns for events, we
26888         now catch this in RealFindMembers.
26889
26890         (RealFindMembers): only perform static lookup if the instance
26891         lookup did not return a type or an event.  
26892
26893 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26894
26895         * assign.cs (CompoundAssign): We pass more semantic information
26896         now to Compound Assignments than we did before: now we have all
26897         the information at hand, and now we resolve the target *before* we
26898         do the expression expansion, which allows the "CacheValue" method
26899         to have the effect we intended (before, a [x] += 1 would generate
26900         two differen ArrayAccess expressions from the ElementAccess,
26901         during the resolution process).
26902
26903         (CompoundAssign.DoResolve): Resolve target and original_source here.
26904
26905 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
26906
26907         * expression.cs (ArrayAccess): dropped debugging information. 
26908
26909         * typemanager.cs: Small bug fix: I was always returning i_members,
26910         instead of one of i_members or s_members (depending on which had
26911         the content).
26912
26913         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
26914         method is invoked before any code generation takes place, and it
26915         is a mechanism to inform that the expression will be invoked more
26916         than once, and that the method should use temporary values to
26917         avoid having side effects
26918
26919         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
26920
26921         * ecore.cs (Expression.CacheTemporaries): Provide empty default
26922         implementation.
26923
26924         * expression.cs (Indirection, ArrayAccess): Add support for
26925         CacheTemporaries in these two bad boys. 
26926
26927         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
26928         ldobj or ldind_ref.  
26929         (StoreFromPtr): Handle stobj as well.
26930
26931         * expression.cs (UnaryMutator): Share more code.
26932
26933         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
26934         down: I was not tracking the Filter function as well, which
26935         was affecting the results of the cache.
26936
26937 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
26938
26939         * attribute.cs: Remove the hack to handle the CharSet property on
26940         StructLayouts. 
26941
26942 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
26943
26944         * attribute.cs (DoResolve): More uglyness, we now only try to
26945         resolve the attribute partially, to extract the CharSet
26946         information (only if we are a StructLayout attribute).  Otherwise 
26947
26948         (GetExtraTypeInfo): Add some code to conditionally kill in the
26949         future this.   I am more and more convinced that the .NET
26950         framework has special code to handle the attribute setting on
26951         certain elements.
26952
26953         * expression.cs (IsParamsMethodApplicable): Revert my previous
26954         foreach change here, it was wrong.
26955
26956 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
26957
26958         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
26959         (pp_expr): do not abort on unknown input, just return.
26960         (eval): abort if there are pending chars.
26961
26962         * attribute.cs (Attribute.Resolve): Positional parameters are
26963         optional.  Deal with that case.
26964
26965         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
26966         the Ansi/Unicode/Auto information for the type.
26967
26968         (TypeContainer.DefineType): instantiate the EmitContext here, as
26969         we will be using it during the type definition (to resolve
26970         attributes) and during the emit phase.
26971
26972         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
26973         to pull type information out of the attributes
26974
26975         (Attribute.Resolve): track the constructor builder, and allow for
26976         multiple invocations (structs and classes will use this).
26977
26978         * ecore.cs (MemberLookupFinal): new version with all the
26979         parameters customizable.
26980
26981         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
26982         constructors.  Return if the result value is null (as the error
26983         would have been flagged already by MemberLookupFinal)
26984
26985         Do not allow instances of abstract classes or interfaces to be
26986         created.
26987
26988         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
26989         We have to compare the assembly property here when dealing with
26990         FamANDAssem and Assembly access modifiers, because we might be
26991         creating an assembly from *modules* (that means that we are not
26992         getting TypeBuilders for types defined in other modules that are
26993         part of this assembly).
26994
26995         (Method.Emit): If the method is marked abstract and has a body,
26996         emit an error. 
26997
26998         (TypeContainer.DefineMembers): If both the defined member and the
26999         parent name match are methods, then do not emit any warnings: let
27000         the Method.Define routine take care of flagging warnings.  But if
27001         there is a mismatch (method overrides something else, or method is
27002         overriwritten by something, then emit warning).
27003
27004         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
27005         set to null, this means `do not check for the return type on the
27006         signature'. 
27007
27008         (Method.Define): set the return type for the method signature to
27009         null, so that we get methods with the same name and parameters and
27010         different return types.  This is used to flag warning 114 (you are
27011         hiding a method, and you probably want to use the new/override
27012         keywords instead).
27013
27014         * typemanager.cs (MemberLookup): Implemented proper access
27015         control, closing a long standing set of bug reports.  The problem
27016         was that the Framework only has two bits: Public and NonPublic,
27017         and NonPublic includes private and protected methods, but we need
27018         to enforce the FamANDAssem, FamOrAssem and Family. 
27019
27020 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
27021
27022         * statement.cs (GotoCase): Return true: Ammounts to giving up
27023         knowledge on whether we return or not, and letting the other case
27024         be responsible for it.
27025
27026 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
27027
27028         * driver.cs: Do not load directories for each file processed, only
27029         do it if there is a pattern.
27030
27031         * ecore.cs: Report readonly assigns here as well, as we might have
27032         been resolved only by MemberAccess.
27033
27034         (SimpleName.SimpleNameResolve): Also be useful for LValue
27035         resolution.   We need this to propagate assign to local readonly variables
27036
27037         * typemanager.cs: Use a ptrhashtable for the criteria, because we
27038         do not want to reuse potential criteria memory.
27039
27040         * class.cs (MyEventBuilder): Set reflected_type;
27041
27042         * ecore.cs (Constantify): Added support for constifying bools.
27043
27044         (RootContext.LookupType): Added a cache for values looked up in
27045         the declaration space.
27046
27047         * typemanager.cs (FindMembers): Now is a front-end to
27048         RealFindMembers, and provides a two-level hashtable-based cache to
27049         the request.  
27050
27051         15% performance improvement: from 22.5 to 19.2 seconds.
27052
27053         * expression.cs (IsParamsMethodApplicable): use foreach.
27054         (Invocation.DoResolve): ditto.
27055         (New.DoResolve): ditto.
27056         (ArrayCreation.DoResolve): ditto.
27057
27058         * ecore.cs (FindMostEncompassingType): use foreach.
27059
27060         * delegate.cs (NewDelegate.DoResolve): Use foreach
27061
27062         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
27063         (RemoveMethods): use foreach.
27064
27065         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
27066         nested foreach statements instead of for, and also break out of
27067         the inner loop once a match is found.
27068
27069         (Invocation.OverloadResolve): Use foreach, simplify the code. 
27070
27071 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
27072
27073         * cfold.cs (BinaryFold): During an enumeration evaluation context,
27074         we actually unwrap the expression to allow for extra information
27075         to be extracted. 
27076
27077         * expression.cs: Use Shr_Un on unsigned operations. 
27078
27079 2002-05-08  Ravi Pratap  <ravi@ximian.com>
27080
27081         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
27082         applicable operators was not being considered correctly. This closes
27083         the bug Miguel reported.
27084
27085 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27086
27087         * attribute.cs: check that the type derives from System.Attribute
27088         and report the correct error in that case (moved the duplicate code to
27089         its own method, too).
27090
27091 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27092
27093         * attribute.cs: lookup attribute type name as the spec says: first the
27094         bare attribute name and then name + "Attribute" (nant compiles with
27095         mcs after this fix).
27096
27097 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27098
27099         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27100         Because of the way we parse things, we should try to see if a
27101         UIntConstant can fit in an integer.
27102
27103 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27104
27105         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27106         when we are in an explicit context.
27107
27108         (ConvertReferenceExplicit): When converting from Iface type S to Class
27109         T make sure the rules are implemented as an OR.
27110
27111         * parameter.cs (ParameterType): Make it a property for now although the
27112         purpose really isn't anything immediate.
27113
27114         * expression.cs (Is*Applicable): Do better checking on the parameter type
27115         of a ref/out parameter. The ones from the system assemblies are already 
27116         marked with the correct type so we don't need to do any correction.
27117
27118         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27119         the object type is standard too so include that.
27120
27121 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27122
27123         * ecore.cs (StandardConversionExists): Augment with missing code:
27124         deal with IntConstant, LongConstants and Enumerations.
27125
27126         * assign.cs: Report the error, instead of failing silently
27127
27128         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27129         typecontainer that they are declared, because the
27130         typecontainer/namespace will have the list of using clauses that
27131         need to be applied.
27132
27133         Assembly Attributes were escaping the normal registration
27134         mechanism. 
27135
27136         (EmitCode): Apply attributes within an EmitContext that represents
27137         the container they were declared on.
27138
27139         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27140
27141 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27142
27143         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27144         Revamp completely - make much cleaner as we now operate only
27145         on a set of Types.
27146
27147         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27148         to implement the logic detailed in the spec more correctly.
27149
27150         (UserDefinedConversion): Update accordingly.
27151
27152 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27153
27154         * statement.cs: Return flow analysis information up.
27155
27156         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27157         and the default.
27158
27159         (token): Do not consume an extra character before calling
27160         decimal_digits.
27161
27162 2002-05-06  Piers Haken <piersh@friskit.com>
27163
27164         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27165
27166 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27167
27168         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27169         EmitContext during the instance constructor initializer
27170         resolution, to stop access to instance variables.
27171
27172         This is mandated by the spec, last paragraph of the `constructor
27173         initializers' section. 
27174
27175 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27176
27177         * cs-parser.jay, class.cs (Accessor): new class used to represent
27178         an accessor (get or set).  In the past we used `null' to represent
27179         a missing accessor.  But this is ambiguous because there was no
27180         way to tell in abstract indexers/properties if one of them was
27181         specified.
27182
27183         Now there is a way of addressing that.
27184
27185         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27186         instead of FindMembers.
27187
27188         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27189         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27190
27191         * attribute.cs: Treat indexers and properties as the same in terms
27192         of applying attributes
27193
27194         * ecore.cs (FindMostEncompassedType): Use statically initialized
27195         EmptyExpressions()s like we do elsewhere to avoid creating useless
27196         objects (and we take this out of the tight loop).
27197
27198         (GetConversionOperators): Move the code to extract the actual
27199         operators to a separate routine to clean things up.
27200
27201 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27202
27203         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27204         events are always registered FieldBuilders.
27205
27206         * class.cs (FieldBase): New class shared by Fields 
27207
27208         * delegate.cs: If we are a toplevel delegate, use our full name.
27209         If we are a nested delegate, then only use our tail name.
27210
27211 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27212
27213         * expression.cs (IsApplicable): Ensure that we add the "&" to
27214         ref/out types before comparing it with the type of the argument.
27215
27216         (IsParamsMethodApplicable): Ditto.
27217
27218         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27219         silly me ;-)
27220
27221         * delegate.cs : Handle the case when we have more than one applicable
27222         method. Flag an error only when we finish checking all.
27223
27224 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27225
27226         * expression.cs: Add support for boolean static initializers.
27227
27228 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27229
27230         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27231
27232         * parameter.cs (ComputeParameterTypes,
27233         ComputeAndDefineParameterTypes): Better error handling: now we
27234         clear the `types' cache if we fail during any of the type lookups.
27235         We also return the status code correctly to our caller
27236
27237         * delegate.cs: If we fail to define a delegate, abort the extra
27238         steps. 
27239
27240         * expression.cs (Binary.ResolveOperator): for
27241         operator==(object,object) and operator !=(object, object) we also
27242         have to verify that there is an implicit conversion from one to
27243         the other.
27244
27245         (ArrayAccess.DoResolve): Array Access can operate on
27246         non-variables. 
27247
27248 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27249
27250         * assign.cs (CompoundAssign): A new class used as a "flag" that
27251         the assignment actually is happening as part of a compound
27252         assignment operator.
27253
27254         During compound assignment, a few new rules exist to enable things
27255         like:
27256
27257         byte b |= 1 + 2
27258
27259         From the spec:
27260
27261         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27262         to the type of x) if y is implicitly convertible to the type of x,
27263         and the operator is a builtin operator and the return type of the
27264         operator is explicitly convertible to the type of x. 
27265
27266         * rootcontext.cs: Reset warning level to 2.  4 catches various
27267         "interesting" features in mcs, we must clean this up at some
27268         point, but currently am trying to kill other bugs ;-)
27269
27270         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27271         in container classes as well.  
27272
27273         * expression.cs (Binary.ResolveOperator): Handle string case
27274         before anything else (as operator overloading does emit an error
27275         before doing anything else).
27276
27277         This code could go away when we move to a table driven model, but
27278         i could not come up with a good plan last night.
27279
27280 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27281
27282         * typemanager.cs (CSharpName): reimplementation using regex.
27283         * class.cs: added null check for fields in Emit
27284         * rootcontext.cs: set warninglevel to 4
27285
27286 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27287
27288         * typemanager.cs (CSharpName): reimplemented with Lupus
27289         suggestion.
27290
27291 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27292
27293         * statement.cs (If): correclty implement Resolve, because we were
27294         not catching sem errors in there.  The same process is needed
27295         everywhere else. 
27296         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27297
27298
27299         (Statement.Warning_DeadCodeFound): Factorize code.
27300         (While): Report dead code here too.
27301
27302         (Statement): Added Resolve virtual method to allow
27303         for resolution split from the emit code.
27304
27305 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27306
27307         * statement.cs (EmitBoolExpression): No longer try to resolve the
27308         expression here.    
27309         (MakeBoolean): New utility function that resolve, implicitly
27310         converts to boolean and tags the expression. 
27311
27312
27313         (If, Do): Implement dead code elimination.
27314         (While): Implement loop inversion
27315
27316         (Do, While, For, If): Resolve the expression prior to calling our
27317         code generation.
27318
27319 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27320
27321         * class.cs:
27322           - added method Report28 (warning: program has more than one entry point)
27323           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27324           - modified method Method.Define, the part at the end of the method
27325
27326         * rootcontext.cs: added static public Location EntryPointLocation;
27327           
27328         * ../errors/cs0028.cs : Add test case for the above warning.              
27329
27330         * typemanager.cs:
27331           - modified method CSharpName to allow arrays of primitive type to
27332             be printed nicely (e.g. instead of System.Int32[][] it now prints
27333             int[][])
27334           - added method CSharpSignature: returns the signature of a method
27335             in string format to be used in reporting errors, warnings, etc.
27336
27337         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27338         with String.Empty.
27339
27340 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27341
27342         * delegate.cs (Define): Fix extremely silly bug where I was
27343         setting the type of the 'object' parameter of the BeginInvoke
27344         method to System.IAsyncResult instead of System.Object ;-)
27345
27346 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27347
27348         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27349         here. 
27350
27351         (Constructor.Emit): return if we fail to initialize the
27352         constructor.  Another door closed!  
27353
27354         * expression.cs (New.DoResolve): Improve error message (from -6 to
27355         1501).  Use DeclaredOnly lookup to find the exact constructor.
27356
27357         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27358         loop.  This is useful.
27359
27360         * cs-parser.jay: Adjust the default parameters so that destructors
27361         have the proper signature.
27362
27363 2002-04-26  Martin Baulig  <martin@gnome.org>
27364
27365         * driver.cs (LoadAssembly): If `assembly' contains any characters
27366         which are only valid in path names and not in assembly names
27367         (currently slash, backslash and point), use Assembly.LoadFrom ()
27368         instead of Assembly.Load () on the `assembly' (before iteration
27369         over the link_paths).
27370
27371 2002-04-26  Martin Baulig  <martin@gnome.org>
27372
27373         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27374
27375 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27376
27377         * class.cs (Property): use the new typemanager.MemberLookup
27378
27379         (TypeContainer.MemberLookup): Implement using the
27380         TypeManager.MemberLookup now. 
27381
27382         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27383         and return MemberInfos, so that these can be used without an
27384         EmitContext (what we had before).
27385
27386 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27387
27388         * expression.cs: Fix the case where the argument to params if the
27389         type of the params.  I omitted handling this before.   Fixed
27390
27391 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27392
27393         * driver.cs: Call BootCorlib_PopulateCoreType
27394
27395         * class.cs (Property.CheckBase): Check for properties only, not
27396         for all members. 
27397
27398         * interface.cs: Temporary hack: try/catch around the
27399         CustomAttributeBuilder, because I am getting an exception that I
27400         do not understand.
27401
27402         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27403         types whose definitions are required to be there (attributes are
27404         defined before standard types).
27405
27406         Compute definitions as we boot the various types, as they are used
27407         immediately (value_type class will need object_type, but if we do
27408         not initialize object_type, we will pass a null, which will let
27409         the runtime pick the System.Object from the existing corlib, which
27410         is not what we want).
27411
27412 2002-04-22  Patrik Torstensson <totte@labs2.com>
27413
27414         * cs-tokenizer.cs: fixed a number of trim() issues.
27415
27416 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27417
27418         * expression.cs (Argument.Type): Ensure that we return the correct
27419         type when we have out or ref parameters [in which case we 
27420         append a "&"].
27421
27422 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27423
27424         * class.cs (Property, Indexer): Allow extern modifier in there. 
27425
27426         * typemanager.cs (InitBaseTypes): Initializes object_type and
27427         value_type, since those will be used early on during the bootstrap
27428         process to compile corlib.
27429
27430         (InitCoreTypes): Move code from here to InitBaseTypes.
27431
27432 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27433
27434         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27435         single-dimension arrays as using the ldlen opcode.  
27436
27437         Daniel Lewis discovered this optimization.  
27438
27439         * typemanager.cs: Add signature for System.Array::get_Length
27440
27441 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27442
27443         * statement.cs: report the error when the foreach does not apply to an
27444         array nor a collection.
27445
27446 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27447
27448         * expression.cs: Add implicit conversions to the operator ~.
27449
27450         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27451
27452         * typemanager.cs: Locate the decimal constructor.
27453
27454 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27455
27456         * attribute.cs: use the new property of TypeOf.
27457         * expression.cs: added 'get' property around typearg.
27458
27459         These changes fix a build breaker reported by NickD. Is this the
27460         correct way to fix?  If not, please, revert my changes and make it
27461         work :-).
27462
27463 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27464
27465         * attribute.cs: Add support for typeof in attribute invocations.
27466         I am not sure that this is right though.
27467
27468 2002-04-14  Duncan Mak  <duncan@ximian.com>
27469
27470         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27471         Binary.Operator.Division case.
27472
27473 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27474
27475         * class.cs (DefineType): Ensure that we do a proper check on
27476         attribute types and also register it with the TypeManager.
27477
27478         (TypeContainer.Targets): The default for attribute types is
27479         AttributeTargets.All.
27480
27481         * attribute.cs (ApplyAttributes): Registering the attribute type
27482         is done elsewhere, not when we discover we have a Usage attribute.
27483
27484 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27485
27486         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27487         and get rid of is_delegate parameter.
27488
27489         * everywhere : update.
27490
27491 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27492
27493         * cs-parser.jay (compilation_unit): Revamp completely to use
27494         some new ideas that I got from Rhys' grammar to solve the problems
27495         with assembly level attributes.
27496
27497         (outer_declaration): New grammar production.
27498
27499         (attribute_sections): Add.
27500
27501         (opt_attributes): Base on attribute_sections
27502
27503         (namespace_declaration): Allow opt_attributes to tackle the case
27504         when we have assembly level attributes - we are clever in this
27505         regard now ;-)
27506
27507         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27508         attributes in the non-global context.
27509
27510         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27511         instead of SetGlobalAttributes.
27512
27513         * class.cs, rootcontext.cs : Ensure we define and generate 
27514         attribute types before anything else.
27515
27516         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27517         and flag the new error -20 for the case when the attribute type
27518         does not have valid targets specified. csc does not catch this.
27519
27520         * ../errors/errors.txt : update for error # -20
27521
27522 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27523
27524         * support.cs (InternalParameters.ParameterModifier): Do some null
27525         checking and return sane values.
27526
27527         * class.cs (Method.Define): If we are a PInvoke method, ensure
27528         that we are static and extern. Report error # 601
27529
27530         * ../errors/cs0601.cs : Add test case for the above error.
27531
27532 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27533
27534         * rootcontext.cs (attribute_types): We need to keep type of
27535         all attribute types separately and emit code for them first.
27536
27537         (RegisterAttribute) : Implement.
27538
27539         * class.cs (DefineType): Check if the current Type is a custom
27540         attribute type and register it accordingly.
27541
27542         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27543         adding the first attribute twice and rename to
27544
27545         (SetGlobalAttributes): this.
27546
27547         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27548         lookups.
27549
27550         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27551         if we are processing global arguments. Hmm, I am unsure of this.
27552
27553 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27554
27555         * expression.cs: added static array of strings to avoid calling
27556         Enum.ToString () for Operator in Binary. Significant recover of
27557         performance.
27558
27559 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27560
27561         * class.cs (FindMembers): Allow the Builders of the various
27562         members to be null.  If they are skip them.  This only happens
27563         during the PInvoke declaration.
27564
27565 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27566
27567         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27568         failure, so we do not keep going afterwards.
27569
27570         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27571         wanted to pass `false' as the `is_delegate' argument.  If this is
27572         the case, why not use delegate_type == null to mean `is_delegate =
27573         false' and anything else as is_delegate = true.
27574
27575 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27576
27577         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27578         code for the section, not the beginning of the tests.
27579
27580 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27581
27582         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27583
27584         * expression.cs (Binary): same.  Warn about errors where we have
27585         Enum/Enum in operator + as well.
27586
27587 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27588
27589         * statement.cs:
27590                 - added support for switch(bool)
27591                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27592                 - add TableSwitchEmit() to handle table-based switch statements
27593
27594 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27595
27596         * expression.cs (Invocation.OverloadResolve): Factor out code which
27597         does parameter compatibility checking with arguments so that we can 
27598         re-use the code even from Delegate.VerifyApplicability
27599
27600         (VerifyArgumentsCompat): Move above code here.
27601
27602         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27603         and instead make a call to the above method.
27604
27605 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27606
27607         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27608         We use it to keep track of classes which are attribute types.
27609
27610 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27611
27612         * delegate.cs (Delegate.Define): Correctly define the types in the
27613         presence of fixed and array parameters.
27614
27615         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27616         doing FindMembers.
27617
27618         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27619         include NonPublic after the first iteration.
27620
27621         * class.cs (Indexer.CheckBase): Only check if both parents are
27622         non-null. 
27623
27624         * cs-parser.jay (accessor_body): If empty, set to null.
27625
27626         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27627         same code path here to resolve constants names that we did have in
27628         MemberAccess.DoResolve.  There is too much code duplicated here.
27629
27630 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27631
27632         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27633
27634         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27635         to MakeUnionSet.
27636
27637         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27638         tokens, numbers and strings.
27639
27640         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27641         parenthesis.
27642
27643         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27644         asyncronous parameters and the regular parameters.  
27645
27646         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27647         specify the target directory.
27648
27649         * expression.cs: (This.DoResolve): Simplify
27650         (As.Emit): Optimize, do not generate IsInst if the expression is
27651         always of the given type.
27652
27653         (Is.DoResolve): Bug fix, we were reporting both always/never for
27654         the is expression.
27655
27656         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27657         creating too many unnecessary arrays.
27658
27659 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27660
27661         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27662         fields instead of rolling our own initializer.   Takes care of all
27663         implicit conversions, and drops unnecessary static checks/argument.
27664
27665 2002-03-31  Dick Porter  <dick@ximian.com>
27666
27667         * driver.cs: use the GetDirectories() return values properly, and
27668         use "/" as path separator.
27669
27670 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27671
27672         * expression.cs (Unary): Optimize - - expr into expr.
27673         (Binary): Optimize a + (-b) into a -b.
27674
27675         * codegen.cs (CodeGen): Made all methods static.
27676
27677 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27678
27679         * rootcontext.cs: 
27680
27681         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27682         TypeBuilder property.
27683
27684         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27685         instead. 
27686
27687         * tree.cs: Removed the various RecordXXXX, and replaced with a
27688         single RecordDecl.  Removed all the accessor methods, and just
27689         left a single access point Type 
27690
27691         * enum.cs: Rename DefineEnum to DefineType.
27692
27693         * decl.cs: New abstract method `DefineType' used to unify the
27694         Defines for Enumerations, Interfaces, TypeContainers and
27695         Delegates.
27696
27697         (FindType): Moved LookupInterfaceOrClass here.  Moved the
27698         LookupBaseClasses method that used to live in class.cs and
27699         interface.cs here, and renamed to FindType.
27700
27701         * delegate.cs: Implement DefineType.  Take advantage of the
27702         refactored pattern for locating the parent builder without taking
27703         the parent_builder argument (which we know does not work if we are
27704         nested, and triggering a toplevel definition).
27705
27706 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27707
27708         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
27709         accessibility of a member has changed during override and report
27710         an error if so.
27711
27712         * class.cs (Method.Define, Property.Define): Only complain on
27713         overrides if the method is private, any other accessibility is
27714         fine (and since we just checked the permission is the same, we are
27715         good to go).
27716
27717         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
27718         and elif are processed always.  The other pre-processing
27719         directives are only processed if we are "taking" the path
27720
27721 2002-03-29  Martin Baulig  <martin@gnome.org>
27722
27723         * class.cs (Method.Emit): Only emit symbolic debugging info if the
27724         current location is not Null.
27725
27726         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
27727         a separate method so we can profile it.
27728
27729         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
27730         `span.Seconds' are just seconds, but no minutes or hours.
27731         (MainDriver): Profile the CodeGen.SaveSymbols calls.
27732
27733 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27734
27735         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
27736         Remove the gratuitous set of Final:
27737
27738                                 // If an interface implementation, then we can set Final.
27739                                 if (((flags & MethodAttributes.Abstract) == 0) &&
27740                                     implementing.DeclaringType.IsInterface)
27741                                         flags |= MethodAttributes.Final;
27742
27743         I do not know what I was smoking when I used that.
27744
27745
27746         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
27747         step into fixing the name resolution issues for delegates and
27748         unifying the toplevel name resolution.
27749
27750 2002-03-28  Martin Baulig  <martin@gnome.org>
27751
27752         * class.cs (Method.Emit): If we have a symbol writer, call its
27753         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
27754         tell it about the current method.
27755
27756         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
27757         writer that we're going to emit the first byte of IL code for a new
27758         statement (a new source line).
27759         (EmitContext.EmitTopBlock): If we have a symbol writer, call
27760         EmitContext.Mark() before emitting any code.
27761
27762         * location.cs (SymbolDocument): Return null when we're Null.
27763
27764         * statement.cs (Statement): Moved the `Location loc' variable here.
27765         (Statement.EmitBoolExpression): If we have a symbol writer, call
27766         ec.Mark() before emitting any code to tell it that we're at the
27767         beginning of a new statement.
27768         (StatementExpression): Added `Location' argument to the constructor.
27769         (Block): Added public readonly variable `StartLocation' and public
27770         variable `EndLocation'.  The latter is to be set using SetEndLocation().
27771         (Block): Added constructor which takes a start and end location.
27772         (Block.SetEndLocation): New method. This sets the end location.
27773         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
27774         local variables we create.
27775         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
27776         each statement and do also mark the begin and end of the block.
27777
27778         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
27779         tell it the current lexer.Location, use Location.Null for the end of the
27780         block.
27781         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
27782         current block, set its end location using SetEndLocation().
27783         (statement_expression): StatementExpression constructor now takes the
27784         lexer.Location as additional argument.
27785         (for_statement, declare_local_variables): Likewise.
27786         (declare_local_variables): When creating a new implicit block, use the
27787         new Block constructor and pass it the lexer.Location.
27788
27789 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27790
27791         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
27792         members also on the parent interfaces recursively.
27793
27794 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
27795
27796         * report.cs: Use new formats, since Gonzalo finished the missing
27797         bits. 
27798
27799         * expression.cs (Binary.ResolveOperator): added missing operator|
27800         operator& and operator^ for bool/bool.
27801
27802         * cs-parser.jay: CheckDef now takes a Location argument that is
27803         used to report errors more precisly (instead of reporting the end
27804         of a definition, we try to track something which is a lot closer
27805         to the source of the problem).
27806
27807         * cs-tokenizer.cs: Track global token use, so we can properly flag
27808         the use of #define/#undef after the first token has been seen.
27809
27810         Also, rename the reportXXXX to Error_DescriptiveName
27811
27812         * decl.cs (DeclSpace.IsTopLevel): Move property here from
27813         TypeContainer, so that Enum and Interface can use this too.
27814
27815         * class.cs (TypeContainer.LookupInterfaceOrClass,
27816         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
27817         `builder' argument.  Typically this was used to pass the parent
27818         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
27819         the definition).  
27820
27821         The problem is that a nested class could trigger the definition of
27822         a toplevel class, and the builder would be obviously wrong in that
27823         case. 
27824
27825         So we drop this argument, and we compute dynamically the
27826         TypeBuilder/ModuleBuilder (the correct information was available
27827         to us anyways from DeclSpace.Parent)
27828
27829         * interface.cs (Interface.DefineInterface): Drop builder
27830         parameter cleanup like class.cs
27831
27832         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
27833         like class.cs
27834
27835         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
27836         values. 
27837
27838         (Try.Emit): Propagate the returns value from the statement.
27839
27840         (Return.Emit): Even if we are leavning 
27841
27842         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
27843
27844         * modifiers.cs: Fix the computation of MethodAttributes flags.
27845
27846 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
27847
27848         * driver.cs: allow compilation of files that start with '/'.
27849         Add a default case when checking the argument of --target.
27850
27851 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
27852
27853         * interface.cs: Implement the same search algorithm for types in
27854         the interface code.
27855
27856         * delegate.cs: Do not allow multiple definition.
27857
27858         * Recovered ChangeLog that got accidentally amputated
27859
27860         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
27861
27862         * rootcontext.cs: Load manually enum to allow core classes to
27863         contain enumerations.
27864
27865         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
27866         Update to new static methods in TypeManager.
27867
27868         * typemanager.cs (GetMethod, GetConstructor): Use our
27869         implementation of FindMembers to find the members, since during
27870         corlib compilation, the types are TypeBuilders and GetMethod and
27871         GetConstructor do not work.
27872
27873         Make all methods in TypeManager static.
27874
27875         (InitCodeHelpers): Split the functionality from
27876         the InitCodeTypes function.
27877
27878         * driver.cs: Call InitCodeHelpers after we have populated the
27879         types. 
27880
27881         * cs-parser.jay (delegate_declaration): we did not used to compute
27882         the delegate name correctly for void delegates.
27883
27884 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
27885
27886         * rootcontext.cs (RootContext): Init the interface_resolve_order
27887         and type_container_resolve_order always.
27888
27889         (ResolveCore, BootstrapCorlib_ResolveClass,
27890         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
27891         compiler when compiling with --nostdlib
27892
27893         * class.cs (TypeContainer.DefineType): Check that our parent is
27894         not null.  This test is most important when we are bootstraping
27895         the core types.
27896
27897         * codegen.cs: Split out the symbol writing code.
27898
27899 2002-03-25  Martin Baulig  <martin@gnome.org>
27900
27901         * driver.cs (-g): Made -g an alias for --debug.
27902
27903 2002-03-24  Martin Baulig  <martin@gnome.org>
27904
27905         * codegen.cs (SymbolWriter): New public variable. Returns the
27906         current symbol writer.
27907         (CodeGen): Added `bool want_debugging_support' argument to the
27908          constructor. If true, tell the ModuleBuild that we want debugging
27909         support and ask it for the ISymbolWriter.
27910         (Save): If we have a symbol writer, call it's Close() method after
27911         saving the assembly.
27912
27913         * driver.c (--debug): New command line argument to create a
27914         debugger information file.
27915
27916         * location.cs (SymbolDocument): New public property. Returns an
27917         ISymbolDocumentWriter object for the current source file or null
27918         if we don't have a symbol writer.
27919
27920 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
27921
27922         * driver.cs (LoadAssembly): Correctly return when all the paths
27923         have been tried and not before.
27924
27925         * statement.cs (Switch.Emit): return the actual coverage for this
27926         statement (returns/not-returns)
27927
27928         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
27929         switch of the statement if we are the last switch section.  That
27930         kills two problems: try/catch problems (we used to emit an empty
27931         nop at the end) and switch statements where all branches would
27932         return. 
27933
27934 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
27935
27936         * driver.cs: Add default assemblies (the equivalent to the
27937         Microsoft CSC.RSP file)
27938
27939         * cs-tokenizer.cs: When updating `cols and setting it to zero,
27940         also update tokens_seen and set it to false.
27941
27942         * driver.cs: Implement --recurse for Mike.
27943
27944         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
27945         correctly splitting out the paths.
27946
27947 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
27948
27949         * interface.cs (Interface.PopulateProperty): Instead of using
27950         `parent' as the declaration space for the set parameters, use
27951         `this' 
27952
27953         * support.cs (InternalParameters): InternalParameters constructor
27954         takes a DeclSpace instead of a TypeContainer.
27955
27956         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
27957         types are being initialized, load the address of it before calling
27958         the function.  
27959
27960         (New): Provide a mechanism to disable the generation of local
27961         value type temporaries when the caller will be providing us with
27962         an address to store it.
27963
27964         (ArrayCreation.EmitDynamicInitializers): Use it.
27965
27966 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
27967
27968         * expression.cs (Invocation.EmitArguments): Only probe for array
27969         property if there is more than one argument.  Sorry about that.
27970
27971         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
27972         empty param arrays.
27973
27974         * class.cs (Method.LabelParameters): Fix incorrect code path that
27975         prevented the `ParamArrayAttribute' from being applied to the
27976         params attribute.
27977
27978 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
27979
27980         * support.cs (ReflectionParameters): Correctly compute whether the
27981         last argument is a params array.  Fixes the problem with
27982         string.Split ('a')
27983
27984         * typemanager.cs: Make the assemblies array always be non-null
27985         (empty, but non-null)
27986
27987         * tree.cs (RecordDecl): New function that abstracts the recording
27988         of names.  This reports error 101, and provides a pointer to the
27989         previous declaration.  Fixes a crash in the compiler.
27990
27991         * cs-parser.jay (constructor_declaration): Update to new grammar,
27992         and provide a constructor_body that can be empty.
27993
27994 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
27995
27996         * driver.cs: Add support for --resources.
27997
27998         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
27999         Make all types for the various array helper methods be integer.
28000
28001         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
28002         CheckState to ConvCast.
28003
28004         (ConvCast): Now it takes a `checked' state argument, to avoid
28005         depending on the emit context for the conversion, and just using
28006         the resolve time setting.
28007
28008         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
28009         instead of Invocation.EmitArguments.  We do not emit the original
28010         arguments, instead we emit those which have been converted to
28011         unsigned int expressions.
28012
28013         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
28014
28015         * codegen.cs: ditto.
28016
28017         * expression.cs (LocalVariableReference): Drop the use of the
28018         Store function that depended on the variable index.
28019
28020         * statement.cs (VariableInfo): Drop the `Idx' property from this
28021         class, as this is not taking into account the indexes for
28022         temporaries tat we generate during the execution, getting the
28023         indexes wrong.
28024
28025         * class.cs: First emit class initializers, then call the parent
28026         constructor. 
28027
28028         * expression.cs (Binary): Fix opcode emision.
28029         (UnaryMutator.EmitCode): Support checked code generation
28030
28031         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
28032         matches for events for both the Static and Instance scans,
28033         pointing to the same element.   Fix that.
28034
28035 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
28036
28037         * rootcontext.cs (ResolveTree): Always set the
28038         interface_resolve_order, because nested interfaces will be calling
28039         into us.
28040
28041         * class.cs (GetInterfaceOrClass): Track the same resolution
28042         process used by TypeManager.LookupType.  This fixes the nested
28043         type lookups in class declarations (separate path from
28044         LookupType). 
28045
28046         (TypeContainer.DefineType): Also define nested interfaces.
28047         (TypeContainer.RegisterOrder): New public function used to
28048         register the order in which child interfaces need to be closed.
28049
28050         Nested interfaces need to be closed after their parents have been
28051         created. 
28052
28053         * interface.cs (InterfaceAttr): Put all the logic for computing
28054         the interface attribute here. 
28055
28056         (DefineInterface): Register our interface order with the
28057         RootContext or with the TypeContainer depending on the case.
28058
28059 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28060
28061         * cs-parser.jay: rework foreach statement to work with the new
28062         changes to the policy on SimpleNames.
28063
28064         * report.cs: support Stacktrace on warnings as well.
28065
28066         * makefile: drop --unsafe and /unsafe from the compile.
28067
28068 2002-03-13  Ravi Pratap  <ravi@ximian.com>
28069
28070         * ecore.cs (StandardConversionExists): Modify to take an Expression
28071         as the first parameter. Ensure we do null -> reference type conversion
28072         checking.
28073
28074         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
28075         temporary Expression objects.
28076
28077 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
28078
28079         * interface.cs: workaround bug in method overloading resolution
28080         (there is already a bugzilla bug for it).
28081
28082 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28083
28084         We could also solve this problem by having a separate path for
28085         performing type lookups, instead of DoResolve, we could have a
28086         ResolveType entry point, and only participating pieces of the
28087         production (simplename, deref, array) would implement this. 
28088
28089         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
28090         signal SimpleName to only resolve type names and not attempt to
28091         resolve anything else.
28092
28093         * expression.cs (Cast): Set the flag.
28094
28095         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28096
28097         * class.cs: Only report 108 if there is no `new' modifier.
28098
28099         * cs-parser.jay: rework foreach statement to work with the new
28100         changes to the policy on SimpleNames.
28101
28102         * report.cs: support Stacktrace on warnings as well.
28103
28104         * makefile: drop --unsafe and /unsafe from the compile.
28105
28106 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28107
28108         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28109         lookups here, instead of doing that at parse time.  This means
28110         that our grammar will not introduce `LocalVariableReferences' as
28111         expressions at this point.  That solves the problem of code like
28112         this:
28113
28114         class X {
28115            static void Main ()
28116            { int X = 1;
28117             { X x = null }}}
28118
28119         This is only half the fix.  The full fix requires parameters to
28120         also be handled in this way.
28121
28122         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28123         makes the use more obvious of the DeclSpace.  The
28124         ec.TypeContainer.TypeBuilder is now only used to pull the
28125         TypeBuilder for it.
28126
28127         My theory is that I can get rid of the TypeBuilder completely from
28128         the EmitContext, and have typecasts where it is used (from
28129         DeclSpace to where it matters).  
28130
28131         The only pending problem is that the code that implements Aliases
28132         is on TypeContainer, and probably should go in DeclSpace.
28133
28134         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28135         lookups here, instead of doing that at parse time.  This means
28136         that our grammar will not introduce `LocalVariableReferences' as
28137         expressions at this point.  That solves the problem of code like
28138         this:
28139
28140         class X {
28141            static void Main ()
28142            { int X = 1;
28143             { X x = null }}}
28144
28145         This is only half the fix.  The full fix requires parameters to
28146         also be handled in this way.
28147
28148         * class.cs (Property.DefineMethod): When implementing an interface
28149         method, set newslot, when implementing an abstract method, do not
28150         set the flag (before we tried never setting it, or always setting
28151         it, which is the difference).
28152         (Indexer.DefineMethod): same.
28153         (Method.DefineMethod): same.
28154
28155         * ecore.cs: Only set the status used flag if we get back a Field.
28156
28157         * attribute.cs: Temporary hack, so Paolo can keep working.
28158
28159 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28160
28161         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28162         the unmanaged type in the case we have a MarshalAs attribute.
28163
28164         (Resolve): Handle the case when we are parsing the special MarshalAs
28165         attribute [we need to store the unmanaged type to use later]
28166
28167         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28168         MarshalAs Attribute.
28169
28170         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28171         on parameters and accordingly set the marshalling info.
28172
28173 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28174
28175         * class.cs: Optimizing slightly by removing redundant code after
28176         we switched to the `NoTypes' return value.
28177         (Property.DefineMethod): use NoTypes here too.
28178
28179         This fixes the bug I introduced in my last batch of changes.
28180
28181 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28182
28183         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28184
28185         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28186         Enums since those are types too. 
28187
28188         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28189
28190         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28191         thanks to a call during the lookup process.
28192
28193 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28194
28195         * statement.cs (Foreach): Lots of work to accomodate a particular
28196         kind of foreach statement that I had not kept in mind.  It is
28197         possible to have foreachs on classes that provide a GetEnumerator
28198         method that return objects that implement the "pattern" for using
28199         a foreach, there is no need to support GetEnumerator
28200         specifically. 
28201
28202         This is needed to compile nant.
28203
28204         * decl.cs: Only report 114 if the member is not `Finalize' and if
28205         the warning level is at least 2.
28206
28207         * class.cs: Moved the compare function from Method to
28208         MethodSignature. 
28209
28210         (MethodSignature.InheritableMemberSignatureCompare): Add new
28211         filter function that is used to extract inheritable methods from a
28212         class. 
28213
28214         (Method.Define): Use the new `inheritable_method_signature_filter'
28215         delegate
28216
28217         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28218         command. 
28219
28220 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28221
28222         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28223
28224         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28225
28226         * expression.cs: Pass location information to
28227         ConvertImplicitStandard. 
28228
28229         * class.cs: Added debugging code to track return values from
28230         interfaces. 
28231
28232 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28233
28234         * expression.cs (Is.DoResolve): If either side of the `is' is an
28235         interface, do not flag the warning.
28236
28237         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28238         for interfaces
28239
28240         * report.cs: Allow for --fatal to be used with --probe.
28241
28242         * typemanager.cs (NoTypes): Move the definition for the empty Type
28243         array here. 
28244
28245         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28246         properties. 
28247         (TypeContainer.DefineProxy): New function used to proxy to parent
28248         implementations when implementing interfaces.
28249         (TypeContainer.ParentImplements): used to lookup if our parent
28250         implements a public function that is required by an interface.
28251         (TypeContainer.VerifyPendingMethods): Hook this up.
28252
28253         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28254         `modules' and `assemblies' arraylists into arrays.  We only grow
28255         these are the very early start up of the program, so this improves
28256         the speedof LookupType (nicely measured).
28257
28258         * expression.cs (MakeByteBlob): Replaced unsafe code with
28259         BitConverter, as suggested by Paolo.
28260
28261         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28262         folding of string concatenation, but if either side is a string,
28263         and the other is not, then return null, and let the runtime use
28264         the concatenation on the string plus the object (using
28265         `Object.ToString'). 
28266
28267 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28268
28269         Constant Folding has been implemented now.
28270
28271         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28272         the error instead on types that are not supported in one's
28273         complement. 
28274
28275         * constant.cs (Constant and all children): New set of functions to
28276         perform implict and explicit conversions.
28277
28278         * ecore.cs (EnumConstant): Implement the new functions to perform
28279         conversion by proxying to the child expression.
28280
28281         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28282         own separate setting that can not be turned off from the command
28283         line using --unchecked or --checked and is only controlled using
28284         the checked/unchecked statements and expressions.  This setting is
28285         used by the constant folder to flag errors.
28286
28287         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28288         ConstantCheckState as well.   
28289
28290         During Resolve, they also have to flag the state, because the
28291         constant folder runs completely in the Resolve phase.
28292
28293         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28294         well.
28295
28296 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28297
28298         * cfold.cs: New file, this file contains the constant folder.
28299
28300         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28301         argument to track whether we are using the resulting address to
28302         load or store a value and provide better error messages. 
28303
28304         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28305         new AddressOf arguments.
28306
28307         * statement.cs (Foreach.EmitCollectionForeach): Update
28308
28309         * expression.cs (Argument.Emit): Call AddressOf with proper
28310         arguments to track usage.
28311
28312         (New.DoEmit): Call AddressOf with new arguments.
28313
28314         (Unary.Emit): Adjust AddressOf call.
28315
28316 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28317
28318         * cs-parser.jay (member_access): Change the case for pre-defined types
28319         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28320         this suggestion.
28321
28322         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28323         a method body.
28324
28325         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28326         essentially like methods and apply attributes like MethodImplOptions to them too.
28327
28328         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28329         not being null.
28330
28331         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28332         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28333         is the DeclSpace.
28334
28335         * Update code everywhere accordingly.
28336
28337         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28338
28339         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28340
28341 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28342
28343         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28344         try performing lookups against those instead of jumping straight into using
28345         the 'using' clauses.
28346
28347         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28348
28349         (LookupType): Perform lookups in implicit parents too.
28350
28351         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28352         sequence as RootContext.LookupType. 
28353
28354         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28355         the various cases of namespace lookups into this method.
28356
28357 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28358
28359         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28360         in positional arguments)
28361
28362         * class.cs (Operator): Update the AllowedModifiers to contain
28363         extern. 
28364
28365         * cs-parser.jay: Update operator declaration to allow for the
28366         operator body to be empty.
28367
28368         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28369         values. 
28370
28371 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28372
28373         * class.cs (Method.Emit): Label parameters.
28374
28375         * driver.cs: Return 1 or 0 as the program exit code.
28376
28377 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28378
28379         * expression.cs: Special case the `null' object when trying to
28380         auto-compute the type, as anything can be explicitly converted to
28381         that. 
28382
28383         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28384         spotting this Paolo.
28385
28386         (Expression.ImplicitNumericConversion): Perform comparissions of
28387         the type using the underlying type in the case of an enumeration
28388         rather than using the enumeration type for the compare.
28389
28390         Cope with the underlying == type case, which is not possible to
28391         catch before. 
28392
28393         (Expression.ConvertNumericExplicit): Perform comparissions of
28394         the type using the underlying type in the case of an enumeration
28395         rather than using the enumeration type for the compare.
28396
28397         * driver.cs: If the user does not supply an extension, assume .exe
28398
28399         * cs-parser.jay (if_statement): Rewrote so that we can track the
28400         location for the if statement.
28401
28402         * expression.cs (Binary.ConstantFold): Only concat strings when
28403         the operation is "+", not everything ;-)
28404
28405         * statement.cs (Statement.EmitBoolExpression): Take a location
28406         argument. 
28407         (If, While, Do): Track location.
28408
28409         * expression.cs (Binary.ResolveOperator): In the object + string
28410         case, I was missing a call to ConvertImplicit
28411
28412 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28413
28414         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28415         Location arguments. Ensure we use RootContext.LookupType to do our work
28416         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28417
28418         * interface.cs (PopulateMethod): Handle the type of the parameter being
28419         null gracefully.
28420
28421         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28422         have a params method with no fixed arguments and a call is made with no
28423         arguments.
28424
28425 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28426
28427         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28428         the verbatim-string-literal
28429
28430         * support.cs (InternalParameters.ParameterModifier): handle null
28431         fixed parameters.
28432         (InternalParameters.ParameterType): ditto.
28433
28434         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28435         duplicating the name of the variable parameter.
28436         (GetParameterByName): Fix bug where we were not looking up array
28437         paramters if they were the only present (thanks Paolo!).
28438         (GetParameterInfo): We only have an empty set of types if both
28439         fixed and array are set to null.
28440         (GetParameterInfo-idx): Handle FixedParameter == null
28441
28442         * cs-parser.jay: Handle the case where there is no catch
28443         statements (missing null test).
28444
28445 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28446
28447         * driver.cs (MainDriver): Be conservative on our command line
28448         handling.
28449
28450         Catch DirectoryNotFoundException when calling GetFiles.
28451
28452         (SplitPathAndPattern): Used to split the input specification into
28453         a path and a pattern that we can feed to Directory.GetFiles.
28454
28455 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28456
28457         * statement.cs (Fixed): Implement the last case of the Fixed
28458         statement (string handling).
28459
28460         * expression.cs (StringPtr): New class used to return a char * to
28461         a string;  Used by the Fixed statement.
28462
28463         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28464
28465         * expression.cs (Binary.ResolveOperator): Remove redundant
28466         MemberLookup pn parent type.
28467         Optimize union call, we do not need a union if the types are the same.
28468         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28469         type.
28470
28471         Specialize the use of MemberLookup everywhere, instead of using
28472         the default settings. 
28473
28474         (StackAlloc): Implement stackalloc keyword.
28475
28476         * cs-parser.jay: Add rule to parse stackalloc.
28477
28478         * driver.cs: Handle /h, /help, /?
28479
28480         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28481         before we supported unsafe code.
28482
28483         * makefile: add --unsafe to the self compilation of mcs.
28484
28485 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28486
28487         * expression.cs (PointerArithmetic): New class that is used to
28488         perform pointer arithmetic.
28489         (Binary.Resolve): Handle pointer arithmetic
28490         Handle pointer comparission.
28491         (ArrayPtr): Utility expression class that is used to take the
28492         address of an array.
28493
28494         (ElementAccess): Implement array access for pointers
28495
28496         * statement.cs (Fixed): Implement fixed statement for arrays, we
28497         are missing one more case before we are done.
28498
28499         * expression.cs (Indirection): Implement EmitAssign and set the
28500         ExprClass to Variable.  This allows pointer dereferences to be
28501         treated as variables, and to have values assigned to them.
28502
28503         * ecore.cs (Expression.StoreFromPtr): New utility function to
28504         store values dereferencing.
28505
28506 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28507
28508         * expression.cs (Binary.ResolveOperator): Ensure that we are
28509         not trying to operate on a void type - this fixes the reported
28510         bug.
28511
28512         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28513         the parent implementation is sealed.
28514
28515         * ../errors/cs0239.cs : Add.
28516
28517         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28518
28519         * typemanager.cs (unverifiable_code_type): Corresponds to 
28520         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28521         which have unsafe code in them.
28522
28523         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28524         unsafe context.
28525
28526 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28527
28528         * cs-tokenizer.cs: Add support for @"litreal strings"
28529
28530         Make tokenizer accept pre-processor directives
28531         on any column (remove the old C-like limitation). 
28532
28533         * rootcontext.cs (EmitCode): Emit any global attributes.
28534         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28535
28536         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28537
28538         * cs-parser.jay: Add support for global attributes.  
28539
28540 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28541
28542         * expression.cs (Indirection): New helper class.  Unary will
28543         create Indirection classes to be able to implement the
28544         IMemoryLocation interface on it.
28545
28546 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28547
28548         * cs-parser.jay (fixed_statement): reference the right statement.
28549
28550         * statement.cs (Fixed.Emit): Finish implementing the fixed
28551         statement for the &x case.
28552
28553 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28554
28555         * class.cs (Property.Define, Method.Define): Remove newslot when
28556         `implementing'.  
28557
28558         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28559         wrong.  NewSlot should only be used if the `new' keyword is present.
28560
28561         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28562         locating our system dir.  Sorry about this.
28563
28564 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28565
28566         * driver.cs (GetSystemDir): Compute correctly the location of our
28567         system assemblies.  I was using the compiler directory instead of
28568         the library directory.
28569
28570 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28571
28572         * expression.cs (BetterFunction): Put back in what Miguel commented out
28573         since it is the correct fix. The problem is elsewhere ;-)
28574
28575         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28576         parameters of the parms method are themselves compatible or not !
28577
28578         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28579         to check that a class implements an interface before saying that an implicit
28580         conversion was allowed. Use ImplementsInterface to do the checking.
28581
28582 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28583
28584         * class.cs (Method.Define): Track whether we are an explicit
28585         implementation or not.  And only call DefineMethodOverride if we
28586         are an explicit implementation.
28587
28588         (Property.DefineMethod): Ditto.
28589
28590 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28591
28592         * expression.cs (BetterFunction): Catch hideous bug which was
28593          preventing us from detecting ambiguous calls due to implicit casts i.e
28594         cs0121.
28595
28596 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28597
28598         * support.cs (Pair): Remove un-needed method.  I figured why I was
28599         getting the error in cs-parser.jay, the variable in a foreach loop
28600         is readonly, and the compiler does not really treat this as a variable.
28601
28602         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28603         instead of EQUALS in grammar.  
28604
28605         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28606
28607         * expression.cs (Unary.DoResolve): Check whether the argument is
28608         managed or not.
28609
28610 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28611
28612         * support.cs: Api for Pair to set a value.  Despite the fact that
28613         the variables are public the MS C# compiler refuses to compile
28614         code that accesses the field if the variable is part of a foreach
28615         statement. 
28616
28617         * statement.cs (Fixed): Begin implementation of the fixed
28618         statement.
28619
28620         (Block.AddVariable): Return the VariableInfo on success and null
28621         on failure instead of true/false. 
28622
28623         * cs-parser.jay (foreach): Catch errors on variables already
28624         defined (we were ignoring this value before) and properly unwind
28625         the block hierarchy
28626
28627         (fixed_statement): grammar for the fixed statement.
28628
28629 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28630
28631         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28632         pointer types to be incretemented.
28633
28634         (SizeOf): Implement.
28635
28636         * cs-parser.jay (pointer_member_access): Implement
28637         expr->IDENTIFIER production.
28638
28639         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28640         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28641         on safe contexts.
28642
28643         (Unary): Implement indirection.
28644
28645         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28646         use in non-unsafe context).
28647
28648         (SimpleName.DoResolve): Check for pointers in field access on safe
28649         contexts. 
28650
28651         (Expression.LoadFromPtr): Factor the load-indirect code in this
28652         function.  This was duplicated in UnboxCast and ParameterReference
28653
28654 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28655
28656         * expression.cs (ComposedCast): report an error if a pointer cast
28657         is used in a safe region.
28658
28659         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28660         pointer type casts in unsafe context.
28661
28662         * codegen.cs (EmitContext): Set up IsUnsafe.
28663
28664         * cs-parser.jay (non_expression_type): Add productions for pointer
28665         casts. 
28666
28667         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28668         code.  We should not use force into static mode if the method is
28669         not virtual.  Fixes bug in MIS
28670
28671         * statement.cs (Do.Emit, While.Emit, For.Emit,
28672         Statement.EmitBoolExpression): Add support to Do and While to
28673         propagate infinite loop as `I do return' semantics.
28674
28675         Improve the For case to also test for boolean constants.
28676
28677         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28678         to the list of attributes we can add.
28679
28680         Remove `EmitContext' argument.
28681
28682         * class.cs (Method.Define): Apply parameter attributes.
28683         (Constructor.Define): Apply parameter attributes.
28684         (MethodCore.LabelParameters): Move here the core of labeling
28685         parameters. 
28686
28687         * support.cs (ReflectionParameters.ParameterModifier,
28688         InternalParameters.ParameterModifier): Use IsByRef on the type and
28689         only return the OUT bit for these parameters instead of in/out/ref
28690         flags.
28691
28692         This is because I miss-understood things.  The ParameterInfo.IsIn
28693         and IsOut represent whether the parameter has the [In] and [Out]
28694         attributes set.  
28695
28696 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
28697
28698         * ecore.cs (FieldExpr.Emit): Release temporaries.
28699
28700         * assign.cs (LocalTemporary.Release): new function.
28701
28702         * codegen.cs (EmitContext.GetTemporaryStorage,
28703         EmitContext.FreeTemporaryStorage): Rework the way we deal with
28704         temporary storage.  Now we can "put back" localbuilders when we
28705         are done with them
28706
28707 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
28708
28709         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
28710         need to make a copy of the variable to generate verifiable code.
28711
28712 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
28713
28714         * driver.cs: Compute dynamically the system directory.
28715
28716         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
28717         Slower, but more generally useful.  Used by the abstract
28718         registering implementation. 
28719
28720         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
28721         the rules for the special rule on Type/instances.  First check if
28722         we have the same name, and if so, try that special static path
28723         rather than the instance path.
28724
28725 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
28726
28727         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
28728         for, while and if.
28729
28730         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
28731         Enum, ValueType, Delegate or Array for non-corlib compiles.
28732
28733         * cs-tokenizer.cs: Catch long identifiers (645)
28734
28735         * typemanager.cs (IndexerPropetyName): Ravi never tested this
28736         piece of code.
28737
28738         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
28739         fix, we were returning too early, so we were not registering
28740         pending methods from abstract classes.
28741
28742         Do not register pending methods if the class is abstract.
28743
28744         * expression.cs (Conditional.DoResolve): Report circular implicit
28745         conversions when we neecd to compute it for conditional
28746         expressions. 
28747
28748         (Is.DoResolve): If the expression is always of the provided type,
28749         flag warning 183.  If the expression can not ever be of the
28750         provided type flag warning 184.
28751
28752         * class.cs: Catch 169 as well.
28753
28754         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
28755         read. 
28756
28757 2002-01-18  Nick Drochak  <ndrochak@gol.com>
28758
28759         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
28760
28761 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
28762
28763         * interface.cs: (PopulateMethod): Check for pointers being defined
28764         only if the unsafe context is active.
28765         (PopulateProperty): ditto.
28766         (PopulateIndexer): ditto.
28767
28768         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
28769         specified.  If pointers are present, make sure that they are
28770         present in an unsafe context.
28771         (Constructor, Constructor.Define): ditto.
28772         (Field, Field.Define): ditto.
28773         (Property, Property.Define): ditto.
28774         (Event, Event.Define): ditto.
28775
28776         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
28777         hashtable if there are classes or structs defined.
28778
28779         * expression.cs (LocalVariableReference.DoResolve): Simplify this
28780         code, as the constant resolution moved.
28781
28782         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
28783         the metadata, so we can flag error 133. 
28784
28785         * decl.cs (MemberCore.UnsafeOK): New function to test that a
28786         pointer is being declared in an unsafe context.
28787
28788 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
28789
28790         * modifiers.cs (Modifiers.Check): Require a Location argument.
28791         Report error 227 for Unsafe use.
28792
28793         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
28794
28795         * statement.cs (For.Emit): If the test is null, then report that
28796         we do `return', as we wont reach anything afterwards.
28797
28798         (Switch.SwitchGoverningType): Track the expression that matched
28799         the conversion.
28800
28801         * driver.cs: Allow negative numbers as an error code to flag.
28802
28803         * cs-parser.jay: Handle 1551.
28804
28805         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
28806
28807 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28808
28809         * cs-parser.jay: Report 1518 (type declaration can only contain
28810         class, struct, interface, enum or delegate)
28811
28812         (switch_label): Report 1523 (keywords `case' or `default' must
28813         preced code)
28814
28815         (opt_switch_sections): Report 1522 (empty switch)
28816
28817         * driver.cs: Report 1515 (response file specified multiple times)
28818         Report 1516 (Source file specified multiple times).
28819
28820         * expression.cs (Argument.Resolve): Signal 1510
28821
28822         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
28823         access not allowed in static code)
28824
28825 2002-01-11  Ravi Pratap  <ravi@ximian.com>
28826
28827         * typemanager.cs (IsPointerType): Utility method which we are going
28828         to need a lot.
28829
28830         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
28831         the object type, so we take care of that.
28832
28833         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
28834
28835         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
28836         added to non-params parameters :-)
28837
28838         * typemanager.cs (CSharpName): Include 'void' type too. 
28839
28840         (void_ptr_type): Include in the set of core types.
28841
28842         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
28843         duplicating code.
28844
28845         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
28846         an unsafe context.
28847
28848         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
28849         completely forgotten about it.
28850
28851 2002-01-10  Ravi Pratap  <ravi@ximian.com>
28852
28853         * cs-parser.jay (pointer_type): Add. This begins our implementation
28854         of parsing rules for unsafe code.
28855
28856         (unsafe_statement): Implement.
28857
28858         (embedded_statement): Modify to include the above.
28859
28860         * statement.cs (Unsafe): Implement new class for unsafe blocks.
28861
28862         * codegen.cs (EmitContext.InUnsafe): Add. This determines
28863         if the current context is an unsafe one.
28864
28865         * cs-parser.jay (local_variable_pointer_type): Since local variable types
28866         are handled differently, we need separate rules for them.
28867
28868         (local_variable_declaration): Update to use local_variable_pointer_type
28869         to allow variable declarations of unmanaged pointer types.
28870
28871         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
28872         in unsafe contexts.
28873
28874         * ../errors/cs0214.cs : Add.
28875
28876 2002-01-16  Nick Drochak  <ndrochak@gol.com>
28877
28878         * makefile: remove 'response' file when cleaning.
28879
28880 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28881
28882         * cs-parser.jay: Report 1524.
28883
28884 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
28885
28886         * typemanager.cs (RegisterMethod): drop checking if we have
28887         registered this from here
28888
28889 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
28890
28891         * class.cs (Method.EmitDestructor): Implement calling our base
28892         destructor. 
28893
28894         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
28895         value of InFinally.
28896
28897         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
28898         this routine and will wrap the call in a try/catch block.  Deal
28899         with the case.
28900
28901 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
28902
28903         * ecore.cs (Expression.MemberLookup): instead of taking a
28904         parameter `same_type' that was used to tell whether we could
28905         access private members we compute our containing type from the
28906         EmitContext.
28907
28908         (FieldExpr): Added partial support for volatile fields.  This does
28909         not work for volatile fields exposed from assemblies, as I can not
28910         figure out how to extract the modreq from it.
28911
28912         Updated all the source files to use this.
28913
28914         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
28915         because it is referenced by MemberLookup very often. 
28916
28917 2002-01-09  Ravi Pratap  <ravi@ximian.com>
28918
28919         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
28920         TypeBuilder.GetCustomAttributes to retrieve what we need.
28921
28922         Get rid of redundant default_member_attr_type as this is the same as
28923         default_member_type which already exists.
28924
28925         * interface.cs, attribute.cs : Update accordingly.
28926
28927 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
28928
28929         * typemanager.cs: Enable IndexerPropertyName again.  It does not
28930         work for TYpeBuilders though.  Ravi, can you please fix this?
28931
28932         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
28933
28934         * expression.cs (Argument.Emit): Handle the case of ref objects
28935         being passed to ref functions;  
28936
28937         (ParameterReference.EmitLoad): Loads the content of the pointer
28938         without dereferencing.
28939
28940 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28941
28942         * cs-tokenizer.cs: Implemented the pre-processing expressions.
28943
28944 2002-01-08  Ravi Pratap  <ravi@ximian.com>
28945
28946         * class.cs (Indexer.DefineMethod): Incorporate the interface
28947         type in the name of the method if we are doing explicit interface
28948         implementation.
28949
28950         * expression.cs (ConversionExists): Remove as it is completely obsolete.
28951
28952         (BetterConversion): Fix extremely trivial bug where we were referring to
28953         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
28954         again !
28955
28956         * ../errors/bug16.cs : Add although we have fixed it.
28957
28958 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28959
28960         * expression.cs (BaseIndexer): Begin implementation.
28961
28962         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
28963
28964         * cs-parser.jay (indexer_declarator): Use qualified_identifier
28965         production directly to remove a shift/reduce, and implement
28966         explicit interface implementation.
28967
28968         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
28969         after a floating point suffix.
28970
28971         * expression.cs (DoNumericPromotions): Improved the conversion for
28972         uint/uint.  If we have a constant, we avoid doing a typecast to a
28973         larger type.
28974
28975         * class.cs (Indexer): Implement explicit interface implementation
28976         for indexers.
28977
28978 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28979
28980         * class.cs: make the default instance constructor public and hidebysig.
28981
28982 2001-01-03  Ravi Pratap  <ravi@ximian.com>
28983
28984         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
28985         so we can call it from elsewhere.
28986
28987         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
28988         we emit it internally if the class has a defined indexer; otherwise the user
28989         emits it by decorating the class definition with the DefaultMemberAttribute.
28990
28991         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
28992         attribute is not used on a type which defines an indexer.
28993
28994         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
28995         character when we skip whitespace.
28996
28997         * ../errors/cs0646.cs : Add.
28998
28999 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
29000
29001         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
29002         again. 
29003
29004         * makefile: Add practical target `mcs3.exe' which builds the third
29005         generation compiler. 
29006
29007         * expression.cs (New): Fix structures constructor calling.
29008
29009         * class.cs (Property, Method, Indexer): Emit Final flag on the
29010         method if we are an interface implementation and we are not
29011         abstract. 
29012
29013         * ecore.cs (PropertyExpr): New public field `IsBase', tells
29014         whether this property is referencing a `base' method.
29015
29016         * expression.cs (Invocation.EmitCall): take an extra argument:
29017         is_base, this is used to determine whether the `call' or
29018         `callvirt' opcode should be used.
29019
29020
29021         * delegate.cs: update EmitCall.
29022
29023         * class.cs (Method.Define): Set NewSlot for the cases where we are
29024         not implementing an interface method.
29025
29026         (Property.Define): ditto.
29027
29028 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
29029
29030         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
29031         'r'.  Allows mcs to parse itself fully.
29032
29033 2002-01-02  Ravi Pratap  <ravi@ximian.com>
29034
29035         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
29036         of the number of initializers that require the InitializeArray method.
29037
29038         (CheckIndices): Store the Expression in all cases - not the plain value. Also
29039         update the above field where necessary.
29040
29041         (MakeByteBlob): Update accordingly.
29042
29043         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
29044         greater than 2.
29045
29046         (EmitDynamicInitializers): Update in accordance with the new optimization.
29047
29048         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
29049         same OpCode applies.
29050
29051         * cs-parser.jay : Fix some glaring errors I introduced.
29052
29053 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
29054
29055         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
29056         so that we can check for name clashes there too.
29057
29058         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
29059         for interface indexers.
29060
29061         * interfaces.cs (Define): Emit the default member attribute.
29062
29063         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
29064         variable was being referred to while setting the value ;-)
29065
29066 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
29067
29068         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
29069         byte-by-byte information when we know the data is zero.
29070
29071         Make the block always a multiple of 4, because
29072         DefineInitializedData has a bug.
29073
29074         * assign.cs: Fix, we should assign from the temporary, not from
29075         the source. 
29076
29077         * expression.cs (MakeByteBlob): Fix my incorrect code.
29078
29079 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
29080
29081         * typemanager.cs (EnumToUnderlying): This function is used to get
29082         the underlying type from an enumeration, because it does not
29083         always work. 
29084
29085         * constant.cs: Use the I4_S form for values between -128 and 127.
29086
29087         * statement.cs (Block.LookupLabel): Looks up a label.
29088         (Block): Drop support for labeled blocks.
29089
29090         (LabeledStatement): New kind of statement that represents a label
29091         only.
29092
29093         (Goto): Finally implement this bad boy.
29094
29095         * cs-parser.jay: Update to reflect new mechanism to implement
29096         labels.
29097
29098 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29099
29100         * codegen.cs (EmitContext.This): a codegen property that keeps the
29101         a single instance of this instead of creating many different this
29102         instances. 
29103
29104         * delegate.cs (Delegate.DoResolve): Update to use the property;
29105
29106         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29107
29108         * expression.cs (BaseAccess.DoResolve): Ditto.
29109
29110 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29111
29112         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29113         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29114
29115         (InitCoreTypes): Update accordingly.
29116
29117         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29118         so we can quickly store the state.
29119
29120         (ApplyAttributes): Set the correct implementation flags
29121         for InternalCall methods.
29122
29123 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29124
29125         * expression.cs (EmitCall): if a method is not virtual, then do
29126         not use callvirt on it.
29127
29128         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29129         user defined stuff) requires the use of stobj, which takes an
29130         address on the stack instead of an array and an index.  So emit
29131         the Ldelema operation for it.
29132
29133         (EmitStoreOpcode): Use stobj for valuetypes.
29134
29135         (UnaryMutator.EmitCode): Use the right 1 value depending on
29136         whether we are dealing with int64/uint64, float or doubles.
29137
29138         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29139         constructors that I implemented last night.
29140
29141         (Constructor.IsDefault): Fix to work properly for static
29142         constructors.
29143
29144         * cs-parser.jay (CheckDef): report method signature errors.
29145         Update error number 103 to be 132.
29146
29147         * decl.cs: New AdditionResult enumeration value: MethodExists.
29148         Although we do this check for methods later on in the semantic
29149         analysis, catching repeated default constructors is so easy that
29150         we catch these here. 
29151
29152         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29153         promotions code.
29154
29155         (ParameterReference.EmitAssign, Emit): handle
29156         bools as bytes.
29157
29158         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29159         (ArrayAccess.EmitStoreOpcode): ditto.
29160
29161         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29162
29163         * expression.cs (MakeByteBlob): Complete all the missing types
29164         (uint, short, ushort, byte, sbyte)
29165
29166         * class.cs: Only init instance field initializers on instance
29167         constructors. 
29168
29169         Rename `constructors' to instance_constructors. 
29170
29171         (TypeContainer.AddConstructor): Only add constructors to the list
29172         if it is not static.
29173
29174         Make sure that we handle default_static_constructor independently
29175         everywhere where we handle instance_constructors
29176
29177 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29178
29179         * class.cs: Do not lookup or create a base initializer for a
29180         static constructor.
29181
29182         (ConstructorInitializer.Resolve): use the proper type to lookup
29183         for constructors.
29184
29185         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29186
29187         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29188         in DeclSpace. 
29189
29190         * decl.cs: CloseType is now an virtual method, the default
29191         implementation just closes this type.
29192
29193 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29194
29195         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29196         to PreserveSig by default. Also emit HideBySig on such methods.
29197
29198         Basically, set the defaults to standard values.
29199
29200         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29201         argument, if candidate is better, it can't be worse than the best !
29202
29203         (Invocation): Re-write bits to differentiate between methods being
29204         applicable in their expanded form and their normal form - for params
29205         methods of course.
29206
29207         Get rid of use_standard everywhere as only standard conversions are allowed
29208         in overload resolution. 
29209
29210         More spec conformance.
29211
29212 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29213
29214         * driver.cs: Add --timestamp, to see where the compiler spends
29215         most of its time.
29216
29217         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29218         `this' in static code.
29219
29220         (SimpleName.DoResolve): Implement in terms of a helper function
29221         that allows static-references to be passed upstream to
29222         MemberAccess.
29223
29224         (Expression.ResolveWithSimpleName): Resolve specially simple
29225         names when called by MemberAccess to implement the special
29226         semantics. 
29227
29228         (Expression.ImplicitReferenceConversion): Handle conversions from
29229         Null to reference types before others, as Null's type is
29230         System.Object. 
29231
29232         * expression.cs (Invocation.EmitCall): Handle the special case of
29233         calling methods declared on a reference type from a ValueType
29234         (Base classes System.Object and System.Enum)
29235
29236         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29237         the left hand side is a TypeExpr, not on every enumeration. 
29238
29239         (Binary.Resolve): If types are reference types, then do a cast to
29240         object on operators != and == of both arguments.
29241
29242         * typemanager.cs (FindMembers): Extract instance and static
29243         members if requested.
29244
29245         * interface.cs (PopulateProperty): Use void_type instead of null
29246         as the return type for the setter method.
29247
29248         (PopulateIndexer): ditto.
29249
29250 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29251
29252         * support.cs (ReflectionParameters): Fix minor bug where we
29253         were examining the wrong parameter for the ParamArray attribute.
29254
29255         Cope with requests for the type of the parameter at position
29256         greater than the params parameter's. We now return the element
29257         type of the params array as that makes more sense.
29258
29259         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29260         accordingly as we no longer have to extract the element type
29261         ourselves.
29262
29263         (Invocation.OverloadResolve): Update.
29264
29265 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29266
29267         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29268         against IEnumerator, test whether the return value is a descendant
29269         of the IEnumerator interface.
29270
29271         * class.cs (Indexer.Define): Use an auxiliary method to implement
29272         the other bits of the method definition.  Begin support for
29273         explicit interface implementation.
29274
29275         (Property.DefineMethod): Use TypeManager.void_type instead of null
29276         for an empty return value.
29277
29278 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29279
29280         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29281         dealing with a FieldExpr which is composed of a FieldBuilder, in
29282         the code path we did extract the constant, but we should have
29283         obtained the underlying value to be able to cast it (otherwise we
29284         end up in an infinite loop, this is what Ravi was running into).
29285
29286         (ArrayCreation.UpdateIndices): Arrays might be empty.
29287
29288         (MemberAccess.ResolveMemberAccess): Add support for section
29289         14.5.4.1 that deals with the special case of E.I when E is a type
29290         and something else, that I can be a reference to a static member.
29291
29292         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29293         handle a particular array type to create byte blobs, it is just
29294         something we dont generate byteblobs for.
29295
29296         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29297         arguments. 
29298
29299         * location.cs (Push): remove the key from the hashtable that we
29300         are about to add.   This happens for empty files.
29301
29302         * driver.cs: Dispose files after we have parsed them.
29303
29304         (tokenize): new function that only runs the tokenizer on its
29305         input, for speed testing.
29306
29307 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29308
29309         * class.cs (Event.Define): Define the private field only if there
29310         are no accessors defined.
29311
29312         * expression.cs (ResolveMemberAccess): If there is no associated
29313         field with the event, that means we have an event defined with its
29314         own accessors and we should flag error cs0070 since transforming
29315         ourselves into a field is not valid in that case.
29316
29317         * ecore.cs (SimpleName.DoResolve): Same as above.
29318
29319         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29320         and charset to sane values.
29321
29322 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29323
29324         * assign.cs (DoResolve): Perform check on events only if they 
29325         are being accessed outside the declaring type.
29326
29327         * cs-parser.jay (event_declarations): Update rules to correctly
29328         set the type of the implicit parameter etc.
29329
29330         (add_accessor, remove_accessor): Set current local parameters.
29331
29332         * expression.cs (Binary): For delegate addition and subtraction,
29333         cast the return value from the method into the appropriate delegate
29334         type.
29335
29336 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29337
29338         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29339         of these as the workaround is unnecessary.
29340
29341         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29342         delegate data - none of that is needed at all.
29343
29344         Re-write bits to extract the instance expression and the delegate method
29345         correctly.
29346
29347         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29348         on delegates too.
29349
29350         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29351         of attaching attributes instead of duplicating code everywhere.
29352
29353         * everywhere : Update code to do attribute emission using the above method.
29354
29355 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29356
29357         * expression.cs (IsParamsMethodApplicable): if there are not
29358         parameters, return immediately.
29359
29360         * ecore.cs: The 0 literal can be implicity converted to an enum
29361         type. 
29362
29363         (SimpleName.DoResolve): First lookup the type, then lookup the
29364         members. 
29365
29366         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29367         want to get its address.  If the InstanceExpression is not
29368         addressable, store the result in a temporary variable, then get
29369         the address of it.
29370
29371         * codegen.cs: Only display 219 errors on warning level or above. 
29372
29373         * expression.cs (ArrayAccess): Make it implement the
29374         IMemoryLocation interface.
29375
29376         (Binary.DoResolve): handle the operator == (object a, object b)
29377         and operator != (object a, object b) without incurring into a
29378         BoxedCast (because 5 != o should never be performed).
29379
29380         Handle binary enumerator operators.
29381
29382         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29383         value type, otherwise use Ldelem_ref.
29384
29385         Use precomputed names;
29386
29387         (AddressOf): Implement address of
29388
29389         * cs-parser.jay (labeled_statement): Fix recursive block
29390         addition by reworking the production.
29391
29392         * expression.cs (New.DoEmit): New has a special case:
29393                 
29394                  If we are dealing with a ValueType, we have a few
29395                  situations to deal with:
29396                 
29397                     * The target of New is a ValueType variable, that is
29398                       easy, we just pass this as the variable reference
29399                 
29400                     * The target of New is being passed as an argument,
29401                       to a boxing operation or a function that takes a
29402                       ValueType.
29403                 
29404                       In this case, we need to create a temporary variable
29405                       that is the argument of New.
29406
29407
29408 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29409
29410         * rootcontext.cs (LookupType): Check that current_type is not null before
29411         going about looking at nested types.
29412
29413         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29414         not implement the IAssignMethod interface any more.
29415
29416         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29417         where we tranform them into FieldExprs if they are being resolved from within
29418         the declaring type.
29419
29420         * ecore.cs (SimpleName.DoResolve): Do the same here.
29421
29422         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29423
29424         * ../errors/bug10.cs : Add.
29425
29426         * ../errors/cs0070.cs : Add.
29427
29428         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29429
29430         * assign.cs : Get rid of EventIsLocal everywhere.
29431
29432 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29433
29434         * ecore.cs (ConvertIntLiteral): finished the implementation.
29435
29436         * statement.cs (SwitchLabel): Convert the value we are using as a
29437         key before looking up the table.
29438
29439 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29440
29441         * codegen.cs (EmitTopBlock): Require a Location argument now.
29442
29443         * cs-parser.jay (constructor_declarator): We need to setup
29444         current_local_parameters before we parse the
29445         opt_constructor_initializer, to allow the variables to be bound
29446         to the constructor arguments.
29447
29448         * rootcontext.cs (LookupType): First lookup nested classes in our
29449         class and our parents before we go looking outside our class.
29450
29451         * expression.cs (ConstantFold): Extract/debox the values at the
29452         beginnning. 
29453
29454         * rootcontext.cs (EmitCode): Resolve the constants first before we
29455         resolve the types.  This is not really needed, but it helps debugging.
29456
29457         * statement.cs: report location.
29458
29459         * cs-parser.jay: pass location to throw statement.
29460
29461         * driver.cs: Small bug fix.
29462
29463         * report.cs: Updated format to be 4-zero filled digits.
29464
29465 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29466
29467         * expression.cs (CheckIndices): Fix minor bug where the wrong
29468         variable was being referred to ;-)
29469
29470         (DoEmit): Do not call EmitStaticInitializers when the 
29471         underlying type is System.Object.
29472
29473 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29474
29475         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29476         and do the usual workaround for SRE.
29477
29478         * class.cs (MyEventBuilder.EventType): New member to get at the type
29479         of the event, quickly.
29480
29481         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29482
29483         * assign.cs (Assign.DoResolve): Handle the case when the target
29484         is an EventExpr and perform the necessary checks.
29485
29486         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29487         interface.
29488
29489         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29490
29491         (EventExpr): Set the type in the constructor itself since we 
29492         are meant to be born fully resolved.
29493
29494         (EventExpr.Define): Revert code I wrote earlier.
29495                 
29496         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29497         instance expression is null. The instance expression is a This in that case
29498         or a null, depending on whether it is a static method or not.
29499
29500         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29501         refers to more than one method.
29502
29503         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29504         and accordingly flag errors.
29505
29506 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29507
29508         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29509
29510 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29511
29512         * location.cs (ToString): Provide useful rutine.
29513
29514 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29515
29516         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29517         objects, return the actual integral boxed.
29518
29519         * statement.cs (SwitchLabel): define an ILLabel for each
29520         SwitchLabel. 
29521
29522         (Switch.CheckSwitch): If the value is a Literal, extract
29523         the underlying literal.
29524
29525         Also in the unused hashtable we had, add the SwitchLabel so we can
29526         quickly look this value up.
29527
29528         * constant.cs: Implement a bunch of new constants.  Rewrite
29529         Literal based on this.  Made changes everywhere to adapt to this.
29530
29531         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29532         dereferencing array only once, and also copes with enumrations.
29533
29534         bytes are two bytes wide, not one.
29535
29536         (Cast): Perform constant conversions.
29537
29538         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29539         wrappers to the literals here.
29540
29541         * expression.cs (DoNumericPromotions): long literals can converted
29542         to ulong implicity (this is taken care of elsewhere, but I was
29543         missing this spot).
29544
29545         * ecore.cs (Expression.Literalize): Make the return type Literal,
29546         to improve type checking.
29547
29548         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29549
29550 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29551
29552         * literal.cs: Revert code from ravi that checked the bounds.  The
29553         bounds are sane by the definition of the type itself. 
29554
29555         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29556         need to actually look up in our parent hierarchy for interfaces
29557         implemented. 
29558
29559         * const.cs: Use the underlying type for enumerations
29560
29561         * delegate.cs: Compute the basename for the delegate creation,
29562         that should fix the delegate test case, and restore the correct
29563         Type Lookup semantics in rootcontext
29564
29565         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29566         referencing a nested type with the Reflection API is using the "+"
29567         sign. 
29568
29569         * cs-parser.jay: Do not require EOF token at the end.
29570
29571 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29572
29573         * rootcontext.cs (LookupType): Concatenate type names with
29574         a '.' instead of a '+' The test suite passes again.
29575
29576         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29577         field of the enumeration.
29578
29579         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29580         the case when the member is an EventExpr.
29581
29582         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29583         static has an associated instance expression.
29584
29585         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29586
29587         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29588
29589         * class.cs (Event.Define): Register event and perform appropriate checks
29590         for error #111.
29591
29592         We define the Add and Remove methods even if the use provides none because
29593         in that case, we provide default implementations ourselves.
29594
29595         Define a private field of the type of the event. This is done by the CSC compiler
29596         and we should be doing it too ;-)
29597
29598         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29599         More methods we use in code we generate.
29600
29601         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29602         is important.
29603
29604         (InitCoreTypes): Update accordingly for the above.
29605
29606         * class.cs (Event.Emit): Generate code for default accessors that we provide
29607
29608         (EmitDefaultMethod): Do the job in the above.
29609
29610         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29611         appropriate place.
29612
29613 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29614
29615         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29616         builders even if we were missing one.
29617
29618         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29619         pass the Basename as our class name instead of the Name.  The
29620         basename will be correctly composed for us.
29621
29622         * parameter.cs (Paramters): Now takes a Location argument.
29623
29624         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29625         make all the code call directly LookupType in RootContext and take
29626         this chance to pass the Location information everywhere.
29627
29628         * Everywhere: pass Location information.
29629
29630 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29631
29632         * class.cs (Constructor.Define): Updated way of detecting the
29633         length of the parameters.
29634
29635         (TypeContainer.DefineType): Use basename as the type name for
29636         nested types.
29637
29638         (TypeContainer.Define): Do not recursively define types here, as
29639         definition is taken care in order by the RootContext.
29640
29641         * tree.cs: Keep track of namespaces in a per-file basis.
29642
29643         * parameter.cs (Parameter.ComputeSignature): Update to use
29644         DeclSpace. 
29645
29646         (Parameters.GetSignature): ditto.
29647
29648         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29649         instead of a TypeContainer.
29650
29651         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29652         resolve names.  Because we need to be resolve in our context, not
29653         our parents.
29654
29655         * driver.cs: Implement response files.
29656
29657         * class.cs (TypeContainer.DefineType): If we are defined, do not
29658         redefine ourselves.
29659
29660         (Event.Emit): Emit the code for add/remove handlers.
29661         (Event.Define): Save the MethodBuilders for add/remove.
29662
29663         * typemanager.cs: Use pair here too.
29664
29665         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29666         DictionaryEntry requires the first argument to be non-null.  
29667
29668         (enum_declaration): Compute full name for registering the
29669         enumeration.
29670
29671         (delegate_declaration): Instead of using
29672         formal_parameter_list, use opt_formal_parameter_list as the list
29673         can be empty.
29674
29675         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29676         (EventParsing): New property that controls whether `add' and
29677         `remove' are returned as tokens or identifiers (for events);
29678
29679 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29680
29681         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29682         use MyEventBuilder only and let it wrap the real builder for us.
29683
29684         (MyEventBuilder): Revamp constructor etc.
29685
29686         Implement all operations that we perform on EventBuilder in precisely the same
29687         way here too.
29688
29689         (FindMembers): Update to use the EventBuilder member.
29690
29691         (Event.Emit): Update accordingly.
29692
29693 2001-12-18  Ravi Pratap  <ravi@ximian.com>
29694
29695         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
29696         by calling the appropriate methods.
29697
29698         (GetCustomAttributes): Make stubs as they cannot possibly do anything
29699         useful.
29700
29701         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
29702
29703 2001-12-17  Ravi Pratap  <ravi@ximian.com>
29704
29705         * delegate.cs (Delegate.Populate): Check that the return type
29706         and various parameters types are indeed accessible.
29707
29708         * class.cs (Constructor.Define): Same here.
29709
29710         (Field.Define): Ditto.
29711
29712         (Event.Define): Ditto.
29713
29714         (Operator.Define): Check that the underlying Method defined itself
29715         correctly - so it's MethodBuilder should not be null.
29716
29717         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
29718         expression happens to be null.
29719
29720         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
29721         members but as of now we don't seem to be able to do anything really useful with it.
29722
29723         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
29724         not the EventBuilder.
29725
29726 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
29727
29728         * cs-tokenizer.cs: Add support for defines.
29729         Add support for #if, #elif, #else, #endif
29730
29731         (eval_var): evaluates a variable.
29732         (eval): stubbed for evaluating functions.
29733
29734         * cs-parser.jay: Pass the defines information
29735
29736         * driver.cs: Add --define command line option.
29737
29738         * decl.cs: Move MemberCore here.
29739
29740         Make it the base class for DeclSpace.  This allows us to catch and
29741         report 108 and 109 for everything now.
29742
29743         * class.cs (TypeContainer.Define): Extract all the members
29744         before populating and emit the warning 108 (new keyword required
29745         to override) instead of having each member implement this.
29746
29747         (MemberCore.Define): New abstract method, we will be using this in
29748         the warning reporting engine in Populate.
29749
29750         (Operator.Define): Adjust to new MemberCore protocol. 
29751
29752         * const.cs (Const): This does not derive from Expression, it is a
29753         temporary object we use to create fields, it is a MemberCore. 
29754
29755         * class.cs (Method.Define): Allow the entry point to be in a
29756         specific class.
29757
29758         * driver.cs: Rewrite the argument handler to clean it up a bit.
29759
29760         * rootcontext.cs: Made it just an auxiliary namespace feature by
29761         making everything static.
29762
29763         * driver.cs: Adapt code to use RootContext type name instead of
29764         instance variable.
29765
29766         * delegate.cs: Remove RootContext argument.
29767
29768         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
29769         argument. 
29770
29771         * class.cs (Event.Define): The lookup can fail.
29772
29773         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
29774
29775         * expression.cs: Resolve the this instance before invoking the code.
29776
29777 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
29778
29779         * cs-parser.jay: Add a production in element_access that allows
29780         the thing to become a "type" reference.  This way we can parse
29781         things like "(string [])" as a type.
29782
29783         Note that this still does not handle the more complex rules of
29784         casts. 
29785
29786
29787         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
29788
29789         * ecore.cs: (CopyNewMethods): new utility function used to
29790         assemble the list of methods from running FindMembers.
29791
29792         (MemberLookup): Rework FindMembers so that 
29793
29794 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
29795
29796         * class.cs (TypeContainer): Remove Delegates who fail to be
29797         defined.
29798
29799         * delegate.cs (Populate): Verify that we dont get null return
29800         values.   TODO: Check for AsAccessible.
29801
29802         * cs-parser.jay: Use basename to emit error 574 (destructor should
29803         have the same name as container class), not the full name.
29804
29805         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
29806         possible representation.  
29807
29808         Also implements integer type suffixes U and L.
29809
29810 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
29811
29812         * expression.cs (ArrayCreation.DoResolve): We need to do the
29813         argument resolution *always*.
29814
29815         * decl.cs: Make this hold the namespace.  Hold the root context as
29816         well.
29817         (LookupType): Move here.
29818
29819         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
29820
29821         * location.cs (Row, Name): Fixed the code, it was always returning
29822         references to the first file.
29823
29824         * interface.cs: Register properties defined through interfaces.
29825
29826         * driver.cs: Add support for globbing on the command line
29827
29828         * class.cs (Field): Make it derive from MemberCore as well.
29829         (Event): ditto.
29830
29831 2001-12-15  Ravi Pratap  <ravi@ximian.com>
29832
29833         * class.cs (Event::Define): Check that the type of the event is a delegate
29834         type else flag error #66.
29835
29836         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
29837         same.
29838
29839         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
29840         values of EntryPoint, CharSet etc etc.
29841
29842         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
29843
29844         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
29845         be null and we should ignore this. I am not sure if this is really clean. Apparently,
29846         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
29847         which needs this to do its work.
29848
29849         * ../errors/cs0066.cs : Add.
29850
29851 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
29852
29853         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
29854         helper functions.
29855
29856         * class.cs: (MethodSignature.MethodSignature): Removed hack that
29857         clears out the parameters field.
29858         (MemberSignatureCompare): Cleanup
29859
29860         (MemberCore): New base class used to share code between MethodCore
29861         and Property.
29862
29863         (RegisterRequiredImplementations) BindingFlags.Public requires
29864         either BindingFlags.Instace or Static.  Use instance here.
29865
29866         (Property): Refactored code to cope better with the full spec.
29867
29868         * parameter.cs (GetParameterInfo): Return an empty array instead
29869         of null on error.
29870
29871         * class.cs (Property): Abstract or extern properties have no bodies.
29872
29873         * parameter.cs (GetParameterInfo): return a zero-sized array.
29874
29875         * class.cs (TypeContainer.MethodModifiersValid): Move all the
29876         method modifier validation to the typecontainer so we can reuse
29877         this on properties.
29878
29879         (MethodCore.ParameterTypes): return an empty sized array of types.
29880
29881         (Property.Define): Test property modifier validity.
29882
29883         Add tests for sealed/override too.
29884
29885         (Method.Emit): abstract or extern methods have no bodies.
29886
29887 2001-12-14  Ravi Pratap  <ravi@ximian.com>
29888
29889         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
29890         thing.
29891
29892         (Method::Define, ::Emit): Modify accordingly.
29893
29894         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
29895
29896         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
29897
29898         * makefile: Pass in /unsafe.
29899
29900 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
29901
29902         * class.cs (MakeKey): Kill routine.
29903
29904         * class.cs (TypeContainer.Define): Correctly define explicit
29905         method implementations (they require the full interface name plus
29906         the method name).
29907
29908         * typemanager.cs: Deply the PtrHashtable here and stop using the
29909         lame keys.  Things work so much better.
29910
29911         This of course broke everyone who depended on `RegisterMethod' to
29912         do the `test for existance' test.  This has to be done elsewhere.
29913
29914         * support.cs (PtrHashtable): A hashtable that avoid comparing with
29915         the object stupid Equals method (because, that like fails all over
29916         the place).  We still do not use it.
29917
29918         * class.cs (TypeContainer.SetRequiredInterface,
29919         TypeContainer.RequireMethods): Killed these two routines and moved
29920         all the functionality to RegisterRequiredImplementations.
29921
29922         (TypeContainer.RegisterRequiredImplementations): This routine now
29923         registers all the implementations required in an array for the
29924         interfaces and abstract methods.  We use an array of structures
29925         which can be computed ahead of time to reduce memory usage and we
29926         also assume that lookups are cheap as most classes will not
29927         implement too many interfaces.
29928
29929         We also avoid creating too many MethodSignatures.
29930
29931         (TypeContainer.IsInterfaceMethod): Update and optionally does not
29932         clear the "pending" bit if we find that there are problems with
29933         the declaration.
29934
29935         (TypeContainer.VerifyPendingMethods): Update to report errors of
29936         methods that look like implementations but are not.
29937
29938         (TypeContainer.Define): Add support for explicit interface method
29939         implementation. 
29940
29941 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
29942
29943         * typemanager.cs: Keep track of the parameters here instead of
29944         being a feature of the TypeContainer.
29945
29946         * class.cs: Drop the registration of parameters here, as
29947         InterfaceMethods are also interface declarations.
29948
29949         * delegate.cs: Register methods with the TypeManager not only with
29950         the TypeContainer.  This code was buggy.
29951
29952         * interface.cs: Full registation here.
29953
29954 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
29955
29956         * expression.cs: Remove reducer for binary expressions, it can not
29957         be done this way.
29958
29959         * const.cs: Put here the code that used to go into constant.cs
29960
29961         * constant.cs: Put here the code for constants, this is a new base
29962         class for Literals.
29963
29964         * literal.cs: Make Literal derive from Constant.
29965
29966 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
29967
29968         * statement.cs (Return.Emit): Report error 157 if the user
29969         attempts to return from a finally block.
29970
29971         (Return.Emit): Instead of emitting a return, jump to the end of
29972         the function.
29973
29974         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
29975         LocalBuilder to store the result of the function.  ReturnLabel is
29976         the target where we jump.
29977
29978
29979 2001-12-09  Radek Doulik  <rodo@ximian.com>
29980
29981         * cs-parser.jay: remember alias in current namespace
29982
29983         * ecore.cs (SimpleName::DoResolve): use aliases for types or
29984         namespaces
29985
29986         * class.cs (LookupAlias): lookup alias in my_namespace
29987
29988         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
29989         aliases hashtable
29990         (LookupAlias): lookup alias in this and if needed in parent
29991         namespaces
29992
29993 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
29994
29995         * support.cs: 
29996
29997         * rootcontext.cs: (ModuleBuilder) Made static, first step into
29998         making things static.  I need this to avoid passing the
29999         TypeContainer when calling ParameterType.
30000
30001         * support.cs (InternalParameters.ParameterType): Remove ugly hack
30002         that did string manipulation to compute the type and then call
30003         GetType.  Use Parameter.ParameterType instead.
30004
30005         * cs-tokenizer.cs: Consume the suffix for floating values.
30006
30007         * expression.cs (ParameterReference): figure out whether this is a
30008         reference parameter or not.  Kill an extra variable by computing
30009         the arg_idx during emission.
30010
30011         * parameter.cs (Parameters.GetParameterInfo): New overloaded
30012         function that returns whether a parameter is an out/ref value or not.
30013
30014         (Parameter.ParameterType): The type of the parameter (base,
30015         without ref/out applied).
30016
30017         (Parameter.Resolve): Perform resolution here.
30018         (Parameter.ExternalType): The full type (with ref/out applied).
30019
30020         * statement.cs (Using.Emit, Using.EmitExpression): Implement
30021         support for expressions on the using statement.
30022
30023 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
30024
30025         * statement.cs (Using.EmitLocalVariableDecls): Split the
30026         localvariable handling of the using statement.
30027
30028         (Block.EmitMeta): Keep track of variable count across blocks.  We
30029         were reusing slots on separate branches of blocks.
30030
30031         (Try.Emit): Emit the general code block, we were not emitting it. 
30032
30033         Check the type of the declaration to be an IDisposable or
30034         something that can be implicity converted to it. 
30035
30036         Emit conversions if required.
30037
30038         * ecore.cs (EmptyExpression): New utility class.
30039         (Expression.ImplicitConversionExists): New utility function.
30040
30041 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
30042
30043         * statement.cs (Using): Implement.
30044
30045         * expression.cs (LocalVariableReference): Support read only variables.
30046
30047         * statement.cs: Remove the explicit emit for the Leave opcode.
30048         (VariableInfo): Add a readonly field.
30049
30050 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
30051
30052         * ecore.cs (ConvCast): new class used to encapsulate the various
30053         explicit integer conversions that works in both checked and
30054         unchecked contexts.
30055
30056         (Expression.ConvertNumericExplicit): Use new ConvCast class to
30057         properly generate the overflow opcodes.
30058
30059 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30060
30061         * statement.cs: The correct type for the EmptyExpression is the
30062         element_type, not the variable type.  Ravi pointed this out.
30063
30064 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30065
30066         * class.cs (Method::Define): Handle PInvoke methods specially
30067         by using DefinePInvokeMethod instead of the usual one.
30068
30069         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
30070         above to do the task of extracting information and defining the method.
30071
30072 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30073
30074         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
30075         of the condition for string type.
30076
30077         (Emit): Move that here. 
30078
30079         (ArrayCreation::CheckIndices): Keep string literals in their expression
30080         form.
30081
30082         (EmitDynamicInitializers): Handle strings appropriately.
30083
30084 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30085
30086         * codegen.cs (EmitContext): Replace multiple variables with a
30087         single pointer to the current Switch statement.
30088
30089         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
30090         EmitContext.
30091
30092 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30093
30094         * statement.cs 
30095
30096         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30097         default'.
30098
30099         (Foreach.Emit): Foreach on arrays was not setting
30100         up the loop variables (for break/continue).
30101
30102         (GotoCase): Semi-implented.
30103
30104 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30105
30106         * attribute.cs (CheckAttribute): Handle system attributes by using
30107         Attribute.GetAttributes to examine information we need.
30108
30109         (GetValidPlaces): Same here.
30110
30111         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30112
30113         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30114
30115         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30116
30117         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30118
30119         (Method::Emit): Handle the case when we are a PInvoke method.
30120
30121 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30122
30123         * expression.cs: Use ResolveWithSimpleName on compound names.
30124
30125 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30126
30127         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30128         before trying to reduce it.
30129
30130         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30131
30132         * constant.cs (LookupConstantValue): Implement.
30133
30134         (EmitConstant): Use the above in emitting the constant.
30135
30136         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30137         that are user-defined by doing a LookupConstantValue on them.
30138
30139         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30140         too, like above.
30141
30142 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30143
30144         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30145
30146         (BaseAccess.DoResolve): Implement.
30147
30148         (MemberAccess.DoResolve): Split this routine into a
30149         ResolveMemberAccess routine that can be used independently
30150
30151 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30152
30153         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30154         As that share bits of the implementation.  Is returns a boolean,
30155         while As returns the Type that is being probed.
30156
30157 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30158
30159         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30160         instead of a Literal - much easier.
30161
30162         (EnumInTransit): Remove - utterly useless :-)
30163
30164         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30165
30166         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30167
30168         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30169         chain when we have no associated expression.
30170
30171 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30172
30173         * constant.cs (Define): Use Location while reporting the errror.
30174
30175         Also emit a warning when 'new' is used and there is no inherited
30176         member to hide.
30177
30178         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30179         populated.
30180
30181         (LookupEnumValue): Implement to lookup an enum member's value and define it
30182         if necessary.
30183
30184         (Populate): Re-write accordingly to use the above routine.
30185
30186 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30187
30188         * expression.cs (This): Fix prototype for DoResolveLValue to
30189         override the base class DoResolveLValue.
30190
30191         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30192         declarations) 
30193
30194         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30195         (we need to load the address of the field here).  This fixes
30196         test-22. 
30197
30198         (FieldExpr.DoResolveLValue): Call the DoResolve
30199         function to initialize the Instance expression.
30200
30201         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30202         correctly the GetEnumerator operation on a value type.
30203
30204         * cs-parser.jay: Add more simple parsing error catches.
30205
30206         * statement.cs (Switch): Add support for string switches.
30207         Handle null specially.
30208
30209         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30210
30211 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30212
30213         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30214
30215         (declare_local_constant): New helper function.
30216
30217         * statement.cs (AddConstant): Keep a separate record of constants
30218
30219         (IsConstant): Implement to determine if a variable is a constant.
30220
30221         (GetConstantExpression): Implement.
30222
30223         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30224
30225         * statement.cs (IsVariableDefined): Re-write.
30226
30227 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30228
30229         * class.cs (TypeContainer::FindMembers): Look for constants
30230         in the case when we are looking for MemberTypes.Field
30231
30232         * expression.cs (MemberAccess::DoResolve): Check that in the
30233         case we are a FieldExpr and a Literal, we are not being accessed
30234         by an instance reference.
30235
30236         * cs-parser.jay (local_constant_declaration): Implement.
30237
30238         (declaration_statement): Implement for constant declarations.
30239
30240 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30241
30242         * statement.cs (Switch): Catch double defaults.
30243
30244         (Switch): More work on the switch() statement
30245         implementation.  It works for integral values now, need to finish
30246         string support.
30247
30248
30249 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30250
30251         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30252         integer literals into other integer literals.  To be used by
30253         switch. 
30254
30255 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30256
30257         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30258         some memory.
30259
30260         (EmitDynamicInitializers): Cope with the above since we extract data
30261         directly from ArrayData now.
30262
30263         (ExpectInitializers): Keep track of whether initializers are mandatory
30264         or not.
30265
30266         (Bounds): Make it a hashtable to prevent the same dimension being 
30267         recorded for every element in that dimension.
30268
30269         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30270         from being found.
30271
30272         Also fix bug which was causing the indices to be emitted in the reverse
30273         order.
30274
30275 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30276
30277         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30278         unfinished.  They do not work, because the underlying code is
30279         sloppy.
30280
30281 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30282
30283         * cs-parser.jay: Remove bogus fixme.
30284
30285         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30286         on Switch statement.
30287
30288 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30289
30290         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30291         the same. 
30292
30293         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30294         parameter. Apparently, any expression is allowed. 
30295
30296         (ValidateInitializers): Update accordingly.
30297
30298         (CheckIndices): Fix some tricky bugs thanks to recursion.
30299
30300         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30301         I was being completely brain-dead.
30302
30303         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30304         and re-write acordingly.
30305
30306         (DelegateInvocation): Re-write accordingly.
30307
30308         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30309
30310         (MakeByteBlob): Handle types more correctly.
30311
30312         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30313         initialization from expressions but it is incomplete because I am a complete
30314         Dodo :-|
30315
30316 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30317
30318         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30319         on If.  Basically, we have to return `true' (ie, we do return to
30320         our caller) only if both branches of the if return.
30321
30322         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30323         short-circuit operators, handle them as short circuit operators. 
30324
30325         (Cast.DoResolve): Resolve type.
30326         (Cast.Cast): Take an expression as the target type.
30327
30328         * cs-parser.jay (cast_expression): Remove old hack that only
30329         allowed a limited set of types to be handled.  Now we take a
30330         unary_expression and we resolve to a type during semantic
30331         analysis.
30332
30333         Use the grammar productions from Rhys to handle casts (this is
30334         not complete like Rhys syntax yet, we fail to handle that corner
30335         case that C# has regarding (-x), but we will get there.
30336
30337 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30338
30339         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30340         field which is an array type.
30341
30342         * cs-parser.jay (declare_local_variables): Support array initialization too.
30343
30344         * typemanager.cs (MakeKey): Implement.
30345
30346         (everywhere): Use the above appropriately.
30347
30348         * cs-parser.jay (for_statement): Update for array initialization while
30349         declaring variables.
30350
30351         * ecore.cs : The error message was correct, it's the variable's names that
30352         were misleading ;-) Make the code more readable.
30353
30354         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30355         the correct type etc.
30356
30357         (ConvertExplicit): Handle Enum types by examining the underlying type.
30358
30359 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30360
30361         * parameter.cs (GetCallingConvention): Always return
30362         CallingConventions.Standard for now.
30363
30364 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30365
30366         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30367         and `r' after calling DoNumericPromotions.
30368
30369         * ecore.cs: Fix error message (the types were in the wrong order).
30370
30371         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30372         BindingFlags.Instance as well 
30373
30374         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30375         implicit int literal conversion in an empty cast so that we
30376         propagate the right type upstream.
30377
30378         (UnboxCast): new class used to unbox value types.
30379         (Expression.ConvertExplicit): Add explicit type conversions done
30380         by unboxing.
30381
30382         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30383         the target type before applying the implicit LongLiterals to ULong
30384         literal cast.
30385
30386 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30387
30388         * cs-parser.jay (for_statement): Reworked the way For works: now
30389         we declare manually any variables that are introduced in
30390         for_initializer to solve the problem of having out-of-band code
30391         emition (that is what got for broken).
30392
30393         (declaration_statement): Perform the actual variable declaration
30394         that used to be done in local_variable_declaration here.
30395
30396         (local_variable_declaration): Do not declare anything, just pass
30397         the information on a DictionaryEntry
30398
30399 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30400
30401         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30402         re-write of the logic to now make it recursive.
30403
30404         (UpdateIndices): Re-write accordingly.
30405
30406         Store element data in a separate ArrayData list in the above methods.
30407
30408         (MakeByteBlob): Implement to dump the array data into a byte array.
30409
30410 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30411
30412         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30413         into CheckIndices.
30414
30415         * constant.cs (Define): Implement.
30416
30417         (EmitConstant): Re-write fully.
30418
30419         Pass in location info.
30420
30421         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30422         respectively.
30423
30424         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30425         DictionaryEntry since we need location info too.
30426
30427         (constant_declaration): Update accordingly.
30428
30429         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30430         code into another method : UpdateIndices.
30431
30432 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30433
30434         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30435         some type checking etc.
30436
30437 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30438
30439         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30440         bits to provide dimension info if the user skips doing that.
30441
30442         Update second constructor to store the rank correctly.
30443
30444 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30445
30446         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30447         and try to implement.
30448
30449         * ../errors/cs0150.cs : Add.
30450
30451         * ../errors/cs0178.cs : Add.
30452
30453 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30454
30455         * statement.cs: Implement foreach on multi-dimensional arrays. 
30456
30457         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30458         name of the params argument.
30459
30460         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30461         initializing the array.
30462
30463         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30464         we can use this elsewhere.
30465
30466         * statement.cs: Finish implementation of foreach for single
30467         dimension arrays.
30468
30469         * cs-parser.jay: Use an out-of-band stack to pass information
30470         around, I wonder why I need this.
30471
30472         foreach_block: Make the new foreach_block the current_block.
30473
30474         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30475         function used to return a static Parameters structure.  Used for
30476         empty parameters, as those are created very frequently.
30477
30478         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30479
30480 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30481
30482         * interface.cs : Default modifier is private, not public. The
30483         make verify test passes again.
30484
30485 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30486
30487         * support.cs (ReflectionParameters): Fix logic to determine
30488         whether the last parameter is a params one. Test 9 passes again.
30489
30490         * delegate.cs (Populate): Register the builders we define with
30491         RegisterParameterForBuilder. Test 19 passes again.
30492
30493         * cs-parser.jay (property_declaration): Reference $6 instead
30494         of $$ to get at the location.
30495
30496         (indexer_declaration): Similar stuff.
30497
30498         (attribute): Ditto.
30499
30500         * class.cs (Property): Register parameters for the Get and Set methods
30501         if they exist. Test 23 passes again.
30502
30503         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30504         call to EmitArguments as we are sure there aren't any params arguments. 
30505         Test 32 passes again.
30506
30507         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30508         IndexOutOfRangeException. 
30509
30510         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30511         Test 33 now passes again.
30512
30513 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30514
30515         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30516         broke a bunch of things.  Will have to come up with a better way
30517         of tracking locations.
30518
30519         * statement.cs: Implemented foreach for single dimension arrays.
30520
30521 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30522
30523         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30524         an error.  This removes the lookup from the critical path.
30525
30526         * cs-parser.jay: Removed use of temporary_loc, which is completely
30527         broken. 
30528
30529 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30530
30531         * support.cs (ReflectionParameters.ParameterModifier): Report
30532         whether the argument is a PARAMS argument or not.
30533
30534         * class.cs: Set the attribute `ParamArrayAttribute' on the
30535         parameter argument.
30536
30537         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30538         and cons_param_array_attribute (ConstructorInfo for
30539         ParamArrayAttribute)., 
30540
30541         * codegen.cs: Emit the return using the `Return' statement, that
30542         way we can report the error correctly for missing return values. 
30543
30544         * class.cs (Method.Emit): Clean up.
30545
30546         * expression.cs (Argument.Resolve): Take another argument: the
30547         location where this argument is used.  Notice that this is not
30548         part of the "Argument" class as to reduce the size of the
30549         structure (we know the approximate location anyways).
30550
30551         Test if the argument is a variable-reference, if not, then
30552         complain with a 206.
30553
30554         (Argument.Emit): Emit addresses of variables.
30555
30556         (Argument.FullDesc): Simplify.
30557
30558         (Invocation.DoResolve): Update for Argument.Resolve.
30559
30560         (ElementAccess.DoResolve): ditto.
30561
30562         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30563         method should be virtual, as this method is always virtual.
30564
30565         (NewDelegate.DoResolve): Update for Argument.Resolve.
30566
30567         * class.cs (ConstructorInitializer.DoResolve): ditto.
30568
30569         * attribute.cs (Attribute.Resolve): ditto.
30570
30571 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30572
30573         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30574
30575         * expression.cs (ParameterReference): Drop IStackStorage and implement
30576         IAssignMethod instead. 
30577
30578         (LocalVariableReference): ditto.
30579
30580         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30581         IAssignMethod instead. 
30582
30583 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30584
30585         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30586         enumerations that are used in heavily used structures derive from
30587         byte in a laughable and pathetic attempt to reduce memory usage.
30588         This is the kind of pre-optimzations that you should not do at
30589         home without adult supervision.
30590
30591         * expression.cs (UnaryMutator): New class, used to handle ++ and
30592         -- separatedly from the other unary operators.  Cleans up the
30593         code, and kills the ExpressionStatement dependency in Unary.
30594
30595         (Unary): Removed `method' and `Arguments' from this class, making
30596         it smaller, and moving it all to SimpleCall, so I can reuse this
30597         code in other locations and avoid creating a lot of transient data
30598         strucutres when not required.
30599
30600         * cs-parser.jay: Adjust for new changes.
30601
30602 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30603
30604         * enum.cs (Enum.Populate): If there is a failure during
30605         definition, return
30606
30607         * cs-parser.jay (opt_enum_base): we used to catch type errors
30608         here, but this is really incorrect.  The type error should be
30609         catched during semantic analysis.
30610
30611 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30612
30613         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30614         current_local_parameters as expected since I, in my stupidity, had forgotten
30615         to do this :-)
30616
30617         * attribute.cs (GetValidPlaces): Fix stupid bug.
30618
30619         * class.cs (Method::Emit): Perform check on applicability of attributes.
30620
30621         (Constructor::Emit): Ditto.
30622
30623         (Field::Emit): Ditto.
30624
30625         (Field.Location): Store location information.
30626
30627         (Property, Event, Indexer, Operator): Ditto.
30628
30629         * cs-parser.jay (field_declaration): Pass in location for each field.
30630
30631         * ../errors/cs0592.cs : Add.
30632
30633 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30634
30635         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30636
30637         (InitCoreTypes): Update accordingly.
30638
30639         (RegisterAttrType, LookupAttr): Implement.
30640
30641         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30642         info about the same.
30643
30644         (Resolve): Update to populate the above as necessary.
30645
30646         (Error592): Helper.
30647
30648         (GetValidPlaces): Helper to the above.
30649
30650         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30651
30652         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30653
30654 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30655
30656         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30657
30658         * ../errors/cs0617.cs : Add.
30659
30660 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30661
30662         * enum.cs (Emit): Rename to Populate to be more consistent with what
30663         we expect it to do and when exactly it is called.
30664
30665         * class.cs, rootcontext.cs : Update accordingly.
30666
30667         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30668         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30669
30670         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30671
30672         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30673         of a fieldinfo using the above, when dealing with a FieldBuilder.
30674
30675 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30676
30677         * ../errors/cs0031.cs : Add.
30678
30679         * ../errors/cs1008.cs : Add.
30680
30681         * ../errrors/cs0543.cs : Add.
30682
30683         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30684         enum type.
30685
30686         (FindMembers): Implement.
30687
30688         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
30689         enums and delegates too.
30690
30691         (enum_types): Rename to builder_to_enum.
30692
30693         (delegate_types): Rename to builder_to_delegate.
30694
30695         * delegate.cs (FindMembers): Implement.
30696
30697 2001-11-09  Ravi Pratap  <ravi@ximian.com>
30698
30699         * typemanager.cs (IsEnumType): Implement.
30700
30701         * enum.cs (Emit): Re-write parts to account for the underlying type
30702         better and perform checking etc.
30703
30704         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
30705         of the underlying type.
30706
30707         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
30708         value
30709
30710         * enum.cs (error31): Helper to report error #31.
30711
30712         * cs-parser.jay (enum_declaration): Store location of each member too.
30713
30714         * enum.cs (member_to_location): New hashtable. 
30715
30716         (AddEnumMember): Update location hashtable.
30717
30718         (Emit): Use the location of each member while reporting errors.
30719
30720 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30721
30722         * cs-parser.jay: A for_initializer if is a
30723         local_variable_declaration really ammount to have an implicit
30724         block with the variable declaration and no initializer for for.
30725
30726         * statement.cs (For.Emit): Cope with null initializers.
30727
30728         This fixes the infinite loop on for initializers.
30729
30730 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
30731
30732         * enum.cs: More cleanup.
30733
30734         * ecore.cs: Remove dead code.
30735
30736         * class.cs (Property.Emit): More simplification.
30737         (Event.Emit): ditto.
30738
30739         Reworked to have less levels of indentation.
30740
30741 2001-11-08  Ravi Pratap  <ravi@ximian.com>
30742
30743         * class.cs (Property): Emit attributes.
30744
30745         (Field): Ditto.
30746
30747         (Event): Ditto.
30748
30749         (Indexer): Ditto.
30750
30751         (Operator): Ditto.
30752
30753         * enum.cs (Emit): Ditto.
30754
30755         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
30756         Enums too.
30757
30758         * class.cs (Field, Event, etc.): Move attribute generation into the
30759         Emit method everywhere.
30760
30761         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
30762         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
30763         as we had no way of defining nested enums !
30764
30765         * rootcontext.cs : Adjust code accordingly.
30766
30767         * typemanager.cs (AddEnumType): To keep track of enum types separately.
30768
30769 2001-11-07  Ravi Pratap  <ravi@ximian.com>
30770
30771         * expression.cs (EvalConstantExpression): Move into ecore.cs
30772
30773         * enum.cs (Enum): Rename some members and make them public and readonly
30774         according to our convention.
30775
30776         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
30777         nothing else.
30778
30779         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
30780
30781         (Enum::Emit): Write a simple version for now which doesn't try to compute
30782         expressions. I shall modify this to be more robust in just a while.
30783
30784         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
30785
30786         (TypeContainer::CloseType): Create the Enum types too.
30787
30788         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
30789
30790         * expression.cs (EvalConstantExpression): Get rid of completely.
30791
30792         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
30793         user-defined values and other cases.
30794
30795         (IsValidEnumLiteral): Helper function.
30796
30797         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
30798         out there in the case we had a literal FieldExpr.
30799
30800         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
30801
30802         (Literalize): Revamp a bit to take two arguments.
30803
30804         (EnumLiteral): New class which derives from Literal to wrap enum literals.
30805
30806 2001-11-06  Ravi Pratap  <ravi@ximian.com>
30807
30808         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
30809
30810         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
30811
30812         (Resolve): Use the above to ensure we have proper initializers.
30813
30814 2001-11-05  Ravi Pratap  <ravi@ximian.com>
30815
30816         * expression.cs (Expression::EvalConstantExpression): New method to 
30817         evaluate constant expressions.
30818
30819         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
30820
30821 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30822
30823         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
30824         in an array.
30825
30826         (Binary.ResolveOperator): Handle operator != (object a, object b)
30827         and operator == (object a, object b);
30828
30829         (Binary.DoNumericPromotions): Indicate whether the numeric
30830         promotion was possible.
30831
30832         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
30833         Implement.  
30834
30835         Made the ArrayAccess implement interface IAssignMethod instead of
30836         IStackStore as the order in which arguments are passed reflects
30837         this.
30838
30839         * assign.cs: Instead of using expr.ExprClass to select the way of
30840         assinging, probe for the IStackStore/IAssignMethod interfaces.
30841
30842         * typemanager.cs: Load InitializeArray definition.
30843
30844         * rootcontext.cs (RootContext.MakeStaticData): Used to define
30845         static data that can be used to initialize arrays. 
30846
30847 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
30848
30849         * expression.cs: Handle operator== and operator!= for booleans.
30850
30851         (Conditioal.Reduce): Implement reducer for the ?: operator.
30852
30853         (Conditional.Resolve): Implement dead code elimination.
30854
30855         (Binary.Resolve): Catch string literals and return a new
30856         concatenated string.
30857
30858         (Unary.Reduce): Implement reduction of unary expressions.
30859
30860         * ecore.cs: Split out the expression core handling here.
30861
30862         (Expression.Reduce): New method used to perform constant folding
30863         and CSE.  This is needed to support constant-expressions. 
30864
30865         * statement.cs (Statement.EmitBoolExpression): Pass true and false
30866         targets, and optimize for !x.
30867
30868 2001-11-04  Ravi Pratap  <ravi@ximian.com>
30869
30870         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
30871         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
30872         set custom atttributes.
30873
30874         * literal.cs (Literal::GetValue): New abstract method to return the actual
30875         value of the literal, cast as an object.
30876
30877         (*Literal): Implement GetValue method.
30878
30879         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
30880         expressions to the arraylist but objects of type Argument.
30881
30882         * class.cs (TypeContainer::Emit): Emit our attributes too.
30883
30884         (Method::Emit, Constructor::Emit): Ditto.
30885
30886         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
30887         to be ignoring earlier.
30888
30889 2001-11-03  Ravi Pratap  <ravi@ximian.com>
30890
30891         * attribute.cs (AttributeSection::Define): Implement to do the business
30892         of constructing a CustomAttributeBuilder.
30893
30894         (Attribute): New trivial class. Increases readability of code.  
30895
30896         * cs-parser.jay : Update accordingly.
30897
30898         (positional_argument_list, named_argument_list, named_argument): New rules
30899
30900         (attribute_arguments): Use the above so that we are more correct.
30901
30902 2001-11-02  Ravi Pratap  <ravi@ximian.com>
30903
30904         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
30905         to perform all checks for a method with a params parameter.
30906
30907         (Invocation::OverloadResolve): Update to use the above method and therefore
30908         cope correctly with params method invocations.
30909
30910         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
30911         params too.
30912
30913         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
30914         constructors in our parent too because we can't afford to miss out on 
30915         protected ones ;-)
30916
30917         * attribute.cs (AttributeSection): New name for the class Attribute
30918
30919         Other trivial changes to improve readability.
30920
30921         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
30922         use the new class names.
30923
30924 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30925
30926         * class.cs (Method::Define): Complete definition for params types too
30927
30928         (Indexer::Define): Ditto.
30929
30930         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
30931         Cope everywhere with a request for info about the array parameter.
30932
30933 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30934
30935         * tree.cs (RecordNamespace): Fix up to check for the correct key.
30936
30937         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
30938         local_variable_type to extract the string corresponding to the type.
30939
30940         (local_variable_type): Fixup the action to use the new helper method.
30941
30942         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
30943         go.
30944
30945         * expression.cs : Clean out code which uses the above.
30946
30947 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30948
30949         * typemanager.cs (RegisterMethod): Check if we already have an existing key
30950         and bale out if necessary by returning a false.
30951
30952         (RegisterProperty): Ditto.
30953
30954         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
30955         and print out appropriate error messages.
30956
30957         * interface.cs (everywhere): Ditto.
30958
30959         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
30960         location to constructor.
30961
30962         * class.cs (Property, Event, Indexer): Update accordingly.
30963
30964         * ../errors/cs111.cs : Added.
30965
30966         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
30967         of a method, as laid down by the spec.
30968
30969         (Invocation::OverloadResolve): Use the above method.
30970
30971 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30972
30973         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
30974         now take a TypeContainer and a Parameters object.
30975
30976         (ParameterData): Modify return type of ParameterModifier method to be 
30977         Parameter.Modifier and not a string.
30978
30979         (ReflectionParameters, InternalParameters): Update accordingly.
30980
30981         * expression.cs (Argument::GetParameterModifier): Same here.
30982
30983         * support.cs (InternalParameters::ParameterType): Find a better way of determining
30984         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
30985         symbol in it at all so maybe this is only for now.
30986
30987 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30988
30989         * support.cs (InternalParameters): Constructor now takes an extra argument 
30990         which is the actual Parameters class.
30991
30992         (ParameterDesc): Update to provide info on ref/out modifiers.
30993
30994         * class.cs (everywhere): Update call to InternalParameters to pass in
30995         the second argument too.
30996
30997         * support.cs (ParameterData): Add ParameterModifier, which is a method 
30998         to return the modifier info [ref/out etc]
30999
31000         (InternalParameters, ReflectionParameters): Implement the above.
31001
31002         * expression.cs (Argument::ParameterModifier): Similar function to return
31003         info about the argument's modifiers.
31004
31005         (Invocation::OverloadResolve): Update to take into account matching modifiers 
31006         too.
31007
31008         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
31009         a new SetFormalParameters object which we pass to InternalParameters.
31010
31011 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31012
31013         * expression.cs (NewArray): Merge into the ArrayCreation class.
31014
31015 2001-10-29  Ravi Pratap  <ravi@ximian.com>
31016
31017         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
31018         NewUserdefinedArray into one as there wasn't much of a use in having
31019         two separate ones.
31020
31021         * expression.cs (Argument): Change field's name to ArgType from Type.
31022
31023         (Type): New readonly property which returns the proper type, taking into 
31024         account ref/out modifiers.
31025
31026         (everywhere): Adjust code accordingly for the above.
31027
31028         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
31029         whether we are emitting for a ref or out parameter.
31030
31031         * expression.cs (Argument::Emit): Use the above field to set the state.
31032
31033         (LocalVariableReference::Emit): Update to honour the flag and emit the
31034         right stuff.
31035
31036         * parameter.cs (Attributes): Set the correct flags for ref parameters.
31037
31038         * expression.cs (Argument::FullDesc): New function to provide a full desc.
31039
31040         * support.cs (ParameterData): Add method ParameterDesc to the interface.
31041
31042         (ReflectionParameters, InternalParameters): Implement the above method.
31043
31044         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
31045         reporting errors.
31046
31047         (Invocation::FullMethodDesc): Ditto. 
31048
31049 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
31050
31051         * cs-parser.jay: Add extra production for the second form of array
31052         creation. 
31053
31054         * expression.cs (ArrayCreation): Update to reflect the above
31055         change. 
31056
31057         * Small changes to prepare for Array initialization.
31058
31059 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
31060
31061         * typemanager.cs (ImplementsInterface): interface might be null;
31062         Deal with this problem;
31063
31064         Also, we do store negative hits on the cache (null values), so use
31065         this instead of calling t.GetInterfaces on the type everytime.
31066
31067 2001-10-28  Ravi Pratap  <ravi@ximian.com>
31068
31069         * typemanager.cs (IsBuiltinType): New method to help determine the same.
31070
31071         * expression.cs (New::DoResolve): Get rid of array creation code and instead
31072         split functionality out into different classes.
31073
31074         (New::FormArrayType): Move into NewBuiltinArray.
31075
31076         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
31077         quite useless.
31078
31079         (NewBuiltinArray): New class to handle creation of built-in arrays.
31080
31081         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
31082         account creation of one-dimensional arrays.
31083
31084         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
31085
31086         (NewUserdefinedArray::DoResolve): Implement.
31087
31088         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
31089
31090         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
31091         we maintain inside the TypeManager. This is necessary to perform lookups on the
31092         module builder.
31093
31094         (LookupType): Update to perform GetType on the module builders too.     
31095
31096         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31097
31098         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31099
31100 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31101
31102         * expression.cs (New::DoResolve): Implement guts of array creation.
31103
31104         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31105
31106 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31107
31108         * expression.cs: Fix bug I introduced lsat night that broke
31109         Delegates. 
31110
31111         (Expression.Resolve): Report a 246 error (can not resolve name)
31112         if we find a SimpleName in the stream.
31113
31114         (Expression.ResolveLValue): Ditto.
31115
31116         (Expression.ResolveWithSimpleName): This function is a variant of
31117         ResolveName, this one allows SimpleNames to be returned without a
31118         warning.  The only consumer of SimpleNames is MemberAccess
31119
31120 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31121
31122         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31123         might arrive here.  I have my doubts that this is correct.
31124
31125         * statement.cs (Lock): Implement lock statement.
31126
31127         * cs-parser.jay: Small fixes to support `lock' and `using'
31128
31129         * cs-tokenizer.cs: Remove extra space
31130
31131         * driver.cs: New flag --checked, allows to turn on integer math
31132         checking. 
31133
31134         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31135         Threading.Monitor.Exit 
31136
31137 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31138
31139         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31140         Expression Class to be IndexerAccess.
31141
31142         Notice that Indexer::DoResolve sets the eclass to Value.
31143
31144 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31145
31146         * class.cs (TypeContainer::Emit): Emit code for indexers.
31147
31148         * assign.cs (IAssignMethod): New interface implemented by Indexers
31149         and Properties for handling assignment.
31150
31151         (Assign::Emit): Simplify and reuse code. 
31152
31153         * expression.cs (IndexerAccess, PropertyExpr): Implement
31154         IAssignMethod, clean up old code. 
31155
31156 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31157
31158         * typemanager.cs (ImplementsInterface): New method to determine if a type
31159         implements a given interface. Provides a nice cache too.
31160
31161         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31162         method.
31163
31164         (ConvertReferenceExplicit): Ditto.
31165
31166         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31167         various methods, with correct names etc.
31168
31169         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31170         Operator.UnaryNegation.
31171
31172         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31173         we have a unary plus or minus operator.
31174
31175         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31176         UnaryMinus.
31177
31178         * everywhere : update accordingly.
31179
31180         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31181         respectively.
31182
31183         * class.cs (Method::Define): For the case where we are implementing a method
31184         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31185         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31186
31187 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31188
31189         * interface.cs (FindMembers): Implement to work around S.R.E
31190         lameness.
31191
31192         * typemanager.cs (IsInterfaceType): Implement.
31193
31194         (FindMembers): Update to handle interface types too.
31195
31196         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31197         use IsAssignableFrom as that is not correct - it doesn't work.
31198
31199         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31200         and accordingly override EmitStatement.
31201
31202         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31203         using the correct logic :-)
31204
31205 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31206
31207         * ../errors/cs-11.cs : Add to demonstrate error -11 
31208
31209 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31210
31211         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31212         then pass this as a hint to ResolveLValue.
31213
31214         * expression.cs (FieldExpr): Add Location information
31215
31216         (FieldExpr::LValueResolve): Report assignment to readonly
31217         variable. 
31218
31219         (Expression::ExprClassFromMemberInfo): Pass location information.
31220
31221         (Expression::ResolveLValue): Add new method that resolves an
31222         LValue. 
31223
31224         (Expression::DoResolveLValue): Default invocation calls
31225         DoResolve. 
31226
31227         (Indexers): New class used to keep track of indexers in a given
31228         Type. 
31229
31230         (IStackStore): Renamed from LValue, as it did not really describe
31231         what this did.  Also ResolveLValue is gone from this interface and
31232         now is part of Expression.
31233
31234         (ElementAccess): Depending on the element access type
31235
31236         * typemanager.cs: Add `indexer_name_type' as a Core type
31237         (System.Runtime.CompilerServices.IndexerNameAttribute)
31238
31239         * statement.cs (Goto): Take a location.
31240
31241 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31242
31243         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31244         if two delegates are compatible.
31245
31246         (NewDelegate::DoResolve): Update to take care of the case when
31247         we instantiate a delegate from another delegate.
31248
31249         * typemanager.cs (FindMembers): Don't even try to look up members
31250         of Delegate types for now.
31251
31252 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31253
31254         * delegate.cs (NewDelegate): New class to take care of delegate
31255         instantiation.
31256
31257         * expression.cs (New): Split the delegate related code out into 
31258         the NewDelegate class.
31259
31260         * delegate.cs (DelegateInvocation): New class to handle delegate 
31261         invocation.
31262
31263         * expression.cs (Invocation): Split out delegate related code into
31264         the DelegateInvocation class.
31265
31266 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31267
31268         * expression.cs (New::DoResolve): Implement delegate creation fully
31269         and according to the spec.
31270
31271         (New::DoEmit): Update to handle delegates differently.
31272
31273         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31274         because of which we were printing out arguments in reverse order !
31275
31276         * delegate.cs (VerifyMethod): Implement to check if the given method
31277         matches the delegate.
31278
31279         (FullDelegateDesc): Implement.
31280
31281         (VerifyApplicability): Implement.
31282
31283         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31284         delegate invocations too.
31285
31286         (Invocation::Emit): Ditto.
31287
31288         * ../errors/cs1593.cs : Added.
31289
31290         * ../errors/cs1594.cs : Added.
31291
31292         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31293
31294 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31295
31296         * typemanager.cs (intptr_type): Core type for System.IntPtr
31297
31298         (InitCoreTypes): Update for the same.
31299
31300         (iasyncresult_type, asynccallback_type): Ditto.
31301
31302         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31303         correct.
31304
31305         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31306         too.
31307
31308         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31309         the builders for the 4 members of a delegate type :-)
31310
31311         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31312         type.
31313
31314         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31315
31316         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31317
31318 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31319
31320         * statement.cs (Break::Emit): Implement.   
31321         (Continue::Emit): Implement.
31322
31323         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31324         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31325         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31326         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31327         end loop
31328
31329         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31330         properties that track the label for the current loop (begin of the
31331         loop and end of the loop).
31332
31333 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31334
31335         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31336         use of emitting anything at all.
31337
31338         * class.cs, rootcontext.cs : Get rid of calls to the same.
31339
31340         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31341
31342         (Populate): Define the constructor correctly and set the implementation
31343         attributes.
31344
31345         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31346         have been defined.
31347
31348         (AddDelegateType): Implement.
31349
31350         (IsDelegateType): Implement helper method.
31351
31352         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31353
31354         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31355         and accordingly handle it.
31356
31357         * delegate.cs (Populate): Take TypeContainer argument.
31358         Implement bits to define the Invoke method. However, I still haven't figured out
31359         how to take care of the native int bit :-(
31360
31361         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31362         Qualify the name of the delegate, not its return type !
31363
31364         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31365         conversion.
31366
31367         (StandardConversionExists): Checking for array types turns out to be recursive.
31368
31369         (ConvertReferenceExplicit): Implement array conversion.
31370
31371         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31372
31373 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31374
31375         * cs-parser.jay (delegate_declaration): Store the fully qualified
31376         name as it is a type declaration.
31377
31378         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31379         readonly.
31380
31381         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31382         as TypeContainer::DefineType.
31383
31384         (Populate): Method in which all the definition of the various methods (Invoke)
31385         etc is done.
31386
31387         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31388         see.
31389
31390         (CloseDelegate): Finally creates the delegate.
31391
31392         * class.cs (TypeContainer::DefineType): Update to define delegates.
31393         (Populate, Emit and CloseType): Do the same thing here too.
31394
31395         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31396         delegates in all these operations.
31397
31398 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31399
31400         * expression.cs: LocalTemporary: a new expression used to
31401         reference a temporary that has been created.
31402
31403         * assign.cs: Handle PropertyAccess back here, so that we can
31404         provide the proper semantic access to properties.
31405
31406         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31407         a few more explicit conversions. 
31408
31409         * modifiers.cs: `NEW' modifier maps to HideBySig.
31410
31411         * expression.cs (PropertyExpr): Make this into an
31412         ExpressionStatement, and support the EmitStatement code path. 
31413
31414         Perform get/set error checking, clean up the interface.
31415
31416         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31417         them into toplevel access objects.
31418
31419 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31420
31421         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31422         SRE.
31423
31424         * typemanager.cs: Keep track here of our PropertyBuilders again to
31425         work around lameness in SRE.
31426
31427 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31428
31429         * expression.cs (LValue::LValueResolve): New method in the
31430         interface, used to perform a second resolution pass for LValues. 
31431
31432         (This::DoResolve): Catch the use of this in static methods.
31433
31434         (This::LValueResolve): Implement.
31435
31436         (This::Store): Remove warning, assigning to `this' in structures
31437         is 
31438
31439         (Invocation::Emit): Deal with invocation of
31440         methods on value types.  We need to pass the address to structure
31441         methods rather than the object itself.  (The equivalent code to
31442         emit "this" for structures leaves the entire structure on the
31443         stack instead of a pointer to it). 
31444
31445         (ParameterReference::DoResolve): Compute the real index for the
31446         argument based on whether the method takes or not a `this' pointer
31447         (ie, the method is static).
31448
31449         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31450         value types returned from functions when we need to invoke a
31451         method on the sturcture.
31452
31453
31454 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31455
31456         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31457         defining the type in the Modulebuilder or Typebuilder. This is to take
31458         care of nested types which need to be defined on the TypeBuilder using
31459         DefineNestedMethod.
31460
31461         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31462         methods in RootContext, only ported to be part of TypeContainer.
31463
31464         (TypeContainer::GetInterfaceOrClass): Ditto.
31465
31466         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31467
31468         * interface.cs (Interface::DefineInterface): New method. Does exactly
31469         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31470         too.
31471
31472         (Interface::GetInterfaces): Move from RootContext here and port.
31473
31474         (Interface::GetInterfaceByName): Same here.
31475
31476         * rootcontext.cs (ResolveTree): Re-write.
31477
31478         (PopulateTypes): Re-write.
31479
31480         * class.cs (TypeContainer::Populate): Populate nested types too.
31481         (TypeContainer::Emit): Emit nested members too.
31482
31483         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31484         instead just use the name argument passed in as it is already fully
31485         qualified.
31486
31487         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31488         to TypeContainer mapping to see if a type is user-defined.
31489
31490         * class.cs (TypeContainer::CloseType): Implement. 
31491
31492         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31493         the default constructor.
31494
31495         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31496         twice.
31497
31498         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31499
31500         * interface.cs (CloseType): Create the type here.
31501
31502         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31503         the hierarchy.
31504
31505         Remove all the methods which are now in TypeContainer.
31506
31507 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31508
31509         * delegate.cs (Define): Re-write bits to define the delegate
31510         correctly.
31511
31512 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31513
31514         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31515
31516         * expression.cs (ImplicitReferenceConversion): handle null as well
31517         as a source to convert to any reference type.
31518
31519         * statement.cs (Return): Perform any implicit conversions to
31520         expected return type.  
31521
31522         Validate use of return statement.  
31523
31524         * codegen.cs (EmitContext): Pass the expected return type here.
31525
31526         * class.cs (Method, Constructor, Property): Pass expected return
31527         type to EmitContext.
31528
31529 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31530
31531         * expression.cs: Make DoResolve take an EmitContext instead of a
31532         TypeContainer.
31533
31534         Replaced `l' and `location' for `loc', for consistency.
31535
31536         (Error, Warning): Remove unneeded Tc argument.
31537
31538         * assign.cs, literal.cs, constant.cs: Update to new calling
31539         convention. 
31540
31541         * codegen.cs: EmitContext now contains a flag indicating whether
31542         code is being generated in a static method or not.
31543
31544         * cs-parser.jay: DecomposeQI, new function that replaces the old
31545         QualifiedIdentifier.  Now we always decompose the assembled
31546         strings from qualified_identifier productions into a group of
31547         memberaccesses.
31548
31549 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31550
31551         * rootcontext.cs: Deal with field-less struct types correctly now
31552         by passing the size option to Define Type.
31553
31554         * class.cs: Removed hack that created one static field. 
31555
31556 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31557
31558         * statement.cs: Moved most of the code generation here. 
31559
31560 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31561
31562         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31563         seem very right.
31564
31565         (ElementAccess): Remove useless bits for now - keep checks as the spec
31566         says.
31567
31568 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31569
31570         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31571         and start performing checks according to the spec.
31572
31573 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31574
31575         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31576         rank_specifiers instead.
31577
31578         (rank_specifiers): Change the order in which the rank specifiers are stored
31579
31580         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31581
31582         * expression.cs (ElementAccess): Implement the LValue interface too.
31583
31584 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31585
31586         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31587         except that user defined conversions are not included.
31588
31589         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31590         perform the conversion of the return type, if necessary.
31591
31592         (New::DoResolve): Check whether we are creating an array or an object
31593         and accordingly do the needful.
31594
31595         (New::Emit): Same here.
31596
31597         (New::DoResolve): Implement guts of array creation.
31598
31599         (New::FormLookupType): Helper function.
31600
31601 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31602
31603         * codegen.cs: Removed most of the code generation here, and move the
31604         corresponding code generation bits to the statement classes. 
31605
31606         Added support for try/catch/finalize and throw.
31607
31608         * cs-parser.jay: Added support for try/catch/finalize.
31609
31610         * class.cs: Catch static methods having the flags override,
31611         virtual or abstract.
31612
31613         * expression.cs (UserCast): This user cast was not really doing
31614         what it was supposed to do.  Which is to be born in fully resolved
31615         state.  Parts of the resolution were being performed at Emit time! 
31616
31617         Fixed this code.
31618
31619 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31620
31621         * expression.cs: Implicity convert the result from UserCast.
31622
31623 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31624
31625         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31626         prevented it from working correctly. 
31627
31628         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31629         merely ConvertImplicit.
31630
31631 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31632
31633         * typemanager.cs: Make the LookupTypeContainer function static,
31634         and not per-instance.  
31635
31636         * class.cs: Make static FindMembers (the one that takes a Type
31637         argument). 
31638
31639         * codegen.cs: Add EmitForeach here.
31640
31641         * cs-parser.jay: Make foreach a toplevel object instead of the
31642         inline expansion, as we need to perform semantic analysis on it. 
31643
31644 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31645
31646         * expression.cs (Expression::ImplicitUserConversion): Rename to
31647         UserDefinedConversion.
31648
31649         (Expression::UserDefinedConversion): Take an extra argument specifying 
31650         whether we look for explicit user conversions too.
31651
31652         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31653
31654         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31655
31656         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31657         with the appropriate arguments.
31658
31659         * cs-parser.jay (cast_expression): Record location too.
31660
31661         * expression.cs (Cast): Record location info.
31662
31663         (Expression::ConvertExplicit): Take location argument.
31664
31665         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31666         to determine if we are doing explicit conversions.
31667
31668         (UserCast::Emit): Update accordingly.
31669
31670         (Expression::ConvertExplicit): Report an error if everything fails.
31671
31672         * ../errors/cs0030.cs : Add.
31673
31674 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31675
31676         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31677         virtual and newslot bits. 
31678
31679         * class.cs (TypeContainer::RegisterRequiredImplementations):
31680         Record methods we need.
31681
31682         (TypeContainer::MakeKey): Helper function to make keys for
31683         MethodBases, since the Methodbase key is useless.
31684
31685         (TypeContainer::Populate): Call RegisterRequiredImplementations
31686         before defining the methods.   
31687
31688         Create a mapping for method_builders_to_methods ahead of time
31689         instead of inside a tight loop.
31690
31691         (::RequireMethods):  Accept an object as the data to set into the
31692         hashtable so we can report interface vs abstract method mismatch.
31693
31694 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31695
31696         * report.cs: Make all of it static.
31697
31698         * rootcontext.cs: Drop object_type and value_type computations, as
31699         we have those in the TypeManager anyways.
31700
31701         Drop report instance variable too, now it is a global.
31702
31703         * driver.cs: Use try/catch on command line handling.
31704
31705         Add --probe option to debug the error reporting system with a test
31706         suite. 
31707
31708         * report.cs: Add support for exiting program when a probe
31709         condition is reached.
31710
31711 2001-10-03  Ravi Pratap  <ravi@ximian.com>
31712
31713         * expression.cs (Binary::DoNumericPromotions): Fix the case when
31714         we do a forcible conversion regardless of type, to check if 
31715         ForceConversion returns a null.
31716
31717         (Binary::error19): Use location to report error.
31718
31719         (Unary::error23): Use location here too.
31720
31721         * ../errors/cs0019.cs : Check in.
31722
31723         * ../errors/cs0023.cs : Check in.
31724
31725         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
31726         case of a non-null MethodInfo object with a length of 0 !
31727
31728         (Binary::ResolveOperator): Flag error if overload resolution fails to find
31729         an applicable member - according to the spec :-)
31730         Also fix logic to find members in base types.
31731
31732         (Unary::ResolveOperator): Same here.
31733
31734         (Unary::report23): Change name to error23 and make first argument a TypeContainer
31735         as I was getting thoroughly confused between this and error19 :-)
31736
31737         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
31738         (::FindMostEncompassedType): Implement.
31739         (::FindMostEncompassingType): Implement.
31740         (::StandardConversionExists): Implement.
31741
31742         (UserImplicitCast): Re-vamp. We now need info about most specific
31743         source and target types so that we can do the necessary conversions.
31744
31745         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
31746         mathematical union with no duplicates.
31747
31748 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31749
31750         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
31751         in order from base classes to child classes, so that we can in
31752         child classes look up in our parent for method names and
31753         attributes (required for handling abstract, virtual, new, override
31754         constructs: we need to instrospect our base class, and if we dont
31755         populate the classes in order, the introspection might be
31756         incorrect.  For example, a method could query its parent before
31757         the parent has any methods and would determine that the parent has
31758         no abstract methods (while it could have had them)).
31759
31760         (RootContext::CreateType): Record the order in which we define the
31761         classes.
31762
31763 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
31764
31765         * class.cs (TypeContainer::Populate): Also method definitions can
31766         fail now, keep track of this.
31767
31768         (TypeContainer::FindMembers): Implement support for
31769         DeclaredOnly/noDeclaredOnly flag.
31770
31771         (Constructor::Emit) Return the ConstructorBuilder.
31772
31773         (Method::Emit) Return the MethodBuilder. 
31774         Check for abstract or virtual methods to be public.
31775
31776         * rootcontext.cs (RootContext::CreateType): Register all the
31777         abstract methods required for the class to be complete and the
31778         interface methods that must be implemented. 
31779
31780         * cs-parser.jay: Report error 501 (method requires body if it is
31781         not marked abstract or extern).
31782
31783         * expression.cs (TypeOf::Emit): Implement.
31784
31785         * typemanager.cs: runtime_handle_type, new global type.
31786
31787         * class.cs (Property::Emit): Generate code for properties.
31788
31789 2001-10-02  Ravi Pratap  <ravi@ximian.com>
31790
31791         * expression.cs (Unary::ResolveOperator): Find operators on base type
31792         too - we now conform exactly to the spec.
31793
31794         (Binary::ResolveOperator): Same here.
31795
31796         * class.cs (Operator::Define): Fix minor quirk in the tests.
31797
31798         * ../errors/cs0215.cs : Added.
31799
31800         * ../errors/cs0556.cs : Added.
31801
31802         * ../errors/cs0555.cs : Added.
31803
31804 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31805
31806         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
31807         single integer which is really efficient
31808
31809 2001-10-01  Ravi Pratap  <ravi@ximian.com>
31810
31811         *  expression.cs (Expression::ImplicitUserConversion): Use location
31812         even in the case when we are examining True operators.
31813  
31814         * class.cs (Operator::Define): Perform extensive checks to conform
31815         with the rules for operator overloading in the spec.
31816
31817         * expression.cs (Expression::ImplicitReferenceConversion): Implement
31818         some of the other conversions mentioned in the spec.
31819
31820         * typemanager.cs (array_type): New static member for the System.Array built-in
31821         type.
31822
31823         (cloneable_interface): For System.ICloneable interface.
31824
31825         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
31826         we start resolving the tree and populating types.
31827
31828         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
31829  
31830 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31831
31832         * expression.cs (Expression::ExprClassFromMemberInfo,
31833         Expression::Literalize): Create literal expressions from
31834         FieldInfos which are literals.
31835
31836         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
31837         type casts, because they were wrong.  The test suite in tests
31838         caught these ones.
31839
31840         (ImplicitNumericConversion): ushort to ulong requires a widening
31841         cast. 
31842
31843         Int32 constant to long requires widening cast as well.
31844
31845         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
31846         for integers because the type on the stack is not i4.
31847
31848 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
31849
31850         * expression.cs (report118): require location argument. 
31851
31852         * parameter.cs: Do not dereference potential null value.
31853
31854         * class.cs: Catch methods that lack the `new' keyword when
31855         overriding a name.  Report warnings when `new' is used without
31856         anything being there to override.
31857
31858         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
31859
31860         * class.cs: Only add constructor to hashtable if it is non-null
31861         (as now constructors can fail on define).
31862
31863         (TypeManager, Class, Struct): Take location arguments.
31864
31865         Catch field instance initialization in structs as errors.
31866
31867         accepting_filter: a new filter for FindMembers that is static so
31868         that we dont create an instance per invocation.
31869
31870         (Constructor::Define): Catch errors where a struct constructor is
31871         parameterless 
31872
31873         * cs-parser.jay: Pass location information for various new
31874         constructs. 
31875
31876         * delegate.cs (Delegate): take a location argument.
31877
31878         * driver.cs: Do not call EmitCode if there were problesm in the
31879         Definition of the types, as many Builders wont be there. 
31880
31881         * decl.cs (Decl::Decl): Require a location argument.
31882
31883         * cs-tokenizer.cs: Handle properly hex constants that can not fit
31884         into integers, and find the most appropiate integer for it.
31885
31886         * literal.cs: Implement ULongLiteral.
31887
31888         * rootcontext.cs: Provide better information about the location of
31889         failure when CreateType fails.
31890
31891 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
31892
31893         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
31894         as well.
31895
31896         * expression.cs (Binary::CheckShiftArguments): Add missing type
31897         computation.
31898         (Binary::ResolveOperator): Add type to the logical and and logical
31899         or, Bitwise And/Or and Exclusive Or code paths, it was missing
31900         before.
31901
31902         (Binary::DoNumericPromotions): In the case where either argument
31903         is ulong (and most signed types combined with ulong cause an
31904         error) perform implicit integer constant conversions as well.
31905
31906 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31907
31908         * expression.cs (UserImplicitCast): Method should always be
31909         non-null. 
31910         (Invocation::BetterConversion): Simplified test for IntLiteral.
31911
31912         (Expression::ImplicitNumericConversion): Split this routine out.
31913         Put the code that performs implicit constant integer conversions
31914         here. 
31915
31916         (Expression::Resolve): Become a wrapper around DoResolve so we can
31917         check eclass and type being set after resolve.
31918
31919         (Invocation::Badness): Remove this dead function
31920
31921         (Binary::ResolveOperator): Do not compute the expensive argumnets
31922         unless we have a union for it.
31923
31924         (Probe::Emit): Is needs to do an isinst and then
31925         compare against null.
31926
31927         (::CanConvert): Added Location argument.  If the Location argument
31928         is null (Location.Null), then we do not report errors.  This is
31929         used by the `probe' mechanism of the Explicit conversion.  We do
31930         not want to generate an error for something that the user
31931         explicitly requested to be casted.  But the pipeline for an
31932         explicit cast first tests for potential implicit casts.
31933
31934         So for now, if the Location is null, it means `Probe only' to
31935         avoid adding another argument.   Might have to revise this
31936         strategy later.
31937
31938         (ClassCast): New class used to type cast objects into arbitrary
31939         classes (used in Explicit Reference Conversions).
31940
31941         Implement `as' as well.
31942
31943         Reverted all the patches from Ravi below: they were broken:
31944
31945                 * The use of `level' as a mechanism to stop recursive
31946                   invocations is wrong.  That was there just to catch the
31947                   bug with a strack trace but not as a way of addressing
31948                   the problem.
31949
31950                   To fix the problem we have to *understand* what is going
31951                   on and the interactions and come up with a plan, not
31952                   just get things going.
31953
31954                 * The use of the type conversion cache that I proposed
31955                   last night had an open topic: How does this work across
31956                   protection domains.  A user defined conversion might not
31957                   be public in the location where we are applying the
31958                   conversion, a different conversion might be selected
31959                   (ie, private A->B (better) but public B->A (worse),
31960                   inside A, A->B applies, but outside it, B->A will
31961                   apply).
31962
31963                 * On top of that (ie, even if the above is solved),
31964                   conversions in a cache need to be abstract.  Ie, `To
31965                   convert from an Int to a Short use an OpcodeCast', not
31966                   `To convert from an Int to a Short use the OpcodeCast on
31967                   the variable 5' (which is what this patch was doing).
31968
31969 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31970
31971         * expression.cs (Invocation::ConversionExists): Re-write to use
31972         the conversion cache
31973
31974         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
31975         cache all conversions done, not just user-defined ones.
31976
31977         (Invocation::BetterConversion): The real culprit. Use ConversionExists
31978         to determine if a conversion exists instead of acutually trying to 
31979         perform the conversion. It's faster too.
31980
31981         (Expression::ConvertExplicit): Modify to use ConversionExists to check
31982         and only then attempt the implicit conversion.
31983
31984 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31985
31986         * expression.cs (ConvertImplicit): Use a cache for conversions
31987         already found. Check level of recursion and bail out if necessary.
31988
31989 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31990
31991         * typemanager.cs (string_concat_string_string, string_concat_object_object):
31992         Export standard methods that we expect for string operations.
31993
31994         * statement.cs (Block::UsageWarning): Track usage of variables and
31995         report the errors for not used variables.
31996
31997         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
31998         operator. 
31999
32000 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32001
32002         * codegen.cs: remove unnneded code 
32003
32004         * expression.cs: Removed BuiltinTypeAccess class
32005
32006         Fix the order in which implicit conversions are
32007         done.  
32008
32009         The previous fixed dropped support for boxed conversions (adding a
32010         test to the test suite now)
32011
32012         (UserImplicitCast::CanConvert): Remove test for source being null,
32013         that code is broken.  We should not feed a null to begin with, if
32014         we do, then we should track the bug where the problem originates
32015         and not try to cover it up here.
32016
32017         Return a resolved expression of type UserImplicitCast on success
32018         rather than true/false.  Ravi: this is what I was talking about,
32019         the pattern is to use a static method as a "constructor" for
32020         objects. 
32021
32022         Also, do not create arguments until the very last minute,
32023         otherwise we always create the arguments even for lookups that
32024         will never be performed. 
32025
32026         (UserImplicitCast::Resolve): Eliminate, objects of type
32027         UserImplicitCast are born in a fully resolved state. 
32028
32029         * typemanager.cs (InitCoreTypes): Init also value_type
32030         (System.ValueType). 
32031
32032         * expression.cs (Cast::Resolve): First resolve the child expression.
32033
32034         (LValue): Add new method AddressOf to be used by
32035         the `&' operator.  
32036
32037         Change the argument of Store to take an EmitContext instead of an
32038         ILGenerator, because things like FieldExpr need to be able to call
32039         their children expression to generate the instance code. 
32040
32041         (Expression::Error, Expression::Warning): Sugar functions for
32042         reporting errors.
32043
32044         (Expression::MemberLookup): Accept a TypeContainer instead of a
32045         Report as the first argument.
32046
32047         (Expression::ResolvePrimary): Killed.  I still want to improve
32048         this as currently the code is just not right.
32049
32050         (Expression::ResolveMemberAccess): Simplify, but it is still
32051         wrong. 
32052
32053         (Unary::Resolve): Catch errors in AddressOf operators.
32054
32055         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
32056         index to a byte for the short-version, or the compiler will choose
32057         the wrong Emit call, which generates the wrong data.
32058
32059         (ParameterReference::Emit, ::Store): same.
32060
32061         (FieldExpr::AddressOf): Implement.
32062
32063         * typemanager.cs: TypeManager: made public variable instead of
32064         property.
32065
32066         * driver.cs: document --fatal.
32067
32068         * report.cs (ErrorMessage, WarningMessage): new names for the old
32069         Error and Warning classes.
32070
32071         * cs-parser.jay (member_access): Turn built-in access to types
32072         into a normal simplename
32073
32074 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32075
32076         * expression.cs (Invocation::BetterConversion): Fix to cope
32077         with q being null, since this was introducing a bug.
32078
32079         * expression.cs (ConvertImplicit): Do built-in conversions first.
32080
32081 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32082
32083         * expression.cs (UserImplicitCast::Resolve): Fix bug.
32084
32085 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32086
32087         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
32088         I had introduced long ago (what's new ?).
32089
32090         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
32091         the work of all the checking. 
32092         (ConvertImplicit): Call CanConvert and only then create object if necessary.
32093         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
32094
32095         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32096         that is the right way. 
32097
32098         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32099         overloading resolution. Use everywhere instead of cutting and pasting code.
32100
32101         (Binary::ResolveOperator): Use MakeUnionSet.
32102
32103         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32104         we have to convert to bool types. Not complete yet.
32105
32106 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32107
32108         * typemanager.cs (TypeManager::CSharpName): support ushort.
32109
32110         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32111         to provide an expression that performsn an implicit constant int
32112         conversion (section 6.1.6).
32113         (Expression::ConvertImplicitRequired): Reworked to include
32114         implicit constant expression conversions.
32115
32116         (Expression::ConvertNumericExplicit): Finished.
32117
32118         (Invocation::Emit): If InstanceExpression is null, then it means
32119         that we perform a call on this.
32120
32121 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32122
32123         * expression.cs (Unary::Emit): Remove some dead code.
32124         (Probe): Implement Resolve and Emit for `is'.
32125         (Expression::ConvertImplicitRequired): Attempt to do constant
32126         expression conversions here.  Maybe should be moved to
32127         ConvertImplicit, but I am not sure.
32128         (Expression::ImplicitLongConstantConversionPossible,
32129         Expression::ImplicitIntConstantConversionPossible): New functions
32130         that tell whether is it possible to apply an implicit constant
32131         expression conversion.
32132
32133         (ConvertNumericExplicit): Started work on explicit numeric
32134         conversions.
32135
32136         * cs-parser.jay: Update operator constants.
32137
32138         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32139         (Parameters::GetSignature): Hook up VerifyArgs here.
32140         (Parameters::VerifyArgs): Verifies that no two arguments have the
32141         same name. 
32142
32143         * class.cs (Operator): Update the operator names to reflect the
32144         ones that the spec expects (as we are just stringizing the
32145         operator names).
32146
32147         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32148         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32149         previous usage did only work for our methods.
32150         (Expression::ConvertImplicit): Handle decimal implicit numeric
32151         conversions as well.
32152         (Expression::InternalTypeConstructor): Used to invoke constructors
32153         on internal types for default promotions.
32154
32155         (Unary::Emit): Implement special handling for the pre/post
32156         increment/decrement for overloaded operators, as they need to have
32157         the same semantics as the other operators.
32158
32159         (Binary::ResolveOperator): ditto.
32160         (Invocation::ConversionExists): ditto.
32161         (UserImplicitCast::Resolve): ditto.
32162
32163 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32164
32165         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32166         operator, return after emitting body. Regression tests pass again !
32167
32168         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32169         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32170         (Invocation::OverloadResolve): Ditto.
32171         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32172
32173         * everywhere : update calls to the above methods accordingly.
32174
32175 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32176
32177         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32178
32179         * expression.cs (ExpressionStatement): New base class used for
32180         expressions that can appear in statements, so that we can provide
32181         an alternate path to generate expression that do not leave a value
32182         on the stack.
32183
32184         (Expression::Emit, and all the derivatives): We no longer return
32185         whether a value is left on the stack or not.  Every expression
32186         after being emitted leaves a single value on the stack.
32187
32188         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32189         facilties of ExpressionStatement if possible.
32190
32191         * cs-parser.jay: Update statement_expression.
32192
32193 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32194
32195         * driver.cs: Change the wording of message
32196
32197 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32198
32199         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32200         the type of the expression to the return type of the method if
32201         we have an overloaded operator match ! The regression tests pass again !
32202         (Unary::ResolveOperator): Ditto.
32203
32204         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32205         to find "op_Implicit", not "implicit" ;-)
32206         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32207         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32208
32209         * everywhere : Correct calls to the above accordingly.
32210
32211         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32212         (ConvertImplicit): Do user-defined conversion if it exists.
32213
32214 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32215
32216         * assign.cs: track location.
32217         (Resolve): Use implicit conversions on assignment.
32218
32219         * literal.cs: Oops.  Not good, Emit of short access values should
32220         pass (Bytes) or the wrong argument will be selected.
32221
32222         * expression.cs (Unary::Emit): Emit code for -expr.
32223
32224         (Unary::ResolveOperator): Handle `Substract' for non-constants
32225         (substract from zero from the non-constants).
32226         Deal with Doubles as well. 
32227
32228         (Expression::ConvertImplicitRequired): New routine that reports an
32229         error if no implicit conversion exists. 
32230
32231         (Invocation::OverloadResolve): Store the converted implicit
32232         expressions if we make them
32233
32234 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32235
32236         * class.cs (ConstructorInitializer): Take a Location argument.
32237         (ConstructorBaseInitializer): Same here.
32238         (ConstructorThisInitializer): Same here.
32239
32240         * cs-parser.jay : Update all calls accordingly.
32241
32242         * expression.cs (Unary, Binary, New): Take location argument.
32243         Update accordingly everywhere.
32244
32245         * cs-parser.jay : Update all calls to the above to take a location
32246         argument.
32247
32248         * class.cs : Ditto.
32249
32250 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32251
32252         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32253         (Invocation::BetterConversion): Same here
32254         (Invocation::ConversionExists): Ditto.
32255
32256         (Invocation::ConversionExists): Implement.
32257
32258 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32259
32260         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32261         Also take an additional TypeContainer argument.
32262
32263         * All over : Pass in TypeContainer as argument to OverloadResolve.
32264
32265         * typemanager.cs (CSharpName): Update to check for the string type and return
32266         that too.
32267
32268         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32269         a given method.
32270
32271 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32272
32273         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32274         (Invocation::BetterFunction): Implement.
32275         (Invocation::BetterConversion): Implement.
32276         (Invocation::ConversionExists): Skeleton, no implementation yet.
32277
32278         Okay, things work fine !
32279
32280 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32281
32282         * typemanager.cs: declare and load enum_type, delegate_type and
32283         void_type. 
32284
32285         * expression.cs (Expression::Emit): Now emit returns a value that
32286         tells whether a value is left on the stack or not.  This strategy
32287         might be reveted tomorrow with a mechanism that would address
32288         multiple assignments.
32289         (Expression::report118): Utility routine to report mismatches on
32290         the ExprClass.
32291
32292         (Unary::Report23): Report impossible type/operator combination
32293         utility function.
32294
32295         (Unary::IsIncrementableNumber): Whether the type can be
32296         incremented or decremented with add.
32297         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32298         complemented. 
32299         (Unary::ResolveOperator): Implement ++, !, ~,
32300
32301         (Invocation::Emit): Deal with new Emit convetion.
32302
32303         * All Expression derivatives: Updated their Emit method to return
32304         whether they leave values on the stack or not.
32305
32306         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32307         stack for expressions that are statements. 
32308
32309 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32310
32311         * expression.cs (LValue): New interface.  Must be implemented by
32312         LValue objects.
32313         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32314         LValue interface.
32315
32316         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32317         interface for generating code, simplifies the code.
32318
32319 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32320
32321         * expression.cs (everywhere): Comment out return statements in ::Resolve
32322         methods to avoid the warnings.
32323
32324 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32325
32326         * driver.cs (parse): Report error 2001 if we can not open the
32327         source file.
32328
32329         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32330         not resolve it.
32331
32332         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32333         object. 
32334
32335         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32336         otherwise nested blocks end up with the same index.
32337
32338         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32339
32340         * expression.cs:  Instead of having FIXMEs in the Resolve
32341         functions, throw exceptions so it is obvious that we are facing a
32342         bug. 
32343
32344         * cs-parser.jay (invocation_expression): Pass Location information.
32345
32346         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32347         Use a basename for those routines because .NET does not like paths
32348         on them. 
32349
32350         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32351         already defined.
32352
32353 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32354
32355         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32356         are loading the correct data types (throws an exception if not).
32357         (TypeManager::InitCoreTypes): Use CoreLookupType
32358
32359         * expression.cs (Unary::ResolveOperator): return the child
32360         expression for expressions which are just +expr.
32361         (Unary::ResolveOperator): Return negative literals for -LITERAL
32362         expressions (otherwise they are Unary {Literal}).
32363         (Invocation::Badness): Take into account `Implicit constant
32364         expression conversions'.
32365
32366         * literal.cs (LongLiteral): Implement long literal class.
32367         (IntLiteral): export the `Value' of the intliteral. 
32368
32369 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32370
32371         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32372
32373         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32374         instead of 'Operator'
32375
32376         * expression.cs (Binary::ResolveOperator): Update accordingly.
32377         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32378         and 'Minus'
32379
32380         * cs-parser.jay (unary_expression): Update to use the new names.
32381
32382         * gen-treedump.cs (GetUnary): Same here.
32383
32384         * expression.cs (Unary::Resolve): Implement.
32385         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32386         operators are found instead of making noise ;-)
32387         (Unary::ResolveOperator): New method to do precisely the same thing which
32388         Binary::ResolveOperator does for Binary expressions.
32389         (Unary.method, .Arguments): Add.
32390         (Unary::OperName): Implement.   
32391         (Unary::ForceConversion): Copy and Paste !
32392
32393         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32394         a unary operator.
32395
32396         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32397         for the inbuilt operators. Only overloading works for now ;-)
32398
32399 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32400
32401         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32402         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32403
32404         * expression.cs (This::Emit): Implement. 
32405         (This::Resolve): Implement.
32406         (TypeOf:Resolve): Implement.
32407         (Expression::ResolveSimpleName): Add an implicit this to instance
32408         field references. 
32409         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32410         Bind instance variable to Field expressions.
32411         (FieldExpr::Instance): New field used to track the expression that
32412         represents the object instance.
32413         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32414         binding 
32415         (FieldExpr::Emit): Implement.
32416
32417         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32418         the last instruction contains a return opcode to avoid generating
32419         the last `ret' instruction (this generates correct code, and it is
32420         nice to pass the peverify output).
32421
32422         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32423         initializer for static and instance variables.
32424         (Constructor::Emit): Allow initializer to be null in the case of
32425         static constructors.  Only emit initializer for instance
32426         constructors. 
32427
32428         (TypeContainer::FindMembers): Return a null array if there are no
32429         matches.
32430
32431         Also fix the code for the MemberTypes.Method branch, as it was not
32432         scanning that for operators (or tried to access null variables before).
32433
32434         * assign.cs (Assign::Emit): Handle instance and static fields. 
32435
32436         * TODO: Updated.
32437
32438         * driver.cs: Stop compilation if there are parse errors.
32439
32440         * cs-parser.jay (constructor_declaration): Provide default base
32441         initializer for non-static constructors.
32442         (constructor_declarator): Do not provide a default base
32443         initializers if none was specified.
32444         Catch the fact that constructors should not have parameters.
32445
32446         * class.cs: Do not emit parent class initializers for static
32447         constructors, that should be flagged as an error.
32448
32449 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32450
32451         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32452         Move back code into TypeContainer::Populate.
32453
32454 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32455
32456         * class.cs (TypeContainer::AddConstructor): Fix the check to
32457         compare against Name, not Basename. 
32458         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32459
32460         * cs-parser.jay : Update accordingly.
32461
32462         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32463         for methods, don't forget to look into the operators too.
32464         (RegisterMethodBuilder): Helper method to take care of this for
32465         methods, constructors and operators.
32466         (Operator::Define): Completely revamp.
32467         (Operator.OperatorMethod, MethodName): New fields.
32468         (TypeContainer::Populate): Move the registering of builders into
32469         RegisterMethodBuilder.
32470         (Operator::Emit): Re-write.
32471
32472         * expression.cs (Binary::Emit): Comment out code path to emit method
32473         invocation stuff for the case when we have a user defined operator. I am
32474         just not able to get it right !
32475
32476 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32477
32478         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32479         argument. 
32480
32481         (Expression::MemberLookup): Provide a version that allows to
32482         specify the MemberTypes and BindingFlags. 
32483
32484         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32485         so it was not fetching variable information from outer blocks.
32486
32487         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32488         Beforefieldinit as it was buggy.
32489
32490         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32491         that Ravi put here.  
32492
32493         * class.cs (Constructor::Emit): Only emit if block is not null.
32494         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32495         deal with this by semantically definining it as if the user had
32496         done it.
32497
32498         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32499         constructors as we now "emit" them at a higher level.
32500
32501         (TypeContainer::DefineDefaultConstructor): Used to define the
32502         default constructors if none was provided.
32503
32504         (ConstructorInitializer): Add methods Resolve and Emit. 
32505
32506         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32507
32508 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32509
32510         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32511         the default constructor builder with our hashtable for methodbuilders
32512         to methodcores.
32513
32514         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32515         and argument_count is 0 in which case we have a match.
32516         (Binary::ResolveOperator): More null checking and miscellaneous coding
32517         style cleanup.
32518
32519 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32520
32521         * rootcontext.cs (IsNameSpace): Compare against null.
32522
32523         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32524
32525         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32526         and Unary::Operator.
32527
32528         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32529         accordingly.
32530
32531         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32532         we have overloaded operators.
32533         (Binary::ResolveOperator): Implement the part which does the operator overload
32534         resolution.
32535
32536         * class.cs (Operator::Emit): Implement.
32537         (TypeContainer::Emit): Emit the operators we have too.
32538
32539         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32540         the case when we have a user-defined operator.
32541
32542 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32543
32544         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32545
32546 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32547
32548         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32549         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32550         (Constructor::Emit): Implement.
32551         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32552         if we have no work to do. 
32553         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32554         Emit method.
32555
32556         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32557         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32558
32559         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32560         of parent.parent.
32561
32562 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32563
32564         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32565         in the source.
32566         (Tree::RecordNamespace): Method to do what the name says ;-)
32567         (Tree::Namespaces): Property to get at the namespaces hashtable.
32568
32569         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32570         keep track.
32571
32572         * rootcontext.cs (IsNamespace): Fixed it :-)
32573
32574 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32575
32576         * class.cs (TypeContainer::FindMembers): Add support for
32577         constructors. 
32578         (MethodCore): New class that encapsulates both the shared aspects
32579         of a Constructor and a Method.  
32580         (Method, Constructor): Factored pieces into MethodCore.
32581
32582         * driver.cs: Added --fatal which makes errors throw exceptions.
32583         Load System assembly as well as part of the standard library.
32584
32585         * report.cs: Allow throwing exceptions on errors for debugging.
32586
32587         * modifiers.cs: Do not use `parent', instead use the real type
32588         container to evaluate permission settings.
32589
32590         * class.cs: Put Ravi's patch back in.  He is right, and we will
32591         have to cope with the
32592
32593 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32594
32595         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32596         FamORAssem, not FamANDAssem.
32597
32598 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32599
32600         * driver.cs: Added --parse option that only parses its input files
32601         and terminates.
32602
32603         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32604         incorrect.  IsTopLevel is not used to tell whether an object is
32605         root_types or not (that can be achieved by testing this ==
32606         root_types).  But to see if this is a top-level *class* (not
32607         necessarly our "toplevel" container). 
32608
32609 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32610
32611         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32612         parent instead of a direct call to GetType.
32613
32614 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32615
32616         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32617         Modifiers.TypeAttr. This should just be a call to that method.
32618
32619         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32620         object so that we can determine if we are top-level or not.
32621
32622         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32623         TypeContainer too.
32624
32625         * enum.cs (Enum::Define): Ditto.
32626
32627         * modifiers.cs (FieldAttr): Re-write.
32628
32629         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32630         (TypeContainer::HaveStaticConstructor): New property to provide access
32631         to precisely that info.
32632
32633         * modifiers.cs (MethodAttr): Re-write.
32634         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32635
32636         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32637         of top-level types as claimed.
32638
32639 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32640
32641         * expression.cs (MemberLookup): Fruitless attempt to lookup
32642         constructors.  Maybe I need to emit default constructors?  That
32643         might be it (currently .NET emits this for me automatically).
32644         (Invocation::OverloadResolve): Cope with Arguments == null.
32645         (Invocation::EmitArguments): new function, shared by the new
32646         constructor and us.
32647         (Invocation::Emit): Handle static and instance methods.  Emit
32648         proper call instruction for virtual or non-virtual invocations.
32649         (New::Emit): Implement.
32650         (New::Resolve): Implement.
32651         (MemberAccess:Resolve): Implement.
32652         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32653         to track instances.
32654         (FieldExpr::Resolve): Set type.
32655
32656         * support.cs: Handle empty arguments.
32657                 
32658         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32659         SimpleLookup): Auxiliary routines to help parse a qualifier
32660         identifier.  
32661
32662         Update qualifier_identifier rule.
32663
32664         * codegen.cs: Removed debugging messages.
32665
32666         * class.cs: Make this a global thing, this acts just as a "key" to
32667         objects that we might have around.
32668
32669         (Populate): Only initialize method_builders_to_methods once.
32670
32671         * expression.cs (PropertyExpr): Initialize type from the
32672         PropertyType. 
32673
32674         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32675         Resolve pattern.  Attempt to implicitly convert value to boolean.
32676         Emit code.
32677
32678         * expression.cs: Set the type for the int32/int32 argument case.
32679         (Binary::ResolveOperator): Set the return type to boolean for
32680         comparission operators
32681
32682         * typemanager.cs: Remove debugging print code.
32683
32684         (Invocation::Resolve): resolve type.
32685
32686         * class.cs: Allocate a MemberInfo of the correct size, as the code
32687         elsewhere depends on the test to reflect the correct contents.
32688
32689         (Method::) Keep track of parameters, due to System.Reflection holes
32690
32691         (TypeContainer::Populate): Keep track of MethodBuilders to Method
32692         mapping here.
32693
32694         (TypeContainer::FindMembers): Use ArrayList and then copy an array
32695         of the exact size and return that.
32696
32697         (Class::LookupMethodByBuilder): New function that maps
32698         MethodBuilders to its methods.  Required to locate the information
32699         on methods because System.Reflection bit us again.
32700
32701         * support.cs: New file, contains an interface ParameterData and
32702         two implementations: ReflectionParameters and InternalParameters
32703         used to access Parameter information.  We will need to grow this
32704         as required.
32705
32706         * expression.cs (Invocation::GetParameterData): implement a cache
32707         and a wrapper around the ParameterData creation for methods. 
32708         (Invocation::OverloadResolve): Use new code.
32709
32710 2001-09-13  Ravi Pratap  <ravi@ximian.com>
32711
32712         * class.cs (TypeContainer::EmitField): Remove and move into 
32713         (Field::Define): here and modify accordingly.
32714         (Field.FieldBuilder): New member.
32715         (TypeContainer::Populate): Update accordingly.
32716         (TypeContainer::FindMembers): Implement.
32717
32718 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32719
32720         * statement.cs: (VariableInfo::VariableType): New field to be
32721         initialized with the full type once it is resolved. 
32722
32723 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
32724
32725         * parameter.cs (GetParameterInfo): Use a type cache to compute
32726         things only once, and to reuse this information
32727
32728         * expression.cs (LocalVariableReference::Emit): Implement.
32729         (OpcodeCast::Emit): fix.
32730
32731         (ParameterReference::Resolve): Implement.
32732         (ParameterReference::Emit): Implement.
32733
32734         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
32735         that are expressions need to stay as Expressions.
32736
32737         * typemanager.cs (CSharpName): Returns the C# name of a type if
32738         possible. 
32739
32740         * expression.cs (Expression::ConvertImplicit): New function that
32741         implements implicit type conversions.
32742
32743         (Expression::ImplicitReferenceConversion): Implements implicit
32744         reference conversions.
32745
32746         (EmptyCast): New type for transparent casts.
32747
32748         (OpcodeCast): New type for casts of types that are performed with
32749         a sequence of bytecodes.
32750
32751         (BoxedCast): New type used for casting value types into reference
32752         types.  Emits a box opcode.
32753
32754         (Binary::DoNumericPromotions): Implements numeric promotions of
32755         and computation of the Binary::Type.
32756
32757         (Binary::EmitBranchable): Optimization.
32758
32759         (Binary::Emit): Implement code emission for expressions.
32760
32761         * typemanager.cs (TypeManager): Added two new core types: sbyte
32762         and byte.
32763
32764 2001-09-12  Ravi Pratap  <ravi@ximian.com>
32765
32766         * class.cs (TypeContainer::FindMembers): Method which does exactly
32767         what Type.FindMembers does, only we don't have to use reflection. No
32768         implementation yet.
32769
32770         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
32771         typecontainer objects as we need to get at them.
32772         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
32773
32774         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
32775         typecontainer object.
32776
32777         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
32778         of just a Report object.
32779
32780 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32781
32782         * class.cs (Event::Define): Go back to using the prefixes "add_" and
32783         "remove_"
32784         (TypeContainer::Populate): Now define the delegates of the type too.
32785         (TypeContainer.Delegates): Property to access the list of delegates defined
32786         in the type.
32787
32788         * delegates.cs (Delegate::Define): Implement partially.
32789
32790         * modifiers.cs (TypeAttr): Handle more flags.
32791
32792 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32793
32794         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
32795         and not <=
32796         (Operator::Define): Re-write logic to get types by using the LookupType method
32797         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
32798         (Indexer::Define): Ditto.
32799         (Event::Define): Ditto.
32800         (Property::Define): Ditto.
32801
32802 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32803
32804         * class.cs (TypeContainer::Populate): Now define operators too. 
32805         (TypeContainer.Operators): New property to access the list of operators
32806         in a type.
32807         (Operator.OperatorMethodBuilder): New member to hold the method builder
32808         for the operator we are defining.
32809         (Operator::Define): Implement.
32810
32811 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32812
32813         * class.cs (Event::Define): Make the prefixes of the accessor methods
32814         addOn_ and removeOn_ 
32815
32816         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
32817         of the location being passed in too. Ideally, this should go later since all
32818         error reporting should be done through the Report object.
32819
32820         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
32821         (Populate): Iterate thru the indexers we have and define them too.
32822         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
32823         for the get and set accessors.
32824         (Indexer::Define): Implement.
32825
32826 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
32827
32828         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
32829         my previous implementation, did not work.
32830
32831         * typemanager.cs: Add a couple of missing types (the longs).
32832
32833         * literal.cs: Use TypeManager.bool_type instead of getting it.
32834
32835         * expression.cs (EventExpr): New kind of expressions.
32836         (Expressio::ExprClassFromMemberInfo): finish
32837
32838 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
32839
32840         * assign.cs: Emit stores to static fields differently.
32841
32842 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32843
32844         * Merge in changes and adjust code to tackle conflicts. Backed out my
32845         code in Assign::Resolve ;-) 
32846
32847 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32848
32849         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
32850         instead Report.Error and also pass in the location.
32851         (CSharpParser::Lexer): New readonly property to return the reference
32852         to the Tokenizer object.
32853         (declare_local_variables): Use Report.Error with location instead of plain 
32854         old error.
32855         (CheckDef): Ditto.
32856
32857         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
32858         (Operator.CheckBinaryOperator): Ditto.
32859
32860         * cs-parser.jay (operator_declarator): Update accordingly.
32861
32862         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
32863         (CheckBinaryOperator): Same here.
32864
32865         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
32866         on the name without any prefixes of namespace names etc. This is because we
32867         already might have something already fully qualified like 
32868         'System.Console.WriteLine'
32869
32870         * assign.cs (Resolve): Begin implementation. Stuck ;-)
32871
32872 2001-09-07  Ravi Pratap  <ravi@ximian.com>
32873
32874         * cs-tokenizer.cs (location): Return a string which also contains
32875         the file name.
32876
32877         * expression.cs (ElementAccess): New class for expressions of the
32878         type 'element access.'
32879         (BaseAccess): New class for expressions of the type 'base access.'
32880         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
32881         respectively.
32882
32883         * cs-parser.jay (element_access): Implement action.
32884         (base_access): Implement actions.
32885         (checked_expression, unchecked_expression): Implement.
32886
32887         * cs-parser.jay (local_variable_type): Correct and implement.
32888         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
32889
32890         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
32891
32892         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
32893         name and the specifiers.
32894
32895         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
32896
32897         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
32898         making them all public ;-)
32899
32900         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
32901         class anyways.
32902
32903 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
32904
32905         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
32906         PropertyExprs.
32907         (FieldExpr, PropertyExprs): New resolved expressions.
32908         (SimpleName::MemberStaticCheck): Perform static checks for access
32909         to non-static fields on static methods. Maybe this should be
32910         generalized for MemberAccesses. 
32911         (SimpleName::ResolveSimpleName): More work on simple name
32912         resolution. 
32913
32914         * cs-parser.jay (primary_expression/qualified_identifier): track
32915         the parameter index.
32916
32917         * codegen.cs (CodeGen::Save): Catch save exception, report error.
32918         (EmitContext::EmitBoolExpression): Chain to expression generation
32919         instead of temporary hack.
32920         (::EmitStatementExpression): Put generic expression code generation.
32921
32922         * assign.cs (Assign::Emit): Implement variable assignments to
32923         local variables, parameters and fields.
32924
32925 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
32926
32927         * statement.cs (Block::GetVariableInfo): New method, returns the
32928         VariableInfo for a variable name in a block.
32929         (Block::GetVariableType): Implement in terms of GetVariableInfo
32930
32931         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
32932         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
32933
32934 2001-09-06  Ravi Pratap  <ravi@ximian.com>
32935
32936         * cs-parser.jay (operator_declaration): Continue on my quest : update
32937         to take attributes argument.
32938         (event_declaration): Ditto.
32939         (enum_declaration): Ditto.
32940         (indexer_declaration): Ditto.
32941
32942         * class.cs (Operator::Operator): Update constructor accordingly.
32943         (Event::Event): Ditto.
32944
32945         * delegate.cs (Delegate::Delegate): Same here.
32946
32947         * enum.cs (Enum::Enum): Same here.
32948
32949 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32950
32951         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
32952
32953         * ../tests/cs0658.cs : New file to demonstrate error 0658.
32954
32955         * attribute.cs (Attributes): New class to encapsulate all attributes which were
32956         being passed around as an arraylist.
32957         (Attributes::AddAttribute): Method to add attribute sections.
32958
32959         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
32960         (struct_declaration): Update accordingly.
32961         (constant_declaration): Update.
32962         (field_declaration): Update.
32963         (method_header): Update.
32964         (fixed_parameter): Update.
32965         (parameter_array): Ditto.
32966         (property_declaration): Ditto.
32967         (destructor_declaration): Ditto.
32968
32969         * class.cs (Struct::Struct): Update constructors accordingly.
32970         (Class::Class): Ditto.
32971         (Field::Field): Ditto.
32972         (Method::Method): Ditto.
32973         (Property::Property): Ditto.
32974         (TypeContainer::OptAttribute): update property's return type.
32975
32976         * interface.cs (Interface.opt_attributes): New member.
32977         (Interface::Interface): Update to take the extra Attributes argument.
32978
32979         * parameter.cs (Parameter::Parameter): Ditto.
32980
32981         * constant.cs (Constant::Constant): Ditto.
32982
32983         * interface.cs (InterfaceMemberBase): New OptAttributes field.
32984         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
32985         the attributes as a parameter.
32986         (InterfaceProperty): Update constructor call.
32987         (InterfaceEvent): Ditto.
32988         (InterfaceMethod): Ditto.
32989         (InterfaceIndexer): Ditto.
32990
32991         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
32992         pass the attributes too.
32993         (interface_event_declaration): Ditto.
32994         (interface_property_declaration): Ditto.
32995         (interface_method_declaration): Ditto.
32996         (interface_declaration): Ditto.
32997
32998 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
32999
33000         * class.cs (Method::Define): Track the "static Main" definition to
33001         create an entry point. 
33002
33003         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
33004         EntryPoint if we find it. 
33005
33006         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
33007         (EmitContext::ig): Make this variable public.
33008
33009         * driver.cs: Make the default output file be the first file name
33010         with the .exe extension.  
33011
33012         Detect empty compilations
33013
33014         Handle various kinds of output targets.  Handle --target and
33015         rename -t to --dumper.
33016
33017         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
33018         methods inherited from Expression return now an Expression.  This
33019         will is used during the tree rewriting as we resolve them during
33020         semantic analysis.
33021
33022         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
33023         the spec.  Missing entirely is the information about
33024         accessability of elements of it.
33025
33026         (Expression::ExprClassFromMemberInfo): New constructor for
33027         Expressions that creates a fully initialized Expression based on
33028         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
33029         a Type.
33030
33031         (Invocation::Resolve): Begin implementing resolution of invocations.
33032
33033         * literal.cs (StringLiteral):  Implement Emit.
33034
33035 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33036
33037         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
33038         member.
33039
33040 2001-09-04  Ravi Pratap  <ravi@ximian.com>
33041
33042         * cs-parser.jay (attribute_arguments): Implement actions.
33043         (attribute): Fix bug in production. Implement action.
33044         (attribute_list): Implement.
33045         (attribute_target): Implement.
33046         (attribute_target_specifier, opt_target_specifier): Implement
33047         (CheckAttributeTarget): New method to check if the attribute target
33048         is valid.
33049         (attribute_section): Implement.
33050         (opt_attributes): Implement.
33051
33052         * attribute.cs : New file to handle attributes.
33053         (Attribute): Class to hold attribute info.
33054
33055         * cs-parser.jay (opt_attribute_target_specifier): Remove production
33056         (attribute_section): Modify production to use 2 different rules to 
33057         achieve the same thing. 1 s/r conflict down !
33058         Clean out commented, useless, non-reducing dimension_separator rules.
33059
33060         * class.cs (TypeContainer.attributes): New member to hold list
33061         of attributes for a type.
33062         (Struct::Struct): Modify to take one more argument, the attribute list.
33063         (Class::Class): Ditto.
33064         (Field::Field): Ditto.
33065         (Method::Method): Ditto.
33066         (Property::Property): Ditto.
33067
33068         * cs-parser.jay (struct_declaration): Update constructor call to
33069         pass in the attributes too.
33070         (class_declaration): Ditto.
33071         (constant_declaration): Ditto.
33072         (field_declaration): Ditto.
33073         (method_header): Ditto.
33074         (fixed_parameter): Ditto.
33075         (parameter_array): Ditto.
33076         (property_declaration): Ditto.
33077
33078         * constant.cs (Constant::Constant): Update constructor similarly.
33079         Use System.Collections.
33080
33081         * parameter.cs (Parameter::Parameter): Update as above.
33082
33083 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33084
33085         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
33086         (TypeContainer.delegates): New member to hold list of delegates.
33087
33088         * cs-parser.jay (delegate_declaration): Implement the action correctly 
33089         this time as I seem to be on crack ;-)
33090
33091 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
33092
33093         * rootcontext.cs (RootContext::IsNamespace): new function, used to
33094         tell whether an identifier represents a namespace.
33095
33096         * expression.cs (NamespaceExpr): A namespace expression, used only
33097         temporarly during expression resolution.
33098         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33099         utility functions to resolve names on expressions.
33100
33101 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33102
33103         * codegen.cs: Add hook for StatementExpressions. 
33104
33105         * class.cs: Fix inverted test for static flag in methods.
33106
33107 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33108
33109         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33110         to make it coincide with MS' number.
33111         (Operator::CheckBinaryOperator): Ditto.
33112
33113         * ../errors/errors.txt : Remove error numbers added earlier.
33114
33115         * ../errors/cs1019.cs : Test case for error # 1019
33116
33117         * ../errros/cs1020.cs : Test case for error # 1020
33118
33119         * cs-parser.jay : Clean out commented cruft.
33120         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33121         used anywhere - non-reducing rule.
33122         (namespace_declarations): Non-reducing rule - comment out.
33123
33124         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33125         with TypeContainer::AddEnum.
33126
33127         * delegate.cs : New file for delegate handling classes.
33128         (Delegate): Class for declaring delegates.
33129
33130         * makefile : Update.
33131
33132         * cs-parser.jay (delegate_declaration): Implement.
33133
33134 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33135
33136         * class.cs (Event::Define): Implement.
33137         (Event.EventBuilder): New member.
33138
33139         * class.cs (TypeContainer::Populate): Update to define all enums and events
33140         we have.
33141         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33142         readonly fields for all these cases ?
33143
33144 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33145
33146         * class.cs (Property): Revamp to use the convention of making fields readonly.
33147         Accordingly modify code elsewhere.
33148
33149         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33150         the Define method of the Property class.
33151
33152         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33153         trivial bug.
33154         (TypeContainer::Populate): Update to define all the properties we have. Also
33155         define all enumerations.
33156
33157         * enum.cs (Define): Implement.
33158
33159 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33160
33161         * cs-parser.jay (overloadable_operator): The semantic value is an
33162         enum of the Operator class.
33163         (operator_declarator): Implement actions.
33164         (operator_declaration): Implement.
33165
33166         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33167         validity of definitions.
33168         (Operator::CheckBinaryOperator): Static method to check for binary operators
33169         (TypeContainer::AddOperator): New method to add an operator to a type.
33170
33171         * cs-parser.jay (indexer_declaration): Added line to actually call the
33172         AddIndexer method so it gets added ;-)
33173
33174         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33175         already taken care of by the MS compiler ?  
33176
33177 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33178
33179         * class.cs (Operator): New class for operator declarations.
33180         (Operator::OpType): Enum for the various operators.
33181
33182 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33183
33184         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33185         ostensibly handle this in semantic analysis.
33186
33187         * cs-parser.jay (general_catch_clause): Comment out
33188         (specific_catch_clauses, specific_catch_clause): Ditto.
33189         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33190         (catch_args, opt_catch_args): New productions.
33191         (catch_clause): Rewrite to use the new productions above
33192         (catch_clauses): Modify accordingly.
33193         (opt_catch_clauses): New production to use in try_statement
33194         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33195         and re-write the code in the actions to extract the specific and
33196         general catch clauses by being a little smart ;-)
33197
33198         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33199         Hooray, try and catch statements parse fine !
33200
33201 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33202
33203         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33204         string from the hashtable of variables.
33205
33206         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33207         I end up making that mistake ;-)
33208         (catch_clauses): Fixed gross error which made Key and Value of the 
33209         DictionaryEntry the same : $1 !!
33210
33211 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33212
33213         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33214
33215         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33216         when the add and remove accessors are specified. 
33217
33218 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33219
33220         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33221         information about indexer_declarator.
33222         (indexer_declarator): Implement actions.
33223         (parsing_indexer): New local boolean used to keep track of whether
33224         we are parsing indexers or properties. This is necessary because 
33225         implicit_parameters come into picture even for the get accessor in the 
33226         case of an indexer.
33227         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33228
33229         * class.cs (Indexer): New class for indexer declarations.
33230         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33231         (TypeContainer::indexers): New member to hold list of indexers for the
33232         type.
33233
33234 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33235
33236         * cs-parser.jay (add_accessor_declaration): Implement action.
33237         (remove_accessor_declaration): Implement action.
33238         (event_accessors_declaration): Implement
33239         (variable_declarators): swap statements for first rule - trivial.
33240
33241         * class.cs (Event): New class to hold information about event
33242         declarations.
33243         (TypeContainer::AddEvent): New method to add an event to a type
33244         (TypeContainer::events): New member to hold list of events.
33245
33246         * cs-parser.jay (event_declaration): Implement actions.
33247
33248 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33249
33250         * cs-parser.jay (dim_separators): Implement. Make it a string
33251         concatenating all the commas together, just as they appear.
33252         (opt_dim_separators): Modify accordingly
33253         (rank_specifiers): Update accordingly. Basically do the same
33254         thing - instead, collect the brackets here.
33255         (opt_rank_sepcifiers): Modify accordingly.
33256         (array_type): Modify to actually return the complete type string
33257         instead of ignoring the rank_specifiers.
33258         (expression_list): Implement to collect the expressions
33259         (variable_initializer): Implement. We make it a list of expressions
33260         essentially so that we can handle the array_initializer case neatly too.
33261         (variable_initializer_list): Implement.
33262         (array_initializer): Make it a list of variable_initializers
33263         (opt_array_initializer): Modify accordingly.
33264
33265         * expression.cs (New::NType): Add enumeration to help us
33266         keep track of whether we have an object/delegate creation
33267         or an array creation.
33268         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33269         members to hold data about array creation.
33270         (New:New): Modify to update NewType
33271         (New:New): New Overloaded contructor for the array creation
33272         case.
33273
33274         * cs-parser.jay (array_creation_expression): Implement to call
33275         the overloaded New constructor.
33276
33277 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33278
33279         * class.cs (TypeContainer::Constructors): Return member
33280         constructors instead of returning null.
33281
33282 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33283
33284         * typemanager.cs (InitCoreTypes): Initialize the various core
33285         types after we have populated the type manager with the user
33286         defined types (this distinction will be important later while
33287         compiling corlib.dll)
33288
33289         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33290         on Expression Classification.  Now all expressions have a method
33291         `Resolve' and a method `Emit'.
33292
33293         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33294         generation from working.     Also add some temporary debugging
33295         code. 
33296
33297 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33298
33299         * codegen.cs: Lots of code generation pieces.  This is only the
33300         beginning, will continue tomorrow with more touches of polish.  We
33301         handle the fundamentals of if, while, do, for, return.  Others are
33302         trickier and I need to start working on invocations soon.
33303
33304         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33305         s.InitStatement. 
33306
33307         * codegen.cs (EmitContext): New struct, used during code
33308         emission to keep a context.   Most of the code generation will be
33309         here. 
33310
33311         * cs-parser.jay: Add embedded blocks to the list of statements of
33312         this block.  So code generation proceeds in a top down fashion.
33313
33314 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33315
33316         * statement.cs: Add support for multiple child blocks.
33317
33318 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33319
33320         * codegen.cs (EmitCode): New function, will emit the code for a
33321         Block of code given a TypeContainer and its ILGenerator. 
33322
33323         * statement.cs (Block): Standard public readonly optimization.
33324         (Block::Block constructors): Link children. 
33325         (Block::Child): Child Linker.
33326         (Block::EmitVariables): Emits IL variable declarations.
33327
33328         * class.cs: Drop support for MethodGroups here, delay until
33329         Semantic Analysis.
33330         (Method::): Applied the same simplification that I did before, and
33331         move from Properties to public readonly fields.
33332         (Method::ParameterTypes): Returns the parameter types for the
33333         function, and implements a cache that will be useful later when I
33334         do error checking and the semantic analysis on the methods is
33335         performed.
33336         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33337         and made a method, optional argument tells whether this is a class
33338         or a structure to apply the `has-this' bit.
33339         (Method::GetCallingConvention): Implement, returns the calling
33340         convention. 
33341         (Method::Define): Defines the type, a second pass is performed
33342         later to populate the methods.
33343
33344         (Constructor::ParameterTypes): implement a cache similar to the
33345         one on Method::ParameterTypes, useful later when we do semantic
33346         analysis. 
33347
33348         (TypeContainer::EmitMethod):  New method.  Emits methods.
33349
33350         * expression.cs: Removed MethodGroup class from here.
33351
33352         * parameter.cs (Parameters::GetCallingConvention): new method.
33353
33354 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33355
33356         * class.cs (TypeContainer::Populate): Drop RootContext from the
33357         argument. 
33358
33359         (Constructor::CallingConvention): Returns the calling convention.
33360         (Constructor::ParameterTypes): Returns the constructor parameter
33361         types. 
33362
33363         (TypeContainer::AddConstructor): Keep track of default constructor
33364         and the default static constructor.
33365
33366         (Constructor::) Another class that starts using `public readonly'
33367         instead of properties. 
33368
33369         (Constructor::IsDefault): Whether this is a default constructor. 
33370
33371         (Field::) use readonly public fields instead of properties also.
33372
33373         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33374         track of static constructors;  If none is used, turn on
33375         BeforeFieldInit in the TypeAttributes. 
33376
33377         * cs-parser.jay (opt_argument_list): now the return can be null
33378         for the cases where there are no arguments. 
33379
33380         (constructor_declarator): If there is no implicit `base' or
33381         `this', then invoke the default parent constructor. 
33382
33383         * modifiers.cs (MethodAttr): New static function maps a set of
33384         modifiers flags into a MethodAttributes enum
33385         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33386         MethodAttr, TypeAttr to represent the various mappings where the
33387         modifiers are used.
33388         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33389
33390 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33391
33392         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33393         method arguments.
33394
33395         * interface.cs (PopulateIndexer): Implemented the code generator
33396         for interface indexers.
33397
33398 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33399
33400         * interface.cs (InterfaceMemberBase): Now we track the new status
33401         here.  
33402
33403         (PopulateProperty): Implement property population.  Woohoo!  Got
33404         Methods and Properties going today. 
33405
33406         Removed all the properties for interfaces, and replaced them with
33407         `public readonly' fields. 
33408
33409 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33410
33411         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33412         initialize their hashtables/arraylists only when they are needed
33413         instead of doing this always.
33414
33415         * parameter.cs: Handle refs and out parameters.
33416
33417         * cs-parser.jay: Use an ArrayList to construct the arguments
33418         instead of the ParameterCollection, and then cast that to a
33419         Parameter[] array.
33420
33421         * parameter.cs: Drop the use of ParameterCollection and use
33422         instead arrays of Parameters.
33423
33424         (GetParameterInfo): Use the Type, not the Name when resolving
33425         types. 
33426
33427 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33428
33429         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33430         and instead use public readonly fields.
33431
33432         * class.cs: Put back walking code for type containers.
33433
33434 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33435
33436         * class.cs (MakeConstant): Code to define constants.
33437
33438         * rootcontext.cs (LookupType): New function.  Used to locate types 
33439
33440
33441 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33442
33443         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33444         this System.Reflection code is.  Kudos to Microsoft
33445
33446         * typemanager.cs: Implement a type cache and avoid loading all
33447         types at boot time.  Wrap in LookupType the internals.  This made
33448         the compiler so much faster.  Wow.  I rule!
33449
33450         * driver.cs: Make sure we always load mscorlib first (for
33451         debugging purposes, nothing really important).
33452
33453         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33454         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33455
33456         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33457         on namespaces that have been imported using the `using' keyword.
33458
33459         * class.cs (TypeContainer::TypeAttr): Virtualize.
33460         (Class::TypeAttr): Return attributes suitable for this bad boy.
33461         (Struct::TypeAttr): ditto.
33462         Handle nested classes.
33463         (TypeContainer::) Remove all the type visiting code, it is now
33464         replaced with the rootcontext.cs code
33465
33466         * rootcontext.cs (GetClassBases): Added support for structs. 
33467
33468 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33469
33470         * interface.cs, statement.cs, class.cs, parameter.cs,
33471         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33472         Drop use of TypeRefs, and use strings instead.
33473
33474 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33475
33476         * rootcontext.cs: 
33477
33478         * class.cs (Struct::Struct): set the SEALED flags after
33479         checking the modifiers.
33480         (TypeContainer::TypeAttr): new property, returns the
33481         TypeAttributes for a class.  
33482
33483         * cs-parser.jay (type_list): Oops, list production was creating a
33484         new list of base types.
33485
33486         * rootcontext.cs (StdLib): New property.
33487         (GetInterfaceTypeByName): returns an interface by type name, and
33488         encapsulates error handling here.
33489         (GetInterfaces): simplified.
33490         (ResolveTree): Encapsulated all the tree resolution here.
33491         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33492         types. 
33493
33494         * driver.cs: Add support for --nostdlib, to avoid loading the
33495         default assemblies.
33496         (Main): Do not put tree resolution here. 
33497
33498         * rootcontext.cs: Beginning of the class resolution.
33499
33500 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33501
33502         * rootcontext.cs: Provide better error reporting. 
33503
33504         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33505
33506         * rootcontext.cs (CreateInterface): Handle the case where there
33507         are no parent interfaces.
33508
33509         (CloseTypes): Routine to flush types at the end.
33510         (CreateInterface): Track types.
33511         (GetInterfaces): Returns an array of Types from the list of
33512         defined interfaces.
33513
33514         * typemanager.c (AddUserType): Mechanism to track user types (puts
33515         the type on the global type hash, and allows us to close it at the
33516         end). 
33517
33518 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33519
33520         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33521         RecordInterface instead.
33522
33523         * cs-parser.jay: Updated to reflect changes above.
33524
33525         * decl.cs (Definition): Keep track of the TypeBuilder type that
33526         represents this type here.  Not sure we will use it in the long
33527         run, but wont hurt for now.
33528
33529         * driver.cs: Smaller changes to accomodate the new code.
33530
33531         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33532         when done. 
33533
33534         * rootcontext.cs (CreateInterface):  New method, used to create
33535         the System.TypeBuilder type for interfaces.
33536         (ResolveInterfaces): new entry point to resolve the interface
33537         hierarchy. 
33538         (CodeGen): Property, used to keep track of the code generator.
33539
33540 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33541
33542         * cs-parser.jay: Add a second production for delegate_declaration
33543         with `VOID'.
33544
33545         (enum_body): Put an opt_comma here instead of putting it on
33546         enum_body or enum_member_declarations so we can handle trailing
33547         commas on enumeration members.  Gets rid of a shift/reduce.
33548
33549         (type_list): Need a COMMA in the middle.
33550
33551         (indexer_declaration): Tell tokenizer to recognize get/set
33552
33553         * Remove old targets.
33554
33555         * Re-add the parser target.
33556
33557 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33558
33559         * cs-parser.jay: Add precendence rules for a number of operators
33560         ot reduce the number of shift/reduce conflicts in the grammar.
33561
33562 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33563
33564         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33565         and put it here.
33566
33567         Get rid of old crufty code.
33568
33569         * rootcontext.cs: Use this to keep track of the parsed
33570         representation and the defined types available to the program. 
33571
33572         * gen-treedump.cs: adjust for new convention.
33573
33574         * type.cs: Split out the type manager, and the assembly builder
33575         from here. 
33576
33577         * typemanager.cs: the type manager will live here now.
33578
33579         * cil-codegen.cs: And the code generator here. 
33580
33581 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33582
33583         * makefile: Fixed up for easy making.
33584
33585 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33586
33587         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33588         the 
33589
33590         (unary_expression): Expand pre_increment_expression and
33591         post_decrement_expression to reduce a shift/reduce.
33592
33593 2001-07-11  Simon Cozens
33594
33595         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33596
33597         Improve allow_keyword_as_indent name.
33598
33599 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33600
33601         * Adjustments for Beta2. 
33602
33603 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33604
33605         * decl.cs: Added `Define' abstract method.
33606         (InTransit): new property, used to catch recursive definitions. 
33607
33608         * interface.cs: Implement `Define'. 
33609
33610         * modifiers.cs: Map Modifiers.constants to
33611         System.Reflection.TypeAttribute flags.
33612
33613         * class.cs: Keep track of types and user-defined types.
33614         (BuilderInit): New method for creating an assembly
33615         (ResolveType): New function to launch the resolution process, only
33616         used by interfaces for now.
33617
33618         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33619         that are inserted into the name space. 
33620
33621 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33622
33623         * ARGH.  I have screwed up my tree so many times due to the use of
33624         rsync rather than using CVS.  Going to fix this at once. 
33625
33626         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33627         load types.
33628
33629 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33630
33631         * Experiment successful: Use System.Type rather that our own
33632         version of Type.  
33633
33634 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33635
33636         * cs-parser.jay: Removed nsAliases from here.
33637
33638         Use new namespaces, handle `using XXX;' 
33639
33640         * namespace.cs: Reimplemented namespace handling, use a recursive
33641         definition of the class.  Now we can keep track of using clauses
33642         and catch invalid using clauses.
33643
33644 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33645
33646         * gen-treedump.cs: Adapted for all the renaming.
33647
33648         * expression.cs (Expression): this class now has a Type property
33649         which returns an expression Type.
33650
33651         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33652         `Type', as this has a different meaning now in the base
33653
33654 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33655
33656         * interface.cs, class.cs: Removed from all the sources the
33657         references to signature computation, as we can not do method
33658         signature computation during the parsing time, as we are not
33659         trying to solve at that point distinguishing:
33660
33661         class X {
33662                 void a (Blah x) {}
33663                 void a (NS.Blah x) {}
33664         }
33665
33666         Which depending on the context might be valid or not, as we do not
33667         know if Blah is the same thing as NS.Blah at that point.
33668
33669         * Redid everything so the code uses TypeRefs now instead of
33670         Types.  TypeRefs are just temporary type placeholders, that need
33671         to be resolved.  They initially have a pointer to a string and the
33672         current scope in which they are used.  This is used later by the
33673         compiler to resolve the reference to an actual Type. 
33674
33675         * DeclSpace is no longer a CIR.Type, and neither are
33676         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33677         are all DeclSpaces, but no Types. 
33678
33679         * type.cs (TypeRefManager): This implements the TypeRef manager,
33680         which keeps track of all the types that need to be resolved after
33681         the parsing has finished. 
33682
33683 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33684
33685         * ARGH.  We are going to have to store `foreach' as a class rather
33686         than resolving it, as we need to verify error 1579 after name
33687         resolution.   *OR* we could keep a flag that says `This request to
33688         IEnumerator comes from a foreach statement' which we can then use
33689         to generate the error.
33690
33691 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
33692
33693         * class.cs (TypeContainer.AddMethod): we now add methods to the
33694         MethodGroup instead of the method hashtable.  
33695
33696         * expression.cs: Add MethodGroup abstraction, which gets us one
33697         step closer to the specification in the way we handle method
33698         declarations.  
33699
33700         * cs-parser.jay (primary_expression): qualified_identifier now
33701         tried to match up an identifier to a local variable reference or
33702         to a parameter reference.
33703
33704         current_local_parameters is now a parser global variable that
33705         points to the current parameters for the block, used during name
33706         lookup.
33707
33708         (property_declaration): Now creates an implicit `value' argument to
33709         the set accessor.
33710
33711 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
33712
33713         * parameter.cs: Do not use `param' arguments as part of the
33714         signature, per the spec.
33715
33716 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
33717
33718         * decl.cs: Base class for classes, structs and interfaces.  This
33719         is the "Declaration Space" 
33720
33721         * cs-parser.jay: Use CheckDef for checking declaration errors
33722         instead of having one on each function.
33723
33724         * class.cs: Factor out some code for handling error handling in
33725         accordance to the "Declarations" section in the "Basic Concepts"
33726         chapter in the ECMA C# spec.
33727
33728         * interface.cs: Make all interface member classes derive from
33729         InterfaceMemberBase.
33730
33731 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
33732
33733         * Many things: all interfaces are parsed and generated in
33734         gen-treedump.  Support for member variables, constructors,
33735         destructors, properties, constants is there.
33736
33737         Beginning of the IL backend, but very little done, just there for
33738         testing purposes. 
33739
33740 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
33741
33742         * cs-parser.jay: Fix labeled statement.
33743
33744         * cs-tokenizer.cs (escape): Escape " and ' always.
33745         ref_line, ref_name: keep track of the line/filename as instructed
33746         by #line by the compiler.
33747         Parse #line.
33748
33749 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
33750
33751         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
33752         to match the values in System.CodeDOM.
33753
33754         Divid renamed to Divide.
33755
33756         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
33757         statements. 
33758         (Statements.set): remove.
33759
33760         * System.CodeDOM/CodeCatchClause.cs: always have a valid
33761         statements. 
33762
33763         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
33764         falseStatements always have valid values. 
33765
33766         * cs-parser.jay: Use System.CodeDOM now.
33767