2010-06-15 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / ChangeLog
1 2010-06-15  Marek Safar  <marek.safar@gmail.com>
2
3         A fix for bug #599601
4         * dynamic.cs, ecore.cs: A new flag for dynamic resolver to ignore
5         generated member access left expression.
6         
7 2010-06-16  Marek Safar  <marek.safar@gmail.com>
8
9         * expression.cs: Dispatch dynamic invocation solely on left
10         expression type.
11
12 2010-06-16  Marek Safar  <marek.safar@gmail.com>
13
14         * expression.cs, statement.cs: Always persist explicit cast
15         semantic at expression level.
16         
17 2010-06-15  Marek Safar  <marek.safar@gmail.com>
18
19         * expression.cs, attribute.cs: Enable generic type parameters
20         attribute check.
21         
22 2010-06-15  Marek Safar  <marek.safar@gmail.com>
23
24         A fix for bug #612146
25         * generic.cs: Don't use fixed array for inflated type parameter
26         interface constraints.
27         
28 2010-06-15  Marek Safar  <marek.safar@gmail.com>
29
30         * typespec.cs: ElementTypeSpec has to use its own ITypeDefinition.
31         
32         * report.cs: Unwrap elements for related symbols reporting.
33
34 2010-06-15  Marek Safar  <marek.safar@gmail.com>
35
36         A fix for bug #612796
37         * cs-tokenizer.cs: Offset correctly keywords the first character
38         comparison.
39         
40 2010-06-15  Marek Safar  <marek.safar@gmail.com>
41
42         A fix for bug #613397
43         * expression.cs: Removed too aggressive object initializers
44         optimization.
45         
46 2010-06-15  Marek Safar  <marek.safar@gmail.com>
47         
48         * parameter.cs, property.cs, membercache.cs, decl.cs, iterators.cs,
49         anonymous.cs, expression.cs, support.cs, method.cs, pending.cs,
50         class.cs, cs-parser.jay: Simplify parsing of accessors by removing
51         any intermediate steps and fake nodes, also saves few MBs of memory.
52
53 2010-06-11  Marek Safar  <marek.safar@gmail.com>
54         
55         * modifiers.cs, rootcontext.cs, location.cs, cs-parser.jay: More
56         precise modifiers parsing.
57
58 2010-06-09  Marek Safar  <marek.safar@gmail.com>
59
60         * cs-tokenizer.cs, anonymous.cs, expression.cs, cs-parser.jay:
61         Fixed few shift/reduce conflicts.
62
63 2010-06-09  Marek Safar  <marek.safar@gmail.com>
64
65         * typemanager.cs, parameter.cs, dynamic.cs, typespec.cs,
66         expression.cs, ecore.cs, cs-parser.jay: Fully parse composed type
67         specifiers and stop using string in AST.
68
69 2010-06-07  Marek Safar  <marek.safar@gmail.com>
70
71         * typemanager.cs, eval.cs, iterators.cs, anonymous.cs, expression.cs
72         method.cs, class.cs, delegate.cs, cs-parser.jay, driver.cs, visit.cs
73         enum.cs: Hold location of predefined types.
74
75 2010-06-07  Marek Safar  <marek.safar@gmail.com>
76
77         A fix for bug #610878
78         * pending.cs: Clone cached list before modifying.
79
80 2010-06-04  Marek Safar  <marek.safar@gmail.com>
81
82         * convert.cs, typespec.cs, expression.cs: Start using array member
83         kind for better conversion checks.
84         
85         * import.cs, report.cs: Report better error message for runtime
86         reflection bugs.
87
88 2010-06-04  Marek Safar  <marek.safar@gmail.com>
89
90         * membercache.cs, convert.cs, nullable.cs, expression.cs: Optimize
91         user defined conversion probing and simplify user conversion for
92         nullabe types. Fixes #610940.
93
94 2010-06-03  Marek Safar  <marek.safar@gmail.com>
95
96         A fix for bug #610919
97         * parameter.cs, property.cs, cs-parser.jay: Use independent implicit
98         parameters for explicit event accessors. Anonymous method capturing
99         won't otherwise work for event implicit parameter.
100
101 2010-06-02  Marek Safar  <marek.safar@gmail.com>
102
103         A fix for bug #610088
104         * nullable.cs, expression.cs, statement.cs, method.cs, ecore.cs:
105         Ignore overrides for base overload resolution as for non-base
106         expressions and convert the best candidate to closest override
107         afterwards.
108
109 2010-06-01  Marek Safar  <marek.safar@gmail.com>
110
111         A fix for bug #610139
112         * generic.cs, convert.cs: Recursively check effective base interface
113
114 2010-06-01  Marek Safar  <marek.safar@gmail.com>
115
116         * statement.cs: Handle nullable types and type parameters in using
117         statement, avoid boxing value types. Also fixes #571010
118
119 2010-06-01  Marek Safar  <marek.safar@gmail.com>
120
121         * convert.cs, expression.cs: Emit unbox for underlying nullable
122         type boxing cast.
123
124 2010-05-29  Marek Safar  <marek.safar@gmail.com>
125
126         A fix for bug #610126
127         * expression.cs: Don't use branch optimization for types bigger than
128         int.
129
130 2010-05-28  Marek Safar  <marek.safar@gmail.com>
131
132         A fix for bug #609088
133         * import.cs: Check private modifier correctly.
134
135 2010-05-28  Marek Safar  <marek.safar@gmail.com>
136
137         A fix for bug #609049
138         * ecore.cs: Don't ignore override methods when looking for base
139         member.
140
141 2010-05-27  Marek Safar  <marek.safar@gmail.com>
142
143         A fix for bugs #608007, #572540, #566130, #476358
144
145         * generic.cs, linq.cs, expression.cs, statement.cs, cs-parser.jay:
146         More tricky refactoring of implicit linq blocks.
147         
148 2010-05-25  Marek Safar  <marek.safar@gmail.com>
149
150         * linq.cs, cs-parser.jay: Keep location for all linq clauses.
151
152 2010-05-25  Marek Safar  <marek.safar@gmail.com>
153
154         * context.cs, expression.cs, cs-parser.jay: Don't store current
155         block in This expression (it's too early for linq blocks).
156
157 2010-05-21  Marek Safar  <marek.safar@gmail.com>
158
159         * expression.cs: Use constrained prefix more broadly to avoid boxing.
160
161 2010-05-20  Marek Safar  <marek.safar@gmail.com>
162
163         A fix for bug #591149
164         * nullable.cs: Don't double wrap same expression.
165         
166 2010-05-20  Marek Safar  <marek.safar@gmail.com>
167
168         A fix for bug #569827
169         * anonymous.cs: Any issued error in probing mode means no match.
170
171 2010-05-20  Marek Safar  <marek.safar@gmail.com>
172
173         * expression.cs: Search for base indexer using the closest match
174         rule.
175
176 2010-05-20  Marek Safar  <marek.safar@gmail.com>
177
178         A fix for bug #572071
179         * method.cs: Set override constraints using unexpanded interface
180         list.
181
182 2010-05-20  Marek Safar  <marek.safar@gmail.com>
183
184         A fix for bug #572071
185         * ecore.cs: Include secondary extension method lookup in probing
186         mode.
187
188 2010-05-19  Marek Safar  <marek.safar@gmail.com>
189
190         A fix for bug #515801
191         * typespec.cs (MayBecomeEqualGenericTypes): Recursively check
192         type arguments.
193
194 2010-05-19  Marek Safar  <marek.safar@gmail.com>
195
196         A fix for bug #515801
197         * pending.cs: Advance counter correctly.
198
199 2010-05-19  Marek Safar  <marek.safar@gmail.com>
200
201         A fix for bug #480139
202         * method.cs, pending.cs: Indexer override uses base name.
203         
204 2010-05-19  Marek Safar  <marek.safar@gmail.com>
205
206         A fix for bug #424064
207         * generic.cs: Replace original with inflated type parameter on
208         failure.
209
210 2010-05-19  Marek Safar  <marek.safar@gmail.com>
211
212         A fix for bug #359733
213         * parameter.cs: Extension attribute can be defined in each assembly.
214
215 2010-05-18  Marek Safar  <marek.safar@gmail.com>
216
217         A fix for bug #446507
218         * method.cs: Only one method can implement an interface.
219
220 2010-05-18  Marek Safar  <marek.safar@gmail.com>
221
222         A fix for bug #594905
223         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
224         Typed null can be used as a source for expression methods.
225
226 2010-05-18  Marek Safar  <marek.safar@gmail.com>
227
228         A fix for bug #606551
229         * namespace.cs: Using directive imports only types and not nested
230         namespaces.
231
232 2010-05-17  Marek Safar  <marek.safar@gmail.com>
233
234         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
235         delegate.cs: Member instance is resolved after member overload
236         definitely resolves static/instance property of member expression.
237         Fixes #545047, #358848, #456605, #460016, #603299
238
239 2010-05-12  Marek Safar  <marek.safar@gmail.com>
240
241         A fix for bug #604981
242         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
243         details for nested anonymous methods stories.
244
245 2010-05-11  Marek Safar  <marek.safar@gmail.com>
246
247         A fix for bug #604735
248         * namespace.cs: Don't report namespace collision.
249
250 2010-05-11  Marek Safar  <marek.safar@gmail.com>
251
252         A fix for bug #604748
253         * class.cs, typespec.cs: Search full imported attribute hierarchy
254         for AttributeUsage.
255
256 2010-05-11  Marek Safar  <marek.safar@gmail.com>
257
258         * namespace.cs: Ignore missing dependencies failure at
259         initialization.
260
261 2010-05-11  Marek Safar  <marek.safar@gmail.com>
262
263         A fix for bug #604640
264         * namespace.cs: Don't resolve using constraints too early.
265
266 2010-05-11  Marek Safar  <marek.safar@gmail.com>
267
268         A fix for bug #604239
269         * generic.cs: Copy partial type constraints to partial container.
270
271 2010-05-10  Marek Safar  <marek.safar@gmail.com>
272
273         A fix for bug #557210
274         * import.cs: Relax underlying enum field rules.
275
276 2010-05-10  Marek Safar  <marek.safar@gmail.com>
277
278         A fix for bug #603476
279         * property.cs: Implement IParametersMember for indexer accessors.
280
281 2010-05-07  Marek Safar  <marek.safar@gmail.com>
282
283         A fix for bug #601141
284         * class.cs: Update all partial modifiers.
285
286 2010-05-06  Marek Safar  <marek.safar@gmail.com>
287
288         A fix for bug #601708
289         * method.cs, membercache.cs: Destructors cannot be hidden.
290
291 2010-05-06  Marek Safar  <marek.safar@gmail.com>
292
293         A fix for bug #602551
294         * class.cs: Resursive reference of type definition is allowed.
295
296 2010-05-06  Marek Safar  <marek.safar@gmail.com>
297
298         * anonymous.cs: Mutate cached storey instance types too.
299
300 2010-05-06  Marek Safar  <marek.safar@gmail.com>
301
302         A fix for bug #602443
303         * convert.cs: Explicit enum conversion cannot involve user operators
304
305 2010-05-05  Miguel de Icaza  <miguel@novell.com>
306
307         * class.cs (TypeContainer.DefineBaseTypes)
308         (TypeContainer.CheckRecursiveDefinition): check for the iface not
309         being null, as we could have failed resolution and crashed;
310         Fixes #442144
311
312         * cs-parser.jay: Productions to catch common mistakes when other
313         punctuation operators are used instead of comma.   Fixes 571702 
314
315 2010-05-05  Marek Safar  <marek.safar@gmail.com>
316
317         * anonymous.cs: Mutate correct set of constraints.
318
319 2010-05-05  Marek Safar  <marek.safar@gmail.com>
320
321         A fix for bug #602842
322         * expression.cs: Resolve all array bound arguments.
323
324 2010-05-05  Marek Safar  <marek.safar@gmail.com>
325
326         * import.cs: Don't import private fields.
327
328 2010-04-30  Marek Safar  <marek.safar@gmail.com>
329
330         Partially based on patch by <sami.lamti@gmail.com>
331
332         * eval.cs, ecore.cs: Fixed eval show methods.
333
334 2010-04-30  Marek Safar  <marek.safar@gmail.com>
335
336         * generic.cs, delegate.cs: Implement output type inference of
337         methodgroup now when the specification was cleared at least little
338         bit.
339
340 2010-04-29  Marek Safar  <marek.safar@gmail.com>
341
342         A fix for bug #575611
343         * class.cs: Fix recursive unmanaged recursice sruct check.
344         
345 2010-04-29  Marek Safar  <marek.safar@gmail.com>
346
347         A fix for bug #479776
348         * expression.cs: Implement typeof unbounded nested generic types.
349
350 2010-04-29  Marek Safar  <marek.safar@gmail.com>
351
352         A fix for bug #474953
353         * class.cs: Fix valid recursive base type definition.
354
355 2010-04-29  Marek Safar  <marek.safar@gmail.com>
356
357         A fix for bug #421737
358         * convert.cs, expression.cs: A boxing conversion exists from a
359         nullable-type to a reference type, if a boxing conversion exists
360         from the underlying non-nullable-value-type to the reference type.
361
362 2010-04-29  Marek Safar  <marek.safar@gmail.com>
363
364         A fix for bug #376875
365         * import.cs: Import volatile modifier.
366
367 2010-04-29  Marek Safar  <marek.safar@gmail.com>
368
369         A fix for bug #372412
370         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
371         generic arrays.
372
373 2010-04-29  Marek Safar  <marek.safar@gmail.com>
374
375         A fix for bug #568955
376         * statements.cs: Handle recursive scope initializers.
377
378 2010-04-28  Marek Safar  <marek.safar@gmail.com>
379
380         A fix for bug #566511
381         * anonymous.cs: Always get inflated version of hoisted variable
382         on generic type definition.
383
384 2010-04-28  Marek Safar  <marek.safar@gmail.com>
385
386         * import.cs, membercache.cs: Relax rules for valid properties.
387
388 2010-04-28  Marek Safar  <marek.safar@gmail.com>
389
390         * import.cs: Intern arrays used in generic arguments.
391
392 2010-04-28  Marek Safar  <marek.safar@gmail.com>
393
394         A fix for bug #600398
395         * convert.cs: Actually use effective base type for the comparison.
396
397 2010-04-28  Marek Safar  <marek.safar@gmail.com>
398
399         A fix for bug #600326
400         * ecore.cs: Pass arity to base member lookup.
401
402 2010-04-28  Marek Safar  <marek.safar@gmail.com>
403
404         A fix for bug #573385
405         * expression.cs: MemberAccess is of generic type based on right
406         arity length only.
407
408 2010-05-28  Marek Safar  <marek.safar@gmail.com>
409
410         * cs-tokenizer.cs: Made tab size configurable.
411
412 2010-05-27  Marek Safar  <marek.safar@gmail.com>
413
414         * attribute.cs: Ensure Obsolete members are defined before doing
415         ctor look-up.
416
417 2010-05-27  Marek Safar  <marek.safar@gmail.com>
418
419         * visit.cs: Add DOM visitor skeleton.
420         
421         * *.cs: Updated.
422
423 2010-05-27  Marek Safar  <marek.safar@gmail.com>
424
425         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
426         
427 2010-05-27  Marek Safar  <marek.safar@gmail.com>
428
429         * *.cs: Major rewrite of compiler internals to better work with
430         unmodified System.Reflection.Emit. Some of the key changes are
431         - TypeSpec replaces reflection specific System.Type.
432         - All Type(TypeSpec) operations are now done in compiler therefore
433         no dependency on SRE to inflate generic members and types or to
434         query unclosed types.
435         - MemberCache is now the only and full hierarchical topology.
436         - Generic constraints are implemented properly.
437         - And as a bonus compilation is on average 30% faster.
438
439 2010-04-15  Jb Evain  <jbevain@novell.com>
440
441         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
442
443 2010-04-12  Marek Safar  <marek.safar@gmail.com>
444
445         * expression.cs, attribute.cs, parameter.cs: More attribute type
446         checks.
447
448 2010-04-12  Marek Safar  <marek.safar@gmail.com>
449
450         A fix for bug #593342
451
452         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
453         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
454         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
455         codegen.cs: Add custom attribute encoder to deal with unfinished
456         types and easier corlib bootstrap from its own types.
457
458 2010-03-26  Marek Safar  <marek.safar@gmail.com>
459
460         * cs-parser.jay: Report invalid constraint types.
461
462 2010-03-16  Jb Evain  <jbevain@novell.com>
463
464         * Makefile: rename the net_2_1 profile to moonlight.
465
466 2010-03-11  Marek Safar  <marek.safar@gmail.com>
467
468         * statement.cs, cs-parser.jay: Use correct location for empty
469         statements.
470
471 2010-03-11  Marek Safar  <marek.safar@gmail.com>
472
473         * cs-parser.jay: Disable Location from expression.
474         
475         * generic.cs: Check constraints for overrides in the parser.
476
477 2010-03-09  Marek Safar  <marek.safar@gmail.com>
478
479         * cs-parser.jay (GetLocation): Use an expression when available.
480
481 2010-03-04  Marek Safar  <marek.safar@gmail.com>
482
483         A fix for bug #582579
484         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
485
486 2010-03-04  Marek Safar  <marek.safar@gmail.com>
487
488         A patch by kornelpal@gmail.com
489         
490         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
491         compiler generated classes sealed by default. Emit and close top
492         level compiler generated classes as well. 
493         
494         * support.cs: Use RuntimeHelpers.GetHashCode.
495
496 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
497
498         * Makefile: We need to use the internal bootstrapping gmcs for
499         net_2_1_bootstrap too now.
500
501 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
502
503         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
504
505 2010-03-02  Marek Safar  <marek.safar@gmail.com>
506
507         * cs-tokenizer.cs: Missed few locations in previous fix.
508
509 2010-03-02  Marek Safar  <marek.safar@gmail.com>
510
511         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
512         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
513         Report correct location for operator errors.
514
515 2010-03-02  Marek Safar  <marek.safar@gmail.com>
516
517         * typemanager.cs (IsDynamicType): Don't check external types when
518         the attribute is not external.
519
520 2010-02-24  Marek Safar  <marek.safar@gmail.com>
521
522         A fix for bug #582579
523         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
524         modifiers.
525
526 2010-02-24  Marek Safar  <marek.safar@gmail.com>
527
528         A fix for bug #581804
529         * ecore.cs: Fixed type comparison.
530
531 2010-02-08  Miguel de Icaza  <miguel@novell.com>
532
533         * namespace.cs (CompletionGetTypesStartingWith): Do not include
534         private types in the completion results.
535
536         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
537         ... let ?"
538
539 2010-02-17  Marek Safar  <marek.safar@gmail.com>
540
541         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
542         constraint parsing.
543
544 2010-02-14  Miguel de Icaza  <miguel@novell.com>
545
546         * eval.cs: Do not do the report printer dance unless the user has
547         set the DescribeTypes feature.
548
549 2010-02-10  Marek Safar  <marek.safar@gmail.com>
550
551         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
552
553 2010-02-08  Marek Safar  <marek.safar@gmail.com>
554
555         A fix for bug #577029
556         * anonymous.cs: Fixed TypeBuilder* check.
557
558 2010-02-06  Miguel de Icaza  <miguel@novell.com>
559
560         * eval.cs (CompileBlock): Also undo if there are problems during
561         semantic analysis, fixes various cases where invalid C# code would
562         be reported, but the internal changes would not be undone.
563
564 2010-02-03  Miguel de Icaza  <miguel@novell.com>
565
566         * driver.cs: Change the --fatal flag to allow a number to be
567         passed, this ignores the first N fatal errors.   Useful to debug
568         errors that do not happen on the first hit.
569
570         * cs-parser.jay (invocation_expression): accept both the
571         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
572         inside an invocation.
573
574         * driver.cs: Expose FatalErrors.
575
576         * eval.cs: Initialize the printer's Fatal property from the
577         Driver's FatalError flag, this allows csharp --fatal to work
578         again. 
579
580         Add support for calling Describe (typeof (TYPE)) if the expression
581         entered is a TYPE.
582         
583 2010-02-02  Marek Safar  <marek.safar@gmail.com>
584
585         A fix for bug #574991
586         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
587         --lint.
588
589 2010-02-02  Marek Safar  <marek.safar@gmail.com>
590
591         A fix for bug #575986
592         * expression.cs: Don't mutate typeof type definitions.
593
594 2010-01-28  Marek Safar  <marek.safar@gmail.com>
595
596         * decl.cs: Use only one set of modifiers.
597
598 2010-01-26  Marek Safar  <marek.safar@gmail.com>
599
600         A fix for bug #573329
601         * eval.cs: Don't disable error reporting completely on silent mode.
602         
603 2010-01-25  Marek Safar  <marek.safar@gmail.com>
604
605         A fix for bug #573312
606         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
607         pointer index of unknown size types greater than 2.
608
609 2010-01-15  Marek Safar  <marek.safar@gmail.com>
610
611         * *.cs: Use only 1 member kind enum.
612
613 2010-01-15  Marek Safar  <marek.safar@gmail.com>
614
615         * *.cs: Add event specification.
616
617 2010-01-14  Marek Safar  <marek.safar@gmail.com>
618
619         * membercache.cs: Extracted from decl.cs.
620         
621         * *.cs: Put more infrastructure in place.
622
623 2010-01-13  Marek Safar  <marek.safar@gmail.com>
624
625         * *.cs: Add property specification, unused yet.
626
627 2010-01-13  Marek Safar  <marek.safar@gmail.com>
628
629         * property.cs: Move all property based declarations into a new file.
630
631 2010-01-13  Marek Safar  <marek.safar at gmail.com>
632
633         * expression.cs (Conditional): Resolve reduced expression.
634
635 2010-01-13  Marek Safar  <marek.safar at gmail.com>
636
637         * *.cs: Introduced non-generic method specification.
638
639 2010-01-07  Marek Safar  <marek.safar@gmail.com>
640
641         * method.cs: Move all method based declarations into a new file.
642
643 2010-01-07  Marek Safar  <marek.safar@gmail.com>
644
645         * *.cs: Extract field specification.
646
647 2009-12-17  Marek Safar  <marek.safar@gmail.com>
648
649         * field.cs: Extracted from class.cs
650
651 2009-12-15  Marek Safar  <marek.safar@gmail.com>
652
653         * attribute.cs (GetFixedBuffer): Work on field definition only.
654
655 2009-12-15  Marek Safar  <marek.safar@gmail.com>
656
657         * *.cs: Clean up NET_4_0 conditional where possible.
658
659 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
660
661         support.cs (DynamicType): Assembly property returns the assembly builder.
662         This is required due to how compiler context works in corlib.
663
664 2009-12-14  Marek Safar  <marek.safar@gmail.com>
665
666         A fix for bug #564376
667         * assign.cs (LocalTemporary): Removed no longer needed special
668         by-ref handling.
669
670 2009-12-11  Marek Safar  <marek.safar@gmail.com>
671
672         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
673         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
674         enum for easier debugging.
675
676 2009-12-10  Marek Safar  <marek.safar@gmail.com>
677
678         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
679         point.
680         
681         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
682         directly.
683
684 2009-12-10  Marek Safar  <marek.safar@gmail.com>
685
686         * cs-parser.jay, statement.cs: Handle parser error in code
687         completition.
688
689 2009-12-10  Marek Safar  <marek.safar@gmail.com>
690
691         * ecore.cs: Ignore base imported methods when they are already
692         in method bag.
693         
694         * eval.cs: Handle non-existent keys.
695         
696         * report.cs, driver.cs: Make fatal work with console printer only.
697
698 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
699
700         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
701
702 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
703
704         * typemanager.cs: Add MakeGenericMethod that checks if the method
705         is really the generic method definition.
706
707         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
708         to inflate generic methods.
709
710 2009-12-08  Marek Safar  <marek.safar@gmail.com>
711
712         A fix for bug #561149
713         * anonymous.cs: Use actual type parameters when checking for generic
714         method host.
715
716 2009-12-08  Marek Safar  <marek.safar@gmail.com>
717
718         A fix for bug #561369
719         * expression.cs (DoNumericPromotion): Fixed typo.
720
721 2009-12-08  Marek Safar  <marek.safar@gmail.com>
722
723         *.cs: Moving to generics world.
724
725         cs-parser.jay: Removed current_array_type.
726
727 2009-12-07  Marek Safar  <marek.safar@gmail.com>
728
729         *.cs: Moving to generics world.
730
731 2009-12-04  Marek Safar  <marek.safar@gmail.com>
732
733         *.cs: Moving to generics world (day 2).
734
735 2009-12-03  Marek Safar  <marek.safar@gmail.com>
736
737         *.cs: Moving to generics world.
738
739 2009-12-02  Marek Safar  <marek.safar@gmail.com>
740
741         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
742         Encode dynamic type attribute for elements where attributes cannot
743         be used.
744
745 2009-12-01  Marek Safar  <marek.safar@gmail.com>
746
747          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
748          arguments by ref.
749
750 2009-12-01  Marek Safar  <marek.safar@gmail.com>
751
752         A fix for bug #360455
753         * class.cs: Never report a unused warning for generic events to
754         workaround wrong expression type.
755
756 2009-11-30  Marek Safar  <marek.safar@gmail.com>
757
758         A fix for bug #558305
759         * decl.cs, class.cs: Check partial method definitions using correct
760         flag.
761
762 2009-11-30  Marek Safar  <marek.safar@gmail.com>
763
764         * argument.cs: Don't cache rarely used dynamic flag.
765
766 2009-11-27  Marek Safar  <marek.safar@gmail.com>
767
768         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
769
770 2009-11-27  Marek Safar  <marek.safar@gmail.com>
771
772         * ecore.cs (SimpleName): Removed no longer needed in_transit as
773         Resolve is now non-reentrant (saves ~0.6MB for corlib).
774
775 2009-11-26  Marek Safar  <marek.safar@gmail.com>
776
777         A fix for bug #545081
778         * decl.cs: Check private nested types of nested types recursively.
779
780 2009-11-26  Marek Safar  <marek.safar@gmail.com>
781
782         A fix for bug #558305
783         * location.cs: Ignore self referencing #line directive
784
785 2009-11-26  Marek Safar  <marek.safar@gmail.com>
786
787         A fix for bug #558292
788         * class.cs: Allow single unsafe fixed buffer fields.
789
790 2009-11-26  Marek Safar  <marek.safar@gmail.com>
791
792         * expression: Optimize few more zero-based operations.
793
794 2009-11-26  Marek Safar  <marek.safar@gmail.com>
795
796         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
797         avoids boxing of literal values.
798
799 2009-11-26  Marek Safar  <marek.safar@gmail.com>
800
801         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
802         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
803         codegen.cs: LocatedToken redesing to avoid excessive allocation and
804         boxing (saves ~7MB for corlib). Also fixes presise token location.
805
806 2009-11-25  Marek Safar  <marek.safar@gmail.com>
807
808         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
809         common data buckers.
810
811 2009-11-24  Marek Safar  <marek.safar@gmail.com>
812
813         * expression.cs: Lower static array initializer barrier.
814         
815         * support.cs, driver.cs: Share reader buffer.
816
817 2009-11-23  Marek Safar  <marek.safar@gmail.com>
818
819         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
820
821 2009-11-23  Marek Safar  <marek.safar@gmail.com>
822
823         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
824         cleanup some obsolete code.
825
826 2009-11-20  Marek Safar  <marek.safar@gmail.com>
827
828         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
829         Expression.Resolve.
830
831 2009-11-20  Marek Safar  <marek.safar@gmail.com>
832
833         * *.cs: Resolved expressions are never resolved again, this helps to
834         uncover some not easy to find bugs and improve the performance.
835
836 2009-11-19  Marek Safar  <marek.safar@gmail.com>
837
838         * *.cs: Made constant expressions fully compatible with any other
839         expression.
840
841 2009-11-19  Marek Safar  <marek.safar@gmail.com>
842
843         * *.cs: DoResolve is a worker method and has to be protected.
844
845 2009-11-18  Marek Safar  <marek.safar@gmail.com>
846
847         * *.cs: More context specific handling.
848
849 2009-11-17  Marek Safar  <marek.safar@gmail.com>
850
851         * *.cs: More context specific handling.
852
853 2009-11-16  Marek Safar  <marek.safar@gmail.com>
854
855         * dynamic.cs, class.cs: Removed few fixed user types conversions.
856         
857         * symbolwriter.cs: Uses public ILOffset.
858
859 2009-11-13  Marek Safar  <marek.safar@gmail.com>
860
861         A fix for bug #553650
862         * generic.cs: Another missing TypeToCoreType, still too many to fix.
863
864 2009-11-13  Marek Safar  <marek.safar@gmail.com>
865
866         A fix for bug #555170
867
868         * class.cs, delegate.cs, enum.cs: Constants have to be available
869         for parameters resolve.
870
871 2009-11-12  Marek Safar  <marek.safar@gmail.com>
872
873         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
874         arrays.
875
876 2009-11-12  Marek Safar  <marek.safar@gmail.com>
877
878         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
879         with a statically known candidate set.
880
881 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
882
883         * generic.cs: Made type inflation for generic constraint checks
884         recursive. This fixes BGO #553655.
885
886 2009-11-11  Marek Safar  <marek.safar@gmail.com>
887
888         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
889         checks.
890
891 2009-11-10  Marek Safar  <marek.safar@gmail.com>
892
893         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
894         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
895         attribute.cs: Add some dynamic error checking.
896
897 2009-11-07  Marek Safar  <marek.safar@gmail.com>
898
899         A fix for bug #553465
900
901         * expression.cs: Fixed mixed version of expression tree anonymous
902         type.
903
904 2009-11-06  Marek Safar  <marek.safar@gmail.com>
905
906         A fix for bug #553031
907
908         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
909         expression tree version of anonymous type with members declaration.
910
911 2009-11-05  Marek Safar  <marek.safar@gmail.com>
912
913         * parameter.cs: Handle nullable parameter default expression.
914         
915         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
916         class.cs, attribute.cs: Check for wrong dynamic arguments.
917
918 2009-11-05  Marek Safar  <marek.safar@gmail.com>
919
920         * statement.cs: Dynamic statements.
921
922 2009-11-04  Marek Safar  <marek.safar@gmail.com>
923
924         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
925         Compound assignments over dynamic type.
926
927 2009-11-03  Marek Safar  <marek.safar@gmail.com>
928
929         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
930         constructor arguments.
931
932 2009-10-30  Marek Safar  <marek.safar@gmail.com>
933
934         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
935         codegen.cs: Unary mutator on dynamic member access expression.
936
937 2009-10-29  Marek Safar  <marek.safar@gmail.com>
938
939         A fix for bug #550580   
940         * convert.cs: Don't eliminate explicit precission casts.
941
942 2009-10-28  Marek Safar  <marek.safar@gmail.com>
943
944         A fix for bug #550404
945         
946         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
947         expression.cs, statement.cs, ecore.cs: Quote any nested expression
948         tree.
949
950 2009-10-27  Marek Safar  <marek.safar@gmail.com>
951
952         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
953         constant.
954         
955         * class.cs: Allow nullable binary user operators.
956
957 2009-10-26  Marek Safar  <marek.safar@gmail.com>
958
959         * expression.cs: Move binary expression optimization at the end of
960         resolve.
961
962 2009-10-23  Marek Safar  <marek.safar@gmail.com>
963
964         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
965         Separate NullConstant from NullLiteral.
966
967 2009-10-23  Marek Safar  <marek.safar@gmail.com>
968
969         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
970         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
971         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
972         ModuleContainer. Add common unclosed member check routine.
973
974 2009-10-22  Marek Safar  <marek.safar@gmail.com>
975
976         * argument.cs: Use literal flag for real literals only.
977
978         * dynamic.cs: Use correct return type for custom delegates.
979
980 2009-10-22  Marek Safar  <marek.safar@gmail.com>
981
982         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
983         resolver.
984
985 2009-10-22  Marek Safar  <marek.safar@gmail.com>
986
987         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
988
989 2009-10-21  Marek Safar  <marek.safar@gmail.com>
990
991         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
992         conversion.
993
994 2009-10-21  Marek Safar  <marek.safar@gmail.com>
995
996         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
997         binder flags.
998
999 2009-10-20  Marek Safar  <marek.safar@gmail.com>
1000
1001         * argument.cs, dynamic.cs, expression.cs: Latest API update.
1002
1003 2009-10-19  Marek Safar  <marek.safar@gmail.com>
1004
1005         * typemanager.cs, expression.cs: Dynamic array initializer.
1006
1007 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1008
1009         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
1010         is imported.
1011
1012 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1013
1014         A fix for bug #493523, #507067
1015         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
1016         standard nullable conversion using underlying standard conversion
1017         and not full conversion.
1018
1019 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1020
1021         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
1022         type in VerifyArgumentsCompat.
1023
1024 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1025
1026         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1027         Reject variable used with type arguments.
1028
1029 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1030
1031         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
1032         Implement dynamic expressions assignment.
1033
1034 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1035
1036         * expression.cs: Build underlying expression when resolving unary
1037         mutators.
1038
1039 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1040
1041         * expression.cs: Emit enum array initializer using binary blob.
1042
1043 2009-10-08  Marek Safar  <marek.safar@gmail.com>
1044
1045         * typemanager.cs, constant.cs: Optimize decimal constants which fit
1046         to long range.
1047
1048 2009-10-07  Marek Safar  <marek.safar@gmail.com>
1049
1050         * typemanager.cs: Reset object_type.
1051         
1052         * assign: Made SimpleAssign public.
1053
1054 2009-10-06  Marek Safar  <marek.safar@gmail.com>
1055
1056         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
1057         invocation assembly to IsThisOrFriendAssembly.
1058
1059 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1060
1061         * expression.cs: Equality comparison of generic parameter with
1062         class constraint.
1063
1064 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1065
1066         A fix for bug #543570
1067         * generic.cs: Import predefined constraints correctly.
1068
1069 2009-10-02  Marek Safar  <marek.safar@gmail.com>
1070
1071         * ecore.cs: Don't crash on overloads with optional paremeters where
1072         arguments count overflows.
1073         
1074         * parameter.cs: Import optional parameter constants using optional
1075         value type.
1076
1077 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1078
1079         * Makefile: Default is gmcs compiler.
1080
1081 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1082
1083         * cs-parser.jay: Fixed few NRE.
1084
1085 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1086
1087         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
1088
1089 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1090
1091         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
1092         ShimExpression, ImplicitCast.
1093
1094 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1095
1096         A fix for bug #542959
1097         * delegate.cs: Emit correct delegate instance variable when there
1098         are static and non-static overloads.
1099
1100 2009-09-29  Marek Safar  <marek.safar@gmail.com>
1101
1102         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
1103         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
1104
1105 2009-09-28  Marek Safar  <marek.safar@gmail.com>
1106
1107         A fix for bug #542487
1108         * ecore.cs: Resolve extension methods hidden by properties.
1109
1110 2009-09-25  Marek Safar  <marek.safar@gmail.com>
1111
1112         * expression.cs, ecore.cs: More dynamic binary expressions.
1113
1114 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1115
1116         * nullable.cs, expression.cs: Fixed null lifted conversion for
1117         bitwise enum operations.
1118
1119 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1120
1121         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
1122         values in checked context.
1123
1124 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1125
1126         * expression.cs, ecore.cs: Fixed array index constant conversion.
1127
1128 2009-09-20  Miguel de Icaza  <miguel@novell.com>
1129
1130         * expression.cs: Do not crash when MemberLookup returns something
1131         that is not a MemberExpr here.   Report error 582 instead. 
1132
1133         Fixes #499988.
1134
1135 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1136
1137         * decl.cs, class.cs: Check protected property accessors.
1138
1139 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1140
1141         * dynamic.cs, assign.cs: Dynamic compound assignment.
1142
1143 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1144
1145         * expression.cs: Fixed compound assignment explicit conversion.
1146
1147 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1148
1149         * expression.cs, ecore.cs: Cannot infer variables from method group.
1150
1151 2009-09-16  Marek Safar  <marek.safar@gmail.com>
1152
1153         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
1154         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
1155         codegen.cs: Dynamic binary operations scaffolding.
1156
1157 2009-09-15  Marek Safar  <marek.safar@gmail.com>
1158
1159         * expression.cs: Fixes nullable promotion for enum type variables.
1160
1161 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1162
1163         * driver.cs, dynamic.cs: Reset more static variables.
1164
1165 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1166
1167         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
1168         driver.cs: Introduced Expression::MakeExpression.
1169
1170 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1171
1172         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
1173
1174 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1175
1176         * eval.cs, report.cs: Use Console.Out for all eval error or warning
1177         output.
1178
1179 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1180
1181         A fix for bug #518707
1182         * expression.cs (Is): Optimize only generic parameter type
1183         expression probing value type generic parameter.
1184
1185 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1186
1187         A fix for bug #532571
1188         * ecore.cs: Check for simple name type arguments used with
1189         non-generic type.
1190
1191 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1192
1193         A fix for bug #497421
1194         * generic.cs (CheckConstraint): Don't use buildin types to check for
1195         parameterless constructor.
1196
1197 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1198
1199         A fix for bug #537402
1200         * generic.cs (CheckConstraint): Correctly inflate generic type
1201         arguments when checking generic method. 
1202
1203 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1204
1205         A fix for bug #536463
1206         * decl.cs (AddToContainer): Don't report collision between explicit
1207         and parameterless non-explicit members.
1208
1209 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1210
1211         * eval.cs: Reset more static stuff.
1212
1213 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1214
1215         A fix for bug #324625
1216         * expression.cs, ecore.cs: Create nested generic type expression
1217         using declaring and not current type.
1218
1219 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1220
1221         * *.cs: Changed Report class to accept various output printers and
1222         be an instance class. An expression resolver can now use different
1223         message reporter for each call and Report.Error can safely throw
1224         an exception. Part of ongoing work to turn mcs into proper library.
1225
1226 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1227
1228         * statement.cs, ecore.cs: Removed error reporting from emit code.
1229
1230 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1231
1232         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1233
1234 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1235
1236         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1237         parser checks out of constructors.
1238
1239 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1240
1241         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1242
1243 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1244
1245         A fix for bug #535448
1246         * anonymous.cs, class.cs: Copy return label between all contexts.
1247
1248 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1249
1250         A fix for bug #535395
1251         * namespace.cs: Resolve context can be null.
1252
1253 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1254
1255         A fix for bug #533912
1256         * generic.cs: Use correct context for constraints resolving.
1257
1258 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1259
1260         A fix for bug #532630
1261         * driver.cs: Trim conditional symbols.
1262
1263 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1264
1265         * context.cs: New file.
1266         
1267         * *.exe.sources, *.csproj: Updated.
1268
1269 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1270
1271         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1272         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1273         IMembercontext, some small cleanups.
1274
1275 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1276
1277         * *.cs: Split ResolveContext and EmitContext.
1278
1279 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1280
1281         * *.cs: Only ResolveContext implements IMemberContext.
1282
1283 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1284
1285         * *.cs: Renamed IResolveContext to IMemberContext.
1286
1287 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1288
1289         * *.cs: Detached ResolveContext from EmitContext.
1290
1291 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1292
1293         * codegen.cs: Moved flow-analysis to BlockContext.
1294
1295 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1296
1297         * *.cs: Detached BlockContext from EmitContext.
1298
1299 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1300
1301         * statement.cs: avoid nullref when the return value of GetEnumerator()
1302         does not contain any MoveNext() method.
1303
1304 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1305
1306         * *.cs: Removed IResolveContext::GenericDeclContainer.
1307
1308 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1309
1310         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1311
1312 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1313
1314         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1315         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1316
1317 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1318
1319         * *.cs: Removed boolean fields from EmitContext.
1320
1321 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1322
1323         * *.cs: Add IResolveContext::IsStatic.
1324
1325 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1326
1327         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1328
1329 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1330
1331         * *.cs: Removed DeclContainer from EmitContext.
1332
1333 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1334
1335         * *.cs: Add IResolveContext::CurrentTypeParameters.
1336
1337 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1338
1339         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1340
1341 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1342
1343         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1344         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1345
1346 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1347
1348         * decl.cs: Look in PartialContainer for parent type parameters.
1349
1350 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1351
1352         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1353         codegen.cs: Add IResolveContext::LookupTypeParameter.
1354
1355 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1356
1357         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1358         Moved resolved logic from Emit to Resolve.
1359
1360 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1361
1362         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1363         codegen.cs: Reworked atttributes handling of ResolveContext.
1364
1365 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1366
1367         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1368         LookupNamespaceOrType to ResolveContext.
1369
1370 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1371
1372         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1373         class.cs: Removed unused parameters and methods.
1374
1375 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1376
1377         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1378         codegen.cs: Finding the best common type of a set of expressions for
1379         lambda statements.
1380
1381 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1382
1383         * dynamic.cs, expression.cs: More dynamic conversions.
1384
1385 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1386
1387         * generic.cs: This loop was incorrect, it was increment ii, but
1388         checking for `i'.  This was a change introduced to fix #327497,
1389         now we fix #424012.
1390  
1391         * class.cs: Catch another case for cs0533 error, fixes #324782.
1392
1393 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1394
1395         * typemanager.cs (GetGenericArguments): SRE returns null for
1396         generic methods on type builder instances if they are not generic
1397         themselves. For example, for Foo<int>::Bar() it returns null, but
1398         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1399
1400 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1401
1402         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1403         delegate.cs: Work on dynamic binding.
1404
1405 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1406
1407         A second fix for bug #525342
1408         * class.cs: Attach partial method attributes to method
1409         implementation.
1410
1411 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1412
1413         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1414         restrictions.
1415         
1416         * rootcontext.cs: Default to langversion v4.
1417
1418 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1419
1420         * pending.cs: Check return type before member info is set.
1421
1422 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1423
1424         * anonymous.cs: Fully initialize generic hoisted field expression.
1425
1426 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1427
1428         * cs-parser.jay: Flag variables declared on the interactive shell
1429         as used to prevent the 168 warning about local variable not being
1430         used. 
1431
1432 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1433
1434         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1435         attribute.cs: Emit dynamic export attribute.
1436
1437 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1438
1439         * expression.cs: More verifier work.
1440
1441 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1442
1443         * nullable.cs: Fixed SRE crash during corlib compilation.
1444
1445 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1446
1447         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1448         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1449         More TypeManager.TypeToCoreType needed.
1450
1451 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1452
1453         * anonymous.cs: Update after recent SRE fixes.
1454
1455 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1456
1457         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1458         version of GetFieldHandle for fields of generic types.
1459
1460 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1461
1462         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1463         ecore.cs: Add TypeManager.IsDynamicType,
1464         PredefinedAttributes.Dynamic.
1465
1466 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1467
1468         A fix for bug #415375
1469         * expression.cs: Fixed object and reference type parameter
1470         comparison.
1471
1472 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1473
1474         A fix for bug #525342
1475         * class.cs: Attach partial method attributes to method
1476         implementation.
1477
1478 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1479
1480         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1481         Dynamic arguments.
1482
1483 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1484
1485         * anonymous.cs (MutateField): Add imported types handling.
1486
1487 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1488
1489         * expression.cs, delegate.cs: Moved arguments resolve into their
1490         counterparts expressions. Removed argument resolve from
1491         CollectionElementInitializer.
1492
1493 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1494
1495         A fix for bug #523683
1496         * convert.cs, delegate.cs: Use common overload mechanism for method
1497         group conversion check.
1498
1499 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1500
1501         A fix for bug #523899
1502         * generics.cs: Exact type inference with other bound types.
1503
1504 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1505
1506         Don't complain when the same type is implemented by the output
1507         assembly as well as multiple referenced assemblies
1508         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1509         'must_be_unique' flag.
1510         (GlobalRootNamespace): Update to changes.
1511         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1512         already have a type in hand.
1513
1514 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1515
1516         * expression.cs: More verifier instrumentation.
1517         
1518         * statement.cs: Do proper throw expression conversion.
1519
1520 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1521
1522         A fix for bug #522789
1523         * expression.cs: Mutate invocation return type.
1524
1525 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1526
1527         * anonymous.cs: Split assignable and readonly generated variable
1528         references.
1529
1530 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1531
1532         A fix for bug #521671
1533         * statement.cs: Fixed crash when checking missing type.
1534
1535 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1536
1537         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1538         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1539         class.cs, driver.cs: Work on dynamic binding.
1540
1541         * dynamic.cs: New file.
1542
1543         * *.sources, *.proj: Updated.
1544
1545 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1546
1547         * expression.cs (Conditional): Avoid double Resolve.
1548
1549 2009-07-13  Marcus Griep  <marcus@griep.us>
1550
1551         * ecore.cs: Fix obscure bug with resolving members of interfaces
1552         that hide parent interface members. Fixes bug #444388 and corrects
1553         bug #323096
1554
1555 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1556
1557         * expression.cs (LocalVariableReference): Bounce resolve.
1558
1559 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1560
1561         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1562         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1563         types to new class.
1564         
1565         * support.cs: New dynamic type wrapper.
1566
1567 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1568
1569         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1570         typed local variable.
1571
1572 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1573
1574         A fix for bug #519005
1575         * anonymous.cs: Use null_type as no return type placeholder.
1576
1577 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1578
1579         * generic.cs: Handle type inference of identical type parameters
1580         with different bounds.
1581
1582 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1583
1584         * expression.cs, class.cs: Events variance.
1585         
1586         * cs-parser.jay: Interface events error messages.
1587
1588 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1589
1590         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1591
1592 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1593
1594         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1595         parameter expression can be value-type New.
1596
1597         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1598
1599 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1600
1601         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1602         Implemented C# 4.0 named arguments.
1603
1604 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1605
1606         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1607         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1608         parameter modifier. Also fixes bug #515497.
1609
1610 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1611
1612         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1613         arguments expression to be implemented.
1614         
1615         *.sources: Add argument.cs
1616
1617 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1618
1619         * parameter.cs: Moved GetParameterIndexByName to base class.
1620         
1621         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1622         unused AType. Use argument's version of GetExpressionTree.
1623
1624 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1625
1626         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1627         arguments grammar.
1628
1629 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1630
1631         A fix for bug #514096
1632         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1633
1634 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1635
1636         * expression.cs: The first multi-dimensional array nested array
1637         initializers was not checked.
1638         
1639         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1640
1641 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1642
1643         A fix for bug #513400
1644         * nullable.cs (EmitEquality): Operands emit could be simplified for
1645         built-in types when we now emit user operators differently.
1646
1647 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1648
1649         * ecore.cs: Report inaccessible delegate methods correctly.
1650
1651 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1652
1653         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1654         cs-parser.jay: Implemented C# 4.0 optional parameters.
1655
1656 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1657
1658         * driver.cs: Removed broken DefineManifestResource.
1659
1660 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1661
1662         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1663         Use $(BOOTSTRAP_PROFILE) instead.
1664
1665 2009-06-12  Jb Evain  <jbevain@novell.com>
1666
1667         * rootcontext.cs: add a Platform field.
1668         * driver.cs: handle /platform.
1669         * codegen.cs: pass the proper flags according to
1670         the platform when saving the assembly.
1671
1672 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1673
1674         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1675         Add optional parameters grammar.
1676
1677 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1678
1679         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1680         driver.cs: Split lang version and metadata version.
1681
1682 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1683
1684         * decl.cs: Better overload ctor collision error message.
1685
1686 2009-06-05  Jb Evain  <jbevain@novell.com>
1687
1688         * driver.cs (EmbededResource): avoid using an internal method
1689         in gmcs to embed manifest resources.
1690
1691 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1692
1693         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1694         the compiler from older mono versions (like moon's bots)
1695
1696 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1697
1698         * namespace.cs (LookupTypeReflection): Ignore collisions between
1699         forwarded types.
1700
1701 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1702
1703         * codegen.cs: Enabled generic type forwarders.
1704
1705 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1706
1707         * dmcs.*: Add another version of SRE compiler.
1708
1709 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1710
1711         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1712         generic-mcs.cs: Fixed variant type conversions.
1713
1714 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1715
1716         A fix for bug #507863
1717         * codegen.cs: Fixes a crash on invalid string value attribute.
1718
1719 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1720
1721         A fix for bug #508334
1722         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1723         cs-parser.jay: Fully import __arglist modifier.
1724
1725 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1726
1727         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1728         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1729         actually work with closed generic types.
1730
1731 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1732
1733         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1734         Fix the build by replacing the use of 'var' with the actual type.
1735
1736 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1737
1738         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1739     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1740         declarations.
1741           
1742         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1743         filter.
1744
1745 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1746                         Marek Safar  <marek.safar@gmail.com>
1747
1748         A fix for bug #377509
1749         * parameter.cs: Use predefined and not empty name for implicit
1750         setters.
1751
1752 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1753
1754         * class.cs: Don't report wrong warnings for event fields.
1755
1756 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1757
1758         A fix for bug #504667
1759         * class.cs: Check for static class using parent container instead of
1760         parent type.
1761
1762 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1763
1764         A fix for bug #496922
1765         * expression.cs: Always use temporary variable when using object
1766         initializer.
1767
1768 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1769
1770         A fix for bug #495112
1771         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1772         local cache.
1773
1774 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1775
1776         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1777
1778 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1779
1780         * complete.cs: No idea how gonzalo got a null in the list, but
1781         avoid crashing.
1782
1783 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1784
1785         * complete.cs (CompletionElementInitializer): New completion class
1786         to support completing inside a C# 3 element initializer, so this
1787         allows completion for Silverlight situations where it is very
1788         common to do:
1789
1790         new TextBlock () { Fo<TAB>
1791
1792         (CompletionSimpleName): Expose the prefix that was
1793         passed to the simple name.
1794
1795         * cs-parser.jay (object_or_collection_initializer): Add support
1796         for element_initializers.
1797
1798         * expression.cs (CollectionOrObjectInitializers.DoResolve):
1799         special case completion expressions as this method aggressively
1800         collects data before it operates, and errors were being thrown
1801         earlier than we were able to complete.
1802
1803 2009-04-23  Miguel de Icaza  <miguel@novell.com>
1804
1805         * eval.cs: Make getcompletions silent and enable debugging output
1806         if the -v option is passed.
1807
1808         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
1809         Consider looking up the namespace that matches the prefix being
1810         used. 
1811
1812         This is part of the support for allowing completions like:
1813         `System.Co<TAB>' to complete to System.Console.
1814
1815         * complete.cs (CompletionSimpleName.AppendResults): Make this
1816         routine reusable.
1817
1818 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
1819
1820         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
1821         COMPLETE_COMPLETION as internal.
1822
1823 2009-04-17  Miguel de Icaza  <miguel@novell.com>
1824
1825         * complete.cs: Include namespace resolution in simple names as
1826         well as global types and types in the using scope in the
1827         resolution. 
1828
1829         * namespace.cs: Supporting infrastrcture to provide completions
1830         based on the current using scope. 
1831
1832         * eval.cs: Introduce an entry point that allows for initialization
1833         to return a list of the files passed on the command line.
1834
1835 2009-04-14  Marek Safar  <marek.safar@gmail.com>
1836
1837         A fix for bug #494243
1838         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
1839
1840 2009-04-13  Marek Safar  <marek.safar@gmail.com>
1841
1842         A fix for bug #493887
1843         * statement.cs: Don't skip string multi-section with default or
1844         null label when populating string hashtable.
1845
1846 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1847
1848         A fix for bug #492329
1849         * expression.cs (New): Load variable when assigning type parameter
1850         to ref variable.
1851
1852 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1853
1854         A fix for bug #488960
1855         * decl.cs: Compare MVAR types using non-null values.
1856
1857 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1858
1859         * typemanager.cs, expression.cs: Removed unused nullable checks.
1860
1861 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1862
1863         * *.cs: Removed some gmcs conditionals.
1864
1865 2009-03-26  Marek Safar  <marek.safar@gmail.com>
1866
1867         * generic.cs, support.cs: Moved generics stuff out of support.cs
1868
1869 2009-03-24  Marek Safar  <marek.safar@gmail.com>
1870
1871         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
1872         DeclaringType.
1873
1874 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1875
1876         * attribute.cs: Consider all members for error reporting when
1877         checking named arguments.
1878
1879 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1880
1881         A fix for bug #487625
1882         * namespace.cs: Use a warning for all predefined type conflicts.
1883
1884 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1885
1886         A fix for bug #485706
1887         * statement.cs: Explicitly type catch type argument to pass verifier
1888         check.
1889
1890 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1891
1892         Initial support to provide code completion facilities to consumers
1893         of the evaluator API.
1894         
1895         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
1896         support the completion engine.   When we reach the end of the
1897         input stream instead of returning EOF, when this flag is true the
1898         tokenizer instead produces:
1899
1900                 One GENERATE_COMPLETION token: this token then must be
1901                 handled in the grammar at every point where the user
1902                 would likely request a completion.
1903
1904                 As many COMPLETE_COMPLETION tokens as necessary.   These
1905                 tokens are generated to assist the parser in unwinding and
1906                 producing a valid parse tree.    
1907
1908         The parser rules do not have to be perfect, the parser needs to be
1909         augmented with judicious use of GENERATE_COMPLETION tokens to
1910         improve the areas where we can provide completion and the parser
1911         needs to add support for COMPLETE_COMPLETION tokens in productions
1912         to make them work.
1913
1914         It is common to not have enough support for COMPLETE_COMPLETION
1915         under certain rules and that even if we generated the
1916         GENERATE_COMPLETION token that the resulting tree will be invalid
1917         due to the missing rules that support COMPLETE_COMPLETION.
1918
1919         The final EOF token is produced by having the parser notify the
1920         tokenizer when it reaches the root production that the next token
1921         should be EOF.
1922
1923         * support.cs (CompletionResult): New Exception.   This exception
1924         is thrown to return the completion results when one of the special
1925         completion expressions is reached.
1926
1927         This exception is thrown by the completing ExpressionStatements
1928         classes that live in complete.cs
1929
1930         * complete.cs (CompletingExpression): a new base class for
1931         completing expressions.   This derives from the
1932         ExpressionStatement class and not from Expression as it allows
1933         completion to happen not only where expressions are expected in
1934         the grammar, but also where statements are expected.
1935
1936         (CompletionSimpleName): A new class used to provide completions
1937         for SimpleNames.     This currently only resolves to local
1938         variables from the evaluator context (GetVars call).
1939
1940         (CompletionMemberAccess): Implements support for completing member
1941         access patterns. 
1942
1943         * cs-parser.jay: Add support for completion in a few places. 
1944
1945         * eval.cs (GetCompletions): New public API for the evaluator that
1946         returns a list of possible completions given the input.   The
1947         return value is an array of completions 
1948
1949         * anonymous.cs (Compatible): If the exception thrown from the
1950         resolved expression is a CompletionResult exception let that one
1951         through instead of printing a diagnostic error in the try/catch. 
1952 <       
1953 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1954
1955         * 
1956
1957         * driver.cs (Main): Use Environment.Exit to quit quickly and
1958         prevent the compiler from doing the usual wait for helper thread
1959         to terminate.  
1960
1961         This is to prevent a slowdown that was reported by Gonzalo on
1962         ASP.NET 
1963
1964 2009-03-19  Marek Safar  <marek.safar@gmail.com>
1965
1966         * ecore.cs: Load build-in types directly instead of accessing
1967         an internal field.
1968
1969 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1970
1971         * ecore.cs: Always use unbox.any when available.
1972
1973 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1974
1975         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
1976
1977 2009-03-17  Marek Safar  <marek.safar@gmail.com>
1978
1979         * generic.cs: Removed obsolete version of type inference.
1980
1981 2009-03-16  Marek Safar  <marek.safar@gmail.com>
1982
1983         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
1984         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
1985         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
1986         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
1987
1988 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1989
1990         A fix for bug #482996
1991         * anonymous.cs: Make sure we are not infering return type when
1992         checking type compatibility.
1993
1994 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1995
1996         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
1997         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
1998         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
1999         attributes in their own structure. Needed when accessing their
2000         properties before they are resolved.
2001
2002 2009-03-09  Marek Safar  <marek.safar@gmail.com>
2003
2004         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
2005         hashtable (~10x faster).
2006         
2007         * driver.cs: Removed wrong Reset.
2008
2009 2009-03-08  Marek Safar  <marek.safar@gmail.com>
2010
2011         * class.cs: Use correct common base type for unmanaged delayed
2012         check.
2013
2014         * rootcontext.cs: Wrap unhandled exception.
2015
2016 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
2017
2018         Make SeekableStreamReader self-tuning and arbitrarily seekable
2019         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
2020         the buffer.
2021         (SeekableStreamReader.Position.set): Use it.  Simplify logic
2022         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
2023         buffer size when the stream needs to be re-read from the beginning.
2024
2025 2009-03-05  Marek Safar  <marek.safar@gmail.com>
2026
2027         A fix for bug #480100
2028         * parameter.cs: A parameter is not hoisted when used directly as ET.
2029
2030 2009-03-04  Marek Safar  <marek.safar@gmail.com>
2031
2032         * statement.cs: Fixed an issue when using variable is of interface
2033         type.
2034
2035 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2036
2037         A fix for bug #480319
2038         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
2039
2040 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2041
2042         A fix for bug #480867
2043         * typemanager.cs, expression.cs, ecore.cs: Changed method group
2044         expression to have no valid type.
2045
2046 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2047
2048         A fix for bug #481258
2049         * class.cs: Set extension method flag in partial container.
2050
2051 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2052
2053         * statement.cs, typemanager.cs: Use expression for StringEmitter.
2054         
2055         * attribute.cs: Add sanity check.
2056
2057 2009-02-27  Marek Safar  <marek.safar@gmail.com>
2058
2059         * class.cs: Add external constructor error.
2060
2061 2009-02-26  Marek Safar  <marek.safar@gmail.com>
2062
2063         A fix for bug #475354
2064         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
2065         correctly user defined nullable equality operators.
2066
2067 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2068
2069         A fix for bug #479532
2070         * expression.cs: Implement NewInitialize::AddressOf.
2071
2072 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2073
2074         A fix for bug #413633
2075         * expression.cs: Iterate all base class-constraint types.
2076
2077 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2078
2079         A fix for bug #479209
2080         * literal.cs: Mutate null underlying type.
2081
2082 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2083
2084         A fix for bug #476295
2085         * convert.cs: Avoid wrapping implicitly convertible reference type.
2086
2087 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2088
2089         * iterators.cs: Create MemberName correctly.
2090
2091 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2092
2093         A fix for bug #478655
2094         * literal.cs: Check also underlying null type conversion.
2095
2096 2009-02-21  Marek Safar  <marek.safar@gmail.com>
2097
2098         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
2099
2100 2009-02-20  Marek Safar  <marek.safar@gmail.com>
2101
2102         A fix for bug #477447
2103         * statement.cs: Add reference to correct parent storey when this
2104         is accessible from deep children storey (more than 1 level).
2105
2106 2009-02-19  Marek Safar  <marek.safar@gmail.com>
2107
2108         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
2109         * class.cs: Define base type members before setting up member cache.
2110
2111 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2112
2113         A fix for bug #477378
2114         * nullable.cs, expression.cs, statement.cs: More precise null type
2115         sanity checks.
2116
2117 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2118
2119         A fix for bug #472805
2120         * typemanager.cs, namespace.cs: Import only visible extension method
2121         types.
2122
2123 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2124
2125         A fix for bug #476895
2126         * attribute.cs: Use correct resolve context for attribute type.
2127
2128 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2129
2130         A fix for bug #476266
2131         * anonymous.cs: Mutate multi-dimensional arrays.
2132
2133 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2134
2135         A fix for bug #476400
2136         * statement.cs, expression.cs: Removed wrong Dispose optimization.
2137
2138 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2139
2140         A fix for bug #476811
2141         * generics.cs: Fixed null-literal check.
2142
2143 2009-02-17  Marek Safar  <marek.safar@gmail.com>
2144
2145         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
2146         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
2147         messing with static variables.
2148
2149 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2150
2151         A fix for bug #475965
2152         * generics.cs: Check generic parameter type after extracting from
2153         Expression<T>.
2154
2155 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2156
2157         A fix for bug #475823
2158         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
2159         typed-null support.
2160
2161 2009-02-14  Marek Safar  <marek.safar@gmail.com>
2162
2163         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
2164         Simplified event field definition using backing field and not
2165         field builder directly.
2166
2167         * expression.cs (EmitLdArg): Optimize fast paths.
2168
2169 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2170
2171         A fix for bug #475327
2172         * expression.cs (ArrayCreation): Don't mutate values optimized away.
2173
2174 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2175
2176         A fix for bug #475342
2177         * cs-parser.jay: Using 'super' instead of 'base' to call base
2178         constructor crashes compiler.
2179
2180 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2181
2182         A fix for bug #475354
2183         * expression.cs (Constantify): Add nullable types.
2184         
2185         * const.cs (EmitDecimalConstant): Avoid explicit cast.
2186
2187 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2188
2189         A fix for bug #475246
2190         * expression.cs: More broken flowanalysis hacking needed.
2191
2192 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2193
2194         * attribute.cs: Compare only ref/out array modifiers. 
2195
2196 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2197
2198         * statement.cs: Use member cache when looking for foreach members.
2199
2200 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2201
2202         * expression.cs: Don't expose internal initializer types.
2203         
2204         * statement.cs: Check also explicit conversions for goto case.
2205
2206 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2207
2208         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2209
2210 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2211
2212         * *.cs: Replace null-type with NullLiteral where appropriate.
2213
2214 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2215
2216         * expression.cs: Initializer of reference argument use temporary
2217         variable to be verifiable.
2218         
2219         * parameter.cs: Share EmitLdArg.
2220
2221 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2222
2223         A fix for bug #473559
2224         * class.cs: Fixed: Not reporting error about nested class with the
2225         same name.
2226
2227 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2228
2229         Contributed under the MIT/X11 license.
2230
2231         * generic.cs: Added VerifyVariantTypeParameters which performs new
2232         variance verification logic. The old logic, based on the spec, was
2233         wrong because the spec is full of LIES!
2234
2235         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2236
2237         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2238
2239         * class.cs:
2240         * ecore.cs: Added calls to the new variance verification logic.
2241
2242         * parameter.cs:
2243         * delegate.cs: Removed calls to the old variance verification logic.
2244
2245 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2246
2247         * delegate.cs: Use cached Invoke method directly.
2248
2249 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2250
2251         * expression.cs: Emit expression tree for hoisted variable access.
2252
2253 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2254
2255         * namespace.cs: Add better extension class check.
2256
2257 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2258
2259         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2260
2261 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2262
2263         This patch adds initial generic variance support to the compiler.
2264         It is contributed under the MIT/X11 license.
2265
2266         * typemanager.cs: Modified ImplementsInterface to check variance.
2267         Added VerifyVariantTypeParameters which checks the specified type to see
2268         if it uses a variant type parameter as a type argument (which is not
2269         allowed). Added IsVariantOf which determins if the first type is a
2270         variant of the second. NOTE: This only supports reference types at
2271         the moment to conform with the current level of VM support. When the
2272         VM supports value types, this will follow step.
2273
2274         * generic.cs: Added the Variance enum. Added a Variance property to
2275         TypeParameter and added variance support to definition phase. Added a
2276         Variance property to TypeParameterName. Also check to make sure that
2277         no variant types appear in generic method parameters.
2278
2279         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2280         keywords if the langversion supports it.
2281
2282         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2283         that variant types are only used in legal positions. Also added
2284         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2285         parameters.
2286
2287         * decl.cs: Construct TypeParameter with the variance information.
2288
2289         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2290         and ImplicitConversionStandard.
2291
2292         * rootcontext.cs: Added new "Future" language version.
2293
2294         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2295         type parameters are not used as type arguments in interface inheritance.
2296         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2297         parameters are not used as method return types. In MemberBase.
2298         ResolveMemberType, ensure that variant type parameters are not used
2299         as type arguments. Also call VerifyNoVariantTypeParameters on every
2300         set of parameters which are resolved.
2301
2302         * delegate.cs: Modified Delegate.Define to ensure that variant
2303         parameters are not used as type arguments and that a contravariant
2304         parameter is not used as the return type. Also call
2305         VerifyNoVariantTypeParameters on the delegate parameters.
2306
2307         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2308         to specify generic variance.
2309
2310         * driver.cs: Added support for LanguageVersion.Future in the form of
2311         "-langversion:future".
2312
2313         * generic-mcs.cs: Stubbed out new members in generic.cs.
2314
2315 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2316
2317         * class.cs, generic.cs: Emit type parameter constraints for nested
2318         types.
2319
2320 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2321
2322         A fix for bug #471213
2323         * class.cs: Avoid emitting backing field for abstract event fields.
2324
2325 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2326
2327         A fix for bug #359731
2328         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2329         expressions.
2330
2331 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2332
2333         A fix for bug #470767
2334         * statement.cs: Introduced BlockScopeExpression, needed when 
2335         expression tree conversion has to emit scope variables.
2336
2337 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2338
2339         * class.cs: Remove duplicate CallingConvention.
2340
2341 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2342
2343         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2344         when I finally found the right naming convention.
2345
2346 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2347
2348         * cs-tokenizer.cs: Put back different open parens optimization.
2349
2350 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2351
2352         A fix for bug #470227
2353         * cs-tokenizer.cs: Remove too agressive parser optimization.
2354
2355 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2356
2357         A fix for bug #324319
2358         * class.cs: Remove too early base type resolve.
2359
2360 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2361
2362         A fix for bug #324319
2363         * ecore.cs: Explicitly type null when assigning to type argument to
2364         make pass verifier check.
2365
2366 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2367
2368         * anonymous.cs: Fixed recent regression when initializing captured 
2369         this.
2370
2371 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2372
2373         A fix for bug #469019
2374         * anonymous.cs: Use all parent type parameters when instantiating
2375         nested generic storey.
2376
2377 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2378
2379         * expression.cs: Check for null instance methodgroup expression.
2380
2381 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2382
2383         A fix for bug #469244
2384         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2385         instance inside a conditional expression.
2386
2387 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2388
2389         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2390         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2391         GetElementType and HasElementType. IsValueType clean up.
2392
2393 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2394
2395         * nullable.cs: Use common EmitCall.
2396         
2397         * expression.cs: Emit constraint. for virtual calls only.
2398
2399 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2400
2401         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2402         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2403         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2404         checks.
2405
2406 2009-01-22  Jb Evain  <jbevain@novell.com>
2407
2408         * anonymous.cs: make anonymous types' ToString implementation
2409         match what csc outputs.
2410
2411 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2412
2413         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2414         up.
2415
2416 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2417
2418         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2419         verifier checks.
2420
2421 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2422
2423         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2424         expressions.
2425
2426 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2427
2428         A fix for bug #466634
2429         * statement.cs: Add reference for nested storey when only this
2430         is captured.
2431
2432 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2433
2434         A fix for bug #466474
2435         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2436         was specified.
2437
2438 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2439
2440         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2441         Fixed nested stories parent referencing process. Also fixes #463985.
2442
2443 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2444
2445         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2446         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2447         implementation. Also fixes #463108.
2448
2449 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2450
2451         A fix for bug #416109
2452         * decl.cs: Issue correct CLSAttribute warning location.
2453
2454 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2455
2456         A fix for bug #456775
2457         * attribute.cs: Use attribute owner scope when resolving attribute
2458         arguments.
2459
2460 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2461
2462         A fix for bug #457257
2463         * decl.cs: Fixed incorrect member declaring type comparison.
2464
2465 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2466
2467         A fix for bug #460896
2468         * driver.cs: Handle /RES resources as embeddable.
2469
2470 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2471
2472         A fix for bug #462515
2473         * ecore.cs: Report inacessible members upwards.
2474
2475 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2476
2477         A fix for bug #463190, #463192
2478         * decl.cs, namespace.cs: Also import internal extension classes.
2479
2480 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2481
2482         A fix for bug #463415
2483         * generic.cs: Use right index for RemoveDependentTypes.
2484
2485 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2486
2487         A fix for bug #463196
2488         * expression.cs: Fixed enum to null comparison.
2489
2490 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2491
2492         A fix for bug #463121
2493         * nullable.cs: Fixed nullable user equality operator comparison.
2494
2495 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2496
2497         A fix for bug #462950
2498         * class.cs, decl.cs: Use full explicit name when defining automatic
2499         property backing field.
2500
2501 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2502
2503         A fix for bug #462592
2504         * pending.cs: Emit type arguments for generic proxy method.
2505
2506 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2507
2508         * expression.cs (As): Mutate all type arguments.
2509
2510 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2511
2512         A fix for bug #462622
2513         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2514         context.
2515
2516 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2517
2518         A fix for bug #450782
2519         * ecore.cs: Consider more variables of form V.I to be fixed.
2520
2521 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2522
2523         A fix for bug #460712
2524         * typemanager.cs: Core types could be imported.
2525
2526 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2527
2528         A fix for bugs #460847, #460772, #458049, #457339, #447807
2529         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2530         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2531         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2532         user lambdas used inside query clauses.
2533
2534 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2535
2536         A fix for bug #460229
2537         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2538
2539 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2540
2541         A fix for bug #459952
2542         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2543
2544 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2545
2546         A fix for bug #459630
2547         * convert.cs: Enum to valuetype conversion is not allowed.
2548
2549 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2550
2551         A fix for bug #457087
2552         * generic.cs: Don't crash when constraint comes from type
2553         declaration.
2554
2555 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2556
2557         A fix for bug #459221
2558         * anonymous.cs, statement.cs: Delay only captured this
2559         initialization.
2560
2561 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2562
2563         A fix for bug #457489
2564         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2565         and initialization to capture scope initializers correctly.
2566
2567 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2568
2569         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2570         ParameterReference refactoring.
2571
2572 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2573
2574         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2575         to be imported from any assembly.
2576
2577 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2578
2579         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2580         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2581         from anonymous method and lambda expression.
2582
2583 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2584
2585         A fix for bug #448560
2586         * expression.cs (As): Box any generic type arguments to be
2587         verifiable.
2588
2589 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2590
2591         Add tripwire for implicit conversion bugs
2592         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2593         for CS1501 error.
2594         (MethodGroupExpr.OverloadResolve): Add sanity check between
2595         IsApplicable and VerifyArgumentsCompat.
2596         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2597
2598 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2599
2600         Fix build break in System.Data_test
2601         * convert.cs (ImplicitConversionExists): Move NullLiteral
2602         conversions ...
2603         (ImplicitStandardConversionExists): ... here.
2604
2605 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2606
2607         * literal.cs: Emit correctly explicit null to nullable cast.
2608
2609 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2610
2611         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2612         resolve.
2613
2614 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2615
2616         A fix for bug #449005
2617         * convert.cs, nullable.cs: Use only one implicit nullable
2618         conversion.
2619
2620 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2621
2622         * convert.cs, literal.cs: More Convert cleanup is needed.
2623
2624 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2625
2626         * decl.cs, class.cs: Fixed misleading error message.
2627
2628 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2629
2630         A fix for bug #449005
2631         * nullable.cs (EmitEquality): Disable optimization for user operator
2632         operands.
2633
2634 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2635
2636         A fix for bug #447027
2637         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2638         with context variables stored as expression instances.
2639
2640 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2641
2642         A fix for bug #447027
2643         * delegate.cs: Fixed delegate VerifyMethod logic.
2644
2645 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2646
2647         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2648         but not verifiable.
2649
2650 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2651
2652         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2653         member type resolve to follow normal flow, instead of random
2654         property access.
2655
2656 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2657
2658         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2659         type.
2660
2661 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2662
2663         * const.cs: Emit decimal array constant as literal.
2664
2665 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2666
2667         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2668
2669 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2670
2671         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2672         into real property (saves 8 MB for corlib compilation).
2673
2674 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2675
2676         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2677         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2678         generic-mcs.cs: Small cleanup of TypeArguments.
2679
2680 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2681
2682         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2683         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2684         of ConstructedType expression, renamed to GenericTypeExpr.
2685
2686 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2687
2688         A fix for bug #445303
2689         * location.cs (IsConditionalDefined): Handle undefined global
2690         defines.
2691
2692 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2693
2694         A fix for bug #444678
2695         * expression.cs (TryReduceConstant): Always create new constant
2696         instance.
2697
2698 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2699
2700         A fix for bug #444673
2701         * ecore.cs: Ignore open generic types when used as generic type
2702         instance fields.
2703
2704 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2705
2706         A fix for bug #445458
2707         * expression.cs, cs-parser.jay: Don't crash when an expression
2708         statement is null.
2709
2710 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2711
2712         A fix for bug #445464
2713         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2714         inside unbound type.
2715
2716 2008-11-14  Jb Evain  <jbevain@novell.com>
2717
2718         * driver.cs: ignore empty -nowarn argument such as
2719         the one in -nowarn:12,13,,.
2720
2721 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2722
2723         A fix for bug #444271
2724         * anonymous.cs: Rescan parent storeys when best candidate was
2725         undone.
2726
2727 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2728
2729         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2730         useless UnboundTypeExpression.
2731         
2732         * attribute.cs: Do check obsolete attribute on generic types.
2733
2734 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2735
2736         A fix for bugs #425680, #400139
2737         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2738         refactoring.
2739
2740 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2741
2742         A fix for bug #435747
2743         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2744         compound value types assignment. Few micro optimizations added.
2745
2746 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2747
2748         A fix for bug #442610
2749         * anonymous.cs (MutateConstructor): More SRE hacking.
2750
2751 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2752
2753         A fix for bug #442579
2754         * ecore.cs: Also initialize expanded form of a method with 1 params
2755         parameter.
2756
2757 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2758
2759         * expression.cs (UnaryMutator): Do early l-side check.
2760
2761 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2762
2763         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2764         Init, otherwise we would crash later on when checking for friend
2765         assemblies. 
2766
2767         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2768         Otherwise we never get any meaningful information as to what
2769         failed. 
2770
2771 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2772
2773         A fix for bug #436318
2774         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2775
2776 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2777
2778         * namespace.cs: Turns out that it was a really bad idea to hide
2779         the errors for namespaces not found here in eval mode.    
2780
2781         * eval.cs: When we process using clauses, only enter those into
2782         the list of valid using clauses after they have been validated.   
2783
2784         The above change gives the proper semantics: it does not
2785         senselessly report the same errors with broken using statements by
2786         never storing them in the first place when they are invalid.
2787
2788 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2789
2790         A fix for bug #421839
2791         * cs-parser.jay: Remove expression from coalesce rule to force lower
2792         priority than the assignment operator.
2793
2794 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2795
2796         A fix for bug #437875
2797         * nullable.cs: Compile correctly method group operand used with null
2798         coalescing operator.
2799
2800 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2801
2802         A fix for bug #434589
2803         * expression.cs (Binary): Ignore lifted conversions when at least
2804         one operand is of reference type.
2805
2806 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2807
2808         * cs-parser.jay: Better syntax error report.
2809
2810 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2811
2812         A fix for bug #436792
2813         * cs-parser.jay: Use GetLocation to access location.
2814
2815 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2816
2817         A fix for bug #440774
2818         * cs-parser.jay: Also set current_array_type when parsing local
2819         variables types.
2820
2821 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2822
2823         A fix for bug #440785
2824         * expression.cs (As): Don't resolve self modifing expression
2825         multiple times.
2826
2827 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2828
2829         A fix for bug #439447
2830         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
2831
2832 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2833
2834         A fix for bug #437571
2835         * cs-parser.jay: Fixes internal error for invalid expression
2836         statements.
2837
2838 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2839
2840         * ecore.cs: Resolve correctly ambiguous params delegate methods.
2841
2842 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2843
2844         * generic.cs, anonymous.cs: Simplified GetDeclarations.
2845
2846 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2847
2848         * cs-tokenizer.cs: More precise cast parsing.
2849
2850 2008-10-16  Martin Baulig  <martin@ximian.com>
2851
2852         * anonymous.cs (AnonymousMethodStorey): Put back the
2853         `hoisted_locals' hashtable and use it in EmitType().
2854
2855 2008-10-15  Marek Safar  <marek.safar@gmail.com>
2856
2857         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
2858         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
2859         ~5MB for corlib.
2860
2861 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2862
2863         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
2864
2865 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2866
2867         * statement.cs: Mutate scope initializers.
2868
2869 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2870
2871         * expression.cs: Use typeless value for This constant.
2872         
2873         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
2874
2875 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2876
2877         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
2878         tokenizer.
2879
2880 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2881
2882         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
2883         type to type cast.
2884
2885 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2886
2887         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
2888         parser and tokenizer. Fixes many ambiguities including #433258.
2889
2890 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2891
2892         * cs-parser.jay: Fixed missing accessor recovery.
2893
2894 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2895
2896         A fix for bug #433701
2897         * expression.cs: Better error message.
2898
2899 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2900
2901         * cs-parser.jay, expression.cs: Start reporting real parser errors.
2902         
2903         * Makefile: Disabled unused debug symbols.
2904
2905         Also fixes: #320556, #321097, #321656, #321876, #351316
2906
2907 2008-10-09  Miguel de Icaza  <miguel@novell.com>
2908
2909         * eval.cs: rename "<interactive>" to "{interactive}", to work
2910         around a requirement in the compiler that this be a valid
2911         filename, and in Windows it is not (433886).
2912
2913 2008-10-09  Marek Safar  <marek.safar@gmail.com>
2914
2915         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
2916
2917 2008-10-08  Marek Safar  <marek.safar@gmail.com>
2918
2919         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
2920         cs-parser.jay: Generic type declaration and type arguments cleanup.
2921
2922 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2923
2924         * cs-parser.jay: Allow parsing weird array creation construct.
2925
2926 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2927
2928         * cs-parser.jay: Conflicts reduction.
2929
2930 2008-10-04  Marek Safar  <marek.safar@gmail.com>
2931
2932         * cs-parser.jay: Conflicts reduction.
2933
2934 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
2935
2936         Fix #398325
2937         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
2938         property.  Add a 'count' hint about the use of the shared vector.
2939         Ensure that we don't leak out dirty bits.
2940         (UsageVector.MergeChild): Throw away information about variables
2941         in child vectors.
2942         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
2943
2944 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2945
2946         A fix for bug #431746
2947         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
2948         parameters when iterator is created.
2949
2950 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2951
2952         A fix for bug #431827
2953         * expression.cs: Fixed right based pointer arithmetic operations
2954         emit.
2955
2956 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2957
2958         A fix for bug #353779
2959         * assign.cs, expression.cs: Fixed compound assignment conversions.
2960
2961 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2962
2963         A fix for bug #375262
2964         * statement.cs: Refactor ArrayForeach to be usable with string
2965         indexer. Optimized single dimentional arrays foreach.
2966
2967 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2968
2969         A fix for bug #431255
2970         * anonymous.cs, expression.cs: Removed broken optimization.
2971
2972 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2973
2974         * anonymous.cs: Use full type parameters of parent generic
2975         containers. Removed unnecessary AddParentStoreyReference call.
2976
2977 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2978
2979         A fix for bug #324702
2980         * class.cs: Use better shorter names for explicit interface member
2981         implementations.
2982
2983         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
2984
2985 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2986         
2987         * expression.cs: Use new interface to check fixed expression.
2988
2989 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2990
2991         A fix for bug #421101
2992         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
2993         interface to check for fixed fixed-buffers.
2994
2995 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2996
2997         A fix for bug #429264
2998         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
2999         
3000         * delegate.cs: Removed unnecessary casts.
3001
3002 2008-09-30  Marek Safar  <marek.safar@gmail.com>
3003
3004         A fix for bug #352151
3005         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
3006         class.cs: Fixed already defined explicit interface members check.
3007
3008 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3009
3010         cs-tokenizer.cs: Fix typo.
3011
3012 2008-09-28  Miguel de Icaza  <miguel@novell.com>
3013
3014         * eval.cs (InteractiveBase): The quit command now just sets a
3015         flag, instead of calling Environment.Exit(), it is milder on
3016         embedded hosts. 
3017
3018         CompiledMethod is now in Mono.CSharp, not nested inside
3019         the Evaluator, it was inconvenient to use.
3020
3021 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3022
3023         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
3024         code to be invoked without having to reparse.
3025
3026 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3027
3028         * ecore.cs: The recent changes to FieldExpr broke this as well.
3029         Fixes LINQ queries in the interactive shell.
3030
3031         * Multiple files: indentation fixing for the Mono coding
3032         guidelines for the switch statement.
3033
3034         * eval.cs: Make the Evaluator API thread safe.
3035
3036 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3037
3038         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
3039         constructor parsing.
3040
3041 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3042
3043         A fix for bug #325326
3044         * statement.cs: Check possible mistaken empty statement using
3045         explicit blocks only.
3046
3047 2008-09-25  Miguel de Icaza  <miguel@novell.com>
3048
3049         * eval.cs (LoadAssembly, ReferenceAssembly): Call
3050         RootNamespace.ComputeNamespaces to update the internal list of
3051         namespaces, this is no longer done for us.
3052
3053         (InteractiveBase): Use the Evaluator APIs instead of calling into
3054         Driver directly
3055
3056 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3057
3058         A fix for bug #429264
3059         * expression.cs: Missing mutator for access to multidimensional
3060         arrays.
3061
3062 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3063
3064         * class.cs, statement: Emit DebuggerHidden attribute for iterator
3065         entry wrapper.
3066         
3067         * driver.cs: Missing input argument check.
3068
3069 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3070
3071         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
3072         expression.cs, statement.cs, rootcontext.cs, class.cs, 
3073         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
3074         DefineMembers.
3075
3076 2008-09-24  Miguel de Icaza  <miguel@novell.com>
3077
3078         * ecore.cs (FieldExpr): Only initialize eclass when we return a
3079         fully constructed FieldExpr, fixes the regression introduced in
3080         the last commit.
3081         
3082         * ecore.cs, expression.cs: Plug back the eclass initialization as
3083         otherwise it regresses `csharp'. 
3084
3085 2008-09-24  Marek Safar  <marek.safar@gmail.com>
3086
3087         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
3088         ecore.cs, attribute.cs: Moved obsolete method checks from emit
3089         phase to resolve phase. It resolves problems with expression trees
3090         and fixes bugs #323796, #325156.
3091
3092 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3093
3094         * codegen.cs: Report better error when symbol writer is missing.
3095
3096 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3097
3098         * codegen.cs: Set .NET symbol writer.
3099         
3100         * decl.cs: Guard against null generic arguments.
3101         
3102         * report.cs: Don't report exactly same additional details.
3103
3104 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3105
3106         A fix for bug #324917
3107         * cs-parser.jay: Add missing multidimensional non-expression type
3108         ranks.
3109         
3110 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3111
3112         A fix for bug #428191
3113         * anonymous.cs: Create an outer generic fields also for non-storey
3114         anonymous methods.
3115
3116 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3117
3118         A fix for bug #378294
3119         * class.cs: Make fixed size buffers gmcs feature only.
3120
3121 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3122
3123         A fix for bug #355622, #324993
3124         * assign.cs, const.cs, class.cs: Create new EmitContext for each
3125         field initializer.
3126
3127 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3128
3129         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
3130         error reporting.
3131
3132 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3133
3134         A fix for bug #416110
3135         * generic.cs: Struct constraint results in default ctor and
3136         ValueType base type constraint to be set.
3137
3138 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3139
3140         A fix for bug #423791
3141         * generic.cs: Fixed params output type type-inference.
3142
3143 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3144
3145         * cs-parser.jay, expression.cs: Fixed few expression crashes.
3146         
3147 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3148
3149         * cs-tokenizer.cs: Don't break on extra partial modifier.
3150
3151 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3152
3153         A fix for bug #427592
3154         * generic.cs: Use common parameter resolve method.
3155
3156 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3157
3158         A fix for bug #414758
3159         * expression.cs, ecore.cs: Fixed crash when accessing non-static
3160         property.
3161
3162 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3163
3164         * driver.cs, namespace.cs: Read types and namespaces after all
3165         requested assemblies are loaded, fixes issues with System.Core
3166         auto-reference, and #419888.
3167
3168 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3169
3170         A fix for bug #417705
3171         * cs-parser.jay: Fixed as/is operator expression split.
3172
3173 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3174
3175         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
3176         Fixed expression tree representation of empty new expression and
3177         new initializer expression.
3178
3179 2008-09-18  Miguel de Icaza  <miguel@novell.com>
3180
3181         * eval.cs: Remove warning, keep reference to driver around.
3182
3183         * Hide fields that do not need to be public.
3184
3185 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3186
3187         A fix for bug #426385
3188         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
3189         conversion for array elements.
3190
3191 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3192
3193         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
3194         void parsing conflicts.
3195
3196 2008-09-15  Marek Safar  <marek.safar@gmail.com>
3197
3198         A fix for bug #425601
3199         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
3200         System.Core only when there is no custom ExtensionAttribute
3201         implementation.
3202
3203 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3204
3205         * namespace.cs: Do not report CS0246 (name
3206
3207 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3208
3209         A fix for bug #425669
3210         * generic.cs: Don't cache generic static anonymous method 
3211         containers.
3212
3213 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3214
3215         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3216         conflicting constraints.
3217
3218 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3219
3220         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3221         mcs too.
3222
3223 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3224
3225         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3226         to null pointer conversion fixes.
3227
3228 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3229
3230         * cs-parser.jay, expression.cs: An implicitly typed local variable
3231         declarator cannot use an array initializer.
3232
3233 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3234
3235         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3236
3237 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3238
3239         * generic.cs (InflatedConstraints): Don't crash when constraints
3240         are different.
3241         
3242         * cs-parser.jay: const_declarator is a block.
3243
3244         * constant.cs: Check for not allowed NaN conversions.
3245
3246 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3247
3248         * driver.cs: Drop --shell argument, the compiler is no longer a
3249         REPL. 
3250
3251         * eval.cs: Move most of the code that deals with evaluation into
3252         this file and document the public API from repl.cs
3253
3254         * repl.cs: Remove from here.
3255         
3256 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3257
3258         A fix for bug #424684
3259         * generic.cs: Generic class constraints must come first.
3260
3261 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3262
3263         * cs-parser.jay: Improve error reporting for syntax errors in
3264         statements and expressions, we now report the expected tokens
3265         instead of reporting the useless "; expected".
3266
3267         Drop the strings from the token declaration, it turns out that
3268         they did not do what I thought they did.  Instead they were adding
3269         two sets of tokens to the tables.
3270
3271 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3272
3273         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3274         delegate.cs: Share special type check.
3275
3276 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3277
3278         A fix for bug #423981
3279         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3280
3281 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3282
3283         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3284         ConvertImplicitly.
3285
3286 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3287
3288         A fix for bugs: #324750, #335946
3289         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3290         lookup rule to determine ?-based tokens.
3291
3292 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3293
3294         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3295         expressions (like event adding or removing) end up here, so we
3296         need to treat those as statements.
3297
3298         Add LoadAssembly method.
3299
3300 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3301
3302         * repl.cs: Add Time method.
3303
3304 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3305
3306         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3307
3308 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3309
3310         * repl.cs: Add workaround for old compilers.
3311
3312 2008-09-04  Jb Evain  <jbevain@novell.com>
3313
3314         * repl.cs (PrettyPrint): pretty print everything that
3315         implements IDictionary, as well as IEnumerables. Also,
3316         add a quit helper property.
3317
3318 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3319
3320         * constant.cs: Better error reporting for decimal literals.
3321         
3322         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3323         field attributes.
3324         
3325 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3326                         Miguel de Icaza  <miguel@novell.com>
3327
3328         A fix for bug #422951
3329         * assign.cs (Assign.DoResolve): Perform the type conversions
3330         checks before we attempt to initialize `New' initializers. 
3331
3332 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3333
3334         A fix for bug #422853
3335         * delegate.cs (DelegateCreation): Add special handling for
3336         EmptyExpression.Null instance expression which is just another
3337         hack for undecided member instance exression.
3338
3339 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3340
3341         * expression.cs, ecore.cs: Emit full expression tree for reduced
3342         binary expressions.
3343
3344 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3345
3346         * expression.cs (This): Guard against multi-resolving.
3347         
3348         * ecore.cs, statement.cs (Throw): Simplified.
3349         
3350         * flowanalysis.cs: Also verify event fields.
3351
3352 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3353
3354         * assign.cs (Assign.DoResolve): Perform the type conversions
3355         checks before we attempt to initialize `New' initializers. 
3356
3357         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3358
3359         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3360         public. 
3361
3362         * repl.cs: Update help.
3363
3364 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3365
3366         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3367         handling of the default config handling, including the special
3368         treatment of System.Core assembly. 
3369
3370         Fixes the REPL processing for LINQ.
3371
3372 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3373
3374         A fix for bug #422507
3375         * expression.cs (UnboxCast): Add missing child expression mutator.
3376
3377 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3378
3379         * driver.cs: Don't self reference System.Core assembly.
3380
3381 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3382
3383         A fix for bug #422507
3384         * expression.cs (StringConcat): Add missing type mutator.
3385
3386 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3387
3388         * generic.cs (TypeInferenceContext): Follow equality rule for
3389         constructed type lower bound type inference.
3390
3391 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3392
3393         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3394         <dblank@cs.brynmawr.edu> which updates the cursor position on
3395         refresh.
3396         
3397 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3398
3399         A fix for bug #367145
3400         * driver.cs: Fixed import of extension methods when using -noconfig
3401         option.
3402
3403 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3404
3405         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3406         version from non-generic implementation instead.
3407
3408 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3409
3410         A fix for bug #418908
3411         * class.cs: Use AddScopeStatement for field initializers.
3412
3413 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3414
3415         A fix for bug #415385
3416         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3417
3418 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3419
3420         A fix for bug #421736
3421         * iterators.cs: Don't crash on unreachable iterators.
3422
3423 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3424
3425         A fix for bug #421628
3426         * parameter.cs, attribute.cs: Clone also parameter attributes.
3427
3428 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3429
3430         * namespace.cs (LookupType): In EvalMode, try to replace
3431         the TypeBuilder from our cache with a Type as Reflection.Emit does
3432         not  like to mix code from older assemblies emitted and new
3433         assemblies emitted. 
3434
3435         This sounds like a serious Mono bug that prevents multiple
3436         assemblies to be generated and consumed at the same time.
3437
3438         * cs-parser.jay (push_current_class): Do not make interactive
3439         classes internal or private, make them public as we currently
3440         generate each new class in a new assembly.   
3441
3442 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3443
3444         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3445         remove types that are entered into the global namespace during
3446         parsing so that we can remove them on failure.
3447  
3448         * cs-parser.jay: Parsing: we now keep track of types that are
3449         entered into global variables and queue those in case the parsing
3450         or resolution fail.
3451  
3452         This happens in a few situations: during partial-input, we invoke
3453         the parser repeatedly for example with the string "class X", this
3454         would cause X to be registed, and we need to remove this
3455         registration so that another parse attempt later with say "class X {"
3456         would actually work.
3457  
3458         Additionally, if there is an error in the resolution phase, for
3459         example: "class X : NonExistant {}" th
3460         
3461         * cs-parser.jay: Be more precise with the errors being raised,
3462         instead of flagging all exceptions during parsing to be attributed
3463         to the parsing process, distinguish those from errors happening in
3464         the actions and hint that using -v would produce the actual
3465         exception. 
3466
3467         * repl.cs: Do not load all compiler references on each reset,
3468         doing the partial reset takes care of this.
3469         
3470 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3471
3472         * repl.cs: Add support for loading all the files from
3473         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3474         as shell libraries.
3475
3476         Introduce a micro-parser that is able to deambiguate on its input
3477         whether we are dealing with a compilation unit (namespace, class,
3478         interface, struct, delegate) declaration or a statement.   This
3479         allows both declarations and statements to be entered. 
3480
3481         Set history size by default to 300 lines.
3482
3483         Instead of distinguishing based on the parser.InteractiveResult,
3484         have only two cases: statements were parsed, or a compilation unit
3485         was.   Always pull the Using statement additions from the
3486         compilation unit parse.
3487         
3488         * cs-tokenizer.cs: Rename tokens to better describe their intent
3489         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3490         
3491         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3492         EvalMode is used to trigger the lookup of global variables while
3493         StatementMode is used turn variable declarations into static
3494         fields.
3495
3496         * getline.cs: Allow history size to be set.
3497         
3498 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3499
3500         A fix for bug #360755
3501         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3502
3503 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3504
3505         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3506         
3507         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3508         member name, it is too confusing
3509         
3510         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3511         
3512         * rootcontext.cs: Finally default to warning level 4.
3513
3514 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3515
3516         * class.cs (CheckBase): Ignore overloaded operators.
3517
3518 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3519
3520         A fix for bug #420830
3521         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3522
3523 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3524
3525         A fix for bug #420832
3526         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3527
3528 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3529
3530         A fix for bug #420386
3531         * nullables.cs: Fixed logic of nullable user comparison operators involving
3532         null values.
3533
3534 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3535         
3536         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3537
3538 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3539
3540         * repl.cs: Add support for aborting the running code with C-c. 
3541
3542 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3543
3544         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3545
3546 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3547
3548         * cs-parser.jay (interactive_statement_list): A new set of rules
3549         for hosting statements that uses the "interactive_" prefix.   
3550
3551         * repl.cs: Add support for parsing `using' as a statement or as a
3552         directive.  Deambiguating before passing this to the parser.
3553
3554         We need to distinguish statement_expressions that occur at the
3555         toplevel vs those that occur embedded into expressions.
3556
3557         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3558         that fixes the cursor key handling, and a history bug.
3559         
3560 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3561
3562         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3563         limitations in Console, instead the 2.0 bootstrap libraries now
3564         include the Console bits.
3565
3566         Also, remove the use of Nullables from getline.cs
3567
3568         ------------
3569         
3570         Interactive support for the C# compiler.   Use gmcs --shell to
3571         enter a read-eval-print loop shell.
3572
3573         Docs: http://www.mono-project.com/CsharpRepl
3574         
3575         * sources: include repl.cs here and getline.cs for gmcs.exe,
3576         everything else is getline.cs impaired.
3577
3578         * Makefile: when bootstrapping pass a special flag
3579         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3580         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3581         This distinguishes those two cases.
3582
3583         * repl.cs: Support for a read-eval-print loop.   Will be soon
3584         refactored into eval support and then REPL on top of it.
3585
3586         * ecore.cs: If a simplename lookup fails, before erroring out,
3587         if we are in EvalMode to resolve the name to a declaration in the
3588         Eval-land.    
3589
3590         This means that variable declarations that happened in previous
3591         classes (as repl puts every statement in a separate class) are
3592         made visible in this way.
3593
3594         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3595         triggered an error due to the end of file being reached.   This is
3596         used to do multi-line input, and notify the caller that the user
3597         needs to provide more text before a successful parse.
3598
3599         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3600         to drive the evaluation with a custom wrapper. 
3601
3602         * driver.cs: Add support for --shell, and refactor some code to be
3603         reused from repl.cs
3604         
3605         * namespace.cs: Add support for serializing the contents of the
3606         namespaces and reloading them.  
3607
3608         * getline.cs: A managed implementation of ReadLine under
3609         X11/Apache2 license terms.  Easy to embed in other applications as
3610         well.
3611
3612         * namespace.cs: Add some functions to save and restore the
3613         namespace state.
3614
3615         * rootcontext.cs: New public field.
3616
3617         * cs-tokenizer.cs: Add support for one of the possible characters
3618         we introduce into the token stream.  
3619
3620         This patch does not affect the regular tokenization process, the
3621         only performance hit would happen if there is an invalid character
3622         on the input string.
3623
3624         * support.cs: Move isatty helper routine here.
3625
3626         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3627         code generator for in-memory assemblies.
3628
3629 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3630
3631         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3632         parameter cannot be always used as a type.
3633
3634 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3635
3636         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3637
3638 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3639
3640         * convert.cs: Implement explicit array to IList<T> conversion.
3641
3642 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3643
3644         A fix for bug #362740
3645         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3646
3647 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3648         
3649         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3650         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3651         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3652         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3653         handling to use just one type of infrastructure and deal with generics
3654         more effectivelly.
3655
3656 2008-07-23  Martin Baulig  <martin@ximian.com>
3657
3658         *** Merged this from trunk revision 108527 ***
3659
3660         * statement.cs
3661         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3662         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3663         scope variable.
3664
3665 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3666         
3667         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3668         error checks.
3669
3670 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3671         
3672         * delegate.cs: Fixed compiler crash when creating delegate using partial
3673         method.
3674         
3675         * typemanager.cs: MulticastDelegate is not a delegate.
3676
3677 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3678         
3679         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3680         checks.
3681
3682 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3683
3684         * cs-parser.jay (type): Allow 'var' in mcs too.
3685         (local_variable_type): Likewise.
3686
3687 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3688         
3689         * driver.cs: Removed broken -noconfig variants.
3690
3691 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3692         
3693         A fix for bug #417078
3694         * expression.cs: Emit correctly left side pointer operators.
3695
3696 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3697
3698         * generic.cs, lambda.cs: Inflate method generic arguments only.
3699
3700 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3701
3702         * class.cs: Fixed struct layout check regression.
3703
3704 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3705
3706         * cs-parser.jay, enum.cs: Simplified enum parsing.
3707         
3708         * decl.cs: Check all type parameters conflicts.
3709         
3710         * expression.cs, statement.cs, attribute.cs: More expression checks.
3711
3712 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3713
3714         * generic.cs: Add type inference types restriction.
3715         
3716         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3717         anonymous.cs, expression.cs: Allocate less accessor parameters.
3718
3719 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3720
3721         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3722         classes.
3723
3724 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3725
3726         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3727
3728 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3729
3730         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3731         Also fixes #362146 and #381592.
3732
3733 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3734
3735         * ecore.cs: Reduced constant cannot be used as an attribute value.
3736         
3737         * cs-parser.jay: Base expression has to be a type.
3738         
3739         * expression.cs (Conditional): Uses ReducedExpression.
3740
3741 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3742
3743         A fix for bug #376826
3744         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3745         address of hoisted local variable or parameter cannot be taken.
3746
3747 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3748
3749         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3750         anonymous method inside checked/unchecked expression.
3751
3752 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3753
3754         * typemanager.cs (IsEqual): Guard against null.
3755         
3756         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3757         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3758         routine. Fixed few misleading conversion errors.
3759
3760 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3761
3762         * class.cs: Consider generics when checking cycles in struct layout.
3763
3764 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3765
3766         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3767
3768 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3769
3770         A fix for bug #414165
3771         * anonymous.cs: Use same anonymous implementation method for all anonymous
3772         method emits.
3773
3774 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3775
3776         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3777         constraints.
3778
3779 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3780
3781         * cs-parser.jay: Typeof argument has to be a type expression.
3782         
3783         * namespace.cs: Check alias and namespace definitions collisions.
3784         
3785         * class.cs, pending.cs: Moved explicit interface accessor implementation
3786         check.
3787         
3788         * delegate.cs, expression.cs: Verify special name invocations.
3789         
3790 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3791
3792         * cs-parser.jay: Don't choke on empty generic type arguments.
3793         
3794         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3795         
3796         * expression.cs, ecore.cs: Minor expressions bugs.
3797
3798 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3799
3800         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
3801         and added more error handling.
3802         
3803         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
3804         
3805         *  modifiers.cs, enum.cs: Fixed.
3806
3807 2008-07-31  Jb Evain  <jbevain@novell.com>
3808
3809         * driver.cs: remove -pkg ability of smcs.
3810
3811 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3812
3813         * statement.cs (Switch): Correctly set empty default target for single
3814         blocks.
3815
3816 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3817
3818         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
3819         string switch statement implementation to use string dictionary which
3820         significantly (2-8x) improves performance of generated code.
3821
3822 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3823
3824         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
3825         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
3826         
3827 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3828
3829         A fix for bug #412595
3830         * typemanager.cs, convert.cs, expression.cs: Some types are never
3831         convertible to each other.
3832
3833 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3834
3835         * nullable.cs (CreateNullConstant): An error messages update.
3836
3837 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3838
3839         A fix for bug #412595
3840         * cfold.cs: Don't cast undefined bool constant.
3841
3842 2008-07-29  Martin Baulig  <martin@ximian.com>
3843
3844         * symbolwriter.cs
3845         (SymbolWriter.Reset): New public static method.
3846
3847         * driver.cs
3848         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
3849
3850 2008-07-28  Marek Safar  <marek.safar@gmail.com>
3851
3852         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
3853         
3854         * expression.cs (ElementAccess): Exact size allocation.
3855
3856 2008-07-26  Marek Safar  <marek.safar@gmail.com>
3857
3858         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
3859
3860 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3861
3862         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
3863         
3864         * class.cs: Removed $PRIVATE$ field hack which caused problems during
3865         flow analysis.
3866
3867 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3868
3869         A fix for bug #412217
3870         * assign.cs: Mutate also assignment type.
3871
3872 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3873
3874         A fix for bug #323644
3875         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
3876         indexers.
3877
3878 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3879
3880         A fix for bug #412134
3881         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
3882         non-enumerable operands when overloading equality or bitwise operators.
3883
3884 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3885
3886         * anonymous.cs: Cache closed generic anonymous method delegates.
3887
3888 2008-07-24  Marek Safar  <marek.safar@gmail.com>
3889
3890         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
3891         anonymous.cs, statement.cs: Always emit anonymous method as static method
3892         when is instance free. Use nesting for nested anynomous methods blocks.
3893         
3894 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3895
3896         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
3897         types.
3898
3899 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3900
3901         * expression.cs: Removed MakeSimpleCall.
3902
3903 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3904
3905         A fix for bug #323012
3906         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
3907         Base method implementing interface has to be public.
3908
3909 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3910
3911         * cs-parser.jay: Don't break on missing argument.
3912
3913 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3914
3915         A fix for bug #320993
3916         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
3917           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
3918
3919 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3920
3921         A fix for bug #320748
3922         * convert.cs: Implicit user operators cannot convert to interfaces
3923
3924 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3925
3926         A fix for bug #312686
3927         * driver.cs: Ignore empty assembly references.
3928
3929 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3930
3931         A fix for bug #387040
3932         * ecore.cs: Skip constrains check for an explicit implementation.
3933
3934 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3935
3936         A fix for bug #409045
3937         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
3938           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
3939           identifiers are file specific unless passed as input arguments.
3940
3941 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3942
3943          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
3944          to emit UnmanagedMarshal data under 2.0 profile.
3945
3946 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3947
3948         A fix for bug #410369
3949         * parameter.cs: Clone correctly ParamsParameter.
3950
3951 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3952
3953         * expression.cs (Argument): Always report type for type based expressions
3954         errors.
3955
3956 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3957
3958         A fix for bug #410666
3959         * anonymous.cs: Correctly initialize generic storey reference.
3960
3961 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3962
3963         * convert.cs: Don't box same type arguments.
3964
3965 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3966
3967         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
3968         Finished missing generic type mutators.
3969
3970 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3971
3972         * iterators.cs, statement.cs: Finished statements CloneTo.
3973
3974 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3975
3976         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
3977         
3978         * expression.cs: Emit optimized default value expressions in expression tree
3979         array initializer.
3980
3981 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3982
3983         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
3984
3985 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3986
3987         A fix for bug #367536
3988         * cs-parser.jay: Check static constructor of generic types for an access
3989         modifier.
3990
3991 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3992
3993         A fix for bug #353800
3994         * lambda.cs: Emit ret for contextual statements.
3995         
3996         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
3997         up emitting redundant ret for all anonymous methods with return.
3998
3999 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4000
4001         A fix for bug #365188
4002         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
4003         create anonymous method storey in unreachable block.
4004
4005 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4006
4007         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
4008         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
4009         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
4010         statement.cs: Fixed relevant defects found by Gendarme.
4011
4012 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4013
4014         A fix for bug #325291
4015         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
4016         statement.cs: Replaced IAnonymousHost with top level block flag.
4017
4018 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4019
4020         * cs-parser.jay: Clean up unused open_parens.
4021
4022 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4023
4024         * ecore.cs: Custom error message for a range variable assignment.
4025
4026 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4027
4028         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
4029         load.
4030
4031 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4032
4033         * literal.cs: Null literal is of object type.
4034
4035 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4036
4037         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
4038         expression of nullable equality comparison.
4039
4040 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4041
4042         * expression.cs(PointerArithmetic): Removed redundant assignment.
4043
4044 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4045
4046         * decl.cs (GetSignatureForError): Report full namespace name for containers.
4047
4048 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4049
4050         A fix for bug #408361
4051         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
4052         they are replaced by GetMethod.
4053
4054 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4055
4056         A fix for bug #408721 by jeremie.laval@gmail.com
4057         * expression.cs (Indirection): Implemented CloneTo.
4058
4059 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4060
4061         * statement.cs (AssignableSlots): Temporary disabled variable initialization
4062         assert check.
4063
4064 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4065
4066         * report.cs (EnableReporting): Don't reinitialize 0-based values.
4067
4068 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4069
4070         * linq.cs: Reset tranparent parameter counter in probing mode.
4071
4072 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4073
4074         * anonymous.cs: Mutate anonymous method type.
4075
4076 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4077
4078         * ecore.cs, anonymous.cs: Mutate field expressions.
4079
4080 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4081
4082         A fix for bug #369670
4083         * linq.cs, statement.cs: Use explicit block for query expressions variables.
4084
4085 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4086
4087         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
4088
4089 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
4090
4091         Fix bug #314902
4092         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
4093         only one '>', and finds a '>>', abort the generic lookahead.
4094
4095 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4096
4097         A fix for bug #319902
4098         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
4099
4100 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4101
4102         A fix for bug #406371
4103         * statement.cs: Moved EmitSymbolInfo to Block.
4104
4105 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4106
4107         * ecore.cs: Report better error for extension method overload failures.
4108
4109 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4110
4111         * expression.cs (Is): No need to box reference values.
4112
4113 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4114
4115         * class.cs: Use event resolve context when initializing CreateEmitContext.
4116
4117 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4118
4119         A fix for bug #394436
4120         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
4121         method used inside expression trees. Added more LINQ to expression tree
4122         conversions.
4123
4124 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4125
4126         A fix for bug #378189, #370577
4127         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
4128         from expression.
4129
4130 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4131
4132         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
4133         hierarchically.
4134
4135 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4136
4137         A fix for bug #406702
4138         * anonymous.cs: Always park anonymous method in the nearest parent storey.
4139
4140 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4141
4142         A fix for bug #406648
4143         * cs-parser.jay: Report nullable use in mcs for some cases.
4144
4145 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4146
4147         * ecore.cs: Improved argument mismatch error messages.
4148
4149 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4150
4151         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
4152
4153 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4154
4155         * expression.cs (TypeOf): Mutate type argument.
4156
4157 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4158
4159         * class.cs: Report missing partial modifier for correct type.
4160
4161 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4162
4163         * ecore.cs, expression.cs (VariableReference): Variable property is 
4164         protected.
4165
4166 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4167
4168         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
4169         
4170 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4171
4172         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
4173         method delegates.
4174
4175 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4176
4177         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
4178         anonymous method storey to an instance method when only "this" is hoisted.
4179
4180 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4181
4182         A fix for bug #321615
4183         * expression.cs: Pointer comparisons use unsigned operator.
4184
4185 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4186
4187         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
4188
4189 2008-07-02  Marek Safar  <marek.safar@gmail.com>
4190
4191         A fix for bug #404905
4192         * class.cs: Always initialize local unsafe variables.
4193
4194 2008-06-30  Marek Safar  <marek.safar@gmail.com>
4195
4196         A fix for bug #396987
4197         * expression.cs (NewInitialize): Clear local temporary variable for next run
4198
4199 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4200
4201         A fix for bug #401020
4202         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4203
4204 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4205
4206         A fix for bug #398319
4207         * cs-parser.jay: Implemented undocumented base access expression inside
4208         anonymous types.
4209
4210 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4211
4212         A fix for bug #404227
4213         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4214
4215 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4216
4217         A fix for bug #404227
4218         * convert.cs: Fixed explicit array to interface cast.
4219
4220 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4221
4222         A fix for bug #403894
4223         * delegate.cs: Mutate DelegateInvocation type.
4224
4225 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4226
4227         A fix for bug #379348
4228         * delegate.cs: Box a load of generic parameters.
4229
4230 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4231
4232         * expression.cs: Add an array creation arguments mutate.
4233
4234 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4235
4236         A fix for bug #386068
4237         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4238         parameter.
4239
4240 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4241
4242         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4243         CloneTo.
4244
4245 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4246
4247         A fix for bug #403518
4248         * delegate.cs: Type correctly anonymous method new invocation.
4249
4250 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4251
4252         A fix for bug #394826
4253         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4254         calls.
4255
4256 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4257
4258         A fix for bug #394826
4259         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4260         needed.
4261
4262 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4263
4264         * class.cs: Clone indexer parameters for localized capturing.
4265
4266 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4267
4268         A fix for bug #402379
4269         * expression.cs: Don't crash when an object initializer resolve fails.
4270
4271 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4272
4273         A fix for bug #402888
4274         * expression.cs: Mutate conditional expression.
4275
4276 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4277
4278         A fix for bug #401012
4279         * class.cs: Keep StructLayout in shared container.
4280
4281 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4282
4283         A fix for bug #400438
4284         * decl.cs, class.cs: Only properties can be automatically implemented.
4285
4286 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4287
4288         * statement.cs (ChangeToIterator): Copy also labels.
4289
4290 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4291
4292         * ecore.cs: Pass type argument details to parent extension method.
4293
4294 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4295
4296         A fix for bug #375966
4297         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4298
4299 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4300
4301         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4302
4303 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4304
4305         A fix for bug #394347
4306         * anonymous.cs: Cache compatible delegates as compatibility check produces
4307         a new method every time.
4308
4309 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4310
4311         * anonymous.cs: Propagate storey reference for single references.
4312
4313 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4314
4315         A fix for bug #387615
4316         * assign.cs, expression.cs: Correctly clone compound assignment.
4317
4318 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4319
4320         A fix for bug #359611, #359604
4321         * anonymous.cs: Mutate all types of hoisted parameters.
4322
4323 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4324
4325         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4326         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4327         expression.cs, codegen.cs, statement.cs
4328         
4329         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4330         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4331         
4332         ** Anonymous methods, lambda expressions rewrite **
4333         
4334         Anonymous expressions are now resolved when an explicit block is resolved 
4335         and they don't require any registration procedure anymore. Further,
4336         anonymous methods are defined when explicit block is emitted which allows
4337         better control of whole process and opens possibilities for more
4338         optimizations as well as alternative to reverse whole process.
4339         
4340         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4341         process consistent and to correctly emit hoisted generic methods when they
4342         have at least 1 hoisted variable.
4343         
4344 2008-06-17  Martin Baulig  <martin@ximian.com>
4345
4346         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4347         iterator method.
4348         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4349         virtual property; check it in Emit().
4350         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4351         an iterator.
4352         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4353         an iterator.
4354         (Indexer.Define): Likewise.
4355
4356 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4357
4358         * convert.cs: Don't use IsInterface on type arguments.
4359         
4360         * delegate.cs: DelegateInvocation uses MethodInfo.
4361         
4362         * parameter.cs: Removed IsTypeParameter.
4363         
4364         * generic-mcs.cs: More missing stuff.
4365
4366 2008-06-16  Martin Baulig  <martin@ximian.com>
4367
4368         * modifiers.cs
4369         (Modifiers.DEBUGGER_HIDDEN): New public const.
4370
4371         * typemanager.cs
4372         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4373
4374         * class.cs
4375         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4376         (AbstractPropertyEventMethod): Likewise.
4377         (Constructor.Emit): Likewise.
4378         (SourceMethod.SetCompilerGenerated): Removed.
4379
4380         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4381         on MoveNext().
4382
4383         * anonymous.cs
4384         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4385         if we're an `IteratorHost'.
4386         (AnonymousMethodMethod..ctor): Don't set
4387         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4388         not on the method.
4389
4390 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4391
4392         * statement.cs: Clean-up foreach statements.
4393
4394 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4395
4396         * class.cs: Stop using public method which should not exist
4397         (MethodBuilder.SetGenericMethodSignature).
4398
4399 2008-06-11  Martin Baulig  <martin@ximian.com>
4400
4401         * location.cs
4402         (Location.LookupFile): Add `CompilationUnit' argument; when given
4403         a relative file name, make it relative to the directory the .cs
4404         file is located in instead of using the current directory.
4405
4406 2008-06-11  Martin Baulig  <martin@ximian.com>
4407
4408         * class.cs
4409         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4410         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4411         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4412         (SourceMethod.SetCompilerGenerated): Likewise.
4413
4414 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4415
4416         * codegen.cs, driver: Only write symbol file when it's asked for.
4417
4418 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4419
4420         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4421
4422 2008-06-10  Martin Baulig  <martin@ximian.com>
4423
4424         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4425
4426 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4427
4428         A fix for bug #316290
4429         * expression.cs: Include decimal operators in predefined table.
4430         
4431         * parameters.cs: More readonlyness.
4432
4433 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4434
4435         A fix for bug #397213
4436         * cs-parser.jay: One more missing current_local_parameters reset.
4437
4438 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4439
4440         A fix for bug #396633
4441         * class.cs: Host backing field in partial container.
4442
4443 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4444
4445         A fix for bug #397068
4446         * expression.cs: Check both operand types when predefined operator is used.
4447
4448 2008-06-05  Martin Baulig  <martin@ximian.com>
4449
4450         Merged the `debugger-kahalo' branch.
4451
4452         * class.cs
4453         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4454         we're an iterator method.
4455         (SourceMethod): Reflect latest symbol writer changes;
4456         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4457         now `start_row' and `end_row'.
4458         (Constructor.Emit): Fix the logic whether to emit symbol information.
4459
4460         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4461         generated methods.
4462
4463         * location.cs
4464         (CompilationUnit): New public class; derives from `SourceFile'.
4465         (SourceFileEntry.DefineSymbolInfo): New public method.
4466         (SourceFileEntry.SetChecksum): New public method.
4467         (Location): Encode hidden line numbers by using `column == 255';
4468         the .ctor now accepts `column == -1' to mark a hidden line number.
4469         (Location.Hidden): New public property.
4470         (Location.CheckPoint): Add `CompilationUnit'.
4471         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4472         (Location.Push): Add `CompilationUnit compile_unit' argument.
4473         (Location.CompilationUnit): New public property.
4474
4475         * statement.cs
4476         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4477
4478         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4479
4480         * driver.cs: `SourceFile' -> `CompilationUnit'.
4481
4482         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4483
4484         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4485
4486         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4487         `#line hidden'.
4488
4489         * symbolwriter.cs
4490         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4491         new symbol writer API to also pass the file.
4492
4493 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4494
4495         * statement.cs: Emit catch variable assignment using variable expression.
4496         
4497 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4498
4499         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4500         with other variable types.
4501
4502 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4503
4504         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4505         GetLength method emit, it breaks resolve rules.
4506         
4507 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4508             Marek Safar  <marek.safar@gmail.com>
4509                         
4510         A fix for bug #395542
4511         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4512         declaration.
4513         
4514 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4515
4516         A fix for bug #395287
4517         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4518
4519 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4520
4521         A fix for bug #395845
4522         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4523         non-nullable parameter type.
4524         
4525 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4526
4527         * class.cs: Handle contructor initializer as a statement in top-level block.
4528
4529 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4530
4531         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4532         security attributes.
4533
4534 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4535
4536         * ecore.cs, expression.cs: Small IVariable refactoring.
4537
4538 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4539
4540         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4541
4542 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4543
4544         * cs-parser.jay: Removed redundant catch type check.
4545
4546 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4547
4548         A fix for bug #390372
4549         * nullable.cs: Set correct return type.
4550
4551 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4552
4553         A fix for bug #391062
4554         * typemanager.cs: Fixed crash when comparing null types.
4555
4556 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4557
4558         A fix for bug #391871
4559         * cs-parser.jay: Better error handling for invalid catch type.
4560
4561 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4562
4563         A fix for bug #392155
4564         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4565
4566 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4567
4568         A fix for bug #390666
4569         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4570         expressions.
4571
4572 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4573
4574         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4575         in getter.
4576
4577 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4578
4579         A fix for bug #389625
4580         * delegate.cs, generic.cs: Some progress on method group return type
4581         inference.
4582
4583 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4584
4585         A fix for bug #378419
4586         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4587
4588 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4589
4590         * class.cs (Constructor): Added IsCompilerGenerated.
4591
4592 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4593
4594         * expression.cs: Enum binary operators can accept non-enum operand only when
4595         is implicitly convertible to underlying type.
4596
4597 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4598
4599         A fix for bug #389272
4600         * support.cs: Workaround System.InvalidOperationException for enums.
4601
4602 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4603
4604         A fix for bug #389073
4605         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4606
4607 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4608
4609         * driver.cs: Split Parse.
4610         
4611         * location.cs (LookupFile): Uses string.Empty.
4612
4613 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4614
4615         * expression.cs, parameter.cs: Small ParameterReference clean up.
4616
4617 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4618
4619         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4620         hack. Fixes #387502.
4621
4622 2008-05-06  Martin Baulig  <martin@ximian.com>
4623
4624         * class.cs (Constructor.Emit): Fix the logic whether to emit
4625         symbol information.
4626
4627 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4628
4629         Fix #385503
4630         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4631         InvalidOperationException when the iterator is before the start or
4632         after the end.
4633
4634 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4635
4636         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4637         when left is nullable type.
4638
4639 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4640
4641         A fix for bug #386628
4642         * expression.cs (LocalVariableReference): Continue in resolving when
4643         variable is not assigned.
4644
4645 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4646
4647         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4648         nullable operations.
4649
4650 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4651
4652         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4653         it saves many redundant temporary variables for nullable operations.
4654
4655 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4656
4657         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4658         
4659         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4660         method.
4661         
4662         * nullable.cs: Constant coalescing operator optimizations.
4663
4664 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4665
4666         * constant.cs: Use unsigned conversion for values which are unsigned only.
4667
4668 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4669
4670         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4671         coalescing operator as it should be.
4672
4673 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4674
4675         A fix for bug #371016
4676         * expression.cs: All predefined delegate operators require implicit method
4677         group conversion.
4678         
4679 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4680
4681         * constant.cs: Emit long constant as uint when fits the range.
4682         
4683         * convert.cs, expression.cs: Fixed few unsafe conversions.
4684
4685 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4686
4687         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4688
4689 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4690
4691         Fix #385758
4692         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4693         'expr'.
4694         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4695
4696 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4697
4698         * constant.cs, literal.cs: IsLiteral property for error reporting.
4699         
4700         * ecore.cs, expression.cs: Implemented Property expression.
4701
4702 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4703
4704         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4705         
4706         * nullable.cs: Implemented nullable coalescing null operator.
4707
4708         * ecore.cs, expression.cs: Expression trees work.
4709
4710 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4711
4712         * ecore.cs: CreateExpressionTree is finally abstract.
4713
4714         * expression.cs, linq.cs: Updated.
4715
4716 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4717
4718         * expression.cs, ecore.cs: Block base access expression inside expression
4719         tree.
4720
4721 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4722
4723         A fix for bug #385058
4724         * expression.cs: User-defined operator implementations always take
4725         precedence over predefined operator implementations.
4726
4727 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4728
4729         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4730         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4731         expression tree conversions.
4732         
4733 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4734
4735         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4736         operators method details to Operator class.
4737
4738 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4739
4740         * anonymous.cs: Pass unsafe flags to anonymous container.
4741         
4742         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4743         inside expression tree.
4744
4745 2008-04-29  Martin Baulig  <martin@ximian.com>
4746
4747         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4748         (Tokenizer.PopPosition): Also restore the `line'.
4749
4750 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4751
4752         * delegate.cs: Implemented Invoke expression.
4753
4754 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4755
4756         * expression.cs: Fixed equality reference comparison regression.
4757
4758 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4759
4760         * ecore.cs: Clean up EmptyCast hack.
4761         
4762         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4763         using correct conversion rules. Also fixes #383993.
4764
4765 2008-04-28  Martin Baulig  <martin@ximian.com>
4766
4767         * class.cs (Constructor.Emit): Don't emit debugging information
4768         for generated default .ctor's.
4769
4770 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4771
4772         * convert.cs: Empty-cast ushort to int conversion.
4773
4774 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4775
4776         A fix for bug #384191
4777         * ecore.cs, expression.cs: Fixed expression cloning.
4778
4779 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4780
4781         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4782
4783 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4784
4785         Fix #381559, test-638.cs, test-639.cs
4786         * assign.cs (CompoundAssign.Helper): New wrapper.
4787         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4788         access.
4789         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4790         Pass unconverted expressions to the params array creation expression.
4791         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4792         (PropertyExpr.EmitAssign): Likewise.
4793         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4794         element if it is of kind CompoundAssign.Helper.
4795         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
4796         first before anything else.
4797         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
4798         (ArrayAccess.LoadArrayAndArguments): Simplify.
4799
4800 2008-04-27  Marek Safar  <marek.safar@gmail.com>
4801
4802         * expression.cs: Fixed cloning of typeof(void).
4803
4804 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
4805
4806         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
4807         (Assign.Emit): Likewise.  Move it to ...
4808         (CompoundAssign.DoResolve): ... here and ...
4809         (CompoundAssign.Emit): ... here.
4810         (EventAddOrRemove): New helper to handle += and -= on events, and
4811         avoid the use of BinaryDelegates.
4812         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
4813         (EventExpr.EmitAddOrRemove): Improve.
4814         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
4815
4816         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
4817         create VarExprs for 'foo.bar.var'.
4818         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
4819         is a highly inappropriate name for its functionality.
4820
4821 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4822
4823         Simplify handling of multiple assignments
4824         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
4825         inheritable-only.
4826         (SimpleAssign): New.  Class to be used for normal assignments.
4827         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
4828         * expression.cs, parameter.cs, statement.cs: Likewise.
4829
4830 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4831
4832         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
4833         for incompatible underlying types, more to come, uff.
4834
4835 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4836
4837         Fix gtest-388.cs
4838         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
4839         Handle 'leave_copy'.
4840
4841 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4842
4843         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
4844
4845 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
4846
4847         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
4848         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
4849         * statement.cs (While, Do, For): Allow test to have side effects.
4850         (For.DoEmit): Always emit InitStatement.
4851
4852         Fix test-635.cs
4853         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
4854         Always create SideEffectConstant.
4855         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
4856         of type EnumConstant.
4857
4858         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4859         Handle 'right' being SideEffectConstant of type 'bool'.
4860
4861         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4862         Use left.EmitBranchable instead of open coding it, so as to
4863         improve optimization opportunities.
4864
4865         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
4866
4867         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
4868         assumptions.
4869         (Expression.EmitSideEffect): Document.
4870
4871 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4872
4873         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
4874
4875 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4876
4877         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
4878
4879 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4880
4881         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
4882         conversion to expression tree.
4883
4884 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4885
4886         * ecore.cs: Removed unused expression.
4887
4888 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4889
4890         * expression.cs: Implemented NegateChecked and New expressions.
4891
4892 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4893
4894         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
4895
4896 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
4897
4898         Fix #351102
4899         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
4900         needing final 'ret' instruction.
4901
4902 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4903
4904         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
4905
4906 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4907
4908         * expression.cs: Emit ldnull and not null expression as an instance argument
4909          of static method expression calls.
4910
4911 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4912
4913         A fix for bug #378200
4914         * expression.cs: Fixed crash when creating parameterless expression tree
4915         method call.
4916
4917 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4918
4919         A fix for bug #375297
4920         * anonymous.cs: Fixed crash when inferring from null argument anonymous
4921         method.
4922
4923 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4924
4925         A fix for bug #377596
4926         * decl.cs, class.cs: Emit delegate type argument attributes.
4927
4928 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4929
4930         A fix for bug #365314
4931         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
4932         
4933 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4934
4935         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
4936         only.
4937
4938 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4939
4940         * generic.cs (TypeParameter): Removed redundant location.
4941
4942 2008-04-19  Marek Safar  <marek.safar@gmail.com>
4943
4944         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
4945         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
4946         FullNamedExpression in all declaration type expression, statements will come
4947         later.
4948
4949 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4950
4951         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
4952         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
4953
4954 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4955
4956         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
4957         code.
4958
4959 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4960
4961         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
4962         constraints.
4963
4964 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4965
4966         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
4967         name expressions.
4968         Also fixes #340463.
4969
4970 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
4971
4972         Hook up 'EmitSideEffect'
4973         * constant.cs (Constant.EmitSideEffect): New.
4974         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
4975         (SideEffectConstant.EmitSideEffect): New.
4976         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
4977         unconditional branch in EmitBranchable.
4978         (FieldExpr.EmitBranchable): New.
4979         * expression.cs (Unary.EmitSideEffect): New.
4980         (Binary.EmitSideEffect): New.
4981         (VariableReference.EmitSideEffect): New.  Do nothing.
4982
4983 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4984
4985         Introduce 'EmitSideEffect'
4986         * ecore.cs (Expression.EmitSideEffect): New.
4987         (TypeCast): Rename from EmptyCast.
4988         (EmptyCast): New.
4989         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
4990         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
4991         * convert.cs, nullable.cs: Update to changes.
4992
4993 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4994
4995         * class.cs, cs-parser.jay: Early check for base types expression.
4996
4997 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4998
4999         * decl.cs (MemberName): Declare PrettyName as obsolete.
5000
5001 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5002
5003         * namespace.cs: Use MemberName comparison.
5004
5005 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
5006
5007         Fix build break
5008         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
5009         FullName.
5010         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
5011         (MemberName.FullyQualifiedName): New.  Provides the functionality
5012         that users assume FullName would have.
5013         * ecore.cs, namespace.cs: Update to changes.
5014
5015         * statement.cs (Using.assign): Make into ExpressionStatement.
5016         (Using.EmitPreTryBody): Simplify.
5017
5018 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5019
5020         * report.cs: ColorFormat is protected.
5021         
5022         * rootcontext.cs: Unused fields clean-up.
5023         
5024         * namespace.cs: Made UsingEntry name private.
5025
5026 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5027
5028         * cs-tokenizer.cs, location.cs: Removed unused field.
5029
5030 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
5031             Raja R Harinath  <harinath@hurrynot.org>
5032
5033         Fix #379822
5034         * constant.cs (SideEffectConstant.value): Rename from 'left'.
5035         (SideEffectConstant.side_effect): Rename from 'right'.
5036         (SideEffectConstant..ctor): Normalize 'side_effect'.
5037         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
5038         value of this constant.
5039         * cfold.cs: Update to changes.
5040
5041 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5042
5043         * cs-paser.jay: Removed unused variable.
5044         
5045         * driver.cs: Made Compile instance method.
5046
5047 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
5048
5049         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
5050
5051 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5052
5053         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
5054
5055 2008-04-13  Jb Evain  <jbevain@novell.com>
5056
5057         * namespace.cs: update the System.Core fullname for 2.1
5058         * driver.cs: update the list of required assemblies for 2.1.
5059         Merged from the Moonlight 2 branch.
5060
5061 2008-04-11  Marek Safar  <marek.safar@gmail.com>
5062
5063         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
5064         types and user defined operators. User operators arguments has to be checked
5065         for null value before invocation, which also means no operator is called
5066         when any argument is not convertible to unwrapped nullable type.
5067         
5068 2008-04-09  Marek Safar  <marek.safar@gmail.com>
5069
5070         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
5071         of Unary expressions to follow operator overloading rules precisely.
5072         Also fixes #321794, #323794
5073         
5074 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5075
5076         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
5077         expression.
5078         
5079 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5080
5081         * expression.cs, ecore.cs: Implemented MemberInit expression.
5082         
5083 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
5084
5085         Fix mono/tests/exception4.cs
5086         * statement.cs (ExceptionStatement, TryCatch): Revert to using
5087         ec.NeedReturnLabel () rather emitting a 'nop'.
5088
5089         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
5090         simple heuristic.
5091         (TryCatch.SomeCodeFollows): Likewise.
5092         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
5093         for 'break', 'continue' and 'return' statements inside a try.
5094         We're fairly sure that the generated IL stream will have more
5095         instructions textually following the try.
5096         (FlowBranchingTryCatch): Likewise.
5097
5098         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
5099         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
5100         overrides.
5101
5102         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
5103         wrapper -- forward everything to CollectionForeach.
5104         (CollectionForeach.NonDisposableWrapper): New.
5105         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
5106         instead of a pop + branch to end.
5107
5108 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5109
5110         A fix for bug #377485
5111         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
5112         Propagate location for extension method groups. Report conversion failure at
5113         right place.
5114
5115 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5116
5117         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
5118         ListInit and Field expressions.
5119
5120 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
5121
5122         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
5123         Since $PC is always -1 inside the body of MoveNext, the fault
5124         handler is a no-op.
5125         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
5126         * statement.cs (ExceptionStatement.emit_finally): Likewise.
5127         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
5128
5129         The denouement!  Fix #324708
5130         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
5131         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
5132         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
5133         'finally' inside the finally clause.
5134
5135         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
5136         inside an iterator.  Don't emit the body of the 'finally' inside
5137         the finally clause yet.
5138
5139         Use the ResumableStatement infrastructure for MoveNext ()
5140         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
5141         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
5142         'old_resume_points'.  Move dispatcher upfront.
5143         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
5144         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
5145         in an enumerator.  This encodes the main fix in this patch series
5146         -- we can only jump into the first instruction of a try from the
5147         outside, but we want to emit try/finally regions in iterators and
5148         resume in the middle of them.
5149
5150 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
5151
5152         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
5153         of NeedReturnLabel here.
5154
5155         Introduce a common point for emitting try/finally to IL
5156         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
5157         features of the various subclasses, which are now driven by ...
5158         (ExceptionStatement.EmitPreTryBody): ... this and ...
5159         (ExceptionStatement.EmitTryBody): ... this and the original
5160         EmitFinallyBody.
5161         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
5162         Remove DoEmit and update to follow above protocol.
5163
5164         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
5165         of the dispatcher are the same, skip emitting the 'switch'.
5166         * iterator.cs (Iterator.EmitDispose): Update to changes.
5167
5168         Clean up handling of 'using' statement
5169         * statement.cs (UsingTemporary): New.  Carved out of ...
5170         (Using): ... this.  Simplify drastically.  Handle exactly
5171         one variable.
5172         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
5173         or Using as appropriate.  If there are multiple variable declared,
5174         create nested Using statements.
5175         (resource_acquisition): Kill.
5176
5177         * statement.cs (ExceptionStatement.EmitForDispose): Use
5178         EmitFinallyBody, not EmitFinally.
5179
5180         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
5181         * iterator.cs: Update to changes.
5182
5183         Start using the ResumableStatement infrastructure
5184         * statement.cs (ResumeableStatement.PrepareForDispose): New.
5185         (ResumableStatement.EmitForDispose): New.
5186         (ExceptionStatement): Override them.
5187         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
5188         EmitForDispose to create the body of the Dispose method.  Don't
5189         use OldResumePoint.
5190
5191         * iterator.cs (Iterator.AddResumePoint): Move here from ...
5192         * statement.cs (Toplevel.AddResumePoint): ... here.
5193         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
5194         * flowanalysis.cs (FlowBranchingIterator): New.
5195         * codegen.cs (EmitContext): Update to changes.
5196
5197         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
5198         (Iterator.old_resume_points): Rename from 'resume_points'.
5199         (Iterator.MoveNextStatement): Remove unused class.
5200
5201         New infrastructure for try/finally in iterators (still unused)
5202         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5203         (FlowBranchingToplevel.AddResumePoint): Hook into
5204         ToplevelBlock.AddResumePoint.
5205         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5206         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5207         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5208         resume points and assign program-counter values.
5209         (ExceptionBlock.AddResumePoint): Collect resume points for
5210         de-muxer at the top of try block.
5211         * iterators.cs (Yield.CheckContext): Simplify.
5212         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5213
5214 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5215
5216         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5217         argument to an ExitStatement.
5218         (FlowBranchingException): Refactor saved origins code.
5219         * statement.cs (ExitStatement): Update to cahges.
5220         * iterator.cs (YieldBreak): Likewise.
5221
5222         * statement.cs (ResumableStatement): New.  Common base class for
5223         YieldReturn and ExceptionStatement.
5224         (ExitStatement): New.  Common base class for Return and YieldBreak.
5225         (Return): Update to changes.
5226         * iterator.cs (YieldBreak): Likewise.
5227         * lambda.cs (ContextualReturn): Likewise.
5228
5229         Fix #377028
5230         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5231         emit a meaningful error message.
5232
5233         Fix #324765, #319508
5234         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5235         (VariableInfo.SetAssigned): Set it.
5236         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5237         determine if CS0219 or CS0168 is appropriate.  Don't use
5238         flow-analysis information.
5239         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5240         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5241         (EmitContext.EndFlowBranching): ... this.
5242
5243 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5244
5245         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5246
5247 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5248
5249         A fix for bug #376508
5250         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5251         ImplicitConversionExists.
5252
5253 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5254
5255         * expression.cs (Binary): Added remaining binary operators to expression
5256         tree builder.
5257
5258         * nullable.cs: Optimize shift with null argument.
5259
5260 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5261
5262         Fix minor IL regression
5263         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5264         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5265         * cs-parser.jay (try_statement): Update to changes.
5266
5267         * statement.cs (TryFinally.need_exc_block): Delete.
5268         (TryFinally): Update to changes.
5269
5270         Now all ExceptionStatements are unconditional
5271         * statement.cs (CollectionForeach.DisposableWrapper): New.
5272         Extract out the try/finally code into a new wrapper.
5273         (CollectionForeach.Resolve): Use it to simplify the code.
5274
5275 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5276
5277         Start at simplifying ExceptionStatement semantics a bit
5278         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5279         * cs-parser.jay (try_statement): Update to changes.
5280         (opt_catch_clauses): Remove.
5281         * flowanalysis.cs: Update to changes.
5282         (FlowBranching.BranchingType.TryCatch): New.
5283         (FlowBranchingTryCatch): New.
5284
5285         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5286         (FlowBranching.CreateBranching): Update to changes.
5287         (FlowBranchingBlock.AddSibling): Add sanity check.
5288         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5289         Update to changes.
5290
5291         * iterators.cs (Iterator.MarkFinally): Remove.
5292         * statement.cs (ExceptionStatement): Update to changes.
5293
5294         Add support for skipping over finally blocks at runtime.  First
5295         in a series to fix #324708
5296         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5297         (Iterator.EmitMoveNext): Initialize it.
5298         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5299         branch over the body of the 'finally' clause.
5300
5301 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5302
5303         Avoid lopsided use of Foo/DoFoo names
5304         * statement.cs (ExpressionStatement.EmitFinallyBody):
5305         Rename from EmitFinally.
5306         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5307         * iterator.cs: Update to changes.
5308
5309 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5310
5311         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5312         based on UserOperatorCall. More binary nullable operators clean up.
5313
5314 2008-04-02  Martin Baulig  <martin@ximian.com>
5315
5316         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5317
5318 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5319
5320         * nullable.cs: Merge user and empty conversions when lifting expression
5321         trees.
5322         
5323         * expression.cs (StringConcat): Implemented expression tree representation.
5324
5325 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5326
5327         * nullable.cs: When lifting null literal and a user operator exists, no call 
5328         is made.
5329         
5330 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5331
5332         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5333         null.
5334
5335 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5336
5337         * nullable.cs, expression.cs: Use namespace instead heavily nested
5338         monster abstract class.
5339
5340 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5341
5342         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5343         lifting of null literal and user operators. Clean up of some temporary
5344         nullable hacks.
5345
5346 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5347
5348         Fix #368224, test-629.cs
5349         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5350         if it crossed an unwind-protect boundary.
5351         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5352         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5353         inside an unwind-protected region.
5354         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5355         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5356         'leave' instead of a 'br' if unwind-protected.
5357         (Iterator.EmitYieldBreak): Likewise.
5358
5359 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5360
5361         * driver.cs: Only define versioninfo resources if no win32 resource
5362         file was specified.
5363
5364 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5365
5366         A fix for bug #372375
5367         * convert.cs: Fixed boxing of nullable types.
5368
5369 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5370
5371         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5372         type.
5373
5374 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5375
5376         A fix for bug #374619
5377         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5378         
5379 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5380
5381         * lambda.cs: Check return type only for invocation.
5382         
5383 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5384
5385         A fix for bug #374214
5386         * ecore.cs: Correctly report argument type mismatch.
5387
5388 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5389
5390         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5391         and not rely on broken IsEnum.
5392
5393 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5394
5395         * nullable.cs: New file, extracted from generic.cs.
5396         
5397         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5398
5399 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5400
5401         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5402         predefined comparison operators and null literals.
5403         
5404         * report.cs: New warning ID.
5405         
5406 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5407
5408         A fix for bug #370577
5409         * lambda.cs: Check return type too.
5410
5411 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5412
5413         A fix for bug #372846
5414         * class.cs: Automatic properties can be declared as unsafe.
5415
5416 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5417
5418         * location.cs: Use string based concatenation.
5419         
5420         * expression.cs: LiftedBinaryOperator is gmcs only.
5421         
5422 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5423
5424         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5425         conversions rules and expression trees.
5426
5427 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5428
5429         * delegate.cs: Use extension method source as delegate target.
5430
5431 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5432
5433         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5434         binary operations to be purely based on binary operations and optimized
5435         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5436         and other ET refactoring.
5437         
5438         * typemanager.cs: Fixed warning.
5439         
5440 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5441
5442         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5443         
5444         * symbolwriter.cs: Fixed.
5445
5446 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5447
5448         * anonymous.cs, driver.cs: Reset anonymous types counters.
5449
5450 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5451
5452         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5453         
5454         * class.cs: Use fullname for all type member definitions.
5455         
5456 2008-02-19  Martin Baulig  <martin@ximian.com>
5457
5458         * class.cs
5459         (IMethodData.EmitExtraSymbolInfo): New interface method.
5460         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5461         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5462         interface method here as an empty public virtual method.
5463
5464         * anonymous.cs
5465         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5466         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5467         CodeGen.SymbolWriter.SetRealMethodName().       
5468
5469 2008-02-18  Martin Baulig  <martin@ximian.com>
5470
5471         * anonymous.cs
5472         (ScopeInfo.EmitType): Override this and emit debugging
5473         information for captured variables.
5474         (RootScopeInfo.EmitType): Override this and emit symbol
5475         information for a captured `this'.
5476
5477 2008-02-15  Martin Baulig  <martin@ximian.com>
5478
5479         * iterators.cs: Emit debugging info.
5480
5481         * codegen.cs
5482         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5483         (EmitContext.OmitDebuggingInfo): New public property.
5484
5485         * statement.cs
5486         (While): Override Emit() and don't emit symbol info there; do it
5487         inside DoEmit() instead.
5488         (Block.Emit): Omit symbol information while emitting the scope
5489         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5490         block logic.
5491         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5492         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5493         .ctor to make `IsIterator' work.
5494
5495 2008-03-14  Martin Baulig  <martin@ximian.com>
5496
5497         * symbolwriter.cs: Added the new symbol writer function from the
5498         debugger's `terrania' branch; temporarily enclose them inside
5499         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5500         my vacations.
5501
5502 2008-03-14  Martin Baulig  <martin@ximian.com>
5503
5504         * symbolwriter.cs
5505         (SymbolWriter): Make this a public static class.
5506
5507         * codegen.cs
5508         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5509         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5510
5511 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5512
5513         A fix for bug #370577
5514         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5515         return type.
5516         
5517 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5518
5519         * typemanager.cs (CSharpName): Made 250 times faster.
5520
5521 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5522
5523         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5524         
5525 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5526
5527         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5528         crash when predefined field does not exist.
5529         
5530 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5531
5532         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5533         
5534 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5535
5536         * class.cs (FixedField): Don't crash when contructors are missing.
5537
5538 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5539
5540         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5541         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5542         check internal types accessibility for internal and external types.
5543         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5544
5545 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5546
5547         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5548         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5549         attribute.cs, statement: Use corect instance of predefined types (work
5550         related to #364674).
5551
5552 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5553
5554         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5555         
5556 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5557
5558         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5559         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5560         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5561         predefined types clean up, delayed predefined types members initialization
5562         (work related to #364674).
5563
5564 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5565
5566         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5567         
5568 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5569
5570         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5571         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5572         predefined types clean up (work related to #364674).
5573
5574 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5575
5576         * ecore.cs: Print an error message instead of throwing exception.
5577         
5578 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5579
5580         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5581         expression.cs, statement.cs: Unififed null literal representation.
5582
5583 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5584
5585         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5586         expression.cs: Refactored binary operators resolve phase and improved speed.
5587         The nullable code is still missing and won't work correctly, more fixes
5588         required.
5589
5590         It also fixes #323726, #324312, #324248, and many other unreported issues.
5591
5592 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5593
5594         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5595         instead of 'gmcs'.
5596
5597 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5598
5599         * ecore.cs: Clean-up and split BetterConversion.
5600         
5601 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5602
5603         Fix #363791
5604         * enum.cs (EnumMember.Value): Only access 'value' if
5605         ResolveValue says it's ok.
5606         (EnumMember.DoResolveValue): Don't set prev_member.value.
5607         (Enum.GetDefinition): Reverse arguments of Equals --
5608         EnumMember.Value can return 'null'.
5609
5610         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5611
5612 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5613
5614         * generic.cs, expression.cs: More ongoing work on expression trees.
5615         
5616 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5617
5618         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5619         handle missing matches when mutiple operators exist.
5620         
5621 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5622
5623         A fix for bug #363218
5624         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5625         initializers.
5626         
5627 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5628
5629         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5630         update. This time to deal correctly with SideEffectConstant expression used
5631         as an argument for another constant folding.
5632
5633 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5634
5635         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5636         MethodBuilder.
5637
5638 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5639
5640         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5641
5642 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5643
5644         A fix for bug #328136
5645         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5646         side is a false constant, because we still need to evaluate the right-hand
5647         side.
5648
5649         * statement.cs (If): Emit two types of boolean constants (simple constant,
5650         side-effect constant).
5651
5652 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5653
5654         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5655
5656         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5657         constants.
5658
5659 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5660
5661         A fix for bug #361457
5662         * ecore.cs (IsApplicable): Params methods have lower priority.
5663
5664         * support.cs: Return correct parameter modifier for params types.
5665
5666 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5667
5668         * generic.cs (TypeParameter): Cache attribute target name.
5669
5670         * support.cs: Removed unused variable.
5671
5672         * typemanager.cs: Removed debugging leftover.
5673
5674         * ecore.cs: Use local type instead of a property;
5675
5676         * class.cs (VerifyMembers): Consider also parent to test whether type member
5677         is local or public.
5678
5679         * expression.cs (FullMethodDesc): Removed.
5680
5681         * attribute.cs (IsValidArgumentType): Made static.
5682
5683 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5684
5685         Cleanup to be more readable.
5686         * Makefile (GMCS_PROFILE): Remove.
5687         (COMPILER_NAME): New helper.
5688
5689 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5690
5691         * cs-tokenizer.cs: if a conditional expression happens inside a
5692         (...) this also means that we do not need to de-ambiguate between
5693         an parenthesized expression and a cast.
5694
5695         Fixes 346484.
5696
5697         * constant.cs (SideEffectConstant): a constant value that happens
5698         to have a side effect.
5699
5700         Fixes the build regressions introduced by the fix for #359789
5701
5702 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5703
5704         * expression.cs (Conditional.Emit): when emitting the ternary
5705         operator, use local variables to generate code verifiable code.
5706
5707         The verifier cannot infer that the type on stack before the
5708         stloc.0 is executed is of type ParentB. This happens because the
5709         stack merge algorithm uses only parent types when deciding which
5710         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5711         335.
5712
5713         This code compiled with mcs is not verifiable under MS. The MS
5714         verifier picks the first common interface of Foo and Bar, which is
5715         wrong, but doesn't use a full join type of the 2 interfaces.
5716
5717         CSC uses a clever hack to compile such code in a verifiable
5718         way. It stores the intermediate values in a local variable with
5719         the expected type.
5720
5721         Fixes: #358102
5722
5723 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5724
5725         * expression.cs: Do not fold BitwiseAnd operators when the left
5726         side is a false constant, because we still need to evaluate the
5727         right-hand side.
5728
5729         Fixes #359789
5730
5731         * support.cs: Instead of throwing an InternalErrorException when
5732         the position of the stream is outside the boundary of our buffer,
5733         reset the state of the reader, and restart the reading from the
5734         beginning of the file.
5735
5736 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5737
5738         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5739
5740 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5741
5742         A fix for bug #361686
5743         * decl.cs: A protected types used inside a private class which parents
5744         derives from the protected class are accessible.
5745
5746 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5747
5748         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5749         the parameterless constructor.
5750
5751 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5752
5753         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5754         lookup methods to use standard member cache when doing member lookup.
5755
5756 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5757
5758         * driver.cs: Don't report full path for referenced module as assembly error.
5759
5760 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5761
5762         * Makefile: Fixed `qh' target to work on all machines.
5763
5764         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5765         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5766         and HasElementType with TypeManager implementation.
5767
5768 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5769
5770         A fix for bugs #325134, #359749
5771         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5772         first binds point to non-method member expression.
5773
5774 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5775
5776         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5777
5778 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5779
5780         A fix for bugs #321394, #323028
5781         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5782         Reworked naive IsAccessibleAs implementation to handle nested types.
5783
5784 2008-02-05  Jb Evain  <jbevain@novell.com>
5785
5786         * class.cs: use generic type comparison for parameters
5787         as well.
5788
5789 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5790
5791         A fix for bug #325372
5792         * class.cs: Use generic type comparison when testing method signatures.
5793
5794 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5795
5796         A fix for bug #357047
5797         * ecore.cs: Applied C# 3.0 changes to better conversion.
5798
5799 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5800
5801         A fix for bug #358374
5802         * cs-parser.jay: Correctly set modifiers for all constructor types.
5803
5804 2008-02-04  Marek Safar  <marek.safar@gmail.com>
5805
5806         A fix for bug #355251
5807         * generic.cs: Added base class constraint based type inference.
5808
5809 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5810
5811         A fix for bug #357255
5812         * decl.cs: One more missing visibility check.
5813
5814 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5815
5816         * support.cs: Fixed broken return.
5817
5818 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5819
5820         * report.cs: Correctly reset warnings count after probing.
5821
5822 2008-01-25  Martin Baulig  <martin@ximian.com>
5823
5824         * namespace.cs
5825         (NamespaceEntry.SymbolFileID): Make this work again after
5826         MemberName.ToString() is gone.
5827
5828 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5829
5830         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
5831         expressions.
5832
5833 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5834
5835         * generic.cs: Use full implicit conversion for type inference fixing.
5836
5837 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5838
5839         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
5840         Fixed user operator conversions.
5841
5842 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5843
5844         * generic.cs: Do nullable type to null comparison optimization during
5845         resolve phase.
5846
5847 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5848
5849         A fix for bug #355163
5850         * generic.cs: Enabled l-value resolve on nullable expressions.
5851
5852 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5853
5854         A fix for bug #353986
5855         * class.cs: Ingore static ctors with parameters for any further checks.
5856
5857 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5858
5859         A fix for bug #354310
5860         * namespace.cs: Removed redundant check.
5861
5862 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5863
5864         A fix for bug #354928
5865         * expression.cs: ElementInitializers can be resolved only once.
5866
5867 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5868
5869         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
5870         Condition expressions.
5871
5872 2008-01-23  Marek Safar  <marek.safar@gmail.com>
5873
5874         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
5875
5876 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5877
5878         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
5879         not allowed.
5880
5881         * generic.cs: Implemented coalesce expression.
5882
5883 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5884
5885         A fix for bug #355145
5886         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
5887         expression tree type inference.
5888
5889 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
5890
5891         Fix #354663
5892         * expression.cs (Binary.IsUnsignedType): Fix typo.
5893
5894 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5895
5896         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
5897
5898 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5899
5900         A fix for bug #355161
5901         * ecore.cs, expression.cs: Wider range of extension method supported
5902         expressions.
5903
5904 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
5905
5906         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
5907         AssemblyBuilder to operate in compiler context. Fixes mcs part of
5908         bug #354970.
5909
5910 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5911
5912         A fix for bug #355148
5913         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
5914
5915 2008-01-22  Miguel de Icaza  <miguel@novell.com>
5916
5917         * expression.cs (CreateExpressionTree): Add support for or and
5918         logical or, and indent following the coding conventions.
5919
5920         * typemanager.cs (LinqExpression): renamed from
5921         ExpressionTreeManager, for a shorter name.
5922
5923         Use TypeManager.CoreLookupType to lookup types from our core
5924         assemblies and turn those into "Type" variables.
5925
5926         Consumers that previously used "Namespace" and "Type" from this
5927         class should instead use the TypeExpression which is a type that
5928         is fully resolved (without involving the regular C# resolution
5929         rules). 
5930
5931         This typically looks like this:
5932
5933         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
5934         new MemberAccess (texpr, name, type_arguments, loc)
5935
5936         This avoids the problem in: #355178
5937
5938 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5939
5940         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
5941         feature in parser only as we do in other cases.
5942         
5943 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5944
5945         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
5946         typemanager.cs: A refactoring of params arguments to reuse existing
5947         expressions (params -> array initializer) to emit params argument instead
5948         of specialized handling.
5949         It was required by expression tree implementation and it has other benefits
5950         as well, we now apply same optimization for params arguments as we do for
5951         array initializers.
5952         
5953 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5954
5955         A fix for bug #353526
5956         * generic.cs: A type inference of params arguments may not required any
5957         temporary array creation.
5958         
5959 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5960
5961         A fix for bug #353534
5962         * generic.cs, ecore.cs, expression.cs: A method group type inference is
5963         supported for delegates only.
5964         
5965 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5966
5967         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
5968         type for more than 1 candidates.
5969         
5970 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5971
5972         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
5973         expressions.
5974         
5975 2008-01-16  Marek Safar  <marek.safar@gmail.com>
5976
5977         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
5978         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
5979         operator) expressions. 
5980                 
5981 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5982
5983         * statement.cs: Avoid declaring an IL variable for this_variable since it is
5984         not accessed from the generated IL.
5985
5986 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5987
5988         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
5989         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
5990         statement.cs: The first expression tree implementation drop, mostly
5991         infrastructure work.
5992
5993 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5994
5995         * ecore.cs (IsNestedChild): Refactored.
5996
5997 2008-01-11  Marek Safar  <marek.safar@gmail.com>
5998
5999         * lambda.cs: Don't use a cast on unknown expression statement.
6000
6001 2008-01-10  Geoff Norton  <gnorton@novell.com>
6002
6003         * cs-tokenizer.cs: One more token to distinguish between method and lambda
6004         arguments
6005
6006 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6007
6008         * doc.cs: Report better /doc crash details.
6009         
6010 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6011
6012         A fix for bug #352536
6013         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
6014
6015 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6016
6017         A fix for bug #352287
6018         * ecore.cs, expression.cs: Do `this' access checking in all member access
6019         expressions.
6020         
6021 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6022
6023         * rootcontext.cs, driver.cs: Switch to linq mode by default.
6024         
6025         * report.cs: Reset message stacks.
6026         
6027 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6028
6029         * generic.cs (InferInPhases): Correctly calculate params position.
6030         
6031 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6032
6033         * cs-tokenizer.cs: No need to parse full string when parsing lambda
6034         arguments.
6035
6036 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6037
6038         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
6039         
6040         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
6041         
6042         * driver.cs: Updated --help option.
6043         
6044 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6045
6046         * generic.cs (InferParamsTypeArguments): Removed.
6047         (InferInPhases): Add params type inference.
6048         (LowerBoundInference): Fixed scoring mechanism.
6049         
6050         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
6051         
6052 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
6053
6054         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
6055         byte array for unsigned "baked" assemblies.
6056
6057 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
6058
6059         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
6060         array for assemblies that are not strongnamed.
6061
6062 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6063
6064         A fix for bug #351481
6065         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
6066         declaring type for nested generic types.
6067         
6068 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6069
6070         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
6071         instead of ToString.
6072         
6073 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6074
6075         A fix for bug #351047
6076         * expression.cs (Binary.ResolveOperator): Allow equality operators between
6077         null and structs only when equality and inequality operators are defined
6078         either as an user-operators or predefined operators.
6079         
6080 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6081
6082         A fix for bug #351047
6083         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
6084         
6085 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6086
6087         A fix for bug #351257
6088         * cs-tokenizer.cs: Advance line number for '\r' correctly.
6089         
6090 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6091
6092         A fix for bug #351157
6093         * class.cs (Using): Fixed yet another broken cloning.
6094         
6095         (Block): Put back more sensible default value for statements.
6096         
6097 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
6098
6099         * codegen.cs: Allow AssemblyVersion with only major version component.
6100         Fixes bug #351055.
6101
6102 2007-12-29  Marek Safar  <marek.safar@gmail.com>
6103
6104         A fix for bug #324654
6105         * class.cs: Use FullName property as member name.
6106
6107 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6108
6109         A fix for bug #342117
6110         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
6111         constructor constraint.
6112
6113 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6114
6115         A fix for bug #338273
6116         * class.cs (ProbertyBase): Access modifier checks are required for overrides
6117         only.
6118
6119 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6120
6121         A fix for bug #350839
6122         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
6123
6124 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6125
6126         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6127         GHOP:
6128         
6129         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6130
6131         * statement.cs: Changed some Hashtables to use HybridDictionaries
6132         instead. It was observed that some HashTables only contained a few
6133         items in the vast majority of cases. Since HybridDictionary is
6134         more efficient on small sets (<10 elements), "known_variables"
6135         from class ExplicitBlock as well as "labels" and "constants " from
6136         class Block were changed to HybridDictionaries. 
6137
6138         Atsai results: (56216kb->54987kb)
6139
6140         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
6141
6142
6143 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6144
6145         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6146         GHOP:
6147         
6148         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6149         
6150         * expression.cs: foreach loop to for loop, saved on allocation of
6151         enumerator (59333kb->59141kb)
6152
6153         * statement.cs. Changed foreach loops to for loops, saved on
6154         allocation of enumerator (59141kb->59006kb)
6155
6156         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
6157         when constructed with no specified capacity. This was causing a
6158         few ArrayLists to allocate more memory than they would potentially
6159         need in the Block class and MemberCache class. Setting the
6160         ArrayLists to construct with a capacity of 1 saves some
6161         memory. (56216kb->55585kb)
6162
6163 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6164
6165         A fix for bug #347189 (2nd issue)
6166         * expression.cs (MemberAccess): Nested type can be found in base non-generic
6167         type.
6168
6169 2007-12-27  Miguel de Icaza  <miguel@novell.com>
6170         
6171         * report.cs: Do not use colors if stdout and stderr are not a
6172         terminal.
6173
6174 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6175
6176         A fix for bug #346998
6177         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
6178         overloads.
6179
6180 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6181
6182         A fix for bug #343465
6183         * class.cs: Explicit method name for nested types uses dots only.
6184
6185 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6186
6187         A fix for bug #343707
6188         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
6189
6190 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6191
6192         * ecore.cs: Report type inference errors only when arguments count matches
6193         parameter count.
6194         
6195         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
6196         
6197         * expression.cs, report.cs: New warning.
6198         
6199         * typemanager.cs: Catch anonymous method type too.
6200
6201 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6202
6203         A fix for bug #346379
6204         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6205
6206 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6207
6208         A fix for bug #347359
6209         * expression.cs (Invocation): Don't resolve already resolved expression.
6210
6211 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6212
6213         A fix for bug #347189
6214         * class.cs (FixedField): Use non-dependent code only in the define phase.
6215
6216 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6217
6218         A fix for bug #348076
6219         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6220
6221 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6222
6223         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6224         discovered extension methods.
6225
6226 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6227
6228         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6229         method.
6230
6231 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6232
6233         * report.cs (ErrorMessage): Add support for using colors on
6234         terminals that support it. 
6235
6236 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6237
6238         * ecore.cs: Use information about expanded params for error reporting.
6239
6240 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6241
6242         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6243         and logic for params overloads.
6244         
6245 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6246
6247         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6248         as this is also created from the parser.  Fixes #349034
6249
6250 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6251
6252         * statement.cs (Throw.CloneTo): it is valid to have empty
6253         expressions for throw. 
6254
6255 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6256
6257         * cs-parser.jay: Set delegate constraint parsing region correctly.
6258
6259 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6260
6261         A fix for bug #345467
6262         * typemanager.cs (IsEqual): Compare generic parameters position only.
6263         
6264 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6265
6266         * expression.cs (BaseAccess): Type arguments can be null.
6267
6268 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6269
6270         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6271         consistent even when an error has occured.
6272         (Switch.Resolve): Likewise.
6273
6274 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6275
6276         A fix for bug #334505
6277         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6278         overrides.
6279         
6280 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6281
6282         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6283         refactorings required to resolve extension methods correctly when mixing
6284         generics and non-generics members.
6285         
6286 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6287
6288         A fix for bug #342584
6289         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6290         conversion.
6291         
6292 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6293
6294         A fix for bug #342512
6295         * delegate.cs: Use delegate argument expression when is available. Don't
6296         emit virtual call when class is sealed.
6297         
6298 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6299
6300         A fix for bug #325423
6301         * assign.cs (FieldInitializer): Use resolved expression for emit.
6302         
6303         * class.cs: Print less confusing error message.
6304         
6305 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6306
6307         * cs-tokenizer.cs: Removed GMCS ifdefs.
6308         
6309         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6310         mcs.
6311         
6312         * cs-parser.jay: Disabled nullable check.
6313         
6314         * generic-mcs: Copied more generic stuff.
6315                 
6316 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6317
6318         * gcs-parser.jay: Merged to cs-parser.jay.
6319         
6320         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6321         * *.csproj, *.sources: Updated to use only jay parser file.
6322
6323 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6324
6325         * gcs-parser.jay: Added nullable and default expression feature checks.
6326         
6327 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6328
6329         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6330         it fixes many TODOs and hidden bugs.
6331         
6332         * expression: Removed duplicate error check.
6333
6334 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6335
6336         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6337         implicitly type local variable only when it is used in a declaration.
6338
6339 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6340
6341         * attribute.cs: Use CS0612 for empty strings.
6342
6343 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6344
6345         * lambda.cs, statement.cs: Contextual return may act as a statement.
6346
6347 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6348
6349         A fix for a regression cause by #324222
6350         * class.cs: Don't report unused even when it implements an interface.
6351         
6352 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6353
6354         A fix for bug #341205
6355         * ecore.cs, expression.cs: Method group expression cannot do static
6356         method access with an instance reference check before overloading takes
6357         a place.
6358         
6359 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6360
6361         A fix for bug #325359
6362         * class.cs: Use predictable name for automatically generated property.
6363         
6364 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6365
6366         A fix for bug #324996
6367         * expression.cs (Is): Handle case where D is nullable and T is not
6368         correctly.
6369         
6370         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6371         
6372 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6373
6374         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6375         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6376         Flush small error reporting changes.
6377         
6378 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6379
6380         A fix for bug #324996
6381         * expression.cs: Rewrote Is expression implementation to work with
6382         generics, nullable types, anonymous method. A const result expression 
6383         uses existing infrastructure instead of custom not fully-featured one.
6384         
6385 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6386
6387         A fix for bug #340202
6388         * class.cs: Consider generics for volatile field.
6389
6390 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6391
6392         A fix for bug #335594
6393         * expression.cs: Use conversion rules when handling string addition.
6394         
6395 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6396
6397         A fix for bug #336651
6398         * expression.cs: Fixed a crash when probing is on.
6399         
6400 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6401
6402         A fix for bug #324242
6403         * covert.cs: Added a conversion from any nullable-type with an 
6404         underlying enum-type to the type System.Enum.
6405         
6406 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6407
6408         A fix for bug #324222
6409         * class.cs: Report all non-used event fields.
6410         
6411 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6412
6413         A fix for bug #325161
6414         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6415         qualifier for generic types.
6416         
6417 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6418
6419         A fix for bug #322971
6420         * expression.cs, ecore.cs: Added intermediate result value check for
6421         indexers. 
6422         
6423 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6424
6425         A fix for bug #324754
6426         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6427         when it was requested.
6428
6429 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6430
6431         A fix for bug #325101
6432         * expression.cs: Do type not value comparison for `is' expression.
6433
6434 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6435
6436         A fix for bug #320236
6437         * convert.cs: Don't apply user conversion on underlying target type.
6438
6439 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6440
6441         * expression.cs: Don't use unresolved expression for error reporting.
6442  
6443 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6444
6445         A fix for bugs #337712, #324490
6446         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6447         overloading resolution too.
6448         
6449         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6450         the process consistent and more robust.
6451         
6452         * expression.cs, linq.cs, report.cs: Update.
6453
6454 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6455
6456         A fix for bug #332909
6457         * attribute.cs: Resolve attributes in correct context using error
6458         handling procedure.
6459         
6460         * rootcontext.cs: Define Obsolete attribute members as core members.
6461         
6462 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6463
6464         * statement.cs: Removed unused methods.
6465         
6466 2007-10-31  Wade Berrier  <wberrier@novell.com>
6467
6468         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6469         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6470         during 'make dist')
6471
6472 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6473
6474         A fix for bug #338102
6475         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6476         methods registered as non-generics.
6477         
6478 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6479
6480         A fix for bugs #337712, #324490
6481         * delegate.cs: Delegate covariance and contravariance is not allowed for
6482         value types.
6483         
6484 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6485
6486         A fix for bug #337719 
6487         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6488         `from' keyword.
6489         
6490 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6491  
6492         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6493
6494 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6495  
6496         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6497         query expressions.
6498
6499 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6500
6501         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6502
6503 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6504  
6505         A fix for bug #334652
6506         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6507         extension methods when we have not found the best candidate in normal
6508         container.
6509
6510 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6511
6512         * AssemblyInfo.cs: Keep up-to-date.
6513
6514 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6515
6516         * Makefile: Fixed generics compiler name.
6517         
6518 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6519
6520         * lambda.test: removed, lambda parsing is done differently.
6521         
6522         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6523
6524 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6525
6526         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6527
6528 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6529
6530         * Makefile, *.sources : All C# compilers are in mcs folder.
6531         
6532         * *.cs: Use existing 2_1 define for smcs.
6533
6534 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6535
6536         A fix for bug #335847
6537         * assign.cs, expression.cs: Couple of changes to avoid creating a
6538         temporary variable for each object initializer assignment statement. It
6539         simplifies struct initialization too, otherwise two temporary variables
6540         would be required.
6541         Implemented optimization of redundant default element initializers.
6542         
6543 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6544
6545         A fix for bug #336766
6546         * expression.cs (Class.CheckBase): Use generic name when method is
6547         generic.
6548         
6549 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6550
6551         A fix for bug #334737
6552         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6553         variable and not variable argument for prepared copies.
6554
6555 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6556
6557         A fix for bug #325110
6558         * class.cs, expression.cs, attribute.cs: Use open generic method when
6559         checking conditional attribute.
6560         
6561 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6562
6563         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6564         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6565         FeatureIsNotAvailable.
6566
6567 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6568
6569         ** C# 3.0 Partial methods
6570         
6571         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6572         methods support. Because of member cache issue with generics only
6573         non-generics partial methods are fully supported.
6574         
6575 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6576         
6577         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6578         generics and to use member cache for member checking. It also improves
6579         performance and fixes remaining overloads issues.
6580         
6581 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6582         
6583         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6584         roottypes.cs, typemanager.cs:
6585                 
6586         A member cache creation logic changed to add members immediately and
6587         not rely on fallback. The member cache is now only prefered way
6588         how to access and find type declaration members. It saves 5 MB of memory
6589         during MWF compilation and makes code ready for more optimizations and
6590         clean-ups, it's also a pre-requirement for partial methods.
6591         
6592 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6593
6594         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6595         handling for generic parameters.
6596
6597 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6598         
6599         * class.cs (FixedField): Removed redundant volatile check.
6600         
6601 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6602         
6603         * class.cs, decl.cs: Fixed overload members verification to do only one
6604         check per possible collision.
6605         
6606 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6607         
6608         A fix for bug #325478
6609         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6610         and create only one disposable flags container.
6611         
6612 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6613         
6614         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6615         * statement.cs (Fixed): Fixed variables cloning.
6616         
6617 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6618         
6619         A fix for bug #333342
6620         * class.cs (EventField): Don't mark value type event as synchronized. 
6621         
6622 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6623         
6624         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6625         inference to identify best candidate method correctly.
6626         (ProperyExpr): A range variable is read only and cannot be modified.
6627         
6628 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6629         
6630         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6631         logic to identify best candidate method correctly.
6632         
6633 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6634         
6635         * location.cs (Equals, GetHashCode): Removed.
6636         
6637 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6638         
6639         * report.cs: Implemented message recorder. It is used mainly for lambda
6640         expressions to capture otherwise swallowed error messages.
6641         
6642         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6643
6644         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6645         and not at the top.
6646         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6647                 
6648         * expression.cs (MemberAccess): Always report lookup failure.
6649         
6650         * location.cs: Implemented Equals, GetHashCode.
6651         
6652         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6653         
6654 2007-10-10  Jb Evain  <jbevain@novell.com>
6655
6656         * codegen.cs: re-enable assembly version check.
6657
6658 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6659         
6660         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6661         checks.
6662         
6663         * namespace.cs (UsingAlias): Do correct version check.
6664         
6665 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6666         
6667         * expresison.cs, ecore.cs: Issue extension method error message when
6668         appropriate.
6669         
6670         * rootcontext.cs: Added ISO_2 compiler mode option.
6671
6672 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6673         
6674         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6675          message.
6676         
6677 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6678         
6679         * attribute.cs (GetString, GetBoolean): Work with both literal and
6680         constant.
6681         
6682         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6683         Moved method overload specific methods to MethodGroupExpr.
6684         
6685         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6686         it should be less memory consuming.
6687         
6688 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6689
6690         * codegen.cs: remove the assembly version check until the buildbot is
6691         fixed.
6692
6693 2007-10-07  Jb Evain  <jbevain@novell.com>
6694
6695         * attribute.cs (Attribute.GetString): if the value
6696         expression is a StringConstant, return its string value.
6697
6698 2007-10-07  Jb Evain  <jbevain@novell.com>
6699
6700         * typemanager.cs: add `assembly_version_attribute_type`.
6701         * codegen.cs: on attribute emission, check that the
6702         AssemblyVersionAttribute doesn't overflow.
6703
6704 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6705         
6706         A fix for bug #324677
6707         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6708         parent container of a scope container with currently resolved one. 
6709         
6710 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6711         
6712         A fix for bug #325534
6713         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6714         only.
6715         
6716 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6717         
6718         A fix for bug #327504
6719         * class.cs (Operator.Define): Refactored implicit and explicit user
6720         operator conversion rules.
6721         
6722 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6723         
6724         A fix for bug #327520
6725         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6726         
6727 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6728         
6729         A fix for bug #328022
6730         * class.cs (MethodData.Define): Use correct method to check whether
6731         a method implementents an accessor.
6732         
6733 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6734         
6735         A fix for bug #330069
6736         * statement.cs (Fixed.Resolve): Read the first array element only when
6737         an array is instantiated. 
6738         
6739 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6740         
6741         * expression.cs, assign.cs, generics.cs: Print correct operator when
6742         compound assignment is used.
6743         
6744 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6745         
6746         A fix for bug #325841
6747         * expression.cs (ArrayAccess): Use full argument cloning only for
6748         string compound concatenation.
6749         
6750 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6751         
6752         A fix for bug #328774
6753         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6754         assignment.
6755         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6756         assignment.
6757
6758 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6759
6760         Fix #328490
6761         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6762         Event accessibility checks here.  Remove some bogus code that
6763         accidently made GenericMethods work.
6764         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6765
6766 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6767         
6768         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6769         
6770         * statement.cs (Block): Refactored AddVariable to allow error handling
6771         customization.
6772         
6773         * generic.cs: New stub.
6774         
6775 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6776         
6777         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6778         flag.
6779         
6780 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6781
6782         * class.cs: Use partial container to record whether any partial part
6783         contains static field initializer and therefore default contructor has
6784         to be defined.
6785         
6786 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6787
6788         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6789         mono-list when only one of two partial parts has defined accessibility
6790         modifier.
6791         
6792 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6793
6794         A fix for bug #82845
6795         
6796         * class.cs (TypeContainer): Set correct resolve context for all field
6797         initializers.
6798         
6799 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6800
6801         * assign.cs: Fixed a crash when field is resolved twice with an error.
6802         
6803         * codegen.cs: Changed InFieldInitializer to be flag.
6804         
6805         * anonymous.cs, ecore.cs, expression.cs: Update after
6806         IsInFieldInitializer rename.
6807         
6808         * const.cs: Removed unused parameter.
6809         
6810         * class.cs: Changed the way how we resolve and emit field initializers.
6811         The field initilizers have to have access to contructor block to emit
6812         compiler generated code.
6813
6814 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6815
6816         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
6817         generics use TypeContainer instead.
6818         
6819 2007-09-12  Marek Safar  <marek.safar@gmail.com>
6820         
6821         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
6822
6823         * lambda.cs (ResolveParameters): Use more powerful
6824         InflateGenericArgument.
6825         
6826         * parameters.cs: Better exception message.
6827                 
6828 2007-09-10  Marek Safar  <marek.safar@gmail.com>
6829
6830         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
6831         correct expression block type. 
6832         
6833         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
6834         
6835         * expression.cs (Invocation): Extracted method group resolve to
6836         DoResolveOverload.
6837         
6838 2007-09-07  Marek Safar  <marek.safar@gmail.com>
6839
6840         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
6841         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
6842         
6843         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
6844         generic extension methods.
6845
6846 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6847
6848         A fix for bug #82676 (Do I get it right now?)
6849         * convert.cs (Binary.ResolveOperator): An interface is converted to the
6850         object before a standard conversion is applied.
6851         
6852 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6853
6854         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
6855         #82676.
6856         
6857 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6858
6859         A fix for bug #82676
6860         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
6861         non-generic interface types.
6862         
6863 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6864
6865         A fix for bug #82690
6866         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
6867         
6868 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6869
6870         A fix for bug #82571
6871         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
6872         modifier for container based methods.
6873         
6874 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6875
6876         A fix for bug #82676
6877         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
6878         any interface-type T means to any of interface type T.
6879
6880 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6881
6882         * namespace.cs: We have 2 versions of System.Core assembly.
6883
6884 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6885
6886         A fix for bug #82652
6887         * class.cs (Class.GetClassBases): Compare types and not expressions.
6888
6889 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6890
6891         A fix for bug #82620
6892         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
6893         actually never worked before.
6894         (IndexerAccess): Emit prepared arguments before they are modified.
6895         
6896 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6897
6898         A fix for bug #82563
6899         * assign.cs: Revert wrong fix.
6900         
6901         * expression.cs (VariableReference.EmitAssign): Handle ref reference
6902         correctly.
6903         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
6904         Instead of ldelema/stdind we have to use temporary variables to handle
6905         cases like String.Concat (params string[]).
6906         
6907 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6908
6909         * class.cs: EmitAttributes to Emit rename.
6910         
6911         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
6912         null.
6913         (MemberCore.HasClsCompliantAttribute): Don't depend on 
6914         GetClsCompliantAttributeValue execution.
6915         
6916 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6917
6918         * anonymous.cs: Use shorter type prefix.
6919         
6920         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
6921         when exist.
6922         
6923         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
6924         variables when probing is on.
6925         
6926         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
6927         unresolved variables.
6928         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
6929         handle transparent identifiers.
6930         
6931 2007-08-26  Marek Safar  <marek.safar@gmail.com>
6932
6933         * attribute.cs (IsClsCompliant): Add nullable types test.
6934         
6935 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
6936
6937         * doc.cs : catch other types of exception than XmlException to
6938           report CS1570. Fixed bug #82565.
6939
6940 2007-08-23  Marek Safar  <marek.safar@gmail.com>
6941
6942         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
6943         The number of delegate parameters has to match.
6944         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
6945         arrays.
6946
6947 2007-08-21  Marek Safar  <marek.safar@gmail.com>
6948
6949         * anonymous.cs (AnonymousMethod): Generate private anonymous method
6950         to fix problem with private arguments.
6951
6952 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6953
6954         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
6955         
6956         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
6957         
6958         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
6959         empty. Add cloning suport.
6960         
6961         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
6962
6963 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6964
6965         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
6966         to create EmptyCast. It handles EmptyConstantCast specialization for
6967         constants.
6968         
6969 2007-08-18  Marek Safar  <marek.safar@gmail.com>
6970
6971         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
6972         (EmitArrayArgument): One routine for array arguments.
6973         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
6974         
6975 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6976
6977         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
6978
6979 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6980
6981         * anonymous.cs: MemberLookupFinal update.
6982
6983         * class.cs (ConstructorInitializer): Is expression based.
6984         
6985         * delegate.cs: MethodGroupExpr update.
6986         
6987         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
6988         messages.
6989         (Error_MemberLookupFailed): Customizable error override.
6990         (MethodGroupExpr): Keep queried type for later usage.
6991         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
6992         resolve.
6993         
6994         * expression.cs: Error_MemberLookupFailed refactoring.
6995         (New.DoResolve): Resolve as much as possible.
6996         (ElementInitializer.Error_MemberLookupFailed): Object initializer
6997         customization for invalid member types.
6998
6999         * statement.cs: MethodGroupExpr update.
7000         
7001 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7002
7003         * modifier.cs (Check): Check all modifiers and not only accessibility
7004         ones.
7005
7006 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7007
7008         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
7009         type and not an expression.
7010
7011 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7012
7013         * statement.cs (Catch.Clone): Type and variable can be null.
7014
7015 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7016
7017         A fix for bug #81979
7018         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
7019         I am really not sure whether this is the best fix.
7020         
7021         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
7022         only once.
7023         
7024 2007-08-14  Marek Safar  <marek.safar@gmail.com>
7025
7026         ** C# 3.0 Object and collection initializers (major re-write)
7027         
7028         * assign.cs (DoResolve): Initializers are not assign related.
7029         
7030         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
7031         used during collection or object initialization.
7032         
7033         * expression.cs (Error_InvalidArguments): Add initializers specific
7034         messages. More will come later because it requires some general
7035         refactoring.
7036         (New.DoResolve): Better error handling for unsafe types.
7037         (EmptyExpressionStatement): New class.
7038         (ElementInitializer): An object initializer expression.
7039         (CollectionElementInitializer): A collection initializer expression.
7040         (CollectionOrObjectInitializers): A block of object or collection
7041         initializers.
7042         (NewInitialize): New expression with element/object initializers.
7043         
7044         * statement.cs: Reverted object/collection initializer hacks.
7045         
7046         * typemanager.cs (CSharpName): Filter __arglist type.
7047         
7048 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7049
7050         ** C# 3.0 Anonymous Types (update to the latest standard)
7051         
7052         * expression.cs (Binary.ResolveOperator): Threat all null based types
7053         same.
7054         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
7055         (AnonymousTypeParameter): Updated.
7056         
7057         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
7058         (AnonymousTypeClass): New anonymous type container.
7059         
7060         * class.cs (AddField): Return operation result.
7061         
7062         * generic.cs: Another empty TypeArguments overload.
7063         
7064         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
7065         are stored at top of normal hierarchy.
7066         
7067         * typemanager.cs (CSharpName): Filter anonymous types.
7068         
7069 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7070
7071         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
7072         as single Concat call. How could we miss that :-(
7073         
7074 2007-08-08  Marek Safar  <marek.safar@gmail.com>
7075
7076         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
7077         
7078 2007-08-07  Miguel de Icaza  <miguel@novell.com>
7079
7080         * expression.cs: Fix the previous commit, the creation of the
7081         arguments array list needs also to be conditional on the arguments
7082         not being null.
7083
7084         * class.cs: Add a little bit of help to help narrow down problems.
7085
7086         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
7087         not try to copy in that case. 
7088
7089         * driver.cs: When building SMCS, include a new different set of
7090         default assemblies here.   Do this here so we can control whether
7091         to include the default assemblies with /noconfig.
7092
7093 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7094
7095         A fix for bug #81979
7096         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
7097         only.
7098
7099 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7100
7101         A fix for bug #82300
7102
7103         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
7104         we are in probing scope.
7105
7106 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7107
7108         A fix for bug #82301
7109
7110         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
7111         (Statement.CloneTo): Clone and not map children blocks.
7112
7113 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7114
7115         A fix for bug #82299
7116
7117         * expression.cs (LocalVariableReference.CloneTo): Remap local info
7118         variable too.
7119         
7120         * statement.cs (Statement.CloneTo): Clone variables before statements
7121         to allow remaping of local variables.
7122
7123 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7124
7125         A fix for bug #82296
7126
7127         * anonymous.cs,
7128         * report.cs: Log crash details for future clone problems.
7129         
7130         * statement.cs (Return.Clone): Don't clone non-existent expression.
7131
7132 2007-08-03  Raja R Harinath  <harinath@gmail.com>
7133
7134         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
7135         (Class.AddBasesForPart): Move CS0537 check here from ...
7136         * cs-parser.jay (class_declaration): ... here.  Move calling of
7137         'AddBasesForPart' to ...
7138         (class_bases): ... here.
7139         (struct_declaration, interface_declaration): Update to changes.
7140
7141 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7142
7143         A fix for bug #81923
7144
7145         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
7146         conversion is allowed.
7147
7148 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7149
7150         A fix for bug #81564
7151
7152         * ecore.cs (EventExpr): Add IsBase handling.
7153
7154         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
7155         too.    
7156         
7157 2007-08-02  Raja R Harinath  <harinath@gmail.com>
7158
7159         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
7160         * cs-parser.jay: Some whitespace cleanups.
7161         (current_delegate): New.
7162         (type_name): New.
7163         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
7164         a dummy code block, and use 'type_name' instead of 'member_name'.
7165         (interface_declaration, class_declaration): Likewise.
7166         (delegate_declaration): Likewise.  Rearrange slightly and use
7167         'current_delegate'.
7168         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
7169         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
7170
7171 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7172
7173         A fix for bug #82039
7174
7175         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
7176         available.
7177
7178         * typemanager.cs (CSharpName): Split to string overload.
7179
7180 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7181
7182         * expression.cs,
7183         * report.cs: Updated warning CS0472.
7184
7185 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7186
7187         A fix for bug #82181
7188         * cs-parser.jay,
7189         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
7190
7191 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7192
7193         A fix for bug #82277
7194         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
7195
7196 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7197
7198         ** C# 3.0 Type Inference (major bits are working)
7199         
7200         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
7201         (.ImplicitStandardConversionExists): Uses compatible.
7202         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7203         (.InferReturnType): New method.
7204         (.Compatible): Refactored.
7205         (.ResolveParameters): Uses factory to create resolved parameters.
7206         (.CompatibleMethod): Add probing mode support.
7207         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7208         clearly distinguish between 2 different operations.
7209         (LambdaMethod): Moved to lambda.cs.
7210         (AnonymousMethod): Removed unused fields and methods.
7211         (AnonymousDelegate): Simplified.
7212         
7213         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7214         
7215         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7216         
7217         * delegate.cs (Delegate): New mehods to reduce code duplication.
7218         (.GetConstructor): New method.
7219         (.GetInvokeMethod): New method.
7220         (DelegateCreation): Updated.
7221         
7222         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7223         does not exist.
7224         (OverloadResolve): Made probing little bit faster.
7225         
7226         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7227         when probing is on.
7228         
7229         * generic.cs (TypeInferenceContext): Dummy implementation.
7230         
7231         * iterators.cs: Updated after Resolve/Define rename.
7232         
7233         * lambda.cs (LambdaExpression)
7234         (.ResolveParameters): Handles both type of arguments and type inference too.
7235         
7236         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7237         (InflateTypes): Updated.
7238         
7239         * support.cs (InflateTypes): Changed signature and updated.
7240         
7241         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7242         (MemberLookup_FindMembers): More MS tricks.
7243         (GetParameterData): Ditto.
7244         (GetDelegateParameters): Uses quick path for dynamic types.
7245         
7246 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7247
7248         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7249         only.
7250
7251 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7252
7253         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7254         syntax.
7255         
7256 2007-07-26  Jb Evain  <jbevain@novell.com>
7257
7258         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7259         which takes a boolean 'report_errors', similar to the GetMethod.
7260         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7261         in .net 2.1, do not report errors here.
7262
7263         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7264         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7265         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7266         in .net 2.1.
7267
7268         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7269         of the type InternalsVisibleToAttribute before the first call
7270         to CoreLookupType which is allowed to fail (third boolean parameter
7271         to true). Because, during the resolution for a type that is not
7272         immediately found, we try to check if the type is not defined in
7273         a friend assembly, and to do so, we need the
7274         InternalVisibleToAttribute.
7275
7276 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7277
7278         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7279         feature that allows structs to be compared against null and inline
7280         the result as true or false.
7281
7282         Notice that the same code is not permitted inside a generic block
7283         of code that would do:
7284
7285         class Foo<T> where T : struct {
7286             bool Eval (T x)
7287             {
7288                  return x == null;
7289             }
7290         }
7291
7292         It is only allowed if the type of T is not bound (no where
7293         clause).   In my opinion, this CSC 2 behavior is broken but people
7294         seem to be using it (IronRuby does, a few bug reports on bugzilla
7295         have it and some people have complained about it).
7296
7297         All of the users that depend on this behavior have code that is
7298         very likely broken. 
7299         
7300         * report.cs (Warning, Error): make these take object arguments,
7301         not strings, as that allows us to take advantage of Format.
7302
7303 2007-07-20  William Holmes  <billholmes54@gmail.com>
7304
7305         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7306           Left member variable for the Count.
7307         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7308           MemberName.CountTypeArguments to avoid a NRE. 
7309
7310         This code is contributed under the MIT X11 license
7311
7312 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7313
7314         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7315
7316 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7317
7318         * doc.cs : generic method arguments are written as ``x while generic
7319           type arguments are `x. Combined with the previous change, fixed bug
7320           #79706.
7321
7322 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7323
7324         Fix #82120
7325         * expression.cs (Binary.ResolveOperator): When converting
7326         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7327
7328 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7329
7330         * doc.cs : when T: or whatever x: is specified, it does not really
7331           check the doc comment's syntax correctness. Fixed bug #82006.
7332
7333 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7334
7335         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7336         LambdaExpression better.
7337         
7338         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7339         
7340         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7341         
7342         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7343         as it can be generated.
7344         
7345         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7346         modifiers.
7347         
7348         * lambda.cs (LambdaExpression): Refactored to share same code with
7349         AnonymousMethodExpression.
7350         
7351 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7352
7353         * anonymous.cs (MakeName): Include host name for easier debugging.
7354         (LambdaMethod): New class for lambda spcecific stuff.
7355         
7356         * attribute.cs: Set EmitContext return type.
7357
7358         * class.cs: Set EmitContext return type.
7359         
7360         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7361         with null/void meaning.
7362         
7363         * iterators.cs (ContainerType): Implemented.
7364         
7365         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7366         
7367         * statement.cs (Return): Updated to lambda expressions.
7368         (Block.CloneTo): Parent can be null.
7369                 
7370 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7371
7372         A fix for bug #81917
7373         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7374         
7375         * class.cs (FixedField): Check whether field is in unsafe scope.
7376
7377         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7378         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7379
7380         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7381         FieldExpr.
7382         
7383         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7384                 
7385 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7386
7387         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7388         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7389         from Report class.
7390
7391 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7392
7393         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7394         
7395 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7396
7397         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7398         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7399         
7400         * codegen.cs(EmitContext): Add ProbingMode flag.
7401         
7402         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7403         
7404         * driver.cs: For now set both warning values.
7405         
7406         * ecore.cs (SimpleName): Name is readonly.
7407         (MethodGroup.OverloadResolve): One quick path for probing.
7408         
7409         * expression.cs (Unary): Set Oper r/o.
7410         (Binary): Set Oper r/o.
7411         (ParameterReference): Set few instance variables as r/o.
7412         (ParameterReference.DoResolveBase): Don't capture aruments when 
7413         the probing is on.
7414         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7415         (Arglist): arguments are private.
7416         (SizeOf): type is private and r/o.
7417         (MemberAccess): arguments are private.
7418
7419         * report.cs: Enhanced reporting on/off capabilities.
7420         
7421         * lambda.cs: Uses ec.IsInProbingMode.
7422         (ContextualReturn): Derives from return.
7423         
7424         * rootcontext.cs: For now set both warning values.
7425         
7426         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7427         copy if one exists.
7428         (Return.Resolve): Don't die immediately.
7429         (Block.Resolve): Speed-up probing.
7430         (Block.CloneTo): Clone only child blocks.
7431
7432 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7433
7434         * iterators.cs: reverted Miguel's latest change (r81925) as it
7435         breaks the build in System.
7436
7437 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7438
7439         * iterators.cs (Yield.CheckContext): Check for the iterator type
7440         also here as we can call into Yield even in codepaths that are not
7441         directly checked by
7442         (MethodOrOperator is the only path that was checked).
7443
7444         In addition to the standard check, use a more specific check for
7445         constructors to report a more verbose error. 
7446
7447 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7448
7449         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7450         report the warning and continue 
7451
7452         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7453         values on the stack on the call to Emit.   Use EmitStatement if
7454         possible, or using Emit + Pop if not possible.   Fixes #82064
7455
7456 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7457
7458         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7459         avoid try...finally in some cases.
7460
7461 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7462
7463         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7464         
7465         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7466         instead of method. Re-use standard error handling.
7467         (ConstructorInitializer.Emit): Simplified.
7468         
7469         * delegate.cs: Updated after Invocation.EmitCall change.
7470         
7471         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7472         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7473         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7474         method and don't permanently changing input arguments.
7475         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7476         is resolved it has one of the candidates is the best one which is later
7477         used to emit. Removed a few unused method.
7478         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7479
7480         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7481         (Binary.ResolveOperator): Ditto.
7482         (ConditionalLogicalOperator.DoResolve): Ditto.
7483         (Invocation): Uses method group.
7484         (Invocation.DoResolve): Simplified.
7485         (Invocation.EmitCall): Removed useless is_static.
7486         (Invocation.Emit): Delegate to method group.
7487         (Invocation.EmitStatement): Simplified.
7488         (New): Uses method group.
7489         (MemberAccess.DoResolve): Don't destroy original expression.
7490         
7491         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7492         
7493 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7494
7495         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7496         
7497         * anonymous.cs,
7498         * lambda.cs: Add custom error message type.
7499
7500 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7501
7502         * lambda.cs: Simplified little bit.
7503         
7504         * parameter.cs: Introduced ImplicitLambdaParameter.
7505         (Parameters.CreateFullyResolved): New factory instead of ctor.
7506         
7507         * anonymous.cs,
7508         * class.cs,
7509         * delegate.cs: Updated parameter creation.
7510         
7511 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7512
7513         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7514         arguments.
7515         
7516         * generic.cs: Synchronized with gmcs.
7517         
7518 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7519
7520         * class.cs (Indexer): Check return type as soon as possible.
7521         
7522         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7523         members too.
7524         
7525         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7526         
7527         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7528         
7529         * parameter.cs (Parameter): Use expression type when it is available.
7530         
7531         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7532         method modifier for the first parameter only.
7533
7534 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7535
7536         A fix for bug #81938
7537         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7538         
7539         * constant.cs: Tide up an exception message.
7540
7541 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7542
7543         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7544         an uninitialized variable is used.
7545         
7546         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7547
7548 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7549
7550         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7551         not found error handling.
7552
7553         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7554         simplified.
7555         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7556         (ArrayCreation.DoResolve): Simplified.
7557         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7558         its own resolve process.
7559         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7560
7561 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7562
7563         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7564         more error details.
7565         
7566 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7567
7568         * cs-tokenizer.cs: Removed var related stuff.
7569         
7570         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7571         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7572         a type and a keyword at same time.
7573         
7574         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7575         matches to "var".
7576         
7577         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7578         implicitly typed arrays, more changes will follow.
7579         
7580         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7581         
7582 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7583
7584         * ecore.cs (VarExpr): Removed Handled field.
7585         
7586         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7587         build-in assign functionality.
7588         (ForEach.Resolve): Removed all implicitly typed local variable code and
7589         simplified.
7590         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7591         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7592
7593 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7594
7595         * assign.cs: Removed implicitly typed local variable check.
7596         
7597         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7598         referencing implicitly typed local variable.
7599         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7600         variable here.
7601         
7602         * statement.cs (Fixed): Removed unsupported implicitly typed local
7603         variable code.
7604
7605 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7606
7607         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7608
7609 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7610
7611         A fix for bugs #81855 and #76274
7612         * attribute.cs (AttachTo): Always set owner for global attributes to
7613         prefined owner.
7614         
7615         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7616         usefull too.
7617         
7618         * cs-parser.jay: Assembly and module attributes must precede all other
7619         elements except using clauses and extern alias declarations.
7620
7621 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7622
7623         A fix for bug #81748
7624         * cs-tokenizer.cs,
7625         * expression.cs: More checks for non ISO-1 features.
7626
7627 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7628
7629         A fix for bug #81807
7630         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7631         present inside switch statement and it is required by nullable check.
7632
7633 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7634
7635         A fix for bug #81840
7636         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7637         when type matching fails.
7638         
7639         * namespace.cs: Tiny error message change.
7640
7641 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7642
7643         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7644         reporting. Added automatic property check.
7645         
7646         * class.cs: Updated after CheckAbstractAndExtern relocation.
7647         (AEventPropertyAccessor.GetSignatureForError): Customized.
7648         
7649 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7650
7651         * class.cs (DefineBaseTypes): Base type can be undefined.
7652         
7653         * ecore.cs (TypeLookup): Minor refactoring.
7654         (DoResolveAsTypeStep): Removed redundant check.
7655
7656         * namespace.cs (Lookup): Removed redundant check.
7657                 
7658         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7659         ResolveAsTypeTerminal step.
7660         (BootstrapCorlib_*): Simplified.
7661         (PopulateCoreType): Core types can be now external.
7662
7663 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7664
7665         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7666          verification only.
7667          (InferTypeArguments): Infers anonymous expression type arguments.
7668          (Compatible): Split to Compatible and InferTypeArguments. 
7669         
7670         * lambda.cs: Updated.
7671
7672 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7673
7674         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7675
7676 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7677
7678         Fix #80477, cs0135-2.cs, cs0135-3.cs
7679         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7680         names to the "known" variables list.
7681         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7682         parameter names are also "known".
7683         (Block.CheckError136): Remove.
7684         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7685         null.
7686
7687 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7688
7689         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7690
7691 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7692
7693         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7694         internal error not an user error.
7695          
7696         * expression.cs (IsApplicable): Refactored to make debugging easier.
7697
7698         * support.cs: More tricks for non-mono runtimes.
7699         
7700         * typemanager.cs (CoreLookupType): Made public.
7701         (InitSystemCore): All linq specific stuff moved to linq.cs
7702
7703 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7704
7705         * typemanager.cs (CSharpSignature): One more missing build-in types
7706         replacement.
7707         More tricks for non-mono runtime.
7708
7709 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7710
7711         * statement.cs (Block.CheckError136_InParents): Remove.
7712         (Block.AddVariable): Use GetParameterInfo instead.
7713         (ToplevelBlock.ProcessArguments): Likewise.
7714
7715 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7716
7717         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7718         information too.
7719         (ToplevelBlock.GetParameterInfo): Split out of ...
7720         (ToplevelBlock.GetParameterRefernce): ... this.
7721         (ToplevelBlock.ParameterMap): Remove.
7722         * expression.cs (ParameterReference): Update to use
7723         ToplevelParameterInfo.
7724
7725         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7726         regression.
7727
7728         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7729         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7730
7731         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7732         (ToplevelBlock.ProcessParameters) ... here.
7733         (ToplevelBlock..ctor): Invoke it.
7734
7735         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7736         new parameters.
7737
7738         * statement.cs (IKnownVariable): New interface.
7739         (LocalInfo): Implement it.
7740         (ToplevelParameterInfo): New class.
7741         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7742         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7743         GetKnownVariableInfo.
7744
7745 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7746
7747         Partly speed up CS0136 error checks.
7748         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7749         'recurse' parameter.
7750         (Block.DoCheckError136): Only check errors in parameters.  Move
7751         local variable checks ...
7752         (Block.AddVariable): ... here, and ...
7753         (ToplevelBlock.ResolveMeta): ... here.
7754
7755 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7756
7757         * statement.cs (Block.IsChildOf): Remove.
7758
7759         * statement.cs (Statement.Clone): Move special case code ...
7760         (Block.CloneTo): ... here.
7761
7762 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7763
7764         * statement.cs (ToplevelBlock.container): Remove field.  It's
7765         redundant with 'Parent'.
7766         (ToplevelBlock.ContainerBlock): Remove accessor.
7767         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7768         child with parent here, ...
7769         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7770         current_block.
7771         (start_anonymous): Don't save current_block.
7772         (top_current_block): Remove.
7773
7774         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7775         (Block.Resolve): Update to changes.
7776         (Block..ctor): Move setting of "correct" 'Toplevel'
7777         and 'Explicit' fields to ...
7778         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7779
7780 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7781
7782         Kill Block.Implicit
7783         * statement.cs (Block.Implicit): Remove.
7784         (Block): Update to changes.
7785         * flowanalysis.cs: Likewise.
7786
7787         Mildly speed up CheckInvariantMeaningInBlock
7788         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7789         Recursively call AddKnownVariable to all enclosing blocks.
7790         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7791         Remove recursive calls.
7792         (Block): Update to changes.
7793
7794         New ExplicitBlock invariants
7795         * statement.cs (Block.Explicit): New field.  It points to the
7796         immediately enclosing non-implicit block.
7797         (Block..ctor): Maintain the invariant.
7798         * cs-parser.jay: Take advantage of invariant.
7799
7800         Introduce ExplicitBlock
7801         * statement.cs (ExplicitBlock): New.
7802         (ToplevelBlock): Derive from it.
7803         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
7804         sense of flag.
7805         (Block.Implicit): Update to changes.
7806         * cs-parser.jay: Update to changes.
7807
7808         Remove unused field
7809         * codegen.cs (EmitContext.IsLastStatement): Remove.
7810         * statement.cs (Block.DoEmit): Update to changes.
7811
7812 2007-05-25  Raja R Harinath  <rharinath@novell.com>
7813
7814         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
7815         modifying current_block directly.
7816
7817 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
7818         
7819         * class.cs: Implemented automatic properties (C# 3.0)
7820           Thanks to Marek for the help.
7821
7822 2007-05-23  Raja R Harinath  <rharinath@novell.com>
7823
7824         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
7825         variable as assigned, note also that all its components are
7826         assigned too.
7827         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
7828
7829 2007-05-19  Marek Safar  <marek.safar@gmail.com>
7830
7831         * anonymous.cs, class.cs: Emit Compiler generated attribute when
7832         member is marked as compiler generated.
7833         
7834         * decl.cs (MemberCore): Refactored ModFlags into property.
7835
7836         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
7837         (Check): Check only accessibility modifiers.
7838
7839 2007-05-18  Raja R Harinath  <rharinath@novell.com>
7840
7841         Track all assignable slots in one bit array
7842         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
7843         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
7844         logic from VariableMap constructor here.  Use the same 'offset'
7845         variable that's later used for computing offsets of local
7846         variables.
7847         * flowanalysis.cs (UsageVector.parameters): Remove.
7848         (UsageVector): Update to changes.
7849         (VariableMap): Remove.
7850
7851         Avoid creating ParameterMap in every block
7852         * statement.cs (Block.ParameterMap): Move ...
7853         (ToplevelBlock.ParameterMap): ... here.
7854         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
7855         only once.
7856         * flowanalysis.cs (FlowBranching.param_map): Remove.
7857         (FlowBranching.UsageVector): Update to changes.
7858         (FlowBranchingToplevel.CheckOutParameters): Likewise.
7859
7860         * statement.cs (Block.CloneTo): Clone Toplevel field too.
7861
7862         * expression.cs (ParameterReference): Distinguish between block
7863         where parameter was referenced and declared.
7864
7865 2007-05-18  Marek Safar  <marek.safar@gmail.com>
7866
7867         * flowanalysis.cs, statement.cs: Put back improved error handling.
7868
7869 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
7870         
7871         * assign.cs:
7872         * expression.cs:
7873           Imporved object and collection initialization (C# 3.0).
7874
7875 2007-05-15  Marek Safar  <marek.safar@gmail.com>
7876
7877         A fix for bug #81380
7878         * expression.cs (Is.DoResolve): Only value types have constant `is'
7879         behaviour.
7880
7881 2007-05-15  Raja R Harinath  <rharinath@novell.com>
7882
7883         * statement.cs (ToplevelBlock.child): Remove.
7884
7885 2007-05-15  Raja R Harinath  <harinath@gmail.com>
7886
7887         Rationalize ResolveMeta: refactoring
7888         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
7889         out constant handling code into ...
7890         (Block.DoResolveConstants): ... this.
7891
7892         Rationalize ResolveMeta: kill local_map
7893         * statement.cs (Block.local_map, Block.LocalMap): Remove.
7894         (Block.AssignableSlots): New.
7895         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
7896         for locals -- move code from VariableMap here.  Avoid unnecessary
7897         allocations.
7898         * flowanalysis.cs (FlowBranching.local_map): Remove.
7899         (FlowBranching..ctor): Use Block.AssignableSlots.
7900         (VariableMap): Remove unused constructors.
7901
7902 2007-05-11  Raja R Harinath  <rharinath@novell.com>
7903
7904         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
7905
7906 2007-05-11  Marek Safar  <marek.safar@gmail.com>
7907
7908         * typemanager.cs (IsFriendAssembly): Should not be called for building
7909         assembly.
7910
7911 2007-05-09  Marek Safar  <marek.safar@gmail.com>
7912
7913         * literal.cs (NullConstant): Print null in all cases.
7914         
7915         * expression.cs (Binary.ResolveOperator): Implemented delegate
7916          comparison based on C# 2.0 changes.
7917
7918 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
7919
7920         This code is contributed under the MIT X11 license
7921         
7922         The following enables support for several C# 3.0 language features:
7923         
7924         * cs-tokenizer.cs: Added support for the "var" keyword.
7925         
7926         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
7927           Added VarExpr class to facilitate type inferencing.
7928         
7929         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
7930           to support anonymous types.
7931         
7932         * assign.cs: Added support for type inferencing and initialization.
7933         
7934         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
7935         
7936         * expression.cs: Added implicit array support to ArrayCreation.
7937           Added 5 types and 1 interface:
7938           
7939           IInitializable                Implementing classes can inject initializing
7940                                         statements after object instantiation.
7941           
7942           Initializer                   Stores data for object initialization.
7943           
7944           AnonymousType                 An expression for anonymous types.
7945           
7946           AnonymousTypeParameter        Stores data about an anonymous type's field.
7947           
7948           NewInitialize                 An expression for object initialization.
7949           
7950           CollectionInitialize          An expression for collection initialization.
7951         
7952         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
7953           statements.
7954
7955 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7956
7957         A fix for bug #81500
7958         * cs-tokenizer.cs: Add special handling for coalescing operator.
7959
7960 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7961
7962         A fix for bug #81529
7963         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
7964         its value from base class until it is redefined.
7965
7966 2007-05-02  Raja R Harinath  <rharinath@novell.com>
7967
7968         Fix regression in cs0631-3.cs
7969         * cs-parser.jay (operator_declarator): Add opt_attributes to error
7970         fallback.  Make error fallback catch more cases.
7971
7972 2007-05-01  Miguel de Icaza  <miguel@novell.com>
7973
7974         * cs-parser.jay: Allow parameters in operator declarations to have
7975         attributes. 
7976
7977 2007-04-27  Miguel de Icaza  <miguel@novell.com>
7978
7979         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
7980         exists. 
7981
7982         * lambda.cs (ContextualReturn.Resolve): An expression is valid
7983         inside the ContextualReturn, it does not have to be an
7984         ExpressionStatement. 
7985
7986 2007-04-24  Miguel de Icaza  <miguel@novell.com>
7987
7988         * lambda.cs (ContextualReturn.Resolve): if the return type is not
7989         set, set it.
7990
7991 2007-04-23  Miguel de Icaza  <miguel@novell.com>
7992
7993         * anonymous.cs (AnonymousContainer): split the virtual Resolve
7994         method in two methods: ResolveNoDefine and Resolve.
7995
7996         ResolveNoDefine will stop just after ResolveTopBlock has been
7997         called.   
7998
7999         Resolve will then continue by creating a method and issuing the
8000         call to method.Define ().
8001
8002         (AnonymousMethod): Split and implement the new Resolve and
8003         ResolveNoDefine as well.
8004
8005         * lambda.cs (LambdaExpression): Split the anonymous method
8006         resolution code into a separate routine (CoreCompatibilityTest)
8007         from DoCompatibleTest.
8008
8009         (LambdaExpression.TryBuild): New method, this method tries to
8010         build the LambdaExpression with the given set of types to be used
8011         as the types for the various parameters of the lambda expression. 
8012
8013         If the compilation succeed with the given types, the infered type
8014         of the Anonymous method is returned, otherwise null is returned.
8015
8016 2007-04-23  Marek Safar  <marek.safar@gmail.com>
8017
8018         A fix for bug #81414
8019         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
8020
8021 2007-04-22  Miguel de Icaza  <miguel@novell.com>
8022
8023         * cs-tokenizer.cs: Change various identifiers here from the
8024         camelCasing to the recommended Linux-like style for instance
8025         variables from the Coding Guidelines. 
8026
8027 2007-04-19  Martin Baulig  <martin@ximian.com>
8028
8029         * convert.cs
8030         (Convert.ImplicitReferenceConversionCore): Allow conversions from
8031         System.Enum to System.ValueType.
8032
8033 2007-04-13  Martin Baulig  <martin@ximian.com>
8034
8035         Rewrote implicit reference conversions.  We need to distinguish
8036         between implicit reference conversions (13.1.4) and implicit
8037         boxing conversions (13.1.5).
8038
8039         According to the spec, there's an an implicit conversion
8040         "From a one-dimensional array-type S[] to IList<T> and base
8041         interfaces of this interface, provided there is an implicit
8042         reference conversion from S to T."  Note that this does not
8043         include boxing conversions.
8044
8045         * convert.cs
8046         (Convert.ImplicitTypeParameterBoxingConversion): New method.
8047         (Convert.ImplicitReferenceConversion): Split into
8048         ImplicitReferenceConversionCore() and
8049         ImplicitBoxingConversionExist().
8050         (Convert.ImplicitReferenceConversionExists): Use the new
8051         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
8052
8053 2007-04-12  Martin Baulig  <martin@ximian.com>
8054
8055         * convert.cs (Convert.ImplicitReferenceConversion): Move the
8056         `TypeManager.null_type' checks up to the top of the method.
8057
8058 2007-04-11  Marek Safar  <marek.safar@gmail.com>
8059
8060         A fix for bug #81350
8061         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
8062         extension methods.
8063
8064 2007-04-11  Martin Baulig  <martin@ximian.com>
8065
8066         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
8067         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
8068         to make this work for generic classes; fixes #79561.
8069
8070 2007-04-11  Martin Baulig  <martin@ximian.com>
8071
8072         * expression.cs (As): Add support for nullable types; fixes #79371.
8073
8074 2007-04-11  Martin Baulig  <martin@ximian.com>
8075
8076         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
8077         `type.FullName' is null; fixes #80243.
8078
8079 2007-04-11  Martin Baulig  <martin@ximian.com>
8080
8081         * expression.cs (Invocation.IsApplicable): Don't modify the method
8082         if type inference succeeded, but the method was not applicable.
8083         Fixes #81250.
8084
8085 2007-04-10  Marek Safar  <marek.safar@gmail.com>
8086
8087         A fix for bug #81324
8088         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
8089         internal and external namespaces containers.
8090
8091 2007-04-10  Martin Baulig  <martin@ximian.com>
8092
8093         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
8094         TypeManager.DropGenericMethodArguments() so we also call
8095         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
8096
8097 2007-04-10  Martin Baulig  <martin@ximian.com>
8098
8099         * iterators.cs (Iterator.CreateIterator): Don't crash if
8100         `method.ReturnType' is null.  This happens if something went wrong
8101         while resolving that typ (we already reported an error in this case).
8102
8103 2007-04-10  Martin Baulig  <martin@ximian.com>
8104
8105         * expression.cs (New.DoResolve): Don't call CheckComImport() on
8106         generic interfaces; report the CS0144 directly.
8107
8108 2007-04-10  Martin Baulig  <martin@ximian.com>
8109
8110         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
8111         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
8112
8113 2007-04-10  Martin Baulig  <martin@ximian.com>
8114
8115         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
8116
8117 2007-04-09  Raja R Harinath  <rharinath@novell.com>
8118
8119         A better fix
8120         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
8121         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
8122
8123         Fix #81338
8124         * statement.cs (For.Resolve): If resolution fails, use
8125         KillFlowBranching.
8126
8127 2007-04-08  Marek Safar  <marek.safar@gmail.com>
8128
8129         * anonymous.cs (MakeName): Make faster and zero-based.
8130         (VerifyExplicitParameterCompatibility): Back to mode where generic
8131         parameter is ignored.
8132         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
8133
8134         * class.cs (EmitType): Method can emit another new method.
8135
8136         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
8137
8138         * driver.cs: Updated.
8139
8140         * lambda.cs: Reuse predefined empty parameters.
8141
8142         * parameter.cs: Updated
8143
8144         * support.cs: Implemented InflateTypes.
8145
8146         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
8147         (InitSystemCore): Introduced to isolate 3.0 dependencies.
8148
8149 2007-04-03  Martin Baulig  <martin@ximian.com>
8150
8151         Fix #80632.
8152
8153         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
8154         version of TypeManager.IsOverride() which also works with generic
8155         types.  
8156
8157 2007-04-03  Martin Baulig  <martin@ximian.com>
8158
8159         Fix #81044.
8160
8161         * convert.cs
8162         (Convert.ExplicitReferenceConversion): We need to cast when
8163         converting from IList<T> to S[].
8164
8165 2007-04-01  Marek Safar  <marek.safar@gmail.com>
8166
8167         * decl.cs (FindExtensionMethods): Consider all candidates with same name
8168         at this level.
8169         
8170         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
8171
8172 2007-03-31  Marek Safar  <marek.safar@gmail.com>
8173
8174         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
8175         argument and return type inferring.
8176
8177         * codegen.cs (InferReturnType): Flag whether return can be inferred.
8178         (ReturnType): Turned to property.
8179
8180         * statement.cs (Return): Implemented return type inferring.
8181
8182         * support.cs (ReflectionParameters): Use local types if possible.
8183
8184 2007-03-30  Raja R Harinath  <rharinath@novell.com>
8185
8186         * flowanalysis.cs (FlowBranching.Reachability): Remove.
8187         (FlowBranching.UsageVector): Update to changes.
8188
8189         Prepare to kill 'Reachability'
8190         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
8191         argument of constructor.
8192
8193 2007-03-29  Raja R Harinath  <rharinath@novell.com>
8194
8195         Prepare to kill 'Reachability'
8196         * flowanalysis.cs (UsageVector.is_unreachable): New.
8197         (UsageVector): Update to maintain 'is_unreachable' in parallel to
8198         'reachability', and verify they're consistent.
8199
8200         Fix #81121
8201         * expression.cs (New.EmitStatement): Handle type parameters here too.
8202
8203 2007-03-29  Martin Baulig  <martin@ximian.com>
8204
8205         Fix #79148.
8206
8207         * anonymous.cs
8208         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8209         CompilerGeneratedClass.
8210         (ScopeInfo.EmitScopeInstance): Make this protected.
8211         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8212         `ec.CurrentAnonymousMethod.Scope == Scope'.
8213
8214         * statement.cs (Block.ScopeInfo): Make this a property.
8215
8216 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8217
8218         Prepare to kill 'Reachability'
8219         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8220         (FlowBranching.UsageVector.Reachability): Remove property.
8221         (FlowBranching.UsageVector.IsUnreachable): New property.
8222         (FlowBranching.UsageVector.ResetBarrier): New.
8223         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8224         * codegen.cs, statement.cs: Update to changes.
8225
8226 2007-03-27  Martin Baulig  <martin@ximian.com>
8227
8228         Fix #81209.
8229
8230         * decl.cs
8231         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8232         generic types.
8233
8234 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8235
8236         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8237         instead of TriState.  Remove all mention of TriState.
8238
8239         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8240         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8241         and maintain invariants.
8242
8243 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8244
8245         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8246
8247 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8248
8249         * expression.cs: Stop using obsolete 2.0 opcodes.
8250
8251 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8252
8253         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8254         one of the latests Martin's fixes.
8255
8256 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8257
8258         * expression.cs: On BigEndian systems, swap the bytes, temporary
8259         solution until we get a new bitconverter class.
8260
8261 2007-03-23  Martin Baulig  <martin@ximian.com>
8262
8263         Fix #81158.
8264
8265         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8266         "Method" and "Method`1".  Normally, a cache lookup is done on the
8267         "Method" form (ie. without the generic arity), but this one makes
8268         lookups on the full form work as well.
8269
8270 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8271
8272         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8273         unused properties.
8274
8275 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8276         * class.cs: 
8277         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8278         ordered_member_list, to TypeBuilder to store members to be defined
8279         in the order they were parsed in.
8280         - ordered_explicit_member_list contains all properties indexers
8281           and methods that are defined as explicit implementation of an
8282           interface or base class.
8283         - ordered_member_list contains all properties indexers and methods
8284           that are not defined as explicit implementation of an interface
8285           or base class.
8286
8287         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8288         functionality in these removed classes has been replaced with 
8289         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8290         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8291
8292         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8293         to CheckForDuplications inside GetMethod and SetMethod Define Method
8294         to handle method property and indexer name conflicts.
8295
8296         Fixes #79434
8297
8298         All code is contributed under the MIT/X11 license.
8299
8300 2007-03-20  Martin Baulig  <martin@ximian.com>
8301
8302         * class.cs (TypeContainer.Interfaces): Removed; they're now
8303         included in `TypeContainer.Types'.
8304
8305 2007-03-20  Martin Baulig  <martin@ximian.com>
8306
8307         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8308
8309         * class.cs (TypeContainer.CreateType): New public method.  This is
8310         now called before DefineType() to create the TypeBuilders.
8311         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8312         has already been created by CreateType().
8313         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8314         don't resolve our base classes here; this has been moved into
8315         DefineBaseTypes().  We're now called from CreateType().
8316         (TypeContainer.DefineBaseTypes): New private method; resolve our
8317         base classes here.  We're now called from DefineType().
8318
8319         * rootcontext.cs
8320         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8321         our types first to create all the TypeBuilders.  After that, call
8322         TypeContainer.DefineType() on all the types which'll resolve their
8323         base classes and setup the resolve order.
8324
8325 2007-03-20  Martin Baulig  <martin@ximian.com>
8326
8327         * class.cs (TypeContainer.Enums): Removed; they're now included in
8328         `TypeContainer.Types'.  
8329
8330 2007-03-20  Martin Baulig  <martin@ximian.com>
8331
8332         * class.cs
8333         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8334         (TypeContainer.DoResolveMembers): Call DefineType() on our
8335         `compiler_generated' classes; moved here from DefineNestedTypes().
8336
8337         * rootcontext.cs
8338         (RootContext.ResolveTree): Call ResolveMembers() on all
8339         TypeContainer's in the `type_container_resolve_order'.
8340
8341 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8342
8343         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8344
8345 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8346
8347         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8348         implementation flags.
8349
8350 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8351
8352         * class.cs: More optimizations for type parameters.
8353
8354 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8355
8356         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8357
8358         * ecore.cs, parameter.cs: More common code for both corlibs.
8359
8360         * typemanager.cs (IsGenericMethod): Simplified.
8361
8362 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8363
8364         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8365         'returns'.
8366         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8367
8368         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8369         unconditionally.  Simplify explanation.
8370         (Try.Resolve, Using.Resolve): Likewise.
8371
8372 2007-03-15  Martin Baulig  <martin@ximian.com>
8373
8374         Fix #80731.
8375
8376         * decl.cs (DeclSpace): If we're a partial class, use our
8377         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8378
8379 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8380
8381         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8382         'throws'.
8383         (FlowBranching.UsageVector): Update to changes.
8384         (FlowBranching.MergeSiblings): Likewise.
8385         * statement.cs: Likewise.
8386
8387 2007-03-15  Martin Baulig  <martin@ximian.com>
8388
8389         Fix #79302.
8390
8391         * decl.cs
8392         (MemberCache): Added a special .ctor for type parameters.
8393
8394         * typemanager.cs
8395         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8396         `MemberCache'.  
8397
8398 2007-03-09  Martin Baulig  <martin@ximian.com>
8399
8400         * enum.cs (Enum): Make this a TypeContainer.
8401         (EnumMember): Derive from `Const'.
8402
8403         * const.cs
8404         (Const.DoResolveValue): New protected virtual method; move most of
8405         the functionality of ResolveValue() here so we can override it in
8406         `EnumMember'.
8407         (Const.CreateConstantReference): Make this virtual.
8408
8409         * class.cs (Kind): Add `Kind.Enum'.
8410         (TypeContainer.Emit): Don't emit the enums here; they're already
8411         in the `RootContext.typecontainer_resolve_order'.
8412
8413         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8414         here; they're already in the `typecontainer_resolve_order'.
8415
8416         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8417         TypeManager.DropGenericTypeArguments().
8418
8419         * typemanager.cs
8420         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8421         (TypeManager.IsEnumType): Likewise.
8422         (TypeManager.EnumToUnderlying): Likewise.
8423         (TypeManager.IsEqual): Add support for enums.
8424
8425 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8426
8427         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8428         DefaultParameterValueAttribute to be undefined, say if System.dll
8429         is not referenced.
8430
8431 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8432
8433         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8434         any mscorlib.
8435
8436 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8437
8438         * class.cs, parameter.cs: Unified parameters verification.
8439
8440 2007-03-08  Martin Baulig  <martin@ximian.com>
8441
8442         * cs-parser.jay (constructor_header): Pass the location to the
8443         newly created TopLevelBlock.
8444
8445 2007-03-07  Martin Baulig  <martin@ximian.com>
8446
8447         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8448
8449 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8450
8451         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8452         with the changes from David, fixes the build.
8453
8454 2007-03-05  David Mitchell  <dmitchell@logos.com>
8455
8456         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8457         and its base interfaces to a one-dimensional array type S[],
8458         provided there is an implicit or explicit reference conversion
8459         from S to T.
8460
8461 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8462
8463         * cs-tokenizer.cs: Implemented basic linq grammar.
8464
8465         * driver.cs: Set linq lang version on demand.
8466
8467 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8468
8469         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8470
8471 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8472
8473         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8474         (Fixes #80455)
8475
8476         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8477         here.
8478         Check property and event extern attributes.
8479
8480         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8481         charset.
8482
8483 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8484
8485         A fix for bug #80407
8486         * ecore.cs: Don't report ambiguity error when methods have same parent.
8487
8488 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8489
8490         A fix for bug #80878
8491         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8492
8493 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8494
8495         * attribute.cs: Enable ExtensionAttribute presence test.
8496
8497 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8498
8499         * class.cs: Warn about missing GetHashCode only when Equals is override.
8500
8501         * decl.cs: Check accessibility of type arguments.
8502
8503         * typemanager.cs: Correctly report nullable array.
8504
8505 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8506
8507         * class.cs, report.cs: Capture more details when things go wrong.
8508
8509 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8510
8511         A fix for bug #80650
8512         * cs-parser.jay: Anonymous container starts at constructor declaration
8513         and not at block beginning because it has to be usable in constructor
8514         initializer.
8515
8516         * statement.cs: Use context location and not block one for error reporting.
8517
8518 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8519
8520         A fix for bug #78712
8521         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8522         too.
8523
8524 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8525
8526         A fix for bug #80493 by Atsushi Enomoto
8527         * cs-parser.jay: Ignore invalid attribute target.
8528
8529 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8530  
8531         * cs-tokenizer.cs: Ignore '\0' as white space character.
8532
8533 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8534
8535         * cs-parser.jay: Add support for lambda expressions to the mcs
8536         compiler as well.
8537
8538         * lambda.cs: Only clone when we are probing, not on the final call
8539         (Compatible is the final call). 
8540
8541         * statement.cs (CloneContext): Introduce class to provide block
8542         remapping during clone.
8543
8544         All statements Clone themselves now.
8545
8546         (Clone): special handling for blocks, when we clone a block, we
8547         register the block inside this routine, as children of the block
8548         might trigger a lookup. 
8549         
8550         * expression.cs: Add support for CloneContext in all expressions. 
8551         
8552 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8553  
8554         A fix for bug #80493
8555         * statement.cs: Report ambiguous warning when interfaces are not related.
8556
8557 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8558
8559         C# 3.0 extension methods.
8560
8561         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8562         cannot be used directly.
8563
8564         * class.cs (Class.Emit): Emit extension attribute if any class method
8565         is extension method.
8566         (Method.Define): Add basic extension method validation conditions.
8567         (Method.Emit): Emit extension attribute for method.
8568
8569         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8570         extension method exists. Currently we follow same approach as Microsoft
8571         does, emit even if a method or a class are private but this can change
8572         later.
8573
8574         * cs-parser.jay: Add handling of `this' keyword in method parameters
8575         context.
8576
8577         * decl.cs (DeclSpace.IsStaticClass): New property.
8578         (MemberCache.FindExtensionMethods): Looks for extension methods with
8579         defined name and extension type.
8580
8581         * doc.cs: Updated after OverloadResolve changes.
8582
8583         * driver.cs: Add new soft reference to System.Core.dll.
8584
8585         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8586         (ExtensionMethodGroupExpr): Represents group of extension methods.
8587
8588         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8589         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8590         to MethodGroupExpr and made non-static for easier customization.
8591         (Invocation.DoResolve): Add extension method lookup when no standard
8592         method was found.
8593         (MemberAccess.DoResolve): Try extension methods if no member exists.
8594
8595         * modifiers.cs: Add METHOD_EXTENSION modifier.
8596
8597         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8598         as well as candidate extension type.
8599         (ComputeNamespaces): When assembly constains extension methods registers
8600         them.
8601         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8602         extension method lookup.
8603         (Namespace.LookupExtensionMethod): Looks for extension method in this
8604         namespace.
8605         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8606         find a method which matches name and extensionType.
8607
8608         * parameter.cs (Parameter): Add This modifer.
8609         (HasExtensionMethodModifier): New property.
8610         (Resolve): Add extension parameter check.
8611         (ModFlags): turned to property to exclude this modifier as it is not real
8612         parameter modifier.
8613         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8614
8615         * support.cs (ParameterData): Add ExtensionMethodType.
8616         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8617
8618         * typemanager.cs: Add type and ctor extension attribute type.
8619
8620 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8621
8622         * report.cs (DisableErrors, EnableErrors): used to prevent error
8623         output when we are "trying" to compile various methods with
8624         different types. 
8625
8626         * ecore.cs (Expression): Add Clone method that calls the virtual
8627         CloneTo method.  The current CloneTo method in Expression throws
8628         an exception so we can track down all the places where this must
8629         be implemented (not using abstract, because that would be a lot of
8630         up-front-work before we can start testing the implementation
8631         idea). 
8632
8633         Important: we only need Clone capabilities for expressions created
8634         by the parser, as the expressions we will be cloning are
8635         expressions in the pre-resolved state.   This vastly simplifies
8636         the work required. 
8637         
8638         (SimpleName): Add CloneTo that does nothing.
8639         (EmptyCast): Add CloneTo.
8640         
8641         * expression.cs (Binary): Implement CloneTo.
8642         (Invocation.IsApplicable): Store the current ec in
8643         EmitContext.TempEc and restore it on return.  This is used so we
8644         do not have to sprinkle hundres of methods with an extra
8645         EmitContext, we know that the only user is the lambda expression
8646         ImplicitConversionExists code. 
8647         
8648         (Argument): Add Cloning capabilities.
8649         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8650         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8651         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8652         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8653         IndexerAccess): Add Clone capability.
8654
8655         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8656
8657         (Argument): Add cloning capability.
8658
8659         * assign.cs (Assign): Implement CloneTo.
8660
8661         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8662         
8663         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8664         version by calling Convert with the EmitContext (that we are
8665         currently storing in ec, this is not great, but will do for now,
8666         to avoid passing EmitContext parameters to hundreds of functions
8667         that do not need them now).
8668
8669         (SetExpression): Remove, it is not needed.
8670         
8671         (ContextualReturn): Implement CloneTo.
8672
8673         * statement.cs (Statement): Implement cloning infrastructure,
8674         similar to expressions.
8675
8676         (Block): Partial implementation of Clone for statements.
8677
8678         (Return): Implement clone.
8679         
8680         * constant.cs (Constant.CloneTo): New method, does nothing.
8681
8682         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8683         solution, until we decide how to exactly do this.  
8684         
8685 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8686  
8687         A fix for bug #80493
8688         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8689         a property is override we need to use second accessor.
8690
8691 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8692  
8693         A fix for bug #80418
8694         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8695         methods.
8696
8697 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8698
8699         Another fix for bug #80749
8700         * pending.cs: Abstract class has priority over interfaces.
8701
8702 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8703
8704         Another fix for bug #80749
8705         * pending.cs: Abstract class has priority over interfaces.
8706
8707 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8708
8709         Another fix for bug #80749
8710         * pending.cs: Abstract class has priority over interfaces.
8711
8712 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8713
8714         Another fix for bug #80749
8715         * pending.cs: Abstract class has priority over interfaces.
8716
8717 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8718
8719         * class.cs Better error message.
8720
8721         * driver.cs: Add shorter versions of -optimize option.
8722
8723 2007-02-13  Martin Baulig  <martin@ximian.com>
8724
8725         * class.cs (Constructor.Emit): Check the return value of
8726         ec.ResolveTopBlock() and return on error.
8727
8728 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8729
8730         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8731         message to fix error message regression.
8732
8733 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8734
8735         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8736
8737 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8738
8739         A fix for bug #80749
8740         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8741         its parent container.
8742
8743         * class.cs (DefineFieldInitializers): Each initializer can has different
8744         resolve context.
8745
8746         * const.cs: Updated.
8747
8748 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8749
8750         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8751         now all the heavy lifting to check that embedded statements or
8752         expressions have the right form is done in the ContextualReturn.
8753
8754         (ContextualReturn): New class.  
8755
8756         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8757         method that can be invoked to report 201, so we do not replicate
8758         this everywhere.
8759
8760         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8761         
8762         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8763         treating tabs as spaces. 
8764
8765 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8766
8767         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8768         * assign.cs: Use full implicit conversion for right side check.
8769
8770 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8771
8772         * statement.cs (Switch): Switch over boolean type is not standardized.
8773
8774 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8775
8776         A fix for bug #80755
8777         * decl.cs (FindBaseEvent): Don't use method cache for events.
8778
8779 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8780
8781         * cs-parser.jay: Better syntax error handling.
8782
8783         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8784         instead of underlying type value.
8785
8786 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8787
8788         * driver.cs: Check define identifier before is registered.
8789
8790         * namespace.cs: Use existing error message.
8791
8792         * report.cs: New warning.
8793
8794 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8795
8796         A fix for bug #80742
8797         * expression.cs: Delegate Invoke method can be called directly.
8798
8799 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8800
8801         A fix for bug #80676
8802         * class.cs (IsEntryPoint): The Main method can have params modifier.
8803
8804 2007-02-04  Miguel de Icaza  <miguel@novell.com>
8805
8806         * parameter.cs (Parameter, Parameters): Add Clone method.
8807
8808         * anonymous.cs (Compatible): Turn method into virtual method, so
8809         LambdaExpression can implement a different behavior.
8810
8811         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
8812         out the basic checking here, so it can be used by
8813         LambdaExpressions.
8814         
8815         * lambda.cs: Introduce "Compatible" function that will do the
8816         heavy lifting.
8817
8818 2007-02-02  Marek Safar  <marek.safar@gmail.com>
8819
8820         * attribute.cs: Unified one error message.
8821
8822         * class.cs (Class): Use type attributes and not properties to test static
8823         class.
8824         (IsEntryPoint): Don's pass local variable.
8825
8826         * convert.cs: Removed duplicate check.
8827
8828         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
8829
8830         * driver.cs: Don't crash when soft reference does not exist.
8831
8832         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
8833         (UsingEntry): Removed redundant allocation.
8834
8835         * parameter.cs: Add fast path for type parameters.
8836
8837         * support.cs: Don't allocate attribute when it's not used.
8838
8839 2007-01-30  Miguel de Icaza  <miguel@novell.com>
8840
8841         * anonymous.cs
8842         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
8843         this into a virtual method, so we can override it in LambdaExpression.
8844
8845         * driver.cs: Improve diagnostics in case of failure. 
8846
8847         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
8848         write a function that is slightly more complex and that parses:
8849
8850         type identifier [, type identifier]* )
8851
8852         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
8853         this expression:
8854
8855                 (canEmpty ? i >= 0 : i > 0)
8856
8857 2007-01-30  Raja R Harinath  <rharinath@novell.com>
8858
8859         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
8860         exception on possibly valid code.
8861
8862 2007-01-29  Raja R Harinath  <rharinath@novell.com>
8863
8864         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
8865         Push/PopPosition.
8866         (parse_opt_type_arguments): Remove.  It's almost the same as
8867         parse_less_than.
8868         (parse_namespace_or_typename): Use parse_less_than.
8869
8870 2007-01-28  Miguel de Icaza  <miguel@novell.com>
8871
8872         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
8873         this bug took a few hours to find, because the state saved and
8874         restored by PushPosition and PopPosition was ignoring the state of
8875         parse_generic_less_than.
8876
8877         I can also now remove the handling of OP_LT and OP_GT, this solves
8878         the big mistery.
8879         
8880         * cs-tokenizer.cs: store the location for the ARROW token, we use
8881         that in the parser.
8882
8883         (PushPosition, PopPosition): save/restore also `current_token',
8884         restore `parse_generic_less_than' (was missing).
8885
8886         (parse_opt_type_arguments): use parse_type, not
8887         parse_namespace_or_typename to parse types.
8888
8889         * lambda.cs: Empty new file, will eventually have the lambda
8890         expression implementation.
8891
8892         * lambda.test: used to test the internal tokenizer. 
8893
8894         * report.cs (FeatureIsNotISO1): Rename from
8895         FeatureIsNotStandardized, because it was about the language level
8896         (1 vs 2) it was not about standarization.
8897
8898         (FeatureRequiresLINQ): New.
8899
8900         * support.cs (SeekableStreamReader): Only require that the reader
8901         is a TextReader, not a StreamReader, so we can plug StringReader. 
8902
8903         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
8904         given position in the input stream the following tokens can be
8905         parsed as a type followed by an identifier.
8906
8907         (is_punct): after a '(' if parse_type_and_parameter returns true,
8908         then return a special token OPEN_PARENS_LAMBDA which is used to
8909         avoid reduce/reduce errors in the grammar for the
8910         lambda_expression rules.
8911
8912         (parse_type): implement a type parser inside the
8913         tokenizer, the parser only returns true or false depending on
8914         whether the input at a given position can be parsed as a type.
8915
8916         (peek_token): new method used during type parsing.
8917
8918 2007-01-28  Raja R Harinath  <rharinath@novell.com>
8919
8920         Fix #80531
8921         * anonymous.cs (ScopeInfo.InflateParameters): New.
8922         (AnonymousContainer.Resolve): Use it to redirect types of
8923         delegate parameters.
8924
8925 2007-01-27  Raja R Harinath  <rharinath@novell.com>
8926
8927         Fix #80530
8928         * expression.cs (Error_InvalidArguments): Don't use two different
8929         messages for CS1503.  Use ExtraInformation and
8930         SymbolRelatedToPreviousError instead.
8931
8932         Fix #80358
8933         * decl.cs (DeclSpace.initialize_type_params): Don't access
8934         'type_params' of a partial class directly.
8935
8936 2007-01-26  Miguel de Icaza  <miguel@novell.com>
8937
8938         * constant.cs: Removed a handful of out-of-range checks that were
8939         not necessary. 
8940
8941 2007-01-25  Marek Safar  <marek.safar@gmail.com>
8942
8943         * expression.cs (CheckUselessComparison): Add additional check for char
8944         constants.
8945
8946         * namespace.cs: Fixed typo.
8947
8948 2007-01-23  Miguel de Icaza  <miguel@novell.com>
8949
8950         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
8951         gone, instead we inline the test, preventing the needless casts to
8952         longs, ulongs and doubles for the parameters, avoiding calls to
8953         methods that overchecked stuff, and instead inlined things
8954         nicely. 
8955
8956 2007-01-20  Marek Safar  <marek.safar@gmail.com>
8957
8958         * cs-parser.jay: Better parameter error handling.
8959
8960 2007-01-17  Marek Safar  <marek.safar@gmail.com>
8961
8962         A fix for bug #80368, #80522
8963         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
8964         whether array initializer contains constants only.
8965         (ArrayCreation.Emit): Use better formula to decide when
8966         are array initializers for static initialization.
8967         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
8968         have to emit even constants otherwise they are pre-initialized.
8969
8970 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
8971             Raja R Harinath  <rharinath@novell.com>
8972
8973         Fix emit order of 'get' vs. 'set'.
8974         * support.cs (Accessors): New.
8975         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
8976         Note the order in which accessors are declared in the source.
8977         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
8978         Refactored from Property.Define and Indexer.Define.
8979         (PropertyBase.DefineAccessors): New helper that calls the above in
8980         appropriate order as noted by the parser.
8981         (Property.Define, Indexer.Define): Update to changes.
8982         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
8983
8984 2007-01-17  Raja R Harinath  <rharinath@novell.com>
8985
8986         Fix cs0029-6.cs and gcs0029-2.cs (regression)
8987         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
8988         there's an implicit conversion from the current type to the target
8989         type before converting the underlying constant.
8990
8991 2007-01-16  Marek Safar  <marek.safar@gmail.com>
8992
8993         * const.cs (ResolveValue): Updated after constant conversion was made more
8994         generic.
8995
8996         * constant.cs (GetAttributableValue): constant to object conversion is
8997         used for attributes only.
8998         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
8999         constant conversions.
9000         (LongConstant.ConvertImplicitly): Ditto.
9001
9002         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
9003         (ImplicitConversionStandard): Handle constant conversion as extra step.
9004         It solves the issue when constant conversion was called indirectly like
9005         inside array initializer and constant folding was skipped.
9006
9007         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
9008         this change.
9009
9010         * statement.cs(ImplicitConversionStandard): Updated after constant
9011         conversion was made more generic.
9012
9013 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
9014
9015         * expression.cs (As.DoResolve): Use GenericConstraints instead of
9016         Constraints, solves the problem where the compiler incorrectly
9017         reported that a type parameter was not constrained to a class (Bug
9018         80518)
9019
9020 2007-01-14  Marek Habersack  <grendello@gmail.com>
9021
9022         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
9023
9024 2007-01-14  Marek Safar  <marek.safar@gmail.com>
9025
9026         A fix for bug #80368
9027         * assign.cs (FieldInitializer): New class implements field
9028         initializer statement.
9029
9030         * attribute.cs: Update after FieldMember rename.
9031
9032         * class.cs (PropertyBasedMember): New common class for property based
9033         types.
9034         (InterfaceMemberBase): New base class for all members which can be used as
9035         an interface members.
9036         (MethodCore): Moved really common code to InterfaceMemberBase.
9037         (Method.Define): Equal and GetHasCode detection is relevant for methods
9038         only.
9039         (MethodData.Define): Don't assume that public event implements an
9040         interface automatically.
9041         (MethodData.DefineMethodBuilder): Issue an error even if only extern
9042         modifier is used.
9043         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
9044         (FieldMember): Merged with FieldBase.
9045         (EventProperty.AEventPropertyAccessor): New specialization to check whether
9046         event extern modifier can be used.
9047         (EventField.EventFieldAccessor): Moved event field specific code here.
9048         (Event.AllowedModifiers): Even event can be extern.
9049         (Event.FindOutBaseMethod): New override specific to events.
9050         (Indexer.parameters): Reintroduce parameters because base class holds
9051         only properties common data.
9052         (Indexer.CheckForDuplications): Indexers are threated as methods so we
9053         need do extra parameters check.
9054
9055         * const.cs: Update after FieldMember rename.
9056
9057         * decl.cs (MemberCache.FindBaseEvent): New method.
9058
9059         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
9060         to reflect that indexer is now derived from PropertyBased.
9061
9062         * ecore.cs (GetMemberType): Made public.
9063         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
9064         obsolete event.
9065
9066         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
9067         
9068         * typemanager.cs (CSharpSignature): Correctly print event accessors.
9069         (RegisterEvent): Removed.
9070         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
9071         (GetPrivateFieldOfEvent): Renamed to GetEventField.
9072
9073 2007-01-11  Raja R Harinath  <rharinath@novell.com>
9074
9075         Fix #80249
9076         * statement.cs (CollectionForeach.TryType): Prefer generic
9077         GetEnumerator over non-generic variant.  Fix code to follow comments.
9078
9079 2007-01-09  Raja R Harinath  <rharinath@novell.com>
9080
9081         Fix #80446
9082         * support.cs (ReflectionParameter): Don't use an invalid index on
9083         the generic parameter data.
9084
9085 2007-01-08  Miguel de Icaza  <miguel@novell.com>
9086
9087         * driver.cs: Just add a tiny bit of infrastructure.
9088
9089 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9090
9091         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
9092         where field type is struct from current assembly.
9093         
9094         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
9095         it is possible.
9096
9097 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9098
9099         A fix for bug #80381
9100         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
9101         the core types.
9102
9103         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
9104         messages.
9105         (Namespace.LookupType): Always use core types from corlib when speficied.
9106
9107         * report.cs: A new warning.
9108
9109         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
9110         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
9111         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
9112
9113         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
9114         (InitCoreTypes): Set expression type of object_type and value_type
9115         immediately after lookup.
9116
9117 2007-01-01  Miguel de Icaza  <miguel@novell.com>
9118
9119         * cs-tokenizer.cs: Accept Pc class characters (Connector
9120         Punctuation) as valid identifiers.  Fixes #78259
9121
9122         * expression.cs (Invocation.DoResolve): Moved the check for the
9123         use of `this' for doing method calls to the Invocation resolution
9124         step, after overload resolution has taken place instead of doing
9125         the check at the low-level `This.DoResolve' level.
9126
9127         The `This.DoResolve'(appens before overload resolution, so it has
9128         no way of knowing if the method that will be called will be
9129         instace or static, triggering an erroneous report for cs0188 (Bug
9130         78113).
9131
9132         We now do the check for instance method invocations after we know
9133         what method will be called.
9134
9135         (This.CheckThisUsage): Move the actual use of this structure
9136         checking into its own method and expose it. 
9137
9138         * Everywhere that called Error_ValueCannotBeConverted: pass a new
9139         EmitContext.
9140
9141         Exceptions: Null.ConvertImplicitly,
9142         Constant.ImplicitConversionRequired as there are too many call
9143         sites for passing the ec. 
9144
9145         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
9146         EmitContext, if the value is null, then we do not try to provide
9147         the extra information from the error (If a userdefined conversion
9148         exists, as UserDefinedConversion requires a non null-EmitContext).
9149
9150         Fixes: #80347
9151
9152 2006-12-30  Raja R Harinath  <rharinath@novell.com>
9153
9154         * flowanalysis.cs (MyBitVector): Document some invariants.
9155         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
9156         introduced below, and add a couple of others, 
9157
9158 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9159
9160         * attribute.cs (GetMethodObsoleteAttribute): Uses new
9161         GetPropertyFromAccessor and GetEventFromAccessor.
9162         
9163         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
9164         overrides non-obsolete one.
9165         (Indexer.Define): Error message has been moved to the parser.
9166
9167         * cs-parser.jay: Better syntax errors handling.
9168
9169         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
9170         when an invocation has no arguments.
9171
9172         * ecore.cs: Removed not used caching.
9173
9174         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
9175         implementation.
9176
9177         * report.cs: Add a new warning.
9178
9179         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
9180
9181         * typemanager.cs (enumeration_type): Removed.
9182         (CSharpSignature): Reuses IsSpecialMethod.
9183         (IsEqual): Hack for MS BCL.
9184         (GetPropertyFromAccessor): New method.
9185         (GetEventFromAccessor): New method.
9186         (IsSpecialMethod): Fixed to handle more cases.
9187
9188 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9189
9190         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
9191         Made white spaces array static.
9192
9193         * ecore.cs (RemoveGenericArity): Optimized.
9194
9195         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
9196         10 times faster).
9197         (MyBitVector.initialize_vector): Simplified.
9198
9199 2006-12-22  Miguel de Icaza  <miguel@novell.com>
9200
9201         * ecore.cs: Am not entirely happy with this hack, but it seems to
9202         address the issue in 80257 (a small test case for
9203         CreativeDocs.NET). 
9204
9205         I set the MethodGroupExpr.Type to an internal compiler type
9206         (itself in this case) to force the resolution to take place.   Why
9207         it does not take place with a null is beyond me.
9208
9209 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9210
9211         A fix for bug #80288
9212         * expression.cs (ResolveOperator): Consider user defined conversion for
9213         logical and operator too.
9214         (EmitBranchable): Optimization for logical and when full constant folding
9215         could not be applied but one operand is constant.
9216
9217 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9218
9219         * class.cs (GetClassBases): Write 5 times every day, will never use
9220         FullName for error reporting.
9221
9222         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9223
9224 2006-12-19  Martin Baulig  <martin@ximian.com>
9225
9226         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9227         the symbol file info here.
9228
9229 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9230
9231         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9232         of `elseif' is taking then following sections are not taking.
9233         Fixes an issue reported on mono mailing list.
9234
9235 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9236
9237         A fix for bug #80300
9238         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9239         a caller is not taking.
9240
9241 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9242
9243         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9244         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9245         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9246         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9247         * class.cs: Update to changes.
9248
9249 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9250
9251         A fix for bug #79934
9252         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9253         partial container.
9254
9255         * class.cs (ResolveMembers): Register an iterator in current container and
9256         not in shared one.
9257
9258 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9259
9260         Fix test-543.cs
9261         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9262         satisfy a params annotated parameter.
9263
9264 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9265
9266         A fix for bug #77014
9267         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9268         paramters correctly and not rely on hacks in Parameters class.
9269         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9270         at any possition.
9271         (Invocation.VerifyArgumentsCompat): Ditto.
9272         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9273         any possition.
9274
9275         * parameter.cs (HasParams): Don't assume that params is the last one.
9276
9277         * support.cs (ReflectionParameters.ctor): Look for params attribute
9278         correctly.
9279         (ReflectionParameters.ParameterType): Removed hack when we returned last
9280         parameter for out of range parameters.
9281         (ParameterName, ParameterModifier): Ditto.
9282
9283 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9284
9285         A fix for bug #79987
9286         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9287         when assembly is not CLS compliant but type is. I have no idea why is this
9288         allowed.
9289
9290         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9291
9292 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9293
9294         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9295         in struct constructors, they are basically no-ops.
9296
9297 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9298
9299         * cs-tokenizer.cs (Position): Save preprocessor status too.
9300
9301 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9302
9303         A fix for bug #77794
9304         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9305
9306 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9307
9308         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9309         Fixes #69299.
9310         (pp_expr): Report error for an invalid expression.
9311         (handle_preprocessing_directive): Simplified; add more error checking.
9312
9313 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9314
9315         A fix for bug #74939
9316         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9317         directives handling.
9318
9319 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9320
9321         A fix for bugs #80093, and #75984
9322         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9323         logic, it seems to me as it worked before "by coincidence".
9324         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9325         (cleanup): Enabled endif check.
9326
9327 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9328
9329         A fix for bug #80162
9330         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9331         enumerators are never ambiguous.
9332
9333 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9334
9335         Fix #80060
9336         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9337
9338 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9339
9340         A fix for bug #80144
9341         * class.cs (EventProperty.Define): Explicit implementation means
9342         that an even is used.
9343
9344 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9345
9346         Fixes the operators implementation (part II)
9347
9348         * cfold.cs (DoConstantNumericPromotions): Renamed to
9349         DoBinaryNumericPromotions and simplified.
9350         (BinaryFold): Couple of conversion fixes; simplified.
9351
9352         * constant.cs, ecore.cs, literal.cs
9353         (ToType): Renamed to ConvertImplicitly.
9354         (Reduce): Renamed to ConvertExplicitly.
9355
9356         * class.cs, convert.cs: Updated.
9357
9358         * expression.cs: TryReduce doesn't throw an exception.
9359
9360 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9361
9362         A fix for bug #80108
9363         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9364         compatible.
9365
9366 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9367
9368         Fixes unary operators implementation (part I)
9369         Also fixes #80026
9370
9371         * cfold.cs (Error_CompileTimeOverflow): Made internal
9372
9373         * const.cs (IConstant): Changed to use reference to constant and
9374         not constant itself.
9375         Updated IConstant implementations.
9376
9377         * constant.cs (CreateConstant): New factory method.
9378         Updated IConstant implementation.
9379
9380         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9381
9382         * ecore.cs: Updated to use CreateConstantReference.
9383
9384         * enum.cs: Reflects IConstant changes.
9385
9386         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9387
9388         * literal.cs (NullConstant): Change to be independently usable.
9389
9390 2006-11-29  Martin Baulig  <martin@ximian.com>
9391
9392         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9393         we need to emit the scope initializer before calling the base .ctor.
9394
9395         * anonymous.cs: Merged back from the new anonymous methods branch.
9396         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9397
9398         * expression.cs (ParameterReference.DoResolveBase): Create a
9399         "normal" ScopeInfo when capturing parameters rather than using the
9400         root scope; this makes things work with anonymous methods having
9401         parameters.
9402
9403         * statement.cs
9404         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9405
9406 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9407
9408         A fix for bug #79987
9409         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9410         check to a base class.
9411         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9412         only when assembly has missing attribute.
9413         * report.cs: Update.
9414
9415 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9416
9417         * cs-tokenizer.cs: Merged with gmcs version.
9418
9419 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9420
9421         * cs-tokenizer.cs,
9422         * cs-parser.jay: Better error message when partial keyword is misplaced.
9423
9424 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9425
9426         A fix for bug #79810
9427         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9428         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9429         a RuntimeWrappedException by default.
9430
9431 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9432
9433         A fix for bug #79843
9434         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9435         implementation.
9436         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9437
9438 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9439
9440         * driver.cs, namespace.cs: Uses faster IndexOf version.
9441
9442 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9443
9444         A fix for bug #79941
9445         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9446         operators.
9447         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9448         even if internal name is different.
9449         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9450         (UserDefinedConversion): Simplified as the operators cannot be internal.
9451         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9452         conversions.
9453         (MethodLookup): Replaced EmitContext with parentType.
9454         * expression.cs: Updated.
9455
9456 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9457
9458         * driver.cs (BadAssembly): Handle all the ugliness of
9459         DefineDynamicAssembly.
9460
9461 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9462
9463         Address parts of #58244 -- most of what's left is in the runtime
9464         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9465         CS1509 error checks, and handle them for all assembly loads, not
9466         just the first invocation.
9467         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9468         * codegen.cs (AssemblyClass.AddModule): ... here.
9469
9470 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9471
9472         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9473         IEnumerable<T> is ambiguous.
9474
9475 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9476
9477         A fix for bug #67689
9478         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9479         GetEnumerator is ambiguous.
9480
9481         * report.cs: Add new warning.
9482
9483 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9484
9485         A fix for bug #78602
9486         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9487         to protected member can be nested type.
9488
9489 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9490
9491         A fix for bug #78965
9492         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9493         to protected member must derive from current type.
9494
9495 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9496
9497         assign.cs: Reuses error method.
9498
9499         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9500         instead of type for constants.
9501         (Expression.Error_ValueAssignment): Common error method.
9502
9503         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9504         for any assignment.
9505
9506 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9507
9508         A fix for bug #79081
9509         * expression.cs (MemberAccess.DoResolve): Check nested type
9510         accessibility.
9511
9512 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9513
9514         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9515
9516 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9517
9518         A fix for bug #76591
9519         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9520
9521 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9522
9523         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9524         type forwarder of the same type multiple times.
9525
9526 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9527
9528         Fix #78820
9529         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9530         instance as an rvalue, even when we later resolve as an lvalue.
9531
9532 2006-10-25  Martin Baulig  <martin@ximian.com>
9533
9534         * anonymous.cs: Fix #79673.
9535
9536 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9537
9538         A fix for bug #79666
9539         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9540         ignored when is optimized (= default value) as its value is already set.
9541
9542 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9543
9544         A fix for bug #79724
9545         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9546         TypeContainer for type lookup.
9547
9548 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9549
9550         A fix for bug #79231
9551         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9552         * expression.cs (OverloadResolve): Always convert type name for
9553         an error message.
9554         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9555         other member.
9556
9557 2006-10-18  Martin Baulig <martin@ximian.com>
9558
9559         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9560
9561 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9562
9563         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9564         an int32, but requesting an int64 from the conversion
9565
9566 2006-10-12  Martin Baulig  <martin@ximian.com>
9567
9568         * anonymous.cs
9569         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9570         
9571 2006-10-12  Martin Baulig  <martin@ximian.com>
9572
9573         * statement.cs
9574         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9575
9576 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9577
9578         * convert.cs: Remove broken code: I was doing the "Existance"
9579         tests for Implicit conversions.
9580
9581 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9582
9583         * convert.cs: Added one missing case in
9584         ImplicitStandardConversionExists uint64 to intptr.
9585
9586         Fixes #59800
9587         
9588         * typemanager.cs (uintptr_type): another core known type.   
9589
9590         * ecore.cs (OperatorCast): routine used to do cast operations that
9591         depend on op_Explicit.  We could change some of the Decimal
9592         conversions to use this.
9593
9594         This one has a probe mechanism that checks both types for an op_
9595         which it coudl be used to eliminate two classes: CastToDecimal
9596         and CastFromDecimal.
9597
9598         * convert.cs: Implement the conversions documented in #59800
9599         
9600 2006-10-10  Martin Baulig  <martin@ximian.com>
9601
9602         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9603         before RootScope.ResolveMembers().
9604
9605         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9606         `CurrentType' if appropriate.
9607
9608 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9609
9610         A fix for bug #78568
9611         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9612         when contains binary operators.
9613         * cs-parser.jay: Updated.
9614
9615 2006-10-09  Martin Baulig  <martin@ximian.com>
9616
9617         * delegate.cs
9618         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9619         moved that into Define() and also do the other type parameter
9620         checks there.  Fixes #79094.  Added gtest-292.cs.
9621
9622         * expression.cs
9623         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9624         since that doesn't include type parameters; don't use `Ldelema'
9625         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9626
9627 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9628
9629         A fix for #77796
9630         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9631         conversion is allowed.
9632
9633 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9634
9635         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9636         error reporting when no error occurs.
9637
9638 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9639
9640         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9641         does not exist.
9642
9643 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9644
9645         Fix #79584
9646         * class.cs (DefineTypeBuilder): Check circular dependencies before
9647         setting the parent of the TypeBuilder.
9648         (CheckRecursiveDefinition): Don't use 'BaseType', since
9649         it may not be valid until after DefineTypeBuilder.  Use
9650         'base_type' instead.
9651
9652 2006-10-04  Martin Baulig  <martin@ximian.com>
9653
9654         Merged the Anonymous Methods patch.
9655
9656         * anonymous.cs, iterators.cs: The new anonymous methods code.
9657
9658         * statement.cs (Variable): New public abstract class.
9659         (LocalInfo.Variable): New public property.
9660         (LocalInfo.ResolveVariable): New public method.
9661         (Block.Flags): Add `IsIterator'.
9662         (Block.AddVariable): Improved the CS0136 check.
9663         (Block.AnonymousChildren): New public property.
9664         (Block.AddAnonymousChild): New public method.
9665         (ToplevelBlock): Update to use the new anonymous method framework.
9666         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9667         `ToplevelBlock'; this is required to correctly implement the
9668         CS0136 check.
9669         (Fixed, Using): Use `TemporaryVariable' instead of directly
9670         creating the `LocalBuilder'.
9671
9672         * parameter.cs (Parameter.ResolveVariable): New public method.
9673         (Parameters.ResolveVariable): Likewise.
9674
9675         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9676
9677         * class.cs (TypeContainer): Replaced the `iterators' list and
9678         corresponding methods with a list of `CompilerGeneratedClass'es.
9679         (TypeContainer.ResolveMembers): New public method.
9680         (Method): `IIteratorContainer' has been replaced by
9681         `IAnonymousHost'.
9682
9683         * expression.cs (VariableReference): New public abstract base
9684         class for `LocalVariableReference', `ParameterReference' and
9685         `This'.
9686
9687         * codegen.cs (EmitContext): Removed `capture_context',
9688         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9689         (EmitContext.EmitThis): Removed.
9690
9691         * cs-parser.jay: Replace `iterator_container' with
9692         `anonymous_host'.       
9693
9694 2006-10-04  Martin Baulig  <martin@ximian.com>
9695
9696         * generic.cs (GenericMethod): Don't make this abstract.
9697         (Constraints.Clone): Added dummy implementation.
9698
9699 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9700
9701         Fix #79577
9702         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9703         'declspaces'.  Avoid allocating arrays willy-nilly.
9704
9705         Fix #79553
9706         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9707         cases out of the switch.
9708
9709 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9710
9711         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9712         message when non-generic type is used with the type arguments.
9713         * expression.cs: Updated.
9714
9715 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9716
9717         Fix #79013
9718         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9719         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9720         Change semantics slightly.  Don't insist on having only one
9721         temporary EmptyExpression -- just throttle the creation of new ones.
9722
9723         Fix #79451
9724         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9725         non-interfaces too.  If no methods are found, don't try to create
9726         a MethodGroupExpr.
9727
9728 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9729
9730         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9731         generic type.
9732
9733         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9734         us produce better error message.
9735
9736 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9737
9738         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9739         of the `|' operator.
9740
9741         * report.cs: A new warning added.
9742
9743 2006-09-27  Martin Baulig  <martin@ximian.com>
9744
9745         * generic.cs (GenericMethod): Don't make this abstract.
9746
9747 2006-09-27  Martin Baulig  <martin@ximian.com>
9748
9749         * report.cs
9750         (InternalErrorException): Added overloaded ctor taking a params array.
9751
9752 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9753
9754         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9755         Fixed the cases when same error was reported twice.
9756
9757         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9758         now report symbol information.
9759
9760 2006-09-25  Martin Baulig  <martin@ximian.com>
9761
9762         * class.cs: Completely unified with the gmcs version.
9763
9764 2006-09-25  Martin Baulig  <martin@ximian.com>
9765
9766         * typemanager.cs (TypeManager.IsNullableType): New public function.
9767         (TypeManager.IsNullableTypeOf): Likewise.
9768         (TypeManager.IsNullableValueType): Likewise.
9769
9770         * class.cs (MethodCore): Added the `GenericMethod' argument from
9771         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9772
9773 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9774
9775         * convert.cs: Unify with gmcs version.
9776
9777 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9778
9779         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9780         verify them as well.
9781
9782         * report.cs: New warning.
9783
9784 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9785
9786         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9787         for anonymous block with out argument.
9788
9789 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9790
9791         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9792         not used private events only.
9793
9794 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9795
9796         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
9797
9798         * const.cs (Const.Define): Check for constant type.
9799         (Const.IsConstantTypeValid): Looks for valid constant types.
9800
9801         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
9802
9803         * ecore.cs (EmptyConstantCast): New common class for all constant based
9804         EmptyCast(s).
9805
9806         * expression.cs (Is.DoResolve): Handle null constant especially.
9807         (New.DoResolve): Check for new void().
9808         (MemberAccess.DoResolve): Cope with all kind of nulls.
9809
9810         * literal.cs (NullConstant): Uses EmptyConstantCast.
9811         (NullDefault): Based on EmptyConstantCast.
9812         (NullLiteral): Uses EmptyConstantCast.
9813
9814         * statement.cs (Block.ResolveMeta): Check for constant type.
9815
9816 2006-09-22  Martin Baulig  <martin@ximian.com>
9817
9818         * delegate.cs, attribute.cs: Merged with the gmcs versions.
9819
9820 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9821
9822         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
9823         not the null type.
9824
9825         Fix part of #79451
9826         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
9827         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
9828         code slightly.
9829
9830 2006-09-22  Martin Baulig  <martin@ximian.com>
9831
9832         * ecore.cs: Merged with the gmcs version.
9833
9834         * generic.cs (ConstructedType): New dummy class.
9835         (TypeArguments): Don't make this abstract.
9836
9837         * typemanager.cs
9838         (TypeManager.IsGenericTypeDefinition): New method.
9839         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
9840
9841 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9842
9843         * expression.cs (ComposedCast): Check for arrays of TypedReference
9844         before creating the type, not after.
9845
9846 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
9847
9848         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
9849         after ToType change.
9850
9851         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
9852         when constant must be implicitly convertible.
9853
9854         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
9855
9856         * ecore.cs (NullCast): Derives from NullConstant.
9857
9858         * expression.cs (Is.DoResolve): Removed useless variables.
9859         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
9860         (New.Constantify): Add enum support.
9861         (MemberAccess.DoResolve): Add warning when accessing null constant or
9862         variable.
9863
9864         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
9865         property.
9866
9867         * literal.cs (NullConstant): New abstract class with common
9868         functionality for all null specializations.
9869         (NullDefault): Represents default(X) when result can be
9870         reduced to null.
9871         (NullLiteral): Updated.
9872
9873         * report.cs: Add new warning.
9874
9875 2006-09-21  Martin Baulig  <martin@ximian.com>
9876
9877         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
9878
9879 2006-09-21  Martin Baulig  <martin@ximian.com>
9880
9881         * generic.cs (GenericConstraints): New dummy class.
9882         (Constraints): Likewise.
9883         (TypeParameter): Likewise.
9884         (TypeParameterName): Likewise.
9885         (GenericMethod): Likewise.
9886
9887         * typemanager.cs (TypeManager.GetGenericArguments): New method.
9888
9889         * decl.cs: Merged with the gmcs version.
9890
9891 2006-09-21  Raja R Harinath  <rharinath@novell.com>
9892
9893         * generic.cs (TypeParameter): Implement IMemberContainer.
9894         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
9895
9896         * rootcontext.cs: Unify with gmcs version.
9897
9898         * report.cs: Unify with gmcs version.
9899         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
9900         from gmcs/generics.cs.
9901         * generics.cs (TypeParameter): New dummy class.
9902
9903         * support.cs: Unify with gmcs version.
9904
9905 2006-09-20  Raja R Harinath  <rharinath@novell.com>
9906
9907         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
9908         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
9909
9910         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
9911         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
9912         * mcs.exe.sources: Add generic.cs.
9913
9914         * codegen.cs: Unify with gmcs version.
9915
9916         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
9917         (EmitContext): Add GenericDeclContainer implementation.
9918         * decl.cs (MemberCore, DeclSpace): Likewise.
9919         * namespace.cs: Remove #ifdef GMCS_SOURCE.
9920
9921         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
9922         MCS TypeManager has a corresponding dummy method.
9923
9924 2006-09-19  Martin Baulig  <martin@ximian.com>
9925
9926         * expression.cs: Completely merged with the gmcs version.
9927
9928 2006-09-19  Martin Baulig  <martin@ximian.com>
9929
9930         * expression.cs (Invocation): Merged with the gmcs version.
9931         (ArrayAccess.GetStoreOpcode): Likewise.
9932
9933 2006-09-19  Martin Baulig  <martin@ximian.com>
9934
9935         * typemanager.cs
9936         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
9937         (TypeManager.IsGenericMethodDefinition): Likewise.
9938
9939 2006-09-19  Martin Baulig  <martin@ximian.com>
9940
9941         * typemanager.cs
9942         (TypeManager.IsEqual): Moved the gmcs implementation here.
9943         (TypeManager.DropGenericTypeArguments): Likewise.
9944         (TypeManager.DropGenericMethodArguments): Likewise.
9945         (TypeManager.GetTypeArguments): Moved here from gmcs.
9946         (TypeManager.HasGenericArguments): Likewise.
9947
9948 2006-09-19  Martin Baulig  <martin@ximian.com>
9949
9950         * expression.cs (Binary): Merged with the gmcs version.
9951
9952 2006-09-19  Martin Baulig  <martin@ximian.com>
9953
9954         * expression.cs (Probe, As, Is): Merged with the gmcs version.
9955
9956 2006-09-19  Martin Baulig  <martin@ximian.com>
9957
9958         * typemanager.cs: Merged with the gmcs version.
9959
9960 2006-09-16  Raja R Harinath  <rharinath@novell.com>
9961
9962         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
9963         * driver.cs: Likewise.
9964
9965 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
9966
9967         A fix for #79401
9968         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
9969         only if parent type is class.
9970         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
9971         update.
9972
9973 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
9974
9975         * cs-parser.jay,
9976         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
9977         keywords are used.
9978         * typemanager.cs(CSharpName): Converts NullType to null.
9979
9980 2006-09-15  Martin Baulig  <martin@ximian.com>
9981
9982         * typemanager.cs
9983         (TypeManager.GetMethodName): Added mcs implementation.
9984         (TypeManager.IsEqual): Likewise.
9985
9986         * ecore.cs
9987         (SimpleName.RemoveGenericArity): Added dummy implementation.
9988
9989         * pending.cs: Merged with the gmcs version.     
9990
9991 2006-09-15  Martin Baulig  <martin@ximian.com>
9992
9993         * statement.cs: Merge with the gmcs version.
9994
9995 2006-09-15  Martin Baulig  <martin@ximian.com>
9996
9997         * statement.cs (Switch): Merge with the gmcs implementation
9998         (without nullables), which is newer.
9999
10000 2006-09-15  Martin Baulig  <martin@ximian.com>
10001
10002         * statement.cs (Block.Variables): Make this public.
10003         (ToplevelBlock.Parameters): Make this a property.
10004         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
10005
10006 2006-09-15  Martin Baulig  <martin@ximian.com>
10007
10008         * namespace.cs: Merge with the gmcs version.
10009
10010 2006-09-15  Martin Baulig  <martin@ximian.com>
10011
10012         * decl.cs (MemberName): Minor code cleanups.
10013
10014 2006-09-15  Martin Baulig  <martin@ximian.com>
10015
10016         * parameter.cs: Merge with the gmcs version.
10017
10018 2006-09-15  Martin Baulig  <martin@ximian.com>
10019
10020         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
10021         and an error in mcs.
10022
10023 2006-09-15  Martin Baulig  <martin@ximian.com>
10024
10025         * flowanalysis.cs: Merged from GMCS; added the generics code into
10026         a `GMCS_SOURCE' conditional so we can share this file.
10027
10028 2006-09-08  Martin Baulig  <martin@ximian.com>
10029
10030         * typemanager.cs (TypeManager.interlocked_type): New public field.
10031         (TypeManager.int_interlocked_compare-exchange): New public field.
10032         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
10033         enumerator types here and call InitGenericCoreTypes().
10034         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
10035         after calling InitEnumUnderlyingTypes().
10036
10037         * rootcontext.cs
10038         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
10039         `classes_second_stage'. 
10040
10041 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
10042
10043         * assign.cs, ecore.cs, expression.cs: Share error message text.
10044         * class.cs (FieldMember.Define): Check for varible of static type.
10045         * driver.cs (LoadAssembly): Uses error output for errors.
10046         * statement.cs: Updated.
10047
10048 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
10049
10050         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
10051         type instance.
10052
10053 2006-09-07  Martin Baulig  <martin@ximian.com>
10054
10055         * driver.cs
10056         (MainDriver): Revert r62663 from Marek; see #70506 for details.
10057
10058 2006-08-29  Miguel de Icaza  <miguel@novell.com>
10059
10060         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
10061         
10062 2006-08-17  Miguel de Icaza  <miguel@novell.com>
10063
10064         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
10065         #52019 and #79064, the use of the \uXXXX sequence in source code
10066         to represent unicode characters.
10067
10068 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
10069
10070         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
10071         support.
10072         * class.cs, ecore.cs, statement.cs: Merged to one error message.
10073
10074 2006-08-13  Miguel de Icaza  <miguel@novell.com>
10075
10076         * assign.cs: Catch attempts to assign to a method groups in += and
10077         report as 1656
10078
10079 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
10080
10081         A fix for #79056
10082         * cs-parser.jay: Don't destroy current array type by typeof of array's.
10083
10084 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
10085
10086         * class.cs (Method.Define): Issue a warning when generic method looks like
10087         an entry point.
10088         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
10089         as well.
10090
10091 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
10092  
10093         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
10094         looking for ctor.
10095         * decl.cs (MemberCache.FindMembers): When container is interface we need to
10096         search all base interfaces as a member can be ambiguous.
10097         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
10098         Constructor member type filter. 
10099         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
10100         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
10101         reporting for returned memberinfos.
10102         * report.cs: Updated.
10103         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
10104         version to work on all runtimes.
10105         (TypeManager.RealMemberLookup): Removed members filtering.
10106
10107 2006-08-08  Raja R Harinath  <rharinath@novell.com>
10108
10109         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
10110         (PropertyExpr.EmitAssign): Likewise.
10111         * expression.cs (Indirection.EmitAssign): Likewise.
10112         (LocalVariableReference.EmitAssign): Likewise.
10113         (ParameterReference.EmitAssign): Likewise.
10114         (Invocation.EmitArguments): Likewise.
10115         (ArrayAccess.EmitAssign): Likewise.
10116         (IndexerAccess.EmitAssign): Likewise.
10117         (This.EmitAssign): Likewise.
10118         (ConditionalLogicalOperator.Emit): Likewise.
10119
10120         Fix #79026
10121         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
10122         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
10123         leave it in after returning it.
10124         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
10125
10126 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
10127
10128         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
10129         message.
10130
10131 2006-08-03  Raja R Harinath  <rharinath@novell.com>
10132
10133         Fix cs0146-3.cs and cs0146-4.cs.
10134         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
10135         enclosing types don't depend on the current type.
10136
10137 2006-08-02  Raja R Harinath  <rharinath@novell.com>
10138
10139         Fix #77963
10140         * class.cs (TypeContainer.DoDefineMembers): Use
10141         FindBaseMemberWithSameName on Parent, since we're interested in
10142         whether we hide inherited members or not.
10143         (FindBaseMemberWithSameName): Make slightly more robust.
10144
10145         Fix the non-generic testcase from #77396
10146         * decl.cs (DeclSpace.DeclContainer): Remove override.
10147
10148         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
10149         declspaces for doppelgangers too.
10150         (UsingEntry): Implement IResolveContext.
10151         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
10152         'this' as the resolve context.
10153         (LocalAliasEntry): Likewise.
10154
10155         Implement parts of #77403
10156         * roottypes.cs (RootDeclSpace): New.  Used to represent the
10157         toplevel declaration space.  Each namespace declaration introduces
10158         a "partial" root declaretion space.
10159         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
10160         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
10161         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
10162         from 'current_namespace.SlaveDeclSpace'.
10163         (namespace_declaration): Likewise.
10164         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
10165         check.  It can't happen now.
10166         * decl.cs (DeclSpace.LookupType): Likewise.
10167         * driver.cs (MainDriver): Sanity check.
10168
10169 2006-08-01  Raja R Harinath  <rharinath@novell.com>
10170
10171         * decl.cs (DeclSpace.FindNestedType): Remove.
10172         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
10173         LookupTypeContainer to get the container of the nested type.
10174         * class.cs (TypeContainer.FindNestedType): Make non-override.
10175
10176 2006-07-31  Raja R Harinath  <rharinath@novell.com>
10177
10178         * decl.cs (DeclSpace.PartialContainer): Move field from ...
10179         * class.cs (TypeContainer.PartialContainer): ... here.
10180         (TypeContainer.AddBasesForPart): New helper.
10181         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
10182         instead.
10183         * cs-parser.jay (current_class): Convert to DeclSpace.
10184         (struct_declaration, interface_declaration, class_declaration):
10185         Use AddBasesForPart instead of .Bases directly.
10186         * const.cs, iterators.cs: Update to changes.
10187
10188 2006-07-28  Raja R Harinath  <rharinath@novell.com>
10189
10190         * class.cs (TypeContainer.AddMemberType): Rename from
10191         AddToTypeContainer.
10192         (TypeContainer.AddMember): Rename from AddToMemberContainer.
10193         (AddTypeContainer): New.  Combine AddClassOrStruct and
10194         AddInterface.
10195         (AddPartial): Update.  Add 'is_partial' argument.
10196         * roottypes.cs: Update to changes.
10197         * cs-parser.jay (push_current_class): New helper for handling
10198         current_container and current_class.
10199         (struct_declaration, interface_declaration, class_declaration):
10200         Use it.
10201
10202 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10203
10204         * roottypes.cs: Rename from tree.cs.
10205
10206         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10207         * tree.cs (Tree, ITreeDump): Remove types.
10208         * rootcontext.cs (tree, Tree): Remove fields.
10209         (root, ToplevelTypes): New.
10210         * *.cs: Update to rename.
10211
10212         * tree.cs (Tree.RecordDecl): Remove.
10213         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10214         namespace here.
10215         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10216
10217 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10218
10219         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10220         DoFlowAnalysis and OmitStructFlowAnalysis here.
10221         (ec.With): Rename from WithUnsafe and generalize.
10222         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10223         (ec.WithFlowAnalyis): New.
10224         * ecore.cs, expression.cs, statement.cs: Update.
10225
10226 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10227
10228         * statement.cs (Block.ResolveMeta): Simplify slightly.
10229
10230         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10231         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10232         check_state to flags.
10233         (CheckState, ConstantCheckState): Update.
10234         (InUnsafe): New read-only property.
10235         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10236         arbitrary flags.
10237         (WithUnsafe): New helper similar to WithCheckState.
10238         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10239         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10240
10241 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10242
10243         Make comparisons use the same IL irrespective of whether they're
10244         in a 'checked' or 'unchecked' context: one of the issues in #78899
10245         * codegen.cs (EmitContext.CheckState): Make read-only property.
10246         (EmitContext.ConstantCheckState): Likewise.
10247         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10248         helper that implement a save/restore stack for CheckState
10249         values.  This is the only way to change check-state.
10250         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10251         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10252         (CheckedExpr.EmitBranchable): New forwarding method.
10253         (UnCheckedExpr): Likewise.
10254         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10255         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10256         (Checked.Resolve, checked.DoEmit): Likewise.
10257
10258 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10259
10260         * anonymous.cs: Cache the resolved anonymous delegate, and return
10261         this so that the ResolveTopBlock is only triggered once, not
10262         twice.
10263
10264         Currently we trigger ResolvetopBlock twice due to a first pass of
10265         argument check compatibility, and a second pass that does the
10266         actual resolution.   
10267         
10268 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10269
10270         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10271         modifiers.
10272         * rootcontext.cs (Reset): Add helper_classes.
10273
10274 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10275
10276         A fix for #78860
10277         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10278         correctly.
10279
10280 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10281
10282         * statement.cs (Lock): Handle expressions of type
10283         TypeManager.null_type specially.  Fixes #78770
10284
10285 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10286
10287         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10288         to an event.
10289
10290 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10291
10292         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10293         for accessors as well.
10294         * ecore.cs (EventExpr): Add AccessorTable.
10295
10296 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10297
10298         A fix for #78738
10299         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10300         for CS0122 where appropriate.
10301         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10302         level attributes.
10303         (Filter): Assembly can be null in the case of top level attributes.
10304
10305 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10306
10307         A fix for #78690
10308
10309         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10310         is done at global level.
10311
10312 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10313
10314         A fix for #77002, Implemented TypeForwarder support.
10315
10316         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10317         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10318         * typemanager.cs (): Add type_forwarder_attr_type.
10319
10320 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10321
10322         * report.cs: Add CS0469 warning.
10323
10324 2006-06-21  Martin Baulig  <martin@ximian.com>
10325
10326         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10327         the `try'-block, so we also report CS0016 etc. there.
10328
10329 2006-06-21  Martin Baulig  <martin@ximian.com>
10330
10331         * delegate.cs
10332         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10333
10334 2006-06-21  Martin Baulig  <martin@ximian.com>
10335
10336         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10337         also report CS1686 for parameters.
10338
10339 2006-06-21  Martin Baulig  <martin@ximian.com>
10340
10341         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10342         instead of an error if the value is not implicitly convertible to
10343         the switch types; fixes #77964.
10344
10345 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10346
10347         Fix #78673
10348         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10349         FieldBuilder is null.
10350
10351         Fix #78662
10352         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10353         'left' and 'right' before error-checking.
10354
10355 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10356
10357         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10358         Fixed bug #78601.
10359         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10360         (FieldExpr.DoResolve): likewise.
10361         (PropertyExpr.InstanceResolve): likewise.
10362         (EventExpr.InstanceResolve): likewise. 
10363
10364 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10365
10366         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10367         attribute applicable tests for attribute argument.
10368
10369 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10370
10371         Fix #78079
10372         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10373         (Binary.OverloadResolve_PredefinedIntegral): New.
10374         (Binary.OverloadResolve_PredefinedFloating): New.
10375         (Binary.OverloadResolve_PredefinedString): New.
10376         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10377         Follow the standard more closely, and treat numeric promotions in
10378         terms of overload resolution.
10379         (Binary.CheckShiftArguments): Simplify.
10380
10381 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10382
10383         * flowanalysis.cs (MyBitVector): Simplify representation.
10384         (MyBitVector.Clone): Avoid allocating BitArray.
10385         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10386         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10387         (*): Update.  Change all references to MyBitVector.And and
10388         MyBitVector.Or to &= and |=.
10389
10390 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10391
10392         Fix cs0231-[34].cs.
10393         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10394         to param arguments too.
10395
10396 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10397
10398         * cs-parser.jay: Catch another parsing form for arglist being
10399         followed by other arguments.  Fixes #78313.
10400
10401 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10402
10403         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10404         checking of out parameters to ...
10405         (FlowBranchingToplevel.Merge): ... here.
10406         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10407         set, propagate the origin upward, and only complain if there was
10408         no other error.
10409         (FlowBranchingException.AddContinueOrigin): Likewise.
10410         (FlowBranchingException.AddReturnOrigin): Likewise.
10411         (FlowBranchingException.AddGotoOrigin): Likewise.       
10412
10413 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10414
10415         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10416         unreachable, skip it.
10417         (FlowBranchingException.Merge): Always propagate jumps, even if
10418         the finally block renders subsequent code unreachable.
10419
10420 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10421
10422         Fix #77601
10423         * statement.cs (Goto.Resolve): Move responsibility for resolving
10424         'goto' to FlowBranching.AddGotoOrigin.
10425         (Goto.SetResolvedTarget): New.  Callback to set the
10426         LabeledStatement that's the target of the goto.
10427         (Goto.DoEmit): Use Leave instead of Br when crossing an
10428         unwind-protect boundary.
10429         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10430         LookupLabel and adjust to new semantics.
10431         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10432         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10433         Goto.SetResolvedTarget to update target.
10434         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10435         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10436         AddBreakOrigin & co.  Delay propagation until ...
10437         (FlowBranchingException.Merge): ... this.
10438
10439         * statement.cs (Block.Resolve): Always depend on flow-branching to
10440         determine unreachability.  Kill workaround that originally emitted
10441         only one statement after an "unreachable" label (see infloop in
10442         test-515.cs).
10443
10444         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10445         This is still "wrong", but anything better would probably need a
10446         multi-pass algorithm.
10447         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10448         usage vector.  Force current usage vector to be reachable, to
10449         optimistically signify backward jumps.
10450         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10451         detected.
10452         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10453         detected, return the original salted-away usage vector instead,
10454         updated with appropriate changes.  Print unreachable warning if
10455         necessary.
10456         * statement.cs (Block.Resolve): Don't print unreachable warning on
10457         a labeled statement.
10458
10459 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10460
10461         * driver.cs: Pass filename without path to AssemblyBuilder's 
10462         AddResourceFile. Fixes bug #78407.
10463
10464 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10465
10466         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10467         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10468         (FlowBranching.MergeChild): Overwrite
10469         reachability information from Labeled branchings too.
10470
10471 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10472
10473         * statement.cs (Goto.Resolve): Merge jump origins here ...
10474         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10475
10476         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10477         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10478         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10479         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10480         here, ...
10481         * statement.cs (Goto.Resolve): ... not here.
10482         (Goto.Emit): Remove CS1632 check.
10483
10484 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10485
10486         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10487         error message.
10488
10489 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10490
10491         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10492         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10493         (FlowBranchingException.Label): Likewise.
10494
10495         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10496         given value.
10497         (MyBitVector.Or): Use it to avoid losing information (Count).
10498         (FlowBranching.MergeOrigins): Likewise.
10499
10500         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10501         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10502         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10503         (UsageVector.ToString): Simplify.
10504         (UsageVector.MergeSiblings): Move here from ...
10505         (FlowBranching.Merge): ... here.
10506         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10507         not a MyBitVector.
10508
10509 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10510
10511         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10512         null bitvector is treated as all-true.
10513
10514         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10515         (MyBitVector): Rationalize invariants.  'vector != null' implies
10516         that we have our own copy of the bitvector.  Otherwise,
10517         'InheritsFrom == null' implies all inherited bits are true.
10518
10519 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10520
10521         * statement.cs (LocalInfo): Add IsConstant.
10522         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10523         local variable for constants.
10524
10525 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10526
10527         * flowanalysis.cs (MyBitVector.Empty): New.
10528         (MyBitVector): Don't allow InheritedFrom to be null.
10529         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10530         (UsageVector, FlowBranching): Update to changes.
10531
10532         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10533         recursion.  The 'Parent == null' condition isn't sufficient for
10534         anonymous methods.
10535         (FlowBranching.AddBreakOrigin): Likewise.
10536         (FlowBranching.AddContinueOrigin): Likewise.
10537         (FlowBranching.AddReturnOrigin): Likewise.
10538         (FlowBranching.StealFinallyClauses): Likewise.
10539         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10540         (FlowBranching.CheckOutParameters): Likewise.
10541         (FlowBranchingToplevel): Terminate all the above recursions here.
10542         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10543         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10544
10545         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10546         toplevel block.
10547         (FlowBranchingToplevel): New.  Empty for now.
10548         (FlowBranching.MergeTopBlock): Update.
10549         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10550         branching for the anonymous delegate.
10551         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10552
10553         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10554         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10555         information at the start of the merge.  Reorganize.
10556
10557 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10558
10559         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10560
10561 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10562
10563         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10564         to newly introduced ctor.
10565
10566         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10567         message to one place.
10568         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10569         global namespace.
10570
10571 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10572
10573         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10574
10575         * ecore.cs (Expression.ResolveAsConstant): Updated.
10576
10577         * statement.cs (ResolveMeta): Updated.
10578
10579 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10580
10581         * cs-parser.jay: __arglist cannot be used in initializer.
10582
10583 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10584
10585         A fix for #77879
10586         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10587         private types.
10588
10589 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10590
10591         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10592         (LabeledStatement): Add 'name' parameter.
10593         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10594         (Block.AddLabel): Update to changes.
10595         * cs-parser.jay (labeled_statement): Likewise.
10596
10597         * flowanalysis.cs (BranchingType.Labeled): New.
10598         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10599         (FlowBranchingLabeled): New.  Does nothing for now, but will
10600         eventually handle 'goto' flows.
10601         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10602         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10603         that's terminated ...
10604         (Block.Resolve): ... here.
10605
10606         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10607         (UsageVector.MergeFinallyOrigins): Likewise.
10608         (FlowBranching.InTryOrCatch): Likewise.
10609         (FlowBranching.AddFinallyVector): Likewise.
10610         (FlowBranchingException): Update to changes.
10611
10612         Fix #78290
10613         * statement.cs (Return.Resolve): Move error checking to ...
10614         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10615         (FlowBranchingException): Handle return origins like break and
10616         continue origins.
10617         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10618
10619 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10620
10621         A fix for #76122
10622         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10623         filter.
10624
10625 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10626
10627         A fix for #77543
10628         * class.cs (MethodData.Define): Do public accessor check only when method
10629         implements an interface.
10630
10631 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10632
10633         Remove special handling of 'break'
10634         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10635         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10636         (UsageVector.Break): Remove.
10637         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10638         reachability.
10639         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10640
10641         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10642         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10643
10644 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10645
10646         A fix for #75726
10647         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10648         be the interface member.
10649
10650 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10651
10652         A fix for #60069
10653         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10654         for emitting small (int) values.
10655
10656 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10657
10658         Fix #59427
10659         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10660         control-flow passes through the 'finally' after merging-in all the
10661         control-flows from 'try' and the 'catch' clauses.
10662
10663         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10664         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10665         always true at the only non-recursive entry point.
10666         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10667         FlowBranchingBreakable.
10668         (FlowBranchingLoop): Remove.
10669         * statement.cs (Return.DoResolve): Update to changes.
10670
10671         Fix #76471, #76665
10672         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10673         (FlowBranching.CreateBranching): Handle it: create a
10674         FlowBranchingContinuable.
10675         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10676         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10677         except that it handles the 'continue' command.
10678         (FlowBranching.UsageVector.MergeOrigins): Rename from
10679         MergeBreakOrigins.
10680         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10681         except that it overrides AddContinueOrigin.
10682         (FlowBranchingException): Override AddContinueOrigin, similar to
10683         AddBreakOrigin.
10684         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10685         Create a new branching around the embedded statement.
10686         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10687         control flow after the embedded statement.
10688         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10689
10690         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10691         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10692         FlowBranchingBreakable.
10693         (FlowBranchingSwitch): Remove.
10694
10695         Fix test-503.cs
10696         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10697         error reporting to ...
10698         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10699         Rename from 'AddBreakVector'.  Add new location argument.  Return
10700         a bool indicating whether the 'break' crosses an unwind-protect.
10701         (FlowBranchingException.AddBreakOrigin): Add.
10702         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10703         flowbranching after updating with the effects of the 'finally'
10704         clause.
10705         (FlowBranchingBreakable): New common base class for
10706         FlowBranchingLoop and FlowBranchingSwitch.
10707
10708         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10709         embedded statement.
10710         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10711
10712 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10713
10714         * statement.cs (Do.Resolve): If the loop is infinite, set the
10715         barrier.
10716         (While.Resolve, For.Resolve): Set a barrier after the embedded
10717         statement.  There's no direct control flow that goes from the end
10718         of the embedded statement to the end of the loop.
10719         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10720         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10721         above ensure that the reachability is correctly computed.
10722
10723         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10724         (UsageVector.MergeBreakOrigins): If the current path is
10725         unreachable, treat it as if all parameters/locals are initialized.
10726         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10727         infinite loops before merging-in break origins.
10728
10729         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10730         (Reachability.Reachable): Split part into ...
10731         (Reachability.Unreachable): ... this.  Simplify.
10732         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10733
10734         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10735         (Reachability.SetThrowsSometimes): Likewise.
10736         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10737         TriState.Always, use corresponding property.
10738         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10739         (Block.Resolve): Likewise.  Remove some redundant checks.
10740
10741 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10742
10743         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10744         (Reachability.Meet): Don't bother checking AlwaysThrows --
10745         barrier is always set.
10746         (FlowBranchingBlock.Merge): Likewise.
10747
10748 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10749
10750         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10751         checks for unreachable.
10752
10753 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10754
10755         A fix for #77980
10756         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10757
10758         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10759         whether field is really assigned.
10760
10761 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10762
10763         * flowanalysis.cs (Reachability): Make 4-argument constructor
10764         private.
10765         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10766         (Reachability.Always): Rename from the highly misleading
10767         'Reachability.Never'.
10768         (FlowBranching.Merge): Update to changes.  Mark an impossible
10769         situation with a 'throw'.
10770         (*): Update to changes.
10771
10772 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10773
10774         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10775         Remove 'Undefined'.
10776         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10777         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10778         (*): Update to changes.
10779         * statement.cs: Update to changes.
10780
10781 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10782
10783         A fix for #78049
10784         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10785
10786 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10787
10788         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10789         dummy UsageVector.
10790
10791         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10792         argument to two arguments: an usage-vector and a bool.  Move call
10793         to FlowBranching.Merge () ...
10794         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10795
10796         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
10797         handling of loop and switch reachability to ...
10798         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
10799
10800 2006-04-27  Raja R Harinath  <harinath@gmail.com>
10801
10802         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
10803         handling to FlowBranchingLoop.InLoop.
10804         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
10805
10806 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
10807
10808         A fix for #78115
10809         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
10810         anonymous method is allowed from AnonymousContainer here.
10811
10812         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
10813
10814 2006-04-24  Raja R Harinath  <rharinath@novell.com>
10815
10816         Fix #78156
10817         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
10818
10819 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
10820
10821         A fix for #49011.
10822         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
10823         (DoubleConstant.Reduce): Ditto.
10824
10825 2006-04-23  Raja R Harinath  <rharinath@novell.com>
10826
10827         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
10828         Remove 'lvalue_right_side' argument.  Move parts to ...
10829         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
10830         (LocalVariable.DoResolveLValue): ... these.
10831
10832 2006-04-21  Raja R Harinath  <rharinath@novell.com>
10833
10834         Fix cs1655.cs
10835         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
10836         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
10837         (LocalVariableReference.DoResolveBase): Use it to implement new
10838         CS1655 check.
10839         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
10840         (Argument.Resolve): Simplify.  Move CS1510 check ...
10841         * ecore.cs (Expression.ResolveLValue): ... here.
10842         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
10843         (PropertyExpr.DoResolveLValue): Likewise.
10844         (FieldExpr.Report_AssignToReadonly): Likewise.
10845         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
10846         LValueMemberAccess or LValueMemberOutAccess on instance depending
10847         on it.
10848         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
10849         DoResolve as appropriate.
10850
10851 2006-04-20  Raja R Harinath  <rharinath@novell.com>
10852
10853         Fix #75800
10854         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
10855         implicit conversions on 'out' and 'ref' arguments.
10856
10857         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
10858         improve clarity.  Remove dead code.
10859
10860         Fix #66031
10861         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
10862         (Catch.Resolve): Resolve VarBlock if it exists.
10863
10864 2006-04-19  Miguel de Icaza  <miguel@novell.com>
10865
10866         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
10867         twice, this was some residual code, the enumerator was emitted
10868         properly in the two branche of if later.
10869
10870 2006-04-19  Raja R Harinath  <rharinath@novell.com>
10871
10872         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
10873         cast is never an lvalue.
10874         (Cast.DoResolve, Cast.ResolveRest): Combine.
10875         (Argument.Emit): Simplify slightly.  Move 'Expr is
10876         IMemoryLocation' check ...
10877         (Argument.Resolve): ... here.
10878         (Argument.Error_LValueRequired): Remove.  Inline into only user.
10879
10880         Simplifications.  Fix cs0191-2.cs
10881         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
10882         CS1649 and CS1651 to ...
10883         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
10884         the actual selection of the error code and message to a lookup
10885         table.  Add a dummy return value to simplify callsites.
10886         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
10887         readonly fields of other instances of the same type.  Move CS0197
10888         warning from ...
10889         * expression.cs (Argument.Resolve): ... here.  Simplify code.
10890         Ensure that ec.InRefOutArgumentResolving is only set during LValue
10891         resolution of an out or ref argument.  The code simplification
10892         above uses this invariant.
10893
10894 2006-04-18  Raja R Harinath  <rharinath@novell.com>
10895
10896         Possibly fix #77752.  Fix cs1690-[4-7].cs.
10897         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
10898         CheckMarshallByRefAccess.  Drop parameter.
10899         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
10900         warning.
10901         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
10902         InstanceExpression.
10903         * report.cs (AllWarnings): Add CS1690.
10904         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
10905         for ref access too.
10906         (LocalVariableReference.DoResolveBase): Update.
10907
10908 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10909
10910         * class.cs (MethodOrOperator): Moved common parts from method class.
10911         detect obsolete attributes.
10912         (Method.Define): Simplified as it reuses code from base.
10913         (Constructor.ValidAttributeTargets): Fixed issue found during
10914         refactoring.
10915         (Destructor.ValidAttributeTargets): Fixed issue found during
10916         refactoring.
10917         (Operator): Finished refactoring set off by #78020. Operator class is now
10918         ordinary method class.
10919
10920         * anonymous.cs: Updated.
10921
10922         * decl.cs (DeclSpace): Add IsGeneric
10923
10924 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10925
10926         * class.cs (Constructor.Emit): Don't emit the attributes twice.
10927
10928 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10929
10930         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
10931         detect obsolete attributes.
10932         (Method.CreateEmitContext): Moved to MethodOrOperator.
10933
10934 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10935
10936         A fix for #78048.
10937         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
10938         customized exception to make crash detection easier.
10939         (MethodOrOperator): Started to work on new base class for methods and
10940         operators.
10941         (Method): Derives from MethodOrOperator.
10942         (Constructor.Emit): Emits its own attributes.
10943         (AbstractPropertyEventMethod.Emit): Ditto.
10944         (Operator): Derives from MethodOrOperator, will refactor fully in extra
10945         patch.
10946         (Operator.Emit): It's temporary more tricky than should be.
10947         
10948         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
10949
10950         * report.cs (InternalErrorException): Add ctor with inner exception.
10951
10952 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
10953
10954         A fix for #76744.
10955         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
10956         only not visible.
10957
10958 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
10959
10960         A fix for #77916.
10961         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
10962         array.
10963
10964 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10965
10966         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
10967         attribute is present and Guid not.
10968         (Interface.ApplyAttributeBuilder): Ditto.
10969
10970         * attribute.cs: Add error message.
10971
10972 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10973
10974         A fix for #78020.
10975
10976         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
10977         sources (it's composite) so hold them in extra array as they are used in
10978         Emit phase only. It worked in the previous versions by mistake.
10979         (Attribute.Emit): Emit attribute for more owners when exist.
10980
10981         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
10982         it has now different behaviour.
10983
10984 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
10985
10986         * constant.cs (Constant.IsDefaultInitializer): New method.
10987
10988         * class.cs: Updated.
10989
10990         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
10991         re-initialize default values. It saves KBs almost for every assembly.
10992         Thanks Zoltan for the idea.
10993         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
10994         (ArrayCreation.DoResolve): Resolve only once.
10995         (ArrayCreation.Emit): Emit static initializer only when it is faster.
10996         (ArrayCreation.GetAttributableValue): Cope with optimized values.
10997
10998 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10999
11000         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
11001         From #77961.
11002
11003 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11004
11005         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
11006         in an embedded statement too.
11007
11008 2006-04-01  Raja R Harinath  <rharinath@novell.com>
11009
11010         Fix #77958
11011         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
11012
11013 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11014
11015         A fix for #77966.
11016
11017         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
11018         was not specified.
11019
11020         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
11021
11022 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
11023
11024         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
11025         phase.
11026
11027         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
11028         LocalTemporary change.
11029
11030         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
11031         TypeContainer.
11032         (ClassOrStruct.DefineFieldInitializers): Implemented static field
11033         initializers optimization.
11034         (ClassOrStruct.TypeAttr): Moved from modifiers.
11035         (Constructor.CheckBase): Don't crash when static ctor has parameters.
11036         (FieldBase.ResolveInitializer): Resolves initializer.
11037         (FieldBase.HasDefaultInitializer): New property.
11038
11039         * cs-parser.jay: Removed message.
11040
11041         * expression.cs (CompilerGeneratedThis): New specialization.
11042
11043         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
11044
11045 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
11046
11047         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
11048
11049 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11050
11051         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
11052         be now EnumConstants only.
11053
11054 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11055
11056         * attribute.cs, driver.cs: Reset more caches.
11057
11058 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11059
11060         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
11061
11062 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11063
11064         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
11065         for easier reuse. Updated all overrides.
11066         (IntegralConstant): New base class for all integral constants.
11067         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
11068         of the constant range, report custom error.
11069         (UIntConstant.Reduce): Fixed uint conversion.
11070
11071         * ecore.cs, literal.cs: Reduce updates.
11072
11073 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11074
11075         A fix for #75813.
11076
11077         * class.cs (Constructor.Define): Removed extra if for default ctors.
11078         A patch from Atsushi Enomoto.
11079
11080 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11081
11082         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
11083         GetAttributableValue.
11084
11085         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
11086         when required.
11087
11088         * convert.cs (ImplicitConversionRequired): Error message moved to
11089         DoubleLiteral.
11090
11091         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
11092         automatic implicit conversion of an output value.
11093         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
11094
11095         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
11096         conversion.
11097         (TypeOf.GetAttributableValue): Add extra handling for object type.
11098
11099         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
11100         special error message.
11101
11102 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
11103
11104         * class.cs (Constructor.Emit): Don't crash when struct ctor is
11105         InternalCall.
11106         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
11107         compatible with MS runtime.
11108
11109 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
11110
11111         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
11112         attribute arguments here.
11113
11114         * class.cs (Indexer.Define): The check was moved to attribute class.
11115
11116 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
11117
11118         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
11119         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
11120         easier.
11121
11122 2006-03-22  Raja R Harinath  <rharinath@novell.com>
11123
11124         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
11125         mcs to keep code differences small.
11126         * attribute.cs (Attribute.GetParameterDefaultValue): New.
11127         * typemanager.cs (parameter_default_value_attribute_type): New.
11128         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
11129         CS1908 check.
11130
11131 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11132
11133         * expression.cs (StringConcat.Append): Reverted back to no warning state.
11134
11135 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11136
11137         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
11138
11139         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
11140         the blocks too.
11141
11142 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
11143
11144         * doc-bootstrap.cs : fix build.
11145
11146 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11147
11148         * expression.cs (StringConcat.Append): Issue a warning when empty string
11149         is going to append.
11150
11151 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11152
11153         * assign.cs (CompoundAssign.ResolveSource): Removed.
11154
11155         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
11156         clean up.
11157
11158         * class.cs (TypeContainer.FindMethods): Removed.
11159         (TypeContainer.CheckMemberUsage): Made static.
11160
11161         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
11162
11163         * constant.cs (CheckRange): Removed unused type argument.
11164         (CheckUnsigned): Removed unused type argument.
11165
11166         * cs-parser.jay: Updated after MemberAccess clean up.
11167         Uses Length for empty string test.
11168
11169         * cs-tokenizer.cs: Uses Length for empty string test.
11170         (IsCastToken): Made static.
11171         (is_hex): Made static.
11172         (real_type_suffix): Made static.
11173
11174         * decl.cs (SetupCache): Made static.
11175         (OnGenerateDocComment): Removed unused ds argument.
11176
11177         * delegate.cs (VerifyDelegate): Removed unused argument.
11178
11179         * doc.cs: Uses Length for empty string test.
11180
11181         * driver.cs: Uses Length for empty string test.
11182
11183         * enum.cs (IsValidEnumType): Made static
11184
11185         * expression.cs (EnumLiftUp): Removed unused argument.
11186         (ResolveMethodGroup): Ditto.
11187         (BetterConversion): Ditto.
11188         (GetVarargsTypes): Ditto.
11189         (UpdateIndices): Ditto.
11190         (ValidateInitializers): Ditto.
11191         (MemberAccess.ctor): Ditto.
11192         (GetIndexersForType): Ditto.
11193
11194         * flowanalysis.cs: (MergeFinally): Removed unused argument.
11195
11196         * iterators.cs: Updated after MemberAccess clean up.
11197
11198         * location.cs: Uses Length for empty string test.
11199
11200         * namespace.cs: Uses Length for empty string test.
11201
11202          * report.cs (CheckWarningCode): Made static.
11203
11204         * statement.cs (LabeledStatement): Removed unused argument.
11205
11206         * typemanager.cs (FilterNone): Removed.
11207
11208 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11209
11210         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11211         obsolete.
11212
11213         * class.cs: Updated.
11214
11215 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11216
11217         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11218
11219 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11220
11221         A fix for #77822.
11222
11223         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11224         reporting, it's more tricky than I thought.
11225
11226 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11227
11228         A fix for #77816.
11229
11230         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11231         host container.
11232         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11233         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11234         Add more error reporting; Fixed issue with params.
11235
11236         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11237
11238         * cs-parser.jay: AnonymousMethod requires host container.
11239
11240         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11241
11242 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11243
11244         * class.cs: Change 'TypeContainer ds' constructor argument to
11245         'DeclSpace parent'.  Some classes were missed below due to
11246         different naming convention.
11247
11248         * class.cs (MemberCore.Parent): Delete.  This makes the
11249         ParentContainer changes below enforceable by the compiler.
11250
11251         Treat pointers to enclosing declaration space as 'DeclSpace', not
11252         'TypeContainer'.
11253         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11254         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11255
11256         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11257         of TypeContainer.
11258         (Block.AddThisVariable): Likewise.
11259         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11260         (AbstractPropertyEventMethod.Emit): Likewise.
11261         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11262         (GetMethod.Define, SetMethod.Define): Likewise.
11263         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11264         (DelegateMethod.EmitMethod): Likewise.
11265
11266         Fix regression test-partial-13.cs.
11267         Rationalize use of PartialContainer.  Ensure that the partial
11268         class semantics can be tied to type-correctness, i.e., any
11269         violation will cause a compile error.
11270         * class.cs, const.cs: Access all fields that belong to class
11271         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11272         Resolve()-like functions still use 'Parent'.
11273
11274         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11275         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11276         (PropertyMethod.CheckModifiers): Remove unused argument.
11277         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11278         DeclSpace.
11279
11280 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11281
11282         Make semantics of PartialContainer simpler.
11283         * decl.cs (DeclSpace.IsPartial): Remove.
11284         * class.cs (TypeContainer.IsPartial): Likewise.
11285         (TypeContainer..ctor): Set PartialContainer to point to self.
11286         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11287         (TypeContainer.FindNestedType): Likewise.
11288         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11289
11290 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11291
11292         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11293
11294 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11295
11296         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11297         classes.
11298
11299 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11300
11301         * class.cs (Operator.Define): An error for base conversion was not
11302         reported correctly.
11303
11304 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11305
11306         * iterator.cs : yield break is allowed in try statement which has
11307           catch clauses. Fixed bug #77767.
11308
11309 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11310
11311         A fix for #77593, #77574.
11312
11313         * class.cs (MethodCore.CheckBase): Another if for operator.
11314
11315 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11316
11317         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11318         were not resolved
11319
11320         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11321         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11322         conversion test.
11323         
11324         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11325         not needed.
11326
11327         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11328         Updated after another emitcontext usage was clean up. It should help us to
11329         synchronize with gmcs easier.
11330
11331 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11332
11333         A fix for #77353.
11334
11335         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11336         (Event.Define): ditto
11337         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11338
11339         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11340         Removed redundant code and set NewSlot for Invoke method too.
11341
11342         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11343         (Parameters.MergeGenerated): New method. Use this method when you merge
11344         compiler generated argument with user arguments.
11345
11346 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11347
11348         * attribute.cs (ResolveAsTypeTerminal): Removed.
11349
11350         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11351         specialization for predefined types; 30% speed up.
11352         Finally placed obsolete check to right place.
11353         (Expression.ResolveType): Removed.
11354
11355         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11356         Updated after ResolveType was removed.
11357
11358         * expression.cs (Cast.ctor): Check void cast.
11359         (Binary.ResolveAsTypeTerminal): Is never type.
11360         (Conditional.ResolveAsTypeTerminal): Is never type.
11361
11362         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11363
11364 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11365
11366         Fix #77679.
11367         * expression.cs (ParameterReference.DoResolveBase): Change return
11368         type to bool.
11369         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11370         Update.
11371
11372         Fix #77628.
11373         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11374
11375         Fix #77642.
11376         * typemanager.cs (GetFullNameSignature): Don't nullref on
11377         protected accessors.
11378
11379 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11380
11381         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11382         these two separated members to simplify the code.
11383         (Attribute.Resolve): Refactored to use new fields and methods.
11384         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11385         implemented obsolete attribute checking.
11386         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11387         implemented obsolete checking again. It look line never ending quest ;-)
11388         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11389
11390         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11391
11392         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11393
11394         *class.cs (Property.Define): Add RegisterProperty call.
11395
11396         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11397         argument groups (only 2).
11398
11399         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11400         encoding expression to arguments.
11401         (Expression.ExprClassToResolveFlags): Just turned to property.
11402
11403         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11404         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11405         optimized as well as implemented support for zero-length attributes.
11406
11407         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11408         Add caching of PropertyInfo's.
11409
11410 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11411
11412         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11413         error multiple times.
11414
11415 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11416
11417         New partial class implementation.
11418         A fix for #77027, #77029, #77403
11419
11420         * attribute.cs (Attributable): Made attributes protected.
11421
11422         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11423         the replacements of ClassPart and PartialContainer.
11424         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11425         (TypeContainer.AddInterface): Ditto.
11426         (TypeContainer.AddPartial): The main method for partial classes. It checks
11427         for errors and merges ModFlags and attributes. At the end class is added to
11428         partial_parts list.
11429         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11430         required here.
11431         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11432         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11433         from the rest of partial classes.
11434         (TypeContainer.GetClassBases): Simplified.
11435         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11436         DefineType.
11437         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11438         (TypeContainer.HasExplicitLayout): Uses Flags now.
11439         (PartialContainer): Removed.
11440         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11441         (StaticClass): Was merged with Class.
11442         (Class.GetClassBases): class and static class bases are verified here.
11443         (Class.TypeAttr): Added static attributes when class is static.
11444         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11445         (MemberBase): In some cases we need to call parent container for partial
11446         class. It should be eliminated but it's not easy now.
11447
11448         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11449
11450         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11451         partial classed to accumulate class comments.
11452         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11453
11454         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11455
11456         * driver.cs (MainDriver): Tree.GetDecl was removed.
11457
11458         * modifiers.cs (Modifiers): Add partial modifier.
11459
11460         * tree.cs (Tree.decl): Removed.
11461         (RootTypes): Started to use this class more often for root types
11462         specializations.
11463
11464 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11465
11466         A fix for #77615
11467
11468         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11469         external interface does not have an attribute.
11470
11471 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11472
11473         Another prerequisites for new partial classs implementation.
11474         
11475         * attribute.cs (Attribute.Equal): Implemented.
11476         (Attribute.Emit): Changed as attributes can be applied more than twice.
11477         (Attributes.Emit): Check for duplicate attributes here.
11478
11479         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11480         as a parameter, clean-up.
11481
11482 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11483
11484         A fix for #77485
11485
11486         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11487         contains obsolete attribute check which can in some cases look for base
11488         type of current class which is not initialized yet.
11489         (TypeContainer.BaseType): Replacement of ptype.
11490
11491         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11492
11493 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11494
11495         First of prerequisites for new partial classs implemention.
11496         
11497         * attribute.cs (Attributable): Extended by ResolveContext;
11498         Attributes finally have correct context for resolving in all cases.
11499         (AttachTo): Attribute owner is assigned here.
11500
11501         * codegen.cs (IResolveContext): Introduce new interface to hold
11502         all information needed in resolving phase.
11503         (EmitContext): Implements IResolveContext; more clean-up needed here.
11504         
11505         * decl.cs (MemberCore): Implemented IResolveContext.
11506
11507         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11508         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11509         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11510         Refactored to use new IResolveContext instead of EmitContext; cleanup
11511
11512 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11513
11514         * codegen.cs (EmitScopeInitFromBlock): check here the
11515         capture_context, there is no need to make two calls to the
11516         EmitContext. 
11517
11518         * anonymous.cs: Add some debugging messages that might help me
11519         track other instances of this problem in the future (the
11520         regression of test 467).
11521
11522         * cs-parser.jay: track the variable block, as we need to initalize
11523         any captured variables declared in this block for the "catch"
11524         portion of the "Try" statement.
11525
11526         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11527         scope initialization for captured variables. 
11528
11529         Also, move the emit for the variables after the block location has
11530         been marked.
11531
11532 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11533
11534         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11535
11536 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11537
11538         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11539         commit yesterday, the initialization for the roots is necessary.
11540         What is not necessary is the scope activation.
11541
11542 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11543
11544         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11545         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11546         CS0206 checks.
11547         (Argument.Resolve): Remove CS0206 checks.
11548
11549 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11550
11551         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11552         scopes for all the roots, the scopes will now be emitted when the
11553         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11554
11555         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11556         code.  This reduces a lot of existing cruft.
11557         
11558         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11559         that the ScopeInfo is generated as we enter the scope, not at the
11560         time of use, which is what we used to do before.
11561
11562         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11563         every time a Block is about to be emitted if we have a
11564         CaptureContext. 
11565
11566 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11567
11568         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11569         (Reset): Update.
11570         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11571
11572         * typemanager.cs (cons_param_array_attribute): Make private.
11573         (Reset): Set it to null.
11574         (InitCoreHelpers): Don't initialize it.
11575         (ConsParamArrayAttribute): New.  Initialize it as needed.
11576         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11577
11578 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11579
11580         * expression.cs: There might be errors reported during the
11581         selection of applicable methods.  If there are errors, do not
11582         continue execution as it will lead the compiler to crash.
11583
11584 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11585
11586         * expression.cs: Member access is not allowed on anonymous
11587         methods.  Fixes #77402.
11588
11589 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11590
11591         Fix #77401
11592         * cs-parser.jay (VariableDeclaration): Don't set
11593         current_array_type to null.
11594         (field_declaration, event_declaration, declaration_statement):
11595         Set it to null here.
11596
11597 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11598
11599         * typemanager.cs (GenericParameterPosition): New.
11600         * doc.cs: Use it.
11601
11602 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11603
11604         * doc.cs : To process "include" elements, first we should create
11605           another list than XmlNodeList, because it could result in node
11606           removal, which could result in that the XmlNodeList gives up
11607           yielding next node.
11608
11609           (Also made code identical to gmcs again.)
11610
11611 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11612
11613         * ecore.cs: Introduce an error report that we were not catching
11614         before, if not silent, we must report the error.  Gonzalo ran into
11615         it.
11616
11617 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11618
11619         A fix for bug: #76957
11620         
11621         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11622         ComputeMethodHost before creating the method, this is a new
11623         requirement. 
11624
11625         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11626         that this method references (RegisterScope).  The actual scope
11627         where the method is hosted is computed with the ComputeMethodHost
11628         before we create the method.
11629
11630         Moved the Deepest routine here.
11631
11632         (AnonymousContainer.ComputeMethodHost): New routine used to
11633         compute the proper ScopeInfo that will host the anonymous method.
11634
11635         (ScopeInfo): Deal with multiple roots.  The problem was that we
11636         did not have a unique root where all ScopeInfos could be hanged
11637         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11638         of roots.  
11639
11640         Remove AdjustMethodScope which is now computed at the end.  Remove
11641         LinkScope which did a partial link, instead link all ScopeInfos
11642         before code generation from the new "LinkScopes" routine. 
11643
11644         Simplify all the Add* routines as they no longer need to maintain
11645         the tree, they just need to record that they are using variables
11646         from a ScopeInfo.
11647
11648         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11649         routines to produce the forest of ScopeInfo trees.
11650
11651         * class.cs (TypeContainer.AppendMethod): This is just like
11652         AddMethod, but ensures that an interface implementation method
11653         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11654         methods, but at the end.
11655
11656         We use this functionality to ensure that the generated MoveNext
11657         method in the iterator class is resolved/emitted before the
11658         enumerator methods created.   
11659
11660         This is required because the MoveNext method computes the right
11661         ScopeInfo for the method.  And the other methods will eventually
11662         need to resolve and fetch information computed from the anonymous
11663         method. 
11664
11665 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11666             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11667
11668         Fix rest of #76995.
11669         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11670         the 'aliases' hash.
11671         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11672         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11673
11674 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11675
11676         Fix #76656, cs0231-2.cs.
11677         * cs-parser.jay (formal_parameter_list): Make error case catch
11678         more issues.
11679         (parenthesized_expression_0): Add CS1026 check.
11680         (invocation_expression): Remove unused { $$ = lexer.Location }.
11681
11682 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11683
11684         Fix #76824.
11685         * cs-parser.jay (statement_expression): Don't list out the
11686         individual statement-expressions.  Convert syntax error into
11687         CS0201 check.
11688
11689 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11690
11691         Fix #76874.
11692         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11693         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11694         CheckIntermediateModification.
11695         (FieldExpr.DoResolve): Add new two-argument version that
11696         allows us to resolve the InstanceExpression as an lvalue.
11697         The one-argument variant is now just a wrapper.
11698         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11699         Resolve the lhs as an lvalue if the it has a value type.
11700         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11701         from Assign.DoResolve.
11702         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11703         resolved as an lvalue.
11704         (PropertyExpr.DoResolve): Update.
11705         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11706         has a value type.  Move CS1612 check here from
11707         CheckIntermediateModification.
11708         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11709         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11710         'right_side' of a ResolveLValue on an 'out' argument.
11711         (EmptyExpression.LValueMemberAccess): New.  Used as the
11712         'right_side' of a propagated ResolveLValue on a value type.
11713         (LocalVariableReference.DoResolveBase): Recognize
11714         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11715         Add CS1654 check.
11716         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11717         EmptyExpression.Null.
11718
11719 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11720
11721         * typemanager.cs : added IsGenericParameter(). In mcs it always
11722           return false.
11723         * doc.cs : for generic parameters, use GenericParameterPosition,
11724           not FullName.
11725
11726 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11727
11728         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11729
11730 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11731
11732         This fixes the problem where we used ldfld instead of ldflda to
11733         load the "THIS" pointer on captured parameters, when THIS is a
11734         value type.  See bug #77205.
11735         
11736         * iterators.cs (CapturedThisReference.Emit): Pass false to
11737         EmitThis (we do not need the address).
11738
11739         * codegen.cs (EmitThis): it needs to know whether we need the
11740         address of `this' or not.  This is used by value types.  
11741
11742         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11743         every other call passes false.
11744
11745 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11746
11747         Fix #77221.
11748         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11749         GetOverride.
11750         * expression.cs (Invocation.OverloadResolve): Update.
11751         (Invocation.DoResolve): Avoid double resolution of invocation.
11752
11753 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11754
11755         Fix #77180.
11756         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11757         unary negation of floating point types as 0-expr; negation cannot
11758         overflow in floating point types.
11759
11760         Fix #77204.
11761         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11762         on operands of 'void' type.
11763
11764         Fix #77200.
11765         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11766         and ExclusiveOr for boolean constants too.
11767
11768 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11769
11770         Fix #75636.
11771         * expression.cs (Invocation.OverloadResolve): Replace reflected
11772         override methods with their base virtual methods, rather than
11773         skipping over them.
11774         * typemanager.cs (TypeManager.GetOverride): New.
11775
11776 2006-01-05  Jb Evain  <jbevain@gmail.com>
11777
11778         * class.cs (Property.Define, Indexer.Define): do not tag the
11779         properties as SpecialName | RTSpecialName.
11780
11781 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11782
11783         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11784         doing a low-level comparission of parameter types.  It was lacking
11785         a check for __argslist. 
11786
11787 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11788
11789         * expression.cs (ParameterReference.DoResolveBase): Allow
11790         reference parameters if they are local to this block. 
11791
11792         This allows the ref and out parameters of a delegate to be used in
11793         an anonymous method, for example:
11794
11795         delegate void set (out int x);
11796
11797         set s = delegate (out int x){
11798                 x = 0;
11799         };
11800
11801         This is used by functionality introduced late in the C# language.
11802         
11803         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
11804         method that take ref and out parameters. 
11805
11806         Fixes #77119 which was a late change in the spec.
11807
11808 2005-12-23  Miguel de Icaza  <miguel@novell.com>
11809
11810         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
11811         parent if its the same scope.  Fixes #77060.
11812
11813 2005-12-21  Miguel de Icaza  <miguel@novell.com>
11814
11815         * driver.cs: Report the case of no source files and no -out:
11816         argument provided.
11817
11818 2005-12-20  Raja R Harinath  <rharinath@novell.com>
11819
11820         Fix #77035.
11821         * expression.cs (ComposedCast.GetSignatureForError): Define.
11822
11823 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11824
11825         Fix #76995
11826
11827         * namespace.cs (NamespaceEntry): Add extern_aliases as a
11828         ListDictionary, to contain the ExternAliasEntry entries (in
11829         addition to the NamespaceEntry.aliases hashtable). This field is
11830         shared between the original entry and its doppelganger (bodyless 
11831         copy of it).
11832         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
11833         extern_aliases field.
11834         (NamespaceEntry.Lookup): Move the IsImplicit check after the
11835         lookup in extern_aliases.
11836
11837 2005-12-16  Raja R Harinath  <rharinath@novell.com>
11838
11839         Fix #77006.
11840         * class.cs (TypeContainer.Mark_HasEquals): New.
11841         (TypeContainer.Mark_HasGetHashCode): New.
11842         (ClassPart): Override them.
11843         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
11844
11845         Fix #77008.
11846         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
11847         'parent' argument to the base constructor.
11848
11849         Remove all mention of TypeContainer from decl.cs.
11850         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
11851         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
11852         (DeclSpace.DeclSpace): Likewise.
11853         (DeclSpace.DefineMembers): Remove unused argument.
11854         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
11855         debugging check -- we don't care if the debug code throws an
11856         InvalidCastException instead of an InternalErrorException.
11857         * class.cs (TypeContainer.DefineMembers): Update to changes.
11858         (TypeContainer.DoDefineMembers): Likewise.
11859         (TypeContainer.GetMethods): Likewise.
11860         (PropertyMember.Define): Likewise.
11861         (MemberBase.Parent): New property that forwards to
11862         MemberCore.Parent, but ensures that we get a TypeContainer.
11863         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
11864         (RootContext.PopulateTypes): Likewise.  Remove special case code
11865         for !RootContext.StdLib: DefineMembers is idempotent.
11866
11867 2005-12-14  Miguel de Icaza  <miguel@novell.com>
11868
11869         * convert.cs (ExplicitConversionCore): Check the return value from
11870         ExplicitConversionCore which can return null on failure.  Fixes #76914
11871
11872 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
11873
11874         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
11875
11876 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
11877
11878         * doc.cs : The search for referenced namespace was insufficient to
11879           get global one as it used to do. Fixed bug #76965.
11880
11881 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
11882
11883         * doc.cs : check name in cref in the last phase that whether it is
11884           namespace or not.
11885
11886 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11887
11888         * cs-tokenizer.cs : reverted the latest change: it somehow broke
11889           Mono.C5.
11890
11891 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11892
11893         * doc.cs : so it turned out that we cannot skip override check for 
11894           interface members. Fixed bug #76954.
11895
11896 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11897
11898         * cs-tokenizer.cs : fixed bug #75984:
11899           - #warning and #error should not be handled when the source line
11900             is disabled.
11901           - #line is not checked strictly when the source line is disabled.
11902           - #define and #undef is on the other hand checked strictly at any
11903             state.
11904
11905 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
11906
11907         * cs-tokenizer.cs : missing Location (actually, filename) in one of
11908           CS1027 report.
11909
11910 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11911
11912         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
11913
11914         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
11915         event initializers.
11916         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
11917         (FieldBase.Initializer): Initializer is now optional.
11918         (EventField.Define): Only event field can have initializer.
11919
11920         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
11921
11922         * const.cs (Const): Reuse initializer.
11923
11924         * cs-parser.jay: Updated after FieldBase changes.
11925         Added current_array_type to simplify array initializers.
11926
11927         * ecore.cs (NullCast.IsDefaultValue): Implemented.
11928
11929         * expression.cs, iterators.cs: Updated.
11930
11931         * namespace.cs (NamespaceEntry): Made UsingFound private.
11932
11933 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11934
11935         * parameterCollection.cs: Obsolete, removed.
11936         * parser.cs: Obsolete, removed.
11937
11938 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11939
11940         Fix #76849.
11941         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
11942
11943         * enum.cs (Enum.Define): Set obsolete context here.
11944
11945 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11946
11947         * doc.cs :
11948           - FindDocumentedMember() now expects 1) paramList as null
11949             when "we don't have to check the number of parameters" and
11950             2) Type.EmptyTypes when "there is no arguments".
11951           - Introduced FoundMember struct to hold the exact type which was
11952             used to find the documented member (the above change broke
11953             test-xml-044; it might be better just to use DeclaringType than
11954             what MS does, like this change does, but it depends on usage.)
11955
11956 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11957
11958         * doc.cs : documented member might be from DeclaringType for nested
11959           types. Fixed bug #76782.
11960
11961 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
11962
11963         * anonymous.cs: Have the param code handle leaving copies on the
11964         stack etc. Allows anonymous params to take part in the assignment
11965         code (++, +=, etc). Fixes bug #76550
11966
11967         * expression.cs: Handle the prepare_for_load/leave_copy by passing
11968         it down to the anon code.
11969
11970         * iterators.cs: Use dummy var here
11971
11972         * codegen.cs: Handle new vars
11973
11974 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11975
11976         Fix #76849.
11977         * class.cs (MethodData.Define): Set proper Obsolete context.
11978
11979         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
11980         obsolete context.
11981         (FieldExpr.DoResolve): Ditto.
11982
11983 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11984
11985         Fix #76849.
11986         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
11987         parent is not obsolete.
11988
11989 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
11990
11991         * doc.cs : (FindDocumentedMember) find parameterless members first
11992           and get CS0419 in the early stage. Fixed first case of bug #76727.
11993
11994 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
11995
11996         Fix #76859.
11997         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
11998         no error was reported.
11999
12000         *expression.cs (Binary.DoResolve): left can be null.
12001
12002 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
12003
12004         Fix #76783.
12005         * class.cs (MethodData.Emit): Parameters should be labeled first.
12006
12007 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
12008
12009         Fix #76761.
12010         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
12011
12012 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
12013
12014         * attribute.cs (AreParametersCompliant): Moved to Parameter.
12015
12016         * class.cs (MethodCore): Parameter clean up.
12017         (IMethodData): Added ParameterInfo.
12018         (MethodData): Parameter clean up.
12019         (Indexer.Define): Parameter clean up.
12020
12021         * anonymous.cs,
12022         * codegen.cs,
12023         * cs-parser.jay,
12024         * decl.cs,
12025         * doc.cs,
12026         * ecore.cs,
12027         * flowanalysis.cs,
12028         * iterators.cs,
12029         * pending.cs,
12030         * statement.cs,
12031         * typemanager.cs: Parameter clean up.
12032
12033         * delegate.cs (Define): Get rid of duplicated code.
12034
12035         * expression.cs (ParameterReference): Removed useless parameters
12036         and simplified.
12037         (Invocation): Ditto.
12038
12039         * parameter.cs (ParamsParameter): New class, params specialization.
12040         (ArglistParameter): Attemp to separate arglist.
12041         (Parameter): Refactored to be reusable and faster.
12042         (Parameter.Modifier): Made understandable.
12043         (Parameters): Changed to be used as a class for `this' assembly
12044         parameters. Refactored to use new specialized classes.
12045
12046         * support.cs (ParameterData): Added Types property.
12047         (InternalParameters): Deleted.
12048
12049 2005-08-20  Martin Baulig  <martin@ximian.com>
12050
12051         Merging this patch from GMCS to fix #75867.
12052
12053         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12054         scope if we don't already have it.
12055
12056 2005-11-17  Martin Baulig  <martin@ximian.com>
12057
12058         * anonymous.cs
12059         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
12060         inherit the scope from our parent.  Fixes #76653.
12061
12062 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12063
12064         * doc.cs : the previous patch does not actually fix the bug.
12065           PropertyInfo override check is now implemented and really fixed it.
12066         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
12067
12068 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12069
12070         * doc.cs : apply "override filter" also to properties.
12071           Fixed bug #76730.
12072
12073 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12074
12075         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
12076           no need to check overrides. For classes, omit those results from 
12077           interfaces since they must exist in the class. Fixed bug #76726.
12078
12079 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12080
12081         * typemanager.cs : (GetFullNameSignature) differentiate indexers
12082           with different parameters. Fixed the second problem in #76685.
12083
12084 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12085
12086         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
12087           get expected 'protected' access in CheckValidFamilyAccess()).
12088           Fixed bug #76692.
12089
12090 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12091
12092         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
12093           Fixed bug #76705.  CS1569 was incorrectly commented out.
12094
12095 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12096
12097         * doc.cs : use Invocation.IsOverride() to do real override check.
12098         * expression.cs : made Invocation.IsOverride() internal.
12099
12100 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12101
12102         * doc.cs : use TypeManager.FindMembers() instead of (possible)
12103           TypeBuilder.FindMembers() and filter overriden base members out.
12104           Fixed bug #76990.
12105
12106 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12107
12108         * doc.cs : ref/out parameters are represented as '@' (instead of
12109           '&' in type FullName). Fixed bug #76630 (additionally crefs).
12110
12111 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12112
12113         * doc.cs : when there was no '.' in cref to methods in doc comment,
12114           then parameters were missing in the output. Fixed bug #76691.
12115
12116 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12117
12118         * driver.cs : don't output docs when there is an error.
12119           Fixed bug #76693.
12120
12121 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12122
12123         * doc.cs :
12124           Now it should detect indexers. Fixed primary concern in bug #76685.
12125           Fixed CS0419 message to not show the identical member signature in
12126           the message.
12127
12128 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12129
12130         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
12131           instead of Type.FindMembers() since it does not handle events.
12132           Fixed bug #71604.
12133
12134 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
12135
12136         * codegen.cs: Fixed typo (speficied -> specified).
12137
12138 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12139
12140         Fix #76369.
12141         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
12142
12143 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12144
12145         * attribute.cs: Changed error message.
12146
12147         * cs-tokenizer.cs: One more check.
12148
12149 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12150
12151         * statement.cs (Block.Resolve): Ignore empty statement.
12152
12153 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12154
12155         * report.cs: Made error/warning methods more strict to avoid
12156         their misuse.
12157
12158         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
12159         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
12160         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
12161         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
12162
12163 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
12164
12165         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
12166         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
12167
12168         * class.cs (TypeContainer.IsComImport): New property.
12169         (Constructor.Define): Create proper ctor for ComImport types.
12170
12171         * expression.cs (New.CheckComImport): Fixed.
12172
12173 2005-11-07  Miguel de Icaza  <miguel@novell.com>
12174
12175         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
12176         that a parameter has been captured does not mean that we do not
12177         have to do the rest of the processing.  This fixes the second part
12178         of #76592.  If there was another anonymous method capturing
12179         values in the past, the Scope would never be set for the second
12180         method that captured the same parameter.
12181
12182         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
12183         properly manipulate the stack.   Second part of fix for #76592.
12184
12185         * expression.cs (New): Add support for invoking "new" on
12186         interfaces that have been flagged with the ComImport attribute and
12187         the CoClass.  Fixes #76637 
12188
12189         * statement.cs (Try.DoEmit): When a variable is captured, do not
12190         try to emit the vi.LocalBuilder variable as it has been captured.
12191         Create a temporary variable and store the results on the
12192         FieldBuilder.  Fixes #76642
12193
12194 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
12195
12196         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
12197
12198         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
12199
12200         * expression.cs (Binary.DoResolve): Added && optimalization.
12201     
12202         * typemanager.cs (AddUserType): Removed useless argument.
12203
12204 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12205
12206         * statement.cs (Block.variables): Uses ListDictionary.
12207
12208 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12209
12210         Fix #75969.
12211         * class.cs (PartialContainer.EmitType): Customized to emit
12212         security attributes.
12213         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12214         for partial classes.
12215
12216 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12217
12218         Fix #76599.
12219         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12220         access has to be fixed.
12221         
12222         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12223
12224 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12225
12226         Fix #76590.
12227         * ecore.cs (NullCast.Reduce): Implemented.
12228
12229         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12230         constant type.
12231         
12232         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12233         properly.
12234         (Foreach.Resolve): Catch null properly.
12235
12236 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12237  
12238         * cs-tokenizer.cs: Warning text fix.
12239
12240         * driver.cs: AllWarningNumbers exposed on public interface.
12241
12242         * report.cs (): Reviewed warning numbers.
12243         (IsValidWarning): Use binary search.
12244
12245 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12246  
12247         * driver.cs: Implemeted resource visibility.
12248         (Resources): New class for code sharing between /res: and
12249         /linkres:
12250  
12251 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12252
12253         Fix #76568.
12254         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12255         folding.
12256         
12257         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12258         contants only.
12259         
12260         * ecore.cs (NullCast): Child is contant only.
12261         
12262         * literal.cs (NullLiteral.Reduce): null can be converted to any
12263         reference type.
12264
12265 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12266
12267         * driver.cs: Use Encoding.Default as default code page instead
12268           of ISO-28591.
12269
12270 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12271
12272         Fix #76085.
12273         * expression.cs (Invocation.Error_InvalidArguments): Handle
12274         __arglist parameters.
12275         (Invocation.VerifyArgumentsCompat): Likewise.
12276         * support.cs (ReflectionParameters.GetSignatureForError): Print
12277         __arglist parameters.
12278         (InternalParamters.GetSignatureForError): Likewise.
12279         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12280
12281 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12282
12283         * attribute.cs (GetPropertyValue): Made public.
12284
12285         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12286         Resolve.
12287         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12288         attribute.
12289         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12290         is not defined.
12291         
12292         * driver.cs: Reflect method name change.
12293         
12294         * statement.cs (Try.Resolve): Warn when try has both general
12295         exception handlers.
12296         
12297         * typemanager.cs: runtime_compatibility_attr_type new predefined
12298         type.
12299
12300 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12301
12302         Fix #76419.
12303         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12304         treat it as an empty parameter list.
12305
12306 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12307
12308         Fix #76271.     
12309         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12310         ResolveAsTypeStep silent.
12311         * statement.cs (Block.AddConstant): Mark block as used.
12312         (Block.ResolveMeta): Avoid piling on error messages
12313         if a constant initializer resolution fails.
12314
12315 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12316
12317         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12318         Remove.
12319         (NamespaceEntry.VerifyAllUsing): New.
12320         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12321         behaviour.  Delegates actual resolution of alias to ...
12322         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12323         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12324         Update.
12325         * driver.cs (Driver.MainDriver): Update.
12326         
12327         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12328         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12329         property.
12330         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12331         Remove.
12332         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12333         RootNamespace.DefineNamespacesForAll.
12334
12335 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12336
12337         * typemanager.cs (assemblies, external_aliases, modules)
12338         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12339         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12340         overhead.  Move resposibility ...
12341         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12342         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12343
12344 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12345
12346         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12347         cached_namespaces.  Improve usage.
12348         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12349         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12350         Move from GlobalRootNamespace and simplify.
12351         (RootNamespace.Global): Make instance variable.
12352         (RootNamespace.RootNamespace): Add "alias name" parameter.
12353         (GlobalRootNamespace): Simplify drastically.
12354         (Namespace.Lookup): Don't use GetNamespace.
12355         * typemanager.cs (GetRootNamespace): Rename from
12356         ComputeNamespaceForAlias.
12357         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12358
12359 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12360
12361         * anonymous.cs (AnonymousContainer): Don't crash when container
12362         doesn't exist.
12363
12364 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12365
12366         * expression.cs (Binary.DoResolve): Warn when comparing same
12367         values.
12368
12369 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12370
12371         Fix #76486.
12372         * expression.cs (Binary.DoResolve): It looks like there are no
12373         convetsion rules in enum context.
12374
12375 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12376
12377         Add support for extern alias qualifiers.
12378         * typemanager.cs: Move some LookupTypeReflection code
12379         to namespace.cs, to have cleaner code. Added some methods
12380         to help us keep track of the extern aliased references.
12381         * driver.cs: Add suport for extern alias assemblies on command
12382         line and check for their warnings/errors. Also keep track of the
12383         extern aliased assemblies.
12384         * namespace.cs: Move the global functionality of Namespace
12385         to GlobalRootNamespace/RootNamespace. Now the global namespace
12386         is GlobalRootNamespace.Globa. Also the code moved from 
12387         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12388         Finally added LocalAliasEntry (AliasEntry before) and
12389         ExternAliasEntry, to handle alias statements.
12390         * cs-parser.jay: Add support in the grammar for extern alias
12391         statement.
12392         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12393         Update callings to Namespace (now in GlobalRootNamespace).
12394
12395 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12396
12397         Fix #76371.
12398         * class.cs (TypeContainer.DefineType): Move updating of
12399         topological sort earlier in the code.
12400         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12401
12402 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12403
12404         Fix #76273.
12405         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12406         
12407         * constant.cs (Constant.TryReduce): Moved from Cast class.
12408         (Reduce): Made little bit more OO and fixed missing conversions.
12409         
12410         * ecore.cs (Reduce): Implemented.
12411         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12412         
12413         * literal.cs (Reduce): Implemented.
12414         
12415         * class.cs: Reverted Miguel's wrong commit.
12416
12417 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12418
12419         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12420
12421 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12422
12423         * cs-parser.jay, expression.cs : CS0214 was missing error location
12424           for constants. Fixed bug #76404.
12425
12426 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12427
12428         Fix #76370.
12429         * convert.cs (ExplicitConversionCore): Fixed object->enum
12430         conversion.
12431
12432 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12433
12434         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12435         InstanceExpression.
12436         (PropertyExpr.EmitCall): Likewise.
12437         * expression.cs (Invocation.EmitArguments): Handle case where
12438         arguments == null.
12439         (Invocation.EmitCall): Avoid allocating temporary variable if
12440         there are no arguments.
12441
12442 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12443
12444         Fix #76323.
12445         * convert.cs (ImplicitConversionStandard): Move conversion of
12446         void* to arbitrary pointer types ...
12447         (ExplicitConversionStandard): .. here.
12448         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12449         error to always print typenames.
12450
12451 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12452
12453         * convert.cs (GetConversionOperator): Rename from
12454         GetConversionOperators.  Move operator selection code from ...
12455         (UserDefinedConversion): ... here.
12456
12457 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12458
12459         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12460         conversion.
12461
12462 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12463
12464         * assign.cs (Assign.DoResolve): Error method changed.
12465
12466         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12467         
12468         * const.cs (ResolveValue): Reset in_transit immediately.
12469         
12470         * constant.cs: Error method changed.
12471         
12472         * convert.cs: Removed useless location parameter.
12473         (ExplicitNumericConversion): Don't do double enum check.
12474         (ExplicitConversionCore): Renamed from ExplicitConversion.
12475         (ExplicitUnsafe): Extracted from ExplicitConversion.
12476         (ExplicitConversion): Uses for error reporting.
12477         
12478         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12479         error messages.
12480         (ResolveBoolean): Uses common error method.
12481         (CastToDecimal): Get rid of ec.
12482         (CastFromDecimal): Optimized.
12483         (ConvCast): Get rid of ec.
12484         
12485         * enum.cs (ResolveValue): Reset in_transit immediately.
12486         (Emit): Return after first error.
12487         
12488         * expression.cs: Convert changes.
12489         
12490         * literal.cs: Error method changed.
12491         
12492         * statement.cs: Error method changed.
12493
12494 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12495
12496         * support.cs (SeekableStreamReader.Position): Don't error out when
12497         the requested position is just beyond the end of the current
12498         buffered data.
12499
12500 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12501
12502         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12503         try to keep in sync with the byte count of the underlying Stream.
12504         However, this limits us to a window size of 2048 characters: i.e.,
12505         the maximum lookahead of our lexer/parser can be 2048 characters.
12506
12507 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12508
12509         Fix #76255.
12510         * driver.cs: Fix compilation files with full root path.
12511
12512 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12513
12514         * report.cs (SymbolRelatedToPreviousError): Format the output so
12515         it does not use an open parenthesis that is never closed. 
12516
12517         * driver.cs: Follow coding guidelines
12518
12519 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12520
12521         Fix #72930.
12522         * const.cs (Const.ResolveValue): Check for assigning non-null
12523         value to reference type.
12524
12525 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12526
12527         * anonymous.cs: Implemented ExprClassName.
12528         
12529         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12530         delegate.
12531         
12532         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12533         check.
12534         
12535         * class.cs (StaticClass.DefineContainerMembers): Report protected
12536         members as error.
12537         
12538         * codegen.cs: if(ed) PRODUCTION.
12539         
12540         * convert.cs (Error_CannotImplicitConversion): Better error
12541         distinction.
12542         
12543         * cs-parser.jay: More error checks.
12544         
12545         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12546         
12547         * driver.cs (CSCParseOption): Enabled wrong option check.
12548         
12549         * ecore.cs (Expression.ExprClassName): Turned to property.
12550         (MemberExpr.CheckIntermediateModification): For checking boxed
12551         value types     modification.
12552         
12553         * statement.cs (Fixed.Resolve): Expression type must be
12554         convertible to fixed type.
12555         (CollectionForeach.GetEnumeratorFilter,TryType):
12556         Small refactoring for easier error checking.
12557
12558 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12559
12560         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12561         attributes.
12562         
12563         * class.cs (GeneratedBaseInitializer): New class for customization
12564         compiler generated initializers.
12565         (MemberBase.DoDefine): Check Obsolete attribute here.
12566         (FieldMember.DoDefine): Ditto.
12567         
12568         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12569         constants.
12570         
12571         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12572         (MemberCore.GetObsoleteAttribute): Removed argument.
12573         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12574         (MemberCore.CheckObsoleteType): New helper.
12575         
12576         * delegate.cs,
12577         * enum.cs,
12578         * statement.cs: Updates after MemberCore changes.
12579         
12580         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12581         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12582         
12583         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12584         obsolete attribute for compiler construct.
12585         (As.DoResolve): Cache result.
12586         
12587         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12588
12589 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12590
12591         Fix #76133.
12592         * expression.cs (This.VerifyFixed): In a value type T, the type of
12593         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12594         value type R, 'this' is treated as a value parameter.
12595
12596 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12597
12598         * statement.cs (Lock): Use the TemporaryVariable class instead of
12599         manually using local variables as those do not work when variables
12600         are captured.
12601
12602         * ecore.cs: Moved the TemporaryVariable class from being a nested
12603         class inside Foreach to be a public class that can be employed in
12604         other places. 
12605
12606 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12607
12608         * cs-parser.jay: interface_accessors replaced by
12609         accessor_declarations.
12610
12611         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12612         location.
12613         
12614         * statement.cs (GotoCase.Resolve): Convert null constant to
12615         null case.
12616         (SwitchLabel.ResolveAndReduce): Ditto.
12617         (SwitchLabel.NullStringCase): Custom null stamp.
12618         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12619         
12620         typemanager.cs (CSharpSignature): Don't skip first argument
12621         for full names.
12622
12623 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12624
12625         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12626
12627         * location.cs (InEmacs): in this mode, do not report column
12628         location as it confuses Emacs.
12629
12630 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12631
12632         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12633         expression.cs, iterators.cs, literal.cs: Store constants and
12634         literals location.
12635         
12636         * class.cs (MemberBase.ShortName): Pass location.
12637         
12638         * cs-parser.jay: Some location fixes.
12639         
12640         * ecore.cs (Expression.Location): Made virtual.
12641
12642 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12643
12644         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12645         if the underlying types are the same, otherwise we need to produce
12646         code that will do the proper cast.
12647
12648         This was exposed by Marek's constant rewrite which produced
12649         invalid code for the call site:
12650
12651         enum X : long { a }
12652         void Method (X v) {}
12653
12654         Method ((X) 5)
12655
12656         This fixes test-49.cs
12657
12658 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12659
12660         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12661           Type/Object should be allowed as well. Fixed bug #75968.
12662
12663 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12664
12665         * expression.cs : (Binary.DoResolve): when one is enum constant and
12666           another is constant 0, then return enum one *as enum type*.
12667           Fixed bug 74846.
12668
12669 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12670
12671         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12672         internal.
12673
12674         Fix #75941.
12675         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12676         flow-branching for LocalVariableReferences in case we were invoked
12677         from a MemberAccess.
12678         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12679         Carved out of ...
12680         (LocalVariableReference.DoResolveBase): ... this.
12681         (MemberAccess.Resolve): Do the check that was disabled during
12682         SimpleNameResolve.
12683
12684 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12685
12686         * class.cs :
12687           (PartialContainer.Create): check abstract/sealed/static strictly
12688           but abstract/sealed can exist only at one side. Fixed bug #75883.
12689
12690 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12691
12692         Fix #75945.
12693         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12694         specified, don't default to UnmanagedType.I4.
12695
12696 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12697
12698         * expression.cs : conditional operator should check possibly
12699           incorrect assign expression. Fixed bug #75946.
12700
12701 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12702
12703         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12704           Reverting the change. gmcs is much complex than mcs on this matter.
12705
12706 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12707
12708         * cs-tokenizer.cs : To read another token ahead of the actual 
12709           consumption, use new SavedToken and cache token instead of moving
12710           back the stream with SeekableStreamReader (it seemed problematic).
12711         * cs-parser.jay,
12712           driver.cs : Thus use StreamReader directly.
12713         * support.cs : Thus removed SeekableStreamReader.
12714
12715 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12716
12717         Fix #75934.
12718         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12719         (ScopeInfo.EmitScopeType): Use it to construct field names from
12720         names of captured locals.
12721
12722         Fix #75929.
12723         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12724         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12725         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12726         (ExplicitConversion): Remove enum cases already handled by
12727         implicit conversion.  Move implicit conversion check to the beginning.
12728         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12729         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12730         Don't treat System.Enum as a struct.
12731
12732 2005-08-30  Jb Evain  <jbevain@gmail.com>
12733
12734         * attribute.cs: handles as expression in parameters.
12735
12736 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12737
12738         Fix #75802.
12739         * class.cs (TypeContainer.VerifyClsName): Don't use a
12740         PartialContainer when verifying CLS compliance.
12741         (AbstractPropertyEventMethod): Set Parent here, ...
12742         (PropertyMethod): ... not here.
12743
12744 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12745
12746         * attribute.cs : escaped attribute name should not be allowed to be
12747           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12748
12749 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12750
12751         Fix #75927.
12752         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12753         when converting a long constant to unsigned long.
12754         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12755         detect where IsApplicable and VerifyArgumentsCompat disagree.
12756
12757 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12758         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12759
12760         Fix #75848.
12761         * class.cs (TypeContainer.CanElideInitializer): New helper.
12762         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12763         can safely emitting the initializer of a field.
12764
12765 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12766
12767         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12768           allowed inside a switch (without loop). Fixed bug #75433.
12769
12770 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12771
12772         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12773         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12774
12775 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12776
12777         * driver.cs : kinda reverting the default encoding changes (not exact 
12778           revert since I noticed that "codepage:reset" might not work fine).
12779
12780 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12781
12782         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12783           Location. Now getter and setter store location correctly.
12784           (errors/cs0111-12.cs now reports the expected location.)
12785
12786 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12787
12788         * driver.cs : Use default encoding on the environment.
12789           Removed (now that) extra parameter for SeekableStreamReader.
12790         * support.cs : (SeekableStreamReader) third .ctor() argument for
12791           StreamReader is not required (always true). preamble size could
12792           be acquired in simpler and safe way.
12793
12794 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12795
12796         * cs-parser.jay: report CS0642 at warning level 3
12797           and report CS0642 for an if else statement also
12798           fixes bug #74745. Patch by John Luke (and a bit
12799           modified by me).
12800           Removed extra CS0642 warning check for "while",
12801           "for" and "fixed".
12802         * statement.cs: In Block.Resolve(), CS0642 check
12803           is reimplemented to check a sequence of an empty
12804           statement and a block.
12805
12806           Both fix bug #66777.
12807
12808 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
12809
12810         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
12811         detection until I fix it.
12812         
12813         * cs-tokenizer.cs: Changed error message.
12814         
12815         * cs-parser.jay: Fixed 2 error locations.
12816         
12817         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
12818         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
12819         properties.
12820         
12821         * enum.cs (GetSignatureForError): Fixed.
12822         
12823         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
12824         method detection.
12825         
12826         * class.cs,
12827         * typemanager.cs (RegisterProperty): Removed.
12828         
12829         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
12830
12831 2005-08-24  Raja R Harinath  <rharinath@novell.com>
12832
12833         Fix #75874.
12834         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
12835         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
12836
12837 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12838
12839         * expression.cs : tiny fix is required for not warning positive ulong.
12840           See test-441.cs.
12841
12842 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12843
12844         * expression.cs : add CS0652 check for constant and integral
12845           expression. Fixed bug #53974.
12846
12847 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12848
12849         * expression.cs : in DoNumericPromotions(), check if there is implicit
12850           conversion overload for string (to check CS0034). Fixed bug #52492.
12851
12852 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12853
12854         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
12855
12856 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12857
12858         * ecore.cs : report location when it is *not* Null.
12859
12860 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12861
12862         * codegen.cs,
12863           ecore.cs,
12864           flowanalysis.cs,
12865           expression.cs:
12866           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
12867           correctly. Fixed bug #75721.
12868
12869 2005-08-23  Raja R Harinath  <rharinath@novell.com>
12870
12871         * support.cs (SeekableStreamReader.Position): Avoid an expensive
12872         loop that performs 'min (pos, char_count)'.
12873
12874         Fix #75862.
12875         * expression.cs (Unary.ResolveOperator): Don't discard implicit
12876         converted value in Operator.OnesComplement.
12877
12878 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
12879
12880         * anonymous.cs: If the anon method is pulled into a helper class,
12881         it needs to be `internal' not `private'. Fixes runtime behavior on
12882         msft. bug #75704
12883
12884 2005-08-20  Martin Baulig  <martin@ximian.com>
12885
12886         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12887         scope if we don't already have it.
12888
12889         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
12890         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
12891         fixes #75867.
12892
12893 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
12894
12895         Fix #75803
12896         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
12897         is a partial class.
12898
12899 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
12900
12901         The big constants rewrite
12902         Fix #75746, #75685 and more
12903         As a side effect saved 1MB for MWF ;-)
12904         
12905         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
12906         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
12907         enum based for corlib compilation.
12908         
12909         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
12910         subtractions.
12911         
12912         * class.cs (FixedField.Define): Use ResolveAsConstant.
12913         
12914         * const.cs (IConstant): Interface constants and enums.
12915         (Const.ResolveValue): New method for constant resolvning.
12916         (ExternalConstant): Constants from imported assemblies.
12917         
12918         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
12919         conversion; like enums.
12920         (Constant.ToType): Converts this constant to different type.
12921         (Constant.Increment): Adds 1.
12922         
12923         * convert.cs (ImplicitConversionRequired): Simplified.
12924         
12925         * cs-parser.jay: Create EnumMember directly.
12926         
12927         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
12928         
12929         * doc.cs (GenerateEnumDocComment): Removed.
12930         
12931         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
12932         (ConvertIntLiteral): Removed.
12933         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
12934         
12935         * enum.cs (EnumMember): Implement IConstant.
12936         (Enum.IsValidEnumConstant): Removed.
12937         (Enum.GetNextDefaultValue): Removed.
12938         (Enum.FindMembers): Updated.
12939         (Enum.GenerateDocComment): Iterate enum members.
12940         
12941         * expression.cs (Cast.TryReduce): Handle enums correctly.
12942         (New.Constantify): Made public.
12943         (MemberAccess.DoResolve): Removed contant specific if(s).
12944         
12945         * literal.cs (NullLiteral): Implement new abstract methods.
12946         
12947         * statement.cs (GotoCase.Resolve): Use new constant methods.
12948         (SwitchLabel.ResolveAndReduce): Use new constant methods.
12949         
12950         * typemanager.cs (LookupEnum): Removed.
12951         (IsEnumType): Fixed to work with corlib.
12952         (RegisterConstant): Removed.
12953         (LookupConstant): Removed.
12954         (GetConstant): Changed to work with IConstant.
12955
12956 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
12957
12958         * location.cs : Fixed overflown (>255) column number.
12959
12960 2005-08-03  Raja R Harinath  <rharinath@novell.com>
12961
12962         First cut of the qualified-alias-member feature.
12963         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
12964         token.
12965         * cs-parser.jay (DOUBLE_COLON): New token.
12966         (namespace_or_type_name): Add rule for recognizing
12967         qualified-alias-members.
12968         (primary_expression): Likewise.
12969         (element_access): Allow QualifiedAliasMember as a possible
12970         type-bearing expression.
12971         (local_variable_type, local_variable_pointer_type): Likewise.
12972         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
12973         aliases in the current and enclosing namespace declarations.
12974         (NamespaceEntry.UsingAlias): Add CS0440 warning.
12975         * decl.cs (MemberName.is_double_colon): New.
12976         (MemberName.MemberName): Add new constructor for alias-member.
12977         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
12978         * expression.cs (QualifiedAliasMember): New expression type.
12979
12980 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12981
12982         * location.cs : it borked when no argument was specified.
12983
12984 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12985
12986         * location.cs : tiny ToString() format fix.
12987
12988 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12989
12990         * statement.cs : oops, it was missing.
12991
12992 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12993
12994         A set of fixes for precise line/column location.
12995
12996         * location.cs :
12997           "token" field now holds a file/line "delta", a line number offset 
12998           from the segment, and a column number. See also:
12999           http://lists.ximian.com/pipermail/mono-devel-list/2004-
13000           December/009508.html
13001           Removed static IsNull. Use instance IsNull property instead.
13002         * cs-tokenizer.cs :
13003           For some tokens it stores Location. For Identifier it stores
13004           LocatedToken which is a pair of string name and location.
13005           Column numbers are adjusted only at getChar().
13006         * report.cs :
13007           Use Location.ToString() for reporting (it now contains column).
13008         * cs-parser.jay :
13009           Largely modified to use LocatedToken instead of
13010           string (IDENTIFIER), and to acquire Location from some tokens.
13011         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
13012           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
13013           codegen.cs :
13014           Now MemberName holds Location. DeclSpace.ctor() receives Location
13015           as a parameter. Removed extra parameters to all derived classes.
13016           Replaced Location.IsNull() with instance property.
13017         * assign.cs, expression.cs :
13018           Added .ctor() overload that omits Location.
13019         * attribute.cs :
13020           Added "nameEscaped" flag that indicates the identifier was escaped
13021           in the source file. This fixes bug #57047.
13022
13023 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
13024
13025         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
13026         New method, looking for lo-case imported cls type.
13027
13028         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
13029         here.
13030
13031         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
13032
13033         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
13034
13035         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
13036         all_imported_types.
13037         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
13038
13039         Optimized to save 3.5 MB for SWF compilation.
13040
13041 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13042
13043         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
13044         (PartialContainer.Create): Moved logic AddToContainer.
13045         (PartialContainer.MarkForDuplicationCheck): Shares name.
13046         
13047         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
13048         place.
13049         
13050         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
13051         initialization.
13052         (Namespace.GetSignatureForError): New method.
13053         
13054         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
13055         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
13056
13057 2005-08-01  Raja R Harinath  <rharinath@novell.com>
13058
13059         Fix #75669.
13060         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
13061         member lookup rather than qualifier_type, since qualifier_type can
13062         be null.
13063
13064 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13065
13066         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
13067         enum member.
13068
13069 2005-07-31  Miguel de Icaza  <miguel@novell.com>
13070
13071         * statement.cs: Copy the local exception into the exception
13072         captured local.  Fixes 75674
13073
13074 2005-07-31  Raja R Harinath  <harinath@gmail.com>
13075
13076         Fix #75658.
13077         * expression.cs (Invocation.OverloadResolve): Don't report error
13078         CS1501 if error CS1502 has been reported.
13079         (New.DoResolve): Delegate CS1501 reporting to
13080         Invocation.OverloadResolve.
13081
13082         Fix #75656.
13083         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
13084         invariant-meaning-in-block property in an enclosing block if
13085         necessary.
13086
13087 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
13088
13089         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
13090         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
13091         (Switch.CheckSwitch): Just save 50kb for SWF.
13092
13093 2005-07-27  Martin Baulig  <martin@ximian.com>
13094
13095         * anonymous.cs (CaptureContext.AddField): Added
13096         `AnonymousContainer am' argument; compute its toplevel scope if
13097         it's not already computed.  Fixes #75649.
13098
13099 2005-07-26  Raja R Harinath  <rharinath@novell.com>
13100
13101         Fix #75628.
13102         * class.cs (Constructor.Emit): Reset block to null if the block
13103         resolve fails.
13104
13105 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13106
13107         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
13108
13109 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13110
13111         * class.cs (MethodData.Define): Check whether accessor implementing
13112         interface is public.
13113
13114         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
13115
13116 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
13117
13118         Fix #57245
13119         * namespace.cs (LookupType): Moved same type check to...
13120         
13121         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
13122         with the same name.
13123
13124 2005-07-21  Raja R Harinath  <rharinath@novell.com>
13125
13126         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
13127         already found a typebuilder.
13128         * class.cs (MethodCore.IsDuplicateImplementation): Compare
13129         MemberNames, not strings.
13130
13131         * const.cs (Error_ExpressionMustBeConst): 
13132         Rename from Error_EpressionMustBeConst.
13133         * const.cs, class.cs, statement.cd: Update.
13134
13135 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
13136
13137         Fix #65573
13138
13139         * const.cs (Const.LookupConstantValue): Report missing contant expression
13140         everytime.
13141         (Error_EpressionMustBeConstant): Only one error method.
13142
13143         * class.cs, statement.c: Updated.
13144
13145 2005-07-20  Raja R Harinath  <rharinath@novell.com>
13146
13147         * statement.cs (Block.Flags): Add back HasVarargs.
13148         (Block.flags): Make protected.
13149         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
13150
13151         * typemanager.cs (types, typecontainers, user_types): Remove.
13152         (UserTypes, TypeContainers): Likewise.
13153         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
13154         (CleanUp, Reset): Update.
13155         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
13156         (GetNestedType): Use Type.GetNestedType.
13157         (CoreLookupType): Take two arguments, the namespace and the
13158         basename of the type.  Update to use the Namespace.Lookup
13159         mechanism.
13160         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
13161         (RealMemberLookup): Use IsNestedChildOf instead of playing with
13162         string concatenation and substring matches.
13163         * class.cs, enum.cs, delegate.cs: Update to changes.
13164
13165 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
13166
13167         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
13168         Expression and made virtual.
13169
13170         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
13171         (ImplicitStandardConversionExists): Fixed `byte' typo ?
13172
13173         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
13174
13175         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
13176         error message.
13177
13178         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
13179         change.
13180
13181 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
13182
13183         Fix #57707
13184         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
13185         AssemblyCultureAttribute is not used on executable.
13186
13187         * rootcontext.cs,
13188         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
13189
13190 2005-07-16  Raja R Harinath  <rharinath@novell.com>
13191
13192         Fix #60638.
13193         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
13194         New.  Reports CS0252/CS0253.
13195         Mostly taken from preliminary patch by Duncak Mak.
13196         (Binary.DoResolveOperator): Store results of operator lookup.
13197         Use them to detect if we need to warn about unintended reference
13198         comparisons.
13199
13200 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13201
13202         Fix #72969.
13203         * namespace.cs (Namespace.Lookup): Add back location parameter.
13204         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13205         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13206
13207         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13208         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13209         (Namespace.LookupType): ... this.
13210         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13211         of namespaces.
13212         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13213         purported to handle pointers.
13214         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13215         CoreLookupType.
13216
13217 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13218
13219         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13220         type as namespace.
13221
13222 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13223
13224         * namespace.cs (Namespace.Lookup): Drop location parameter.
13225         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13226         (NamespaceEntry.Lookup): ... this.
13227         (NamespaceEntry.Error_AmbiguousTypeReference):
13228         Move here from DeclSpace.
13229         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13230         names ...
13231         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13232         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13233         Move to NamespaceEntry.
13234         * delegate.cs, expression.cs: Update to changes.
13235
13236 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13237
13238         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13239         CheckAttributeType and refactored.
13240         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13241         ResolveAsTypeTerminal error handling.
13242         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13243         handling.
13244         (GetSignatureForError): Print errors in same way.
13245
13246         * class.cs,
13247         * codegen.cs: Reflect attribute GetSignatureForError change.
13248
13249         * ecore.cs,
13250         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13251
13252         * namespace.cs (UsingEntry): Refactored to make fields private.
13253
13254         * assign.cs,
13255         statement.cs: Error_UnexpectedKind has extra parameter.
13256
13257 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13258
13259         * ecore.cs (IAlias): Remove.
13260         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13261         that implement the interface.
13262         * namespace.cs (Namespace): Likewise.
13263         (Namespace.declspaces): Renamed from 'defined_names'.
13264         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13265         DeclSpace instead of an IAlias.
13266         * tree.cs (Tree.AddDecl): Update.
13267
13268 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13269
13270         * statement.cs (Block.Flags); Remove HasVarargs.
13271         (Block.HasVarargs): Move to ToplevelBlock.
13272         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13273         (Block.Variables): Make protected.  Initialize variable hashtable
13274         if necessary.
13275         (Block.AddVariable): Update.
13276         (Block.Resolve): Update to changes.
13277         (ToplevelBlock.HasVarargs): New boolean.
13278         (ToplevelBlock.ThisVariable): Move here from Block.
13279         (ToplevelBlock.AddThisVariable): Likewise.
13280         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13281         * expression.cs (This.ResolveBase): Update to changes.
13282         (ArglistAccess.DoResolve): Likewise.
13283
13284 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13285
13286         Fix #75321
13287         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13288
13289         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13290         not used and not used & assigned.
13291         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13292
13293 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13294
13295         Fix #75053
13296         * expression.cs (Is.DoResolve): null is never provided type.
13297
13298 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13299
13300         Fix #52496
13301         * cs-parser.jay: Less strict event error rule to catch more errors.
13302
13303 2005-07-08  Martin Baulig  <martin@ximian.com>
13304
13305         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13306         gettter (allowed) or setter (not allowed).
13307
13308         * class.cs (Accessor): Implement IIteratorContainer.
13309         (Accessor.Yields): New public field.
13310         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13311         per-accessor basis.
13312
13313         * cs-parser.jay
13314         (get_accessor_declaration, set_accessor_declaration): Set the
13315         `yields' flag on the accessor, not the property.
13316         (property_declaration): Do the iterators check on a per-accessor
13317         basis and not for the whole property.
13318
13319 2005-07-08  Martin Baulig  <martin@ximian.com>
13320
13321         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13322         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13323
13324 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13325
13326         Fix #74975
13327         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13328         (ExtractSecurityPermissionSet): Cope with self referencing security
13329         attributes properly.
13330
13331         * driver.cs (SetOutputFile): Made public property OutputFile.
13332
13333 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13334
13335         Fix #75486.
13336         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13337         has_nonstatic_fields.  Make into a FieldBase pointer.
13338         (TypeContainer.AddField): Add CS0282 check.
13339         (TypeContainer.EmitType): Update.
13340
13341 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13342
13343         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13344         compare if they start with __.
13345
13346 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13347
13348         * statement.cs (Switch.SwitchGoverningType): Only look at
13349         UserCasts that don't need implicit standard conversions to one of
13350         the allowed switch types (Fixes test-322.cs).
13351         (LocalInfo.Resolve): Re-enable sanity-test.
13352
13353 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13354
13355         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13356         
13357         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13358         
13359         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13360
13361 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13362
13363         Fix #75472.
13364         * ecore.cs (SimpleName.GetSignatureForError): Add.
13365         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13366         (MemberAccess.GetSignatureForError): Add.
13367
13368 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13369  
13370         The big error and warning messages review.
13371         
13372         * anonymous.cs,
13373         * assign.cs,
13374         * attribute.cs,
13375         * class.cs,
13376         * codegen.cs,
13377         * convert.cs,
13378         * cs-parser.jay,
13379         * cs-tokenizer.cs,
13380         * decl.cs,
13381         * delegate.cs,
13382         * doc.cs,
13383         * driver.cs,
13384         * ecore.cs,
13385         * enum.cs,
13386         * expression.cs,
13387         * flowanalysis.cs,
13388         * iterators.cs,
13389         * literal.cs,
13390         * location.cs,
13391         * modifiers.cs,
13392         * namespace.cs,
13393         * parameter.cs,
13394         * pending.cs,
13395         * report.cs,
13396         * rootcontext.cs,
13397         * statement.cs,
13398         * support.cs,
13399         * tree.cs,
13400         * typemanager.cs: Updated.
13401         
13402         * class.cs: (MethodCore.SetYields): Moved here to share.
13403         (PropertyMethod.Define): Moved iterator setup here.
13404         
13405         * iterators.cs: Add orig_method to have full access to parent
13406         container.
13407
13408 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13409
13410         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13411         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13412         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13413         variable of struct type.
13414         * expression.cs (Unary.ResolveOperator): Update to change.
13415         (Indirection.VerifyFixed): Likewise.
13416         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13417         (ParameterReference.VerifyFixed): Value parameters are fixed.
13418         (This.VerifyFixed): Treat 'this' as a value parameter.
13419         * statement.cs (LocalInfo.IsFixed): Remove.
13420
13421 2005-07-01  Martin Baulig  <martin@ximian.com>
13422
13423         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13424         `ec.EmitThis ()' to get the correct scope.
13425
13426 2005-07-01  Martin Baulig  <martin@ximian.com>
13427
13428         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13429         instance is a ParameterReference; fixes #75299.
13430
13431 2005-07-01  Martin Baulig  <martin@ximian.com>
13432
13433         Reverted Marek's latest patch (r46725):
13434         - it contains structural changes which are neither mentioned in
13435           the ChangeLog nor explained anywhere; for example the additional
13436           argument of EmitContext's and Iterator's .ctor's and the
13437           TypeContainer.DefineMembers() change.
13438         - structural changes like this should go in in seperate patches
13439           and not be hidden in a huge patch which just seems to affect
13440           warnings and errors.
13441           a big and hard to understand patch.
13442         - it breaks iterators and causes regressions, for instance in
13443           test-iter-03.cs.      
13444
13445 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13446
13447         Fix #75412.
13448         * expression.cs (Indexers.map): Remove.
13449         (Indexers.Append): Filter out inaccessible setters and getters.
13450         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13451
13452         Fix #75283.
13453         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13454         Refactored from ...
13455         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13456         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13457         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13458         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13459
13460 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13461
13462         Fix #75322
13463         * class.cs (FieldBase.GetInitializerExpression): One more field
13464         for backup.
13465
13466 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13467
13468         * pending.cs: Do not define a proxy if the base method is virtual,
13469         it will be picked up by the runtime (bug 75270).
13470
13471 2005-06-08  Martin Baulig  <martin@ximian.com>
13472
13473         The big Iterators rewrite :-)
13474
13475         * iterators.cs: Rewrite this to use the anonymous methods framework.
13476
13477         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13478         before the TypeContainers; see 2test-21.cs.
13479
13480         * class.cs
13481         (TypeContainer.DefineType): Don't create a new EmitContext if we
13482         already have one (this only happens if we're an Iterator).
13483         (TypeContainer.Define): Also call Define() on all our iterators.
13484         (Method.CreateEmitContext): Added support for iterators.
13485
13486         * anonymous.cs
13487         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13488         (AnonymousContainer.CreateMethodHost): Moved here from
13489         AnonymousMethod and made abstract.
13490         (AnonymousContainer.CreateScopeType): New abstract method.
13491         (AnonymousContainer.IsIterator): New public property.
13492         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13493         get the ScopeTypeBuilder rather than manually defining it here. 
13494         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13495         iterators here.
13496
13497         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13498         before RootContext.DefineTypes().
13499
13500         * codegen.cs (EmitContext.RemapToProxy): Removed.
13501         (EmitContext.CurrentAnonymousMethod): Changed type from
13502         AnonymousMethod -> AnonymousContainer.
13503         (EmitContext.ResolveTopBlock): Protect from being called twice.
13504         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13505         (EmitContext.EmitThis): Removed the iterators hacks; use the
13506         anonymous methods framework for that.
13507
13508         * statement.cs
13509         (ToplevelBlock.Container): Make this a property, not a field.
13510         (ToplevelBlock.ReParent): New public method; move the
13511         ToplevelBlock into a new container.
13512         (Foreach.TemporaryVariable): Simplify.
13513
13514 2005-06-05  Martin Baulig  <martin@ximian.com>
13515
13516         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13517         (Block.AddTemporaryVariable): New public method; creates a new
13518         `LocalInfo' for a temporary variable.
13519         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13520         variables here.
13521         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13522         non-iterator variables.
13523
13524 2005-06-05  Martin Baulig  <martin@ximian.com>
13525
13526         * statement.cs (Foreach.TemporaryVariable): Create the
13527         LocalBuilder in the Emit phase and not in Resolve since in some
13528         situations, we don't have an ILGenerator during Resolve; see
13529         2test-19.cs for an example.
13530
13531 2005-06-04  Martin Baulig  <martin@ximian.com>
13532
13533         **** Merged r45395 from GCS ****
13534
13535         The big Foreach rewrite - Part II.
13536
13537         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13538         with `PropertyInfo ienumerator_getcurrent'.
13539
13540         * codegen.cs (VariableStorage): Removed.
13541
13542         * statement.cs
13543         (Foreach): Derive from Statement, not ExceptionStatement.
13544         (Foreach.CollectionForeach): New nested class.  Moved all the code
13545         dealing with collection foreach here.
13546         (Foreach.ForeachHelperMethods): Removed.
13547         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13548
13549 2005-05-23  Martin Baulig  <martin@ximian.com>
13550
13551         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13552         don't need to.  Fix #75014.
13553
13554 2005-05-20  Martin Baulig  <martin@ximian.com>
13555
13556         Merged r44808 from GMCS.
13557
13558         * class.cs (TypeContainer.CircularDepException): Removed.
13559         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13560         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13561         (CS0146) and interface (CS0529) dependencies here.
13562
13563 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13564
13565         * expression.cs (Invocation.EmitCall): Fix initialization
13566         'this_call' to reflect current behaviour.  Fix indentation.
13567
13568         * convert.cs (FindMostEncompassedType): Add two trivial special
13569         cases (number_of_types == 0 || number_of_types == 1).
13570         (FindMostEncompasingType): Likewise.
13571
13572 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13573
13574         Some cleanups preparing for the fix of #75283.
13575         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13576         error testing.
13577         (EventExpr.InstanceResolve): Likewise.
13578         (EventExpr.DoResolve): Remove redundant checks.
13579
13580 2005-06-10  Duncan Mak  <duncan@novell.com>
13581
13582         * cs-tokenizer.cs (process_directives): New flag for controlling
13583         the processing of preprocessor directives.
13584         (x_token): After seeing a '#', return Token.NONE instead of going
13585         to handle_preprocessing_directive() when not processing
13586         directives. This avoids unnecessary processing during the token peek in
13587         is_punct().
13588
13589         This fixes #74939.
13590
13591         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13592         the existing error reporting methods instead of Report.Error.
13593
13594         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13595         after Raja's rewrite.
13596
13597 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13598
13599         * class.cs: Small fix.
13600
13601 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13602
13603         Fix #75160.
13604         * class.cs (GetPartialBases): Fix return value check of
13605         part.GetClassBases.
13606
13607 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13608
13609         Ensure that partial classes are registered in their enclosing
13610         namespace.  Initial part of fix of #75160.
13611         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13612         Register declspace with namespace here, not in
13613         DeclSpace.RecordDecl.
13614         * cs-parser.jay: Pass namespace to RecordDecl.
13615         * class.cs (PartialContainer.Create): Likewise.
13616         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13617         called.
13618         * decl.cs (Declspace.RecordDecl): Remove.
13619         * namespace.cs (NamespaceEntry.DefineName): Remove.
13620
13621 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13622
13623         * rootcontext.cs: Reset TargetExt as well.
13624
13625 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13626
13627         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13628         -langversion:ISO-1.
13629
13630 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13631
13632         Fix #75080, cs0119.cs.
13633         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13634         of ...
13635         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13636         allowing ExprClass.Type and ExprClass.Namespace for
13637         ResolveFlags.VariableOrValue.
13638         (Expression.Resolve) [1-argument variant]: Change default resolve
13639         flags based on language version.
13640         (Expression.Error_UnexpectedKind): Use a simple string array
13641         rather than an ArrayList.
13642         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13643         not ExprClass.Type.
13644         (TypeOfVoid.DoResolve): Likewise.
13645         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13646         flags argument -- it always has the same value.
13647
13648 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13649
13650         Fix #75081.
13651         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13652         Use it in the error message.
13653         * assign.cs, expression.cs, statement.cs: Update.
13654
13655 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13656
13657         Fix #75088.
13658         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13659         the "almostMatchedMember" case too.
13660         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13661         that failed the accessibility checks to 'almost_match'.
13662
13663 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13664
13665         * attribute.cs: Use internal MethodBuilder methods to set
13666         ExactSpelling and SetLastError on PInvoke methods, instead
13667         of passing them via charset.  Fixes #75060.
13668
13669 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13670
13671         * parameter.cs (Parameter): Remove TODO comment.
13672         (Parameter.DefineParameter): Remove Location parameter.
13673         (Parameters.LabelParameters): Likewise.
13674         * class.cs (Constructor.Emit): Update to change.
13675         (MethodData.Emit): Likewise.
13676         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13677         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13678
13679 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13680
13681         * parameter.cs,
13682           Removed Parameters.Location and added Parameter.Location instead.
13683           Removed Location parameter from Emit() and GetSignature().
13684         * anonymous.cs,
13685           class.cs,
13686           cs-parser.jay,
13687           delegate.cs,
13688           iterators.cs,
13689           statement.cs :
13690           Modified all related calls.
13691
13692 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13693
13694         Improve user-defined conversion handling.
13695         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13696         applicable operators.
13697         (AddConversionOperators): New.  Helper for GetConversionOperators.
13698         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13699         there is only one most encompassed/encompassing type.
13700         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13701         "applicable operator" handling.
13702         (UserConversion): Move cache here from GetConversionOperators.
13703         Directly cache the chosen operator, rather than the whole
13704         MethodGroup.
13705         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13706         case.  Allow conversion of decimal to sbyte and byte too.
13707         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13708         New static methods.  Used to avoid allocating EmptyExpressions in
13709         convert.cs.
13710
13711 2005-05-24  Duncan Mak  <duncan@novell.com>
13712
13713         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13714         another class, used in Convert.ExplicitNumericConversion.
13715         (CastToDecimal): New class, similar to above, but casts to
13716         System.Decimal, used in Convert.ImplicitNumericConversion and also
13717         in explicit convesion from double/float to decimal.
13718
13719         * convert.cs (ImplicitNumericConversion): Handle implicit
13720         conversions to System.Decimal.
13721         (ExplicitNumericConversion): handle explicit conversions to
13722         System.Decimal.
13723
13724         This fixes #68711.
13725         
13726 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13727
13728         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13729         know the type at this stage, just break through.   Fixes #75008 
13730
13731 2005-05-19  Martin Baulig  <martin@ximian.com>
13732
13733         * delegate.cs
13734         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13735         to disable error reporting.
13736
13737         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13738         here since we don't want to report an error; see the new test-336.cs.
13739
13740 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13741
13742         * statement.cs (ToplevelBlock.GetParameterReference)
13743         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13744         Move here from class Block.
13745         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13746         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13747
13748 2005-05-18  Martin Baulig  <martin@ximian.com>
13749
13750         Fix #74978.
13751
13752         * flowanalysis.cs
13753         (FlowBranching.Reachability): Add non-static public And() and Or()
13754         methods.
13755         (FlowBranchingSwitch): New class; do the `break_origins' thing
13756         like in FlowBranchingLoop.
13757         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13758         reachability, not just locals and parameters.
13759         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13760         switch; MergeBreakOrigins() now takes care of that.
13761
13762 2005-05-18  Martin Baulig  <martin@ximian.com>
13763
13764         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13765         a loop and may leave it, reset the barrier; fixes #74974.
13766
13767 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13768         
13769         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13770         is back.
13771         
13772         * cs-parser.jay: Catch more lexical errors.
13773         
13774         * report.cs: Add one more Error method.
13775         
13776         * rootcontext.cs,
13777         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13778
13779 2005-05-17  Martin Baulig  <martin@ximian.com>
13780
13781         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13782         #70970. 
13783
13784 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13785
13786         Fix test-382.cs.  Emit values of decimal constants.
13787         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13788         Carved out of ...
13789         (TypeContainer.AddField): ... this.
13790         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13791         with initializers to include 'Const's.
13792         (ClassPart.RegisterFieldForInitialization): Forward to
13793         PartialContainer.
13794         * const.cs (Const.Const): Pass initializer to base class.
13795         (Const.Define): In case of decimal constants, register them for
13796         initialization in a static constructor.
13797
13798 2005-05-14  Martin Baulig  <martin@ximian.com>
13799
13800         * statement.cs (Block.Resolve): Correctly handle unreachable code;
13801         do not call ResolveUnreachable() on unreachable statements in
13802         here, see the comment in the source code.
13803
13804 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13805
13806         Fix #74934.
13807         * expression.cs (BinaryResolveOperator): If one of the operands of
13808         an equality comparison is 'null' and the other is a pointer type,
13809         convert the null to a NullPointer.
13810         * convert.cs (ImplicitReferenceConversion): If the expression is a
13811         NullLiteral and the target type is a pointer type, return a
13812         NullPointer instead.
13813         (ImplicitConversionStandard): Likewise.
13814
13815 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
13816         
13817         * cs-parser.jay: Set readonly context based on special constructs.
13818         
13819         * expression.cs (LocalVariableReference.DoResolveBase): Improved
13820         readonly variable error handling.
13821         
13822         * rootcontext.cs (EmitCode): Don't verify members when error
13823         occurred.
13824         
13825         * statement.cs (LocalInfo): Add reaodnly context information.
13826         (SetReadOnlyContext, GetReadOnlyContext): New methods.
13827
13828 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13829
13830         * statement.cs (Block.Resolve): Revert change below.  Modify fix
13831         for #74041 to initialize 'resolved' to false only for explicit
13832         blocks.  Fixes #74873.
13833
13834 2005-05-12  Raja R Harinath  <harinath@gmail.com>
13835
13836         Fix #74920.
13837         * typemanager.cs (unmanaged_enclosing_types): New.
13838         (IsUnmanagedType): Avoid infloops by using
13839         'unmanaged_enclosing_types' to talk with recursive invocations.
13840
13841 2005-05-13  Martin Baulig  <martin@ximian.com>
13842
13843         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
13844         instance variable, not a local.  Fix #74873.
13845         (Block.ResolveUnreachable): Set it to true here.
13846
13847 2005-05-11  Duncan Mak  <duncan@novell.com>
13848
13849         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
13850         continuing to process for 'arg'.
13851         (handle_preprocessing_directive): Check the argument of the #endif
13852         directive and report error CS1025 if there are any trailing
13853         characters.
13854
13855         According to the C# spec, having even whitespace after the #endif
13856         directive is illegal; however, because we call arg.TrimEnd ()
13857         beforehand, we have the same behavior as csc, allowing whitespace
13858         after the directive.
13859
13860         Fixes #74892.
13861
13862 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
13863
13864         Fix #74863.
13865         
13866         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
13867         (Constructor.GetObsoleteAttribute): Implemented correctly.
13868
13869 2005-05-10  Martin Baulig  <martin@ximian.com>
13870
13871         * support.cs (ReflectionParameters.ParameterModifier): Use
13872         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
13873         and `ParameterAttributes.In'.  Fixes #74884.
13874
13875 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
13876
13877         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
13878         
13879         * expression.cs (Argument.GetParameterModifier): Turned to property.
13880         (Invocation.Error_InvalidArguments): Add more descriptive errors.
13881         
13882         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
13883         its C# equivalent.
13884         
13885 2005-05-09  Raja R Harinath  <rharinath@novell.com>
13886
13887         Fix #74852.
13888         * decl.cs (MemberCache.AddMethods): Register override methods,
13889         rather than non-override methods.
13890         * typemanager.cs (RegisterOverride): New.
13891         (IsOverride): Update.
13892
13893 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
13894
13895         Fix #73105.
13896         
13897         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
13898         recursive declaration.
13899         
13900         * statement.cs (Block.ResolveMeta): Report any error in resolving.
13901         
13902 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
13903
13904         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
13905         
13906         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
13907
13908 2005-05-05  Raja R Harinath  <rharinath@novell.com>
13909
13910         Fix #74797.
13911         * decl.cs (DeclSpace.FamilyAccessible): 
13912         Use TypeManager.IsNestedFamilyAccessible.
13913
13914         Fix reopened #64812.
13915         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
13916         internal'.
13917
13918 2005-05-04  Raja R Harinath  <rharinath@novell.com>
13919             Abin Thomas  <projectmonokochi@rediffmail.com>
13920             Anoob V E  <projectmonokochi@rediffmail.com>
13921             Harilal P R  <projectmonokochi@rediffmail.com>
13922
13923         Fix #64812.
13924         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
13925         allow access to all static members.
13926
13927 2005-05-04  Martin Baulig  <martin@ximian.com>
13928
13929         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
13930
13931 2005-05-04  Martin Baulig  <martin@ximian.com>
13932
13933         Fix #74655.
13934
13935         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
13936         section at the end; make things work if `default' is not the last
13937         section.        
13938
13939 2005-05-04  Martin Baulig  <martin@ximian.com>
13940
13941         Fix #70400.
13942
13943         * statement.cs (Switch): Replaced the `got_default' field with a
13944         `default_section' one.
13945         (Switch.CheckSwitch): Set `default_section' here.
13946         (Switch.Resolve): If we're a constant switch and the constant is
13947         not found, use the default section.
13948
13949 2005-05-03  Martin Baulig  <martin@ximian.com>
13950
13951         * expression.cs (ArrayAccess.EmitGetLength): New public method.
13952
13953         * statement.cs (Foreach.ArrayForeach): New nested class.
13954         (Foreach.TemporaryVariable): New nested class.
13955         (Foreach.EmitArrayForeach): Removed; this is now in the new
13956         ArrayForeach class.
13957
13958 2005-05-03  Raja R Harinath  <rharinath@novell.com>
13959
13960         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
13961         more conservative.
13962         (VerifyPendingMethods): Revert change below.
13963
13964         * typemanager.cs (IsOverride, RegisterNonOverride): New.
13965         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
13966         that used to trigger warning -28.  Remove warning -28.
13967         * expression.cs (Invocation.OverloadResolve): Use
13968         TypeManager.IsOverride to distinguish override methods.
13969
13970         Fix #74773.
13971         * pending.cs (VerifyPendingMethods): If a base type implements the
13972         requested interface, don't bother checking individual methods of
13973         the base type.  As a side-effect, this prevents the creation of
13974         unnecessary proxies.
13975
13976 2005-05-02  Martin Baulig  <martin@ximian.com>
13977
13978         Fix #70182.
13979
13980         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
13981         Also `And' the locals if the old vector is null.
13982         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
13983         null; in this case we basically reset all the variables.        
13984
13985 2005-05-02  Martin Baulig  <martin@ximian.com>
13986
13987         Fix #74529.
13988
13989         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
13990         Added `FlowBranching branching' argument; always `and' the
13991         variables instead of `or'ing them unless we're an infinite loop.
13992
13993         * statement.cs (While.Resolve): Create a new sibling unless we're
13994         infinite.       
13995
13996 2005-05-02  Martin Baulig  <martin@ximian.com>
13997
13998         Fix #70140.
13999
14000         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
14001         arguments; use it instead of creating a new TopLevelBlock.
14002         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
14003         our ConstructorInitializer.
14004
14005         * statement.cs
14006         (TopLevelBlock.TopLevelBranching): New public property.
14007         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
14008         and create our `TopLevelBranching'.
14009
14010         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
14011         anonymous method host, use `block.TopLevelBranching' rather than
14012         creating a new branching.
14013
14014 2005-04-20  Miguel de Icaza  <miguel@novell.com>
14015
14016         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
14017         a ScopeInfo, if any of the current children is a child of the new
14018         entry, move those children there.
14019
14020 2005-04-30  Martin Baulig  <martin@ximian.com>
14021
14022         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
14023         at the beginning of a SwitchSection.  Fix #73335.
14024
14025 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
14026
14027         Fix #74378
14028         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
14029         
14030         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
14031         (FieldExpr.DoResolve): Obsolete members are ignored for field
14032         initializers.
14033         
14034 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
14035
14036         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
14037         of arrays detection.
14038
14039         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
14040         verification.
14041         (Field.VerifyClsCompliance): Volatile fields are not compliant.
14042
14043         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
14044         arrays report.
14045
14046 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
14047
14048         * cs-parser.jay: Use the prefered version of -unsafe in error
14049         message.
14050
14051 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
14052
14053         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
14054         circumstances.
14055
14056 2005-04-20  John Luke  <john.luke@gmail.com>
14057
14058         * driver.cs: fix typo in error message, --outout to --output
14059
14060 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
14061
14062         * codegen.cs (InRefOutArgumentResolving): New field.
14063         
14064         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
14065         fields outside contructor.
14066         
14067         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
14068         
14069 2005-04-19  Miguel de Icaza  <miguel@novell.com>
14070
14071         * anonymous.cs (CaptureContext.EmitParameterInstance): The
14072         parameter code was not completed ever, so it was not as up-to-date
14073         as local variables.  Must finish it.
14074
14075         The bug fix was to compare the Toplevel of the block, not the
14076         current block.  Thanks for Ben for pointing this out. 
14077
14078 2005-04-19  Raja R Harinath  <rharinath@novell.com>
14079
14080         * decl.cs (AddMethods): Use the declaring type of the problem
14081         method to determine if we want to squash a warning.
14082
14083 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
14084
14085         * attribute.cs: Removed debug output.
14086
14087         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
14088         
14089         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
14090         Report.Stderr.
14091         
14092 2005-04-18  Raja R Harinath  <rharinath@novell.com>
14093
14094         Fix #74481.
14095         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
14096         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
14097         all null comparisons against reference types.
14098
14099 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
14100
14101         Fix# 74565
14102         * class.cs (TypeContainer.CircularDepException) New nested
14103         exception class.
14104         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
14105         (TypeContainer.DefineType): Removed error, reset InTransit before
14106         exit.
14107         (Class.DefineType): Throw exception when is in Transit.
14108         Catch exception and report error.
14109         (Struct.DefineType): Throw exception when is in Transit.
14110         Catch exception and report error.
14111         (Interface.DefineType): Throw exception when is in Transit.
14112         Catch exception and report error.
14113
14114         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
14115         handle nested exception handlers.
14116
14117         * flowanalysis.cs (InTryWithCatch): New method, search for try with
14118         a catch.
14119
14120         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
14121         InFinally and InCatch storage.
14122
14123         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
14124         (Catch.Resolve): Set and Restore ec.InCatch.
14125         (Try.Resolve): Set and Restore ec.InFinally.
14126         (Try.HasCatch): True when try has catch.
14127
14128 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
14129
14130         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
14131           for the same event member, so exclude such cases from warning 419.
14132           Fixed bug #74633.
14133
14134 2005-04-16  Miguel de Icaza  <miguel@novell.com>
14135
14136         * expression.cs (Binary.ResolveOperator): Apply patch from John
14137         Luke to fix bug 59864: operators &, | and ^ on enumerations
14138         require that the same enum type on both sides.
14139
14140         * driver.cs: Add warnings to old flag usage, this is to assist
14141         people who produce Makefiles and hope that the Makefiles will be
14142         used on Windows.
14143
14144         * class.cs (TypeContainer.EmitType): Moved the definition of the
14145         special $PRIVATE$ field from the resolve phase to the Emit phase.
14146         During resolve we do not know if we are a struct with
14147         HasExplicitLayout, we know this only after the attributes for the
14148         type are emitted.
14149
14150         Set the FieldOffset to zero on the dummy field that we create for
14151         the class.   Fixes 74590.
14152
14153 2005-04-16  Raja R Harinath  <rharinath@novell.com>
14154
14155         Fix #73834.
14156         * ecore.cs (PropertyExpr.resolved): New.
14157         (DoResolve): Use it to handle a case of double resolution here.
14158         Handle a case of identical-name-and-type-name.
14159         * expression.cs (ArrayCreation.CheckIndices): Avoid double
14160         resolution by storing the results of expression resolution back
14161         into the "probes" array.
14162
14163 2005-04-15  Raja R Harinath  <rharinath@novell.com>
14164
14165         Fix cs0208-7.cs and cs0208-8.cs.
14166         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
14167         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
14168         error reporting to point out the reason a struct is not unmanaged.
14169
14170 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14171
14172         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
14173           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
14174
14175 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14176
14177         Fix #74528.
14178         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
14179         IdenticalNameAndTypeName here.
14180         (EventExpr.InstanceResolve): Likewise.
14181
14182 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
14183
14184         C# 2.0 DefaultCharSetAttribute implementation
14185         
14186         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
14187         which allows us to set GlobalNamespace for every resolve.
14188         (Attribute.ResolveArguments): Cut from Resolve.
14189         (Attribute.GetCharSetValue): Returns CharSet named argument.
14190         (Attribute.DefinePInvokeMethod): Gets default charset from
14191         module settings.
14192         (GlobalAttribute.ResolveAsTypeStep): Override.
14193         (GlobalAttribute.ResolveArguments): Override.
14194         
14195         * class.cs (TypeAttr): Is protected.
14196         
14197         * codegen.cs (ModuleClass.DefaultCharSet): New member.
14198         (ModuleClass.DefaultCharSetType): New memeber.
14199         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
14200         
14201         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
14202         charset from module.
14203         
14204         * delegate.cs (TypeAttr): Override.
14205         (Delegate.DefineType): Use this TypeAttr.
14206         
14207         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14208         at very early stage (before types are defined) to resolve model
14209         module attributes. It will probably not work with corlib but it
14210         should be ok.
14211         
14212         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14213         charset from module.
14214         
14215         * typemanager.cs (default_charset_type): New type.
14216
14217 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14218
14219         * decl.cs (MemberCache.AddMethods): Don't warn if
14220         System.Object.Finalize has buggy MethodAttributes.
14221
14222         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14223         removed below.
14224
14225 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14226
14227         * doc.cs : detect ambiguous reference to overloaded members.
14228           Fixed bug #71603. MS 1.1 csc does not detect it.
14229
14230 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14231
14232         * doc.cs : delegates must not be referenced with parameters.
14233           Fixed bug #71605.
14234
14235 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14236
14237         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14238
14239 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14240
14241         * driver.cs (MainDriver): Stop processing if the CLS stage found
14242         errors. 
14243
14244         (CompilerCallableEntryPoint.InvokeCompiler): Always
14245         reset after execution;   Take a TextWriter argument for the
14246         output.
14247
14248         * report.cs: Use the error stream instead of hardcoding stderr. 
14249
14250 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14251
14252         * class.cs: Reduce code paths to test, too small of an
14253         optimization to make it worth the extra testing.  Always perform
14254         it. 
14255
14256 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14257
14258         Fix #74510.
14259         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14260         operators that had errors reported on them.
14261
14262 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14263
14264         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14265         argument types.
14266         (Attribute.Resolve): Add named argument type checking.
14267         
14268         * class.cs (FixedField.Define): Use IsPrimitiveType
14269         
14270         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14271         
14272         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14273         unsafe parameter types.
14274         
14275         * statement.cs (Using.ResolveExpression): Add better error description.
14276         
14277         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14278         
14279 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14280
14281         Fix #74484.
14282         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14283         AttributeUsageAttribute in the emitcontext of the attribute class,
14284         not in the emitcontext of the attributable entity it was attached to.
14285         * cs-parser.jay: Use 'current_class', not 'current_container',
14286         when creating a GlobalAttribute.
14287
14288 2005-04-08  Alp Toker  <alp@atoker.com>
14289
14290         * pending.cs: The fix to #58413 failed to compile methods implementing
14291         interfaces with/without params modifiers and vice versa, even though
14292         params modifiers aren't part of the signature. Make the modifier check
14293         less strict as in csc.
14294
14295 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14296             Anoob V E  <projectmonokochi@rediffmail.com>
14297             Harilal P R  <projectmonokochi@rediffmail.com>
14298
14299         Fix #58413.
14300         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14301         modifiers of pending methods.
14302         (PendingImplementation.PendingImplementation): Initialize it.
14303         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14304         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14305         with ParameterData.  Add check for modifiers.
14306         * class.cs (MethodData.Define): Update to changes.
14307
14308 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14309
14310         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14311
14312 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14313
14314         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14315         property.
14316         
14317         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14318         
14319         * rootcontext.cs,
14320         * typemanager.cs: Registered RequiredAttributeAttribute.
14321         
14322 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14323
14324         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14325         Warning CS0169 is back at level 3.
14326         (IMethodData.SetMemberIsUsed): New method.
14327         
14328         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14329         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14330         
14331         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14332
14333         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14334         contants.
14335         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14336         is used.
14337         
14338         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14339         is used.
14340         
14341         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14342         to avoid the problems with nested types.
14343
14344 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14345             Anoob V.E  <projectmonokochi@rediffmail.com>
14346             Harilal P.R  <projectmonokochi@rediffmail.com>
14347             Raja R Harinath  <rharinath@novell.com>
14348
14349         Fix #73820.
14350         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14351         attribute.
14352         * typemanager (GetConstructor): Make public.
14353
14354 2005-04-05  John Luke  <john.luke@gmail.com>
14355             Raja R Harinath  <rharinath@novell.com>
14356
14357         Fix #62232.
14358         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14359         struct too.  Return false quicker in a few cases.
14360         (VerifyUnManaged): Use it.
14361
14362 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14363
14364         Fix #74041.
14365         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14366         not 'unreachable_seen'.
14367
14368 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14369
14370         * attribute.cs (Attribute.GetValue): Removed unused.
14371         
14372         * codegen.cs (CodeGen.TrimExt): Removed unused.
14373         
14374         * cs-parser.jay (output): Removed unused.
14375         
14376         * cs-tokenizer.cs (hex_digits): Removed unused.
14377         
14378         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14379         
14380         * expression.cs (Indirection.LoadExprValue): Removed unused.
14381         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14382         
14383         * iterators.cs (Iterator.param_types): Removed unused.
14384         
14385         * statement.cs (Goto.block): Removed unused.
14386         (ToplevelBlock.did): Removed unused.
14387         (Switch.ResolveConstantSwitch): Removed unused.
14388
14389 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14390
14391         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14392         resetting thingy.
14393
14394 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14395
14396         Fix #74232 and cs0208-3.cs.
14397         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14398         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14399         unmanaged type.  Don't use FieldBuilders when 't' is a
14400         TypeBuilder.  Use ModFlags and MemberType fields.
14401         * class.cs (MemberBase.member_type): Rename from MemberType.
14402         (MemberBase.MemberType): New property.  Determines member_type on
14403         demand.
14404         (MemberBase.DoDefine): Don't initialize MemberType here.
14405         (FieldMember.Define): Likewise.
14406
14407 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14408
14409         Fix #74241
14410         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14411         Attributes are emitted there.
14412         
14413 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14414
14415         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14416         keyword in 'partial enum' too.
14417         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14418         is not allowed).
14419         Report from Kamil Skalski <nazgul@omega.pl>.
14420
14421         Fix #74309.
14422         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14423         have partial containers too.
14424
14425         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14426         in block' checks to Block.CheckInvariantMeaningInBlock.
14427         * statement.cs (Block.GetKnownVariableInfo): Make private.
14428         (Block.IsVariableUsedInChildBlock): Remove.
14429         (Block.IsVariableUsedInBlock): Likewise.
14430         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14431         conflicting declaration.
14432         (Block.AddVariable): Make error messages less long-winded and more
14433         specific.  Show location of conflicting declaration.
14434         * parameter.cs (Parameters.Location): New readonly property.
14435
14436 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14437
14438         Clean up semantics of invoking ResolveMemberAccess.
14439         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14440         can have an instance, ensure that we pass in a non-TypeExpression
14441         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14442         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14443         argument.  Update to changes and simplify.
14444         (FieldExpr.Emitinstance): Remove CS0120 check.
14445         (PropertyExpr.EmitInstance): Likewise.
14446         * expression.cs (Argument.Resolve): Likewise.
14447         (Invocation.DoResolve): Update to changes in semantics of
14448         InstanceExpression.
14449
14450 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14451
14452         Fix #74241
14453         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14454         customization.
14455         
14456         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14457
14458 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14459
14460         Fix difference in behaviour with commandline invocation.
14461         * driver.cs (Driver.Reset): New.
14462         (CompilerCallableEntryPoint): Call it.
14463
14464         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14465         variable" warnings if the boolean expression failed to resolve.
14466
14467 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14468
14469         * attribute.cs: Fix the union of several permissions when some of them
14470         are unrestricted (so the result isn't an unrestricted permission set).
14471         Fix #74036.
14472
14473 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14474
14475         * ecore.cs (MemberExpr): New class.  Convert from interface
14476         IMemberExpr.
14477         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14478         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14479         error checks.
14480         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14481         (MethodGroupExpr.IsExplicitImpl): Remove.
14482         (Expression.GetFieldFromEvent): Remove.
14483         (SimpleName.MemberStaticCheck): Remove.
14484         (SimpleName.DoSimpleNameResolve): Update to changes.
14485         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14486         (MemberAccess.IdenticalNameAndTypeName): Remove.
14487         (MemberAccess.error176): Move to MemberExpr.
14488         (MemberAccess.DoResolve): Update to changes.
14489         (BaseAccess.DoResolve): Likewise.
14490
14491 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14492
14493         C# 2.0 Conditional attribute class implementation
14494         
14495         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14496         Analyzes class whether it has attribute which has ConditionalAttribute
14497         and its condition is not defined.
14498         
14499         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14500         (Class.IsExcluded): New method. Search for at least one defined
14501         condition in ConditionalAttribute of attribute class.
14502
14503 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14504
14505         * ecore.cs (PropertyExpr): Derive from Expression, not
14506         ExpressionStatement.
14507         (PropertyExpr.EmitStatement): Remove.
14508
14509 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14510
14511         Fix #74060.
14512         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14513         internal field "value__" of an enum be private.  The examples for
14514         "value__" that I found on MSDN all used FieldAttributes.Private.
14515
14516         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14517         Don't mention IL method attribute names.
14518
14519         Fix #47991.  Remove a TODO.
14520         * statement.cs (Block.Toplevel): Make into a field.
14521         (Block.Parameters): Move into ToplevelBlock.
14522         (Block.known_variables): Rename from child_variable_names.
14523         (Block.Block): Remove variants that take Parameters.  Initialize
14524         'Toplevel' with the immediately surrounding toplevel block.
14525         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14526         LocalInfo parameter.
14527         (Block.GetKnownVariableInfo): New.
14528         (Block.IsVariableNameUsedInChildBlock): Update.
14529         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14530         the block, even though it may not be in scope.
14531         (Block.AddVariable): Remove Parameters parameter.  Use
14532         Toplevel.Parameters instead.
14533         (Block.AddConstant): Remove Parameters parameter.
14534         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14535         (Block.IsParamaterReference): Likewise.
14536         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14537         (ToplevelBlock.Parameters): New.  Moved from Block.
14538         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14539         initialize Parameters to a non-null value.
14540         * cs-parser.jay: Update to changes.
14541         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14542         simple names that mean different things in the same block.  Use
14543         Block.IsVariableNameUsedInBlock.
14544
14545 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14546
14547         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14548         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14549         GetTypeHandle.  It is possible for a reflected type to derive from
14550         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14551         System.Array during mscorlib compilation).
14552         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14553         contain a method_hash, don't create one either.  Don't create a
14554         deep copy of the base cache's method_hash.
14555         (MemberCache.SetupCache): Rename back from DeepCopy.
14556         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14557         already initialized.  If we see an override function, add its
14558         underlying base virtual function to the member_hash too.
14559
14560         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14561
14562 2005-03-26  Raja R Harinath  <harinath@acm.org>
14563
14564         Fix #73038.
14565         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14566         fails to resolve, ensure that the LHS is still resolved as an
14567         lvalue.
14568
14569 2005-03-25  Raja R Harinath  <harinath@acm.org>
14570
14571         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14572         ec.ContainerType.
14573         (Enum.current_ec): Remove.
14574         (Enum.LookupEnumValue): Remove EmitContext argument.
14575         Just uses the one created during DefineType.
14576         (Enum.FindMembers): Update.
14577         * expression.cs (MemberAccess.DoResolve): Update.
14578
14579 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14580
14581         * assign.cs (Assign.DoResolve): Check for CS1717 when
14582         source and target are same (uses Equals).
14583
14584         * expression.cs (LocalVariableReference, ParameterReference,
14585         This): Implemented Equals, GetHashCode.
14586
14587         * statement.cs (Block.GetParameterReference): Removed useless
14588         local variable.
14589
14590 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14591
14592         Fix cs0128.cs
14593         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14594         blocks before deciding whether the error is cs0136 or cs0128.
14595
14596         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14597         (using_alias_directive, using_namespace_directive): Pass
14598         MemberName, not an expression to Namespace.UsingAlias and
14599         Namespace.Using.
14600         (MakeName): Use the MemberName of the namespace.
14601         * namespace.cs (Namespace.MemberName): New.
14602         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14603         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14604         Likewise.
14605         * decl.cs (MemberName.Name): Make readonly.
14606         (MemberName.FromDotted): New "constructor".
14607         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14608         (MemberCore.Name): Compute from MemberName on demand.
14609         (MemberCore.SetMemberName): Provide a way to change the
14610         MemberName.
14611         (MemberCore.AddToContainer): Don't take a fullname parameter.
14612         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14613         fully qualified name of the container to the member name.
14614         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14615         only if the type is a member of the root container.
14616         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14617         MemberName.Left rather than searching for an embedded ".".
14618         (PartialContainer.CreatePart): Update to changes in RootContext.
14619         (MemberBase.ShortName): Turn into a property.  Use
14620         MemberCore.SetMemberName.
14621         (MemberBase.ExplicitInterfaceName): Remove.
14622         (MemberBase.UpdateMemberName): Remove.
14623         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14624         (PropertyBase.SetMemberName): New override.
14625         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14626         (Tree.GetDecl): New.
14627         (Tree.AllDecls): Rename from Decls.
14628         * attribute.cs, enum.cs, report.cs: Update to changes.
14629         * driver.cs (MainDriver): Use MemberName.FromDotted on
14630         RootContext.MainClass.
14631
14632 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14633
14634         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14635         checks.
14636
14637         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14638
14639 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14640
14641         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14642         property accessor modifiers.
14643
14644         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14645         fixed buffer attribute (CS1716).
14646         (PropertyMethod.HasCustomAccessModifier): When property accessor
14647         has custom modifier.
14648
14649         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14650         modifiers.
14651         (PropertyExpr.DoResolveLValue): Add CS0272.
14652
14653 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14654
14655         * convert.cs: When converting to a pointer, use the proper Conv.U
14656         or Conv.I depending on the source data type.
14657
14658         * cs-tokenizer.cs: Make the size for large decimal constants,
14659         fixes #72957.
14660
14661 2005-03-17  Martin Baulig  <martin@ximian.com>
14662
14663         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14664         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14665
14666 2005-03-17  Martin Baulig  <martin@ximian.com>
14667
14668         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14669         to bool so we can return an error condition.
14670         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14671         returned an error.
14672
14673 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14674
14675         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14676         attributes.
14677
14678 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14679
14680         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14681         Refactor to avoid traversing the list of assemblies, and to avoid
14682         string concatenation.
14683         * typemanager.cs (guid_attr_type): Remove.
14684         (negative_hits, pointers, references): Remove hashes.
14685         (type_hash): New.
14686         (GetConstructedType): New.  Uses type_hash to handle constructed
14687         types (arrays, references, pointers).
14688         (GetReferenceType, GetPointerType): Use it.
14689         (GetNestedType): New.  Uses type_hash to handle nested types of
14690         reflected types.
14691         (LookupType, LookupTypeDirect): Remove.
14692         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14693         'types' hash and LookupTypeReflection directly.
14694         (params_string, params_object): Use GetConstructedType.
14695         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14696         top-level types.
14697         (Namespace.Lookup): Use cached_types.
14698         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14699         provided by old TypeManager.LookupType.
14700         * rootcontext.cs (MakeFQN): Remove.
14701         * decl.cs (DeclSpace.MakeFQN): Likewise.
14702         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14703         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14704         TypeManager.GetConstructedType.
14705         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14706
14707 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14708
14709         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14710         indexers.
14711
14712         * cs-parser.jay: Reports CS1527 for any namespace element.
14713
14714         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14715         Added CS0407.
14716
14717         * expression.cs (ParameterReference.IsAssigned): Changed error to
14718         CS0269.
14719         (Error_WrongNumArguments): Moved CS0245 detection here.
14720
14721         * statement.cs (Return.Resolve): Add CS1622 report.
14722
14723 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14724
14725         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14726
14727 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14728
14729         * attribute.cs expression.cs: Get rid of some allocations.
14730
14731 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14732
14733         * doc.cs : just eliminate the latest change.
14734
14735 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14736
14737         * doc.cs : commented out the latest change. It breaks xml-030.cs
14738
14739 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14740
14741         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14742           fail. So invoke CreateType() in FindDocumentedType().
14743
14744 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14745
14746         * cs-tokenizer.cs : added IsKeyword().
14747         * doc.cs : Detect keyword incorrectly used as identifier.
14748           Allow identifiers prefixed by @.
14749
14750 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14751
14752         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14753         It caused exception in namespace resolving (again!).
14754         
14755         * class.cs (Class.ctor): Removed exit.
14756         (PropertyMethod.ctor): ditto.
14757         
14758         * codegen.cs (Codegen.Reset): Reset static data.
14759         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14760         
14761         * cs-tokenizer.cs (Cleanup): Removed.
14762         
14763         * driver.cs (GetSystemDir): Rewrote to one line command.
14764         It caused problem with unloaded dynamic modules.
14765         (UnixParseOption): Removed Exit.
14766         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14767         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14768         Now can be mcs used as library.
14769         
14770         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14771         empty location.
14772         
14773         * location.cs (Reset): Reset static data.
14774         
14775         * namespace.cs (Reset): Reset static data.
14776         
14777         * report.cs (Report.Reset): Reset static data.
14778         
14779         * rootcontext.cs (RootContext.Reset): Reset static data.
14780         
14781         * tree.cs (RootTypes.ctor): Use Location.Null
14782         
14783         * typemanager.cs (TypeManager.Reset): Reset static data.
14784         (CoreLookupType): Removed Exit.
14785         (TypeHandle.Reset): Reset static data.
14786         
14787 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14788
14789         Fix #73516.
14790         * typemanager.cs (ComputeNamespaces): Import namespaces from
14791         referenced modules too.
14792
14793 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14794
14795         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
14796         than '.'.
14797
14798 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14799
14800         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
14801         enclosing DeclSpace.  This ensures that a name-lookup populates
14802         more caches and there are fewer 'TypeExpression's.  Carve out
14803         nested type lookup into ...
14804         (LookupNestedTypeInHierarchy): ... this.
14805
14806 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14807
14808         Clean up a few partial-class semantics.  
14809         Fixes test-357.cs and cs1618-2.cs.
14810         * cs-parser.jay (struct_declaration): Use 'current_class' as
14811         parent of newly-created struct.  Remove call to Register ().
14812         Use 'pop_current_class' to complete handing the current struct.
14813         (interface_declaration): Likewise.
14814         (class_declaration): Likewise.
14815         (enum_declaration): Use 'current_class' as parent of newly created
14816         enum.
14817         (delegate_declaration): Likewise.
14818         (pop_current_class): New function.  This is used to handle closing
14819         up the 'current_class' and 'current_container', and pointing them
14820         to the enclosing class/container.
14821         (CSharpParser): Initialize 'current_class' too.
14822         * decl.cs (MemberCore): Add check for invariant: a partial
14823         container is not a parsed entity, and thus does not enclose any
14824         parsed members.
14825         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
14826         (DeclSpace.BaseTypeExpr): Use it.
14827         (DeclSpace.LookupType): Add check for invariant.
14828         * class.cs (TypeContainer): Add check for invariant: a nested
14829         class should have the same NamespaceEntry as its enclosing class.
14830         (TypeContainer.EmitFieldInitializers): Make virtual.
14831         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
14832         MemberCore.
14833         (TypeContainer.Register): Remove.
14834         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
14835         null.  Use TypeResolveEmitContext for resolving base types and
14836         interfaces.  Move initialization of Parts.TypeBuilder here from
14837         ...
14838         (TypeContainer.DefineNestedTypes): ... here.
14839         (PartialContainer): Take a Namespace not a NamespaceEntry.
14840         (PartialContainer.Create): Don't use Register.  Call the
14841         appropriate Add... function directly.
14842         (ClassPart): Take both the PartialContainer and the enclosing
14843         class as constructor arguments.
14844         (ClassPart.EmitFieldInitializers): Override.
14845         (ClassPart.PartFindNestedTypes): Remove.
14846         (FieldBase.GetInitializerExpression): Resolve the initializer
14847         expression in the emit context of the enclosing class.
14848         * tree.cs (RootTypes): Remove Register ().
14849         
14850 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
14851
14852         * cs-parser.jay: Removed CS0134.
14853         
14854         * driver.cs: Removed CS1901.
14855         
14856         * expression.cs (SizeOf.DoResolve): Don't report CS0233
14857         for predefined types.
14858
14859 2005-03-07  Duncan Mak  <duncan@novell.com>
14860
14861         * codegen.cs (Save):  Catch UnauthorizedAccessException as
14862         well. Fixes bug #73454.
14863
14864 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
14865
14866         * cs-tokenizer.cs (xtoken): Add CS1035.
14867         
14868         * class.cs (MethodData.Define): Add CS0683.
14869         (FieldMember.ctor): Add CS0681.
14870
14871 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14872
14873         * ecore.cs (SimpleName.DoResolve): Rename from
14874         SimpleName.DoResolveAllowStatic.
14875         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
14876         Pass 'intermediate' flag to MemberStaticCheck.
14877         (SimpleName.MemberStaticCheck): Skip "static check" only in case
14878         of "intermediate" lookups via MemberAccess.
14879         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
14880         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
14881
14882 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14883
14884         Fix #73394.
14885         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
14886         slipped in because of variable names that are identical to a
14887         builtin type's BCL equivalent ('string String;', 'int Int32;').
14888         (PropertyExpr.EmitInstance): Likewise.
14889
14890 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
14891
14892         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
14893         
14894         * report.cs (warning_ignore_table): Made public.
14895
14896 2005-03-04  Raja R Harinath  <rharinath@novell.com>
14897
14898         Fix #73282.
14899         * class.cs (MethodData.Emit): Pass 'container' to
14900         container.GetObsoleteAttribute instead of 'container.Parent'.
14901
14902 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
14903
14904         * cs-parser.jay: Add 1534 error test.
14905
14906         * iterators.cs (Yield.CheckContext): Add error 1629.
14907         (Iterator.ctor): Save unsafe modifier.
14908         (MoveNextMethod.DoEmit): Restore unsafe context.
14909
14910         * namespace.cs (UsingAlias): Better error message.
14911
14912 2005-03-03  Dan Winship  <danw@novell.com>
14913
14914         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
14915         the warning message [#73219]
14916
14917 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14918
14919         Fix compile with MCS 1.0.0.0.
14920         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
14921         w_restore to not depend on string constant folding.
14922
14923 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14924
14925         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
14926         CS0246 check to users who passed 'silent = false'.
14927         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
14928         check.
14929         (SimpleName.SimpleNameResolve): Update.
14930         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
14931         (MemberAccess.IdenticalNameAndTypeName): Update.
14932         * doc.cs (FindDocumentedTypeNonArray): Update.
14933
14934 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
14935
14936         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
14937         * parameters.cs (ComputeAndDefineParameters): Remove.
14938         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
14939         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
14940         Use GetParameterInfo.
14941
14942 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
14943
14944         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
14945
14946 2005-03-02  Raja R Harinath  <rharinath@novell.com>
14947
14948         Unify DeclSpace.LookupType and DeclSpace.FindType.
14949         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
14950         is in charge of defining nested types on demand.
14951         (DeclSpace.LookupType): Use it when the current_type is a
14952         TypeBuilder.  Use LookupTypeDirect for reflected types.
14953         (DeclSpace.FindType): Remove.
14954         (DeclSpace.LookupInterfaceOrClass): Likewise.
14955         (DeclSpace.DefineTypeAndParents): Likewise.
14956         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
14957         DeclSpace.LookupType.
14958         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
14959         * typemanager.cs (LookupType): Simplify.
14960         (AddUserType): Remove type from negative_hits.
14961         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
14962         * class.cs (TypeContainer.FindMembers): Move handling of nested
14963         types ...
14964         (TypeContainer.FindMembers_NestedTypes): ... here.
14965         (TypeContainer.FindNestedType): Implement override.
14966         (ClassPart.FindNestedType): Delegate to PartialContainer.
14967         (ClassPart.PartFindNestedType): Looks up the nested types of the
14968         part alone.
14969
14970 2005-03-02  Martin Baulig  <martin@ximian.com>
14971
14972         * class.cs (TypeContainer.DoDefineMembers): We also need a default
14973         static constructor in static classes.
14974
14975 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
14976
14977         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
14978         sizeParamIndex is not specified.
14979
14980 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
14981
14982         Fix #73117
14983         * report.cs (WarningMessage.IsEnabled): Missing null check.
14984
14985 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14986
14987         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
14988         in the fields and not in the properties.
14989
14990 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
14991
14992         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
14993         fields as well.
14994
14995 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14996
14997         * attribute.cs: Small refactoring (improved robustness).
14998         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
14999         (ValidateGuid): Removed.
15000         (Resolve): Removed referenced to above mentioned.
15001         (GetAttributeUsage): Made private and changed to work without
15002         class assistance.
15003         (GetIndexerAttributeValue): Don't crash.
15004         (GetConditionalAttributeValue): Ditto.
15005         (GetClsCompliantAttributeValue): Ditto.
15006         (ExtractSecurityPermissionSet): All attributes exceptions are
15007         error 648.
15008         (GetPropertyValue): New helper.
15009         (GetMethodImplOptions): New method.
15010         (DefinePInvokeMethod): Reuse common code. Implemented handling of
15011         some missing properties.
15012         
15013         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
15014         (Method.ApplyAttributeBuilder): Updated.
15015         
15016         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
15017         exception.
15018
15019 2005-02-28  Raja R Harinath  <rharinath@novell.com>
15020
15021         Fix #73052.
15022         * report.cs (Report.SymbolRelatedToPreviousError): Handle
15023         non-simple types (array, pointer, reference).
15024
15025 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15026
15027         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
15028
15029         * class.cs (MethodCore.IsDuplicateImplementation): Special error
15030         for operators.
15031         (Method.CheckBase): Catch wrong destructor here.
15032         (MethodData.Define): Add errors 550, 668.
15033
15034         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
15035
15036         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
15037
15038         * pending.cs (VerifyPendingMethods): Add error 551.
15039
15040         * typemanager.cs (CSharpName): Next error report helper.
15041
15042 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
15043
15044         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
15045         attributes. Removed useless attribute double check.
15046         It saves almost 2MBs for corlib.
15047
15048 2005-02-25  Raja R Harinath  <rharinath@novell.com>
15049
15050         Fix #72924.
15051         * statement.cs (ExpressionStatement.Resolve): Make robust to being
15052         called twice in case of error.
15053
15054 2005-02-23  Chris Toshok  <toshok@ximian.com>
15055
15056         Fix compiler portions of #72827.
15057         * statement.cs (Block.Emit): call Begin/EndScope on the
15058         EmitContext instead of the ILGenerator.
15059
15060         * codegen.cs (EmitContext.BeginScope): new method, call
15061         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
15062         we have one.)
15063         (EmitContext.BeginScope): same, but EndScope and CloseScope
15064
15065         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
15066         offset and call the superclass's OpenScope(int) with it.
15067         (SymbolWriter.CloseScope): get the current il
15068         offset and call superclass's CloseScope(int) with it.
15069
15070 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
15071
15072         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
15073         CS1677 for out and ref as well.
15074
15075         * class.cs (Method.Define): Add error CS1599 detection.
15076         
15077         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
15078         
15079         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
15080         
15081         * delegate.cs (Delegate.Define): Add error CS1599 detection.
15082         
15083         * support.cs.cs (ModifierDesc): New helper method.
15084
15085 2005-02-23  Raja R Harinath  <rharinath@novell.com>
15086             Abin Thomas  <projectmonokochi@rediffmail.com>
15087             Anoob V E  <projectmonokochi@rediffmail.com>
15088             Harilal P R  <projectmonokochi@rediffmail.com>
15089
15090         Fix #57851, #72718.
15091         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
15092         MemberLookup (used for error reporting) actually returns a result.
15093         Fix error report number (122, not 112).
15094
15095 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
15096             Anoob V E  <projectmonokochi@rediffmail.com>
15097             Harilal P R  <projectmonokochi@rediffmail.com>
15098
15099         Fix #71134.
15100         * pending.cs (PendingImplementation.GetAbstractMethods):
15101         Find NonPublic members too.
15102
15103 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
15104
15105         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
15106         Fixed error 217.
15107         
15108         * class.cs (MethodCore.CheckMethodAgainstBase):
15109         Add error 239 report.
15110
15111 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15112
15113         Fix #68955.
15114         * expression.cs (Invocation.IsApplicable): Make public.
15115         (Invocation.IsParamsMethodApplicable): Likewise.
15116         * delegate.cs (Delegate.VerifyApplicability): Don't use
15117         Invocation.VerifyArgumentCompat for parameter applicability
15118         testing.  Use Invocation.IsApplicable and
15119         Invocation.IsParamsMethodApplicable.
15120
15121 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15122
15123         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
15124         
15125         * class.cs (Operator.Define): Add error 217 report.
15126         
15127 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15128
15129         * namespace.cs (UsingEntry.Resolve): Undo change below.
15130
15131 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15132
15133         Fix #72756.
15134         * ecore.cs (Expression.MemberLookupFailed): Add argument to
15135         disable the error message when the extended MemberLookup also
15136         fails.
15137         (Expression.MemberLookupFinal): Update.
15138         (SimpleName.DoSimpleNameResolve): Update.
15139         * expression.cs (MemberAccess.ResolveNamespaceOrType):
15140         Don't use MemberLookupFinal.
15141         (New.DoResolve): Update.
15142         (BaseAccess.CommonResolve): Update.
15143
15144 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15145
15146         Fix #72732.
15147         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
15148         occured previously, don't resolve again.
15149
15150 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15151
15152         Fix #69949
15153         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
15154         argument. Call ResolveAttributeUsage for unresolved.
15155         when types doesn't match ctor arguments.
15156         
15157         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
15158         for nested attribute classes.
15159         (Class.attribute_usage): Removed.
15160         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
15161         for attribute class.
15162         
15163         * ecore.cs (IsAttribute): Removed.
15164         
15165         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
15166         
15167         * rootcontext.cs (RegisterAttribute): Removed, attributes are
15168         now normal types.
15169         (attribute_types): Removed.
15170         (EmitCode): Global attributes are emited as the latest.
15171
15172 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
15173
15174         * class.cs (EmitFieldInitializers): Don't emit field initializer
15175         for default values when optimilization is on.
15176         
15177         * constant.cs (Constant.IsDefaultValue): New property.
15178         
15179         * driver.cs: Add /optimize handling.
15180         
15181         * constant.cs,
15182         * ecore.cs,
15183         * literal.cs: Implement new IsDefaultValue property.
15184         
15185         * rootcontext.cs (Optimize): New field, holds /optimize option.
15186
15187 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15188
15189         Fix crasher in re-opened #72347.
15190         * namespace.cs (Namespace.Lookup): Return null if
15191         DeclSpace.DefineType returns null.
15192
15193         Fix #72678.
15194         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
15195
15196 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15197
15198         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
15199         now returns null if it cannot resolve to an lvalue.
15200         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
15201         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
15202         returned null.  Remove check for SimpleName.
15203         (EventExpr.DoResolveLValue): New.
15204         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15205         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15206         error from ...
15207         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15208         avoid CS0131 error.
15209         (Unary.ResolveOperator): Move CS0211 check ...
15210         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15211         CS0131 error.
15212         (Unary.DoResolveLValue): Simplify.
15213         (AddressOf.DoResolveLValue): New.
15214         (ArrayAccess.DoResolveLValue): New.
15215
15216 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15217
15218         * attribute.cs (Attribute.Resolve): Add arguments casting for
15219         when types doesn't match ctor arguments.
15220
15221 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15222
15223         Fix parts of #63202.
15224         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15225         lookup of operator in base type.  Ensure that all checks happen
15226         when the operator resolves to an "op_..." method.
15227
15228 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15229
15230         Fix #71992.
15231         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15232         'ignore_cs0104' parameter.  Pass it to ...
15233         (NamespaceEntry.Lookup): ... this.
15234         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15235         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15236         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15237         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15238         Update.  Request that cs0104 errors be ignored.
15239         (ComposedCast.ResolveAsTypeStep): Update.
15240
15241 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15242
15243         Fix #59209.
15244         * expression.cs (Invocation.BetterFunction): Remove support for
15245         comparing virtual functions and their overrides.
15246         (Invocation.IsOverride): New.
15247         (Invocation.OverloadResolve): Don't consider 'override' functions
15248         during candidate selection.  Store them in a lookaside list.
15249         If the selected method is a 'virtual' function, use the list to
15250         find any overrides that are closer to the LHS type.
15251
15252 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15253
15254         * expression.cs (New.DoResolve): Add complex core type reduction.
15255         (New.Constantify): Converts complex core type syntax like 'new int ()'
15256         to simple constant.
15257         
15258 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15259
15260         * decl.cs (EntryType.EntryType): New constructor to create an
15261         updated copy of a cache entry.
15262         (MemberCache.AddMethods): Use it.
15263         (MemberCache.ClearDeclaredOnly): Remove.
15264         (MemberCache.MemberCache): Update.
15265
15266 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15267
15268         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15269         variable.  This one is represents the actual low-level declaration
15270         of the method, as opposed to the semantic level `IsStatic'.   
15271
15272         An anonymous method which is hosted into a static method might be
15273         actually an instance method.  IsStatic would reflect the
15274         container, while MethodIsStatic represents the actual code
15275         generated.
15276
15277         * expression.cs (ParameterReference): Use the new MethodIsStatic
15278         instead of IsStatic.
15279
15280         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15281         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15282         set on the current EmitContext. 
15283
15284         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15285         resolve our casted expression as an LValue.  This triggers the
15286         proper LValue processing that is later required by Assign.
15287
15288         This fixes 72347.
15289
15290         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15291
15292 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15293
15294         C# 2.0 Fixed buffer implementation
15295
15296         * anonymous.cs: Update after RegisterHelperClass renaming.
15297
15298         * attribute.cs (AttributeTester.fixed_buffer_cache):
15299         Cache of external fixed buffers.
15300         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15301         implementation if field is fixed buffer else null.
15302
15303         * class.cs
15304         (TypeContainer.AddField): Accept FieldMember instead of Field.
15305         (FieldBase.IsFieldClsCompliant): Extracted code from
15306         VerifyClsCompliance descendant customization.
15307         (FixedField): New class handles fixed buffer fields.
15308         (FixedFieldExternal): Keeps information about imported fixed
15309         buffer.
15310         (IFixedField): Make access to internal or external fixed buffer
15311         same.
15312
15313         * cs-parser.jay: Add fixed buffer parsing.
15314
15315         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15316         buffer.
15317
15318         * expression.cs (Indirection): Extended implementation to accept
15319         fixed buffer field.
15320         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15321         (ElementAccess.MakePointerAccess): Get type as parameter.
15322         (DoResolve): Add fixed buffer field expression conversion.
15323         (DoResolveLValue): Ditto.
15324         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15325         (ArrayPtr): Derives from FixedBufferPtr.
15326         (ArrayPtr.Emit): Add extra emit for array elements.
15327
15328         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15329
15330         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15331         for compiler generated types.
15332         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15333
15334         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15335         and consume less memory.
15336         (Fixed.Resolve): Add fixed buffer case.
15337
15338         * typemanager.cs (compiler_generated_attr_ctor,
15339         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15340         (HasElementType): Add our own implementation to work on every
15341         runtime.
15342
15343 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15344
15345         * anonymous.cs (CaptureContext): Track whether `this' has been
15346         referenced.   
15347
15348         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15349         only captured `this' if it was implicitly done (instance
15350         methods/variables were used). 
15351
15352         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15353         `this' must be captured.
15354
15355 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15356  
15357         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15358         is null it means that there has been no need to capture anything,
15359         so we just create a sibling.
15360
15361         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15362
15363         Just a partial fix.  The other half is fairly elusive.
15364         
15365 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15366
15367         Fix #52586, cs0121-4.cs.
15368         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15369         and return a hashtable.
15370         (MemberCache.ClearDeclaredOnly): New.
15371         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15372         the method_hash of a base type too.
15373         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15374         type methods.  Overwrite entries with the same MethodHandle so
15375         that the ReflectedType is correct.  The process leaves in base
15376         virtual functions and their overrides as distinct entries.
15377         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15378         matters since it was boxed in a ArrayList before.
15379         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15380         modifier.
15381         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15382         case of a virtual function and its override (choose the overload
15383         as better).
15384         (Invocation.OverloadResolve): Avoid 'override' members during
15385         'applicable_type' calculation.
15386
15387 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15388
15389         Combine two near-redundant caches.
15390         * typemanager.cs (method_params): Rename from method_internal_params.
15391         (TypeManager.GetParameterData): New.  Replace
15392         Invocation.GetParameterData.
15393         (TypeManager.LookupParametersByBuilder): Remove.
15394         * expression.cs (Invocation.method_parameter_cache): Remove.
15395         (Invocation.GetParameterData): Remove.
15396         Update to changes.
15397         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15398         Update to changes.
15399
15400 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15401
15402         Fix #72015.
15403         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15404         TypeManager.multicast_delegate_type is null, resolve it by looking
15405         up "System.MulticastDelegate".
15406         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15407
15408 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15409             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15410             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15411
15412         Fix cs0164.cs.
15413         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15414         (LabeledStatement.AddReference): New.  Set 'referenced'.
15415         (Goto.Resolve): Use it.
15416
15417 2005-02-05  John Luke  <john.luke@gmail.com>
15418
15419         * driver.cs: remove duplicate -doc line in Usage ()
15420
15421 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15422
15423         * location.cs (Location.AddFile): Fix CS2002 error report.
15424
15425 2005-02-02  Martin Baulig  <martin@ximian.com>
15426
15427         * delegate.cs (Delegate.DefineType): Report an internal error if
15428         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15429         details.        
15430
15431 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15432
15433         Fix a crasher in a variant of #31984.
15434         * const.cs (Constant.CheckBase): New override that defers the
15435         new-or-override check in case the base type hasn't been populated
15436         yet.
15437         (Constant.Define): Ensure the new-or-override check is performed.
15438
15439 2005-02-01  Duncan Mak  <duncan@ximian.com>
15440
15441         * const.cs (LookupConstantValue): Check that `ce' is not null
15442         before calling GetValue ().
15443
15444 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15445
15446         Fix test-334.cs (#69519).
15447         * cs-parser.jay (using_alias_directive): Pass in an expression to
15448         NamespaceEntry.UsingAlias.
15449         (using_namespace_directive): Pass in an expression to
15450         NamespaceEntry.Using.
15451         (namespace_name): Don't flatten to a string.
15452         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15453         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15454         ResolveAsTypeStep.
15455         (NamespaceEntry.UsingEntry): Likewise.
15456         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15457         changes.
15458         (NamespaceEntry.LookupForUsing): Remove.
15459         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15460         names.
15461         (NamespaceEntry.Lookup): Remove support for dotted names.
15462
15463 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15464
15465         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15466         split into two.
15467         (NamespaceEntry.ImplicitParent): Compute on demand.
15468         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15469         parallels the current.
15470         (NamespaceEntry.LookupForUsing): Use it.
15471         (NamespaceEntry.Lookup): If the current namespace-entry is
15472         implicit, don't search aliases and using tables.
15473
15474 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15475
15476         Fix #31984.
15477         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15478         BaseCache here.
15479         (TypeContainer.BaseCache): Compute on demand.
15480         (TypeContainer.FindMembers): Define constants and types if they're
15481         not already created.
15482         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15483         check.
15484         * const.cs (Constant.Define): Make idempotent.
15485
15486 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15487
15488         * pending.cs: Produce better code (no nops produced by using Ldarg
15489         + value).
15490         
15491         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15492         i - 1' it should be arg + 1.
15493
15494         Fixes bug #71819.
15495
15496 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15497
15498         * attribute.cs (Attribute.CheckAttributeType): Make private
15499         non-virtual.
15500         (Attribute.ResolveType): Make virtual.
15501         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15502         handling of RootContext.Tree.Types.
15503
15504 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15505
15506         Update attribute-handling to use the SimpleName/MemberAccess
15507         mechanisms.
15508         * cs-parser.jay (attribute): Pass in an expression to the
15509         constructors of Attribute and GlobalAttribute.
15510         * attribute.cs (Attribute): Take an expression for the name.
15511         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15512         passed in attribute name expression.
15513         (Attribute.CheckAttributeType): Use it.
15514         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15515         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15516         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15517         argument to prevent error messages if the lookup fails.
15518
15519 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15520
15521         * expression.cs (Indirection): Implemented IVariable interface
15522         to support indirection in AddressOf operator.
15523         (PointerArithmetic.Emit): Add optimalization for case where
15524         result can be precomputed.
15525
15526 2005-01-26  Martin Baulig  <martin@ximian.com>
15527
15528         * class.cs (TypeContainer.AttributeTargets): Return the correct
15529         AttributeTargets depending on our `Kind' instead of throwing an
15530         exception; fixes #71632.
15531
15532 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15533
15534         Fix #71257
15535         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15536         constant members.
15537
15538 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15539
15540         Fix #71602.
15541         * expression.cs (MemberAccess.DoResolve): Don't complain with
15542         cs0572 when the LHS of a member access has identical name and type
15543         name.
15544
15545 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15546
15547         Fix #71651, #71675
15548         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15549         CreatePermission.
15550         Create custom PermissionSet only for PermissionSetAttribute.
15551
15552 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15553
15554         Fix #71649
15555         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15556         delegates in static class.
15557
15558 2005-01-24  Martin Baulig  <martin@ximian.com>
15559
15560         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15561         merging an implicit block, just use its reachability.
15562
15563         * statement.cs (Block.Resolve): Make the unreachable code check
15564         work wrt. implicit blocks; see test-337 from #63842.
15565
15566 2005-01-21  Alp Toker  <alp@atoker.com>
15567  
15568         * cs-parser.jay: destructor_declaration's container is PartialContainer
15569         not Class when partial types are used, so use Kind prop instead of
15570         'is'.
15571         
15572 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15573
15574         * cs-parser.jay: Improve error reporting when an interface
15575         declares new types.
15576
15577 2005-01-20  Dick Porter  <dick@ximian.com>
15578
15579         * support.cs: SeekableStreamReader fix from Sandor Dobos
15580         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15581         chars are read.  Fixes bug 70369.
15582
15583 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15584
15585         * cs-parser.jay (catch_clause): Simplify current_block handling
15586         somewhat.
15587
15588 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15589
15590         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15591         code with ImplicitStandardConversion to handle the implicit
15592         conversion of method groups into valid delegate invocations. 
15593
15594         The problem is that in parameter handling we were using this code
15595         path.  Fixes bug #64698
15596
15597 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15598
15599         * cs-parser.jay: Fix several infelicities.
15600         - Avoid assigning to the parser value stack.  Code like 
15601           '$3 = null' is unclean.  Synthesize a value for the code block
15602           instead. 
15603         - Avoid using oob_stack for storing location information.  Use ...
15604         (_mark_): ... this.  New (empty) rule.  Saves the current location
15605         in $$.
15606         (foreach_statement): Avoid using oob_stack for current_block
15607         handling.  Use technique used in for_statement and
15608         using_statement.  Synthesize a value for the code block to store
15609         additional intermediate information.
15610
15611 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15612
15613         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15614         of a different type is only allowed to private fields of a
15615         containing type, not on fields of a base class.
15616
15617         See test-174.cs and error cs0122-9.cs
15618
15619 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15620
15621         Fix test-335.cs (bug #58126).
15622         * cs-parser.jay (argument): Split out non-expression parts of the
15623         rule into 'non_simple_argument'.
15624         (invocation_expression): Support parenthesized invocations with
15625         multiple arguments, and with single non-simple arguments.
15626
15627 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15628
15629         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15630         places.
15631
15632 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15633
15634         Fix cs0038-1.cs, cs1640-6.cs.
15635         * ecore.cs (Expression.Resolve): Remove special-case for
15636         SimpleName in error-handling.
15637         (Expression.almostMatchedMembers): Relax access permission to
15638         protected.
15639         (Expression.MemberLookupFailed): Handle duplicates in
15640         almostMatchedMembers list.
15641         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15642         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15643         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15644         overload if the passed in MemberInfo is a MethodBase.
15645
15646 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15647
15648         Fix #70749
15649         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15650         for non-CAS & merge permission sets properly.
15651
15652 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15653
15654         Improve standard-compliance of simple name and member access 
15655         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15656         * ecore.cs (FullNamedExpression): New abstract base class 
15657         for Namespaces and TypeExpressions.
15658         (ResolveFlags.SimpleName): Remove.
15659         (SimpleName): Remove support for dotted names.
15660         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15661         DeclSpace.FindType and DeclSpace.LookupType.
15662         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15663         (Expression.ExprClassName): Make member function.
15664         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15665         a namespace.  Remove creation of dotted "SimpleName"s.
15666         (MemberAccess.DoResolve): Likewise.
15667         * decl.cs (DeclSpace.Cache): Make private.
15668         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15669         (DeclSpace.FindType): Update.
15670         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15671         FullNamedExpression.
15672         * namespace.cs (Namespace): Derive from FullNamedExpression
15673         so that it can be part of expression resolution.
15674         (Namespace.Lookup): Return an FullNamedExpression.
15675         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15676         namespace.
15677         * rootcontext.cs (NamespaceLookup): Remove.
15678         (LookupType): Move to DeclSpace.
15679         * attribute.cs (CheckAttributeType): Update.
15680         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15681         (FindDocumentedTypeNonArray): Likewise.
15682
15683 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15684
15685         Fix cs0509.cs, cs1632.cs.
15686         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15687         is the same as IsInterface.
15688         (TypeContainer.GetClassBases): Likewise.
15689         * statement.cs (LabeledStatement.ig): New field.
15690         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15691         label.
15692         (LabeledStatement.DoEmit): Check that the label was created with
15693         the same ILGenerator.
15694
15695 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15696
15697         Fix #71058
15698         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15699         accessors to its properties.
15700
15701         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15702         from accessors to property.
15703         
15704 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15705
15706         Fix #70722
15707         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15708         only for overrides.
15709         
15710 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15711
15712         * attribute.cs: Check for null and empty strings.  
15713
15714         I have lost another battle to Paolo.
15715
15716 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15717
15718         Fix #70942
15719         * class.cs (PropertyMethod): Set Parent field in ctors.
15720         (SetMethod.InternalParameters): Add unsafe switch hack.
15721         Override MarkForDuplicationCheck where it is appropriate.
15722
15723         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15724         It says whether container allows members with the same name.
15725         Base default is no.
15726         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15727         Removed is_method parameter.
15728
15729 2005-01-06  Duncan Mak  <duncan@ximian.com>
15730
15731         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15732         because the previous change led to incorrect reporting of CS1032
15733         ("Cannot define/undefine preprocessor symbols after first token in
15734         file"). Instead of using `tokens_seen' as the only flag that
15735         triggers CS1040, introduce `comments_seen'. This new flag is used
15736         to signify having seen comments on the current line, so it is
15737         unset after a newline.
15738
15739 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15740
15741         * doc.cs : When searching for a type, find nested type too.
15742           This fixes bug #71040.
15743
15744 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15745
15746         * doc.cs :
15747           - Warn missing member comment on those classes which also does not
15748             have doc comments. Fixed bug #71041.
15749           - Don't warn missing doc comment on default constructor.
15750             Fixed bug #71042.
15751
15752 2005-01-06  Duncan Mak  <duncan@ximian.com>
15753
15754         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15755         comments, set `tokens_seen' to true. This allows us to detect
15756         misplaced preprocessor directives (i.e. not at the beginning of
15757         the a line, nor after whitespaces). In that case, report error
15758         CS1040. This fixes bug #56460.
15759
15760         * cs-parser.jay (interface_member_declaration): Add checks for
15761         IsExplicitImpl, and report CS0541 error if an interface member is
15762         defined as an explicit interface declaration.
15763
15764 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15765
15766         Fix #70817
15767         * class.cs (PropertyMethod): Set Parent field in ctors.
15768         (SetMethod.InternalParameters): Add unsafe switch hack.
15769         
15770         * decl.cs (MemberCore.Parent): Cannot be readonly.
15771
15772 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15773
15774         * decl.cs (DeclSpace.ResolveType): Remove.
15775         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15776         Merge in code from ...
15777         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15778         * class.cs, enum.cs: Update to changes.
15779
15780 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15781
15782         * anonymous.cs: Ensure that we init the scope of our parent if it
15783         has not been initialized yet.
15784
15785 2004-12-30  Duncan Mak  <duncan@ximian.com>
15786
15787         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15788         if field.FieldBuilder is null. Fixes #70758.
15789
15790         * convert.cs: Fixed some typos and updated some of the comments.
15791         (ImplicitStandardConversionExists):
15792         (TryImplicitIntConversion): If `target_type' is an interface and
15793         the type of `ic' implements this interface, return true or a new
15794         BoxedCast instead of null. This fixes #70468.
15795
15796 2004-12-29  Duncan Mak  <duncan@ximian.com>
15797
15798         * expression.cs (Argument.Emit): Check that Expr is
15799         IMemoryLocation before casting to it, and report CS1510 otherwise.
15800
15801         This fixes #70402.
15802
15803 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15804
15805         * statement.cs (Block.ThisVariable): remove the recursion here, to
15806         make the --profile more sane.
15807
15808 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
15809
15810         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
15811         assembly, by JB Evain.
15812
15813 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15814
15815         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
15816           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
15817         "parent" refers to enclosing type/class.  "base" refers to superclass.
15818
15819 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15820
15821         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15822         Ensure that we only have GlobalAttributes.
15823         * attribute.cs (Attribute.Emit): Make non-virtual.
15824         (GlobalAttribute.Emit): Remove.
15825         (Attribute.Resolve): Make virtual.
15826         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
15827         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
15828         the argument. Don't create one.
15829         (Attribute.GetObsoleteAttribute): Likewise.
15830         (Attribute.GetClsCompliantAttributeValue): Likewise.
15831         * class.cs, decl.cs: Update to changes.
15832
15833 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
15834
15835         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
15836         
15837         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
15838         
15839         * statement.cs (Foreach.Resolve): Add error 186 report.
15840
15841 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
15842
15843         * expression.cs (Conditional.DoResolve): Add warning 429.
15844         
15845         * statement.cs (If.Resolve): Add warning 665.
15846
15847 2004-12-16  Raja R Harinath  <rharinath@novell.com>
15848
15849         New invariant: RootContext.Tree.Types.NamespaceEntry == null
15850         except when in the parser, and in GlobalAttribute.
15851         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
15852         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
15853         RootContext.Tree.Types.NamespaceEntry once work is done.
15854         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
15855         and resets RootContext.Tree.Types.NamespaceEntry.
15856
15857 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
15858
15859         * cs-parser.jay: Don't create a block for every variable.
15860
15861 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
15862
15863         * location.cs: Provide extra information.
15864
15865         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
15866         variables from the captured environment, it is the ldarg_0.
15867
15868 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15869
15870         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
15871         find a conclusion.
15872         
15873         * class.cs: Changed warning level for 169 to avoid developer
15874         displeasure from warning flooding. It will be changed back when they
15875         fix most of current BCL warnings.
15876         
15877         * RootContext.cs: Pushed default WarningLevel to 3.
15878         
15879         * statement.cs: Removed unused variable.
15880
15881 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15882
15883         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
15884         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
15885         Add error 502 report.
15886         (StaticClass.DefineType): Add error 441 report.
15887         (Class.AllowedModifiersProp): New virtual property as temporary
15888         extension to AllowedModifiers.
15889         (Class.DefineType): Add error 418 report. Moved ModFlags check here
15890         to share implementation with StaticClass and don't call virtual
15891         methods from ctor.
15892         
15893         * driver.cs (MainDriver): Add error 1558 test.
15894
15895         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
15896         report. Moved error 36 test here.
15897
15898         * statement.cs (Throw.Resolve): Add error 724 report.
15899
15900         * typemanager.cs: Add out_attribute_type core type.
15901         
15902 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
15903
15904         * class.cs (TypeContainer.VerifyClsCompliance): Add error
15905         3018 report.
15906         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
15907
15908         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
15909         3017 report.
15910         
15911         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
15912
15913         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
15914         Add error 3023 report.
15915         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
15916
15917         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
15918         implementation.
15919
15920 2004-12-12  John Luke  <john.luke@gmail.com>
15921
15922         * driver.cs (AddArgs): take -- into account when
15923         adding arguments, fixes bug 65710 
15924
15925 2004-12-12  Martin Baulig  <martin@ximian.com>
15926
15927         * expression.cs (Unary.TryReduceNegative): Added support for
15928         SByteConstant and ByteConstant.
15929         (Unary.Reduce): Check error values from TryReduceNegative().
15930
15931 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
15932
15933         * attributes.cs (Attribute.Resolve): Avoid multiple error report
15934         and report exception as error 182.
15935
15936 2004-12-10  Raja R Harinath  <rharinath@novell.com>
15937
15938         * driver.cs (Main): Fix message when there are warnings.
15939
15940 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
15941
15942         * delegate.cs: Fixed my fix from yesterday, sorry about that.
15943
15944 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
15945
15946         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
15947         Reduced number of warnings.
15948         
15949         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
15950
15951 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
15952
15953         * driver.cs: Removed message.
15954
15955         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
15956
15957 2004-12-08    <vargaz@freemail.hu>
15958
15959         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
15960
15961 2004-12-08  Martin Baulig  <martin@ximian.com>
15962
15963         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
15964         instead of a CS3002 for properties and indexer.
15965
15966 2004-12-08  Martin Baulig  <martin@ximian.com>
15967
15968         * decl.cs (MemberName.ToString): Make this work again.
15969
15970 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
15971
15972         * attribute.cs (Resolve): Add error 591 detection.
15973
15974         * class.cs (FieldMember.Define): Add error 1547 detection.
15975         (Indexer.Define): Add error 620 detection.
15976         (Operator.Define): Add error 590 detection.
15977
15978         * ecore.cs: Missing argument for error 79.
15979
15980         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
15981         detection.
15982
15983 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
15984
15985         Fix #70106
15986         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
15987         only.
15988
15989 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
15990
15991         * cs-parser.jay : handle doc comments on implicit/explicit operators.
15992           Some operator comments were suppressed.
15993         * doc.cs : Implicit/explicit operator name in doc comments are like
15994           "op_Explicit(type)~returnType", so added suffix handling.
15995
15996 2004-12-07  Martin Baulig  <martin@ximian.com>
15997
15998         * decl.cs
15999         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
16000         (MemberCore.GetClsCompliantAttributeValue): Likewise.
16001         (DeclSpace.ec): New protected field; store the EmitContext here.
16002         (DeclSpace.EmitContext): New public property; moved here from
16003         `TypeContainer'.
16004         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
16005         EmitContext.
16006
16007         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
16008         (Enum.Emit): Don't create a new EmitContext.
16009
16010         * delegate.cs (Delegate.DefineType): Always create the
16011         EmitContext.
16012
16013         * iterators.cs (Iterators.DefineIterator): Create a new
16014         EmitContext and store it in `ec'.
16015
16016 2004-08-24  Martin Baulig  <martin@ximian.com>
16017
16018         * typemanager.cs
16019         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
16020         this for accessibility checks.
16021         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
16022         IsNestedFamilyAccessible.
16023         (TypeManager.IsSubclassOf): New method, do what the name actually
16024         says.   
16025
16026 2004-12-06  Raja R Harinath  <rharinath@novell.com>
16027
16028         Fix crash on cs0657-17.cs.
16029         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
16030         Use RootContext.Tree.Types, not 'new RootTypes ()'.
16031         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
16032         the case where the NamespaceEntry gets overwritten.
16033
16034 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
16035
16036         Fixed #69195, #56821
16037         * ecore.cs (ResolveBoolean): Tiny refactoring.
16038
16039         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
16040         of right expression resolving when left is false constant and
16041         operator is LogicalAnd OR true constant and operator is LogicalOr.
16042
16043         * statement.cs (ResolveUnreachable): Always reports warning.
16044
16045 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
16046
16047         * class.cs: Distinguish between 1721 and 1722 (just a little help
16048         for the programmer).
16049
16050 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
16051
16052         * delegate.cs: Only allow this on new versions of the language. 
16053
16054 2004-12-02  Duncan Mak  <duncan@ximian.com>
16055
16056         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
16057         Expression class.
16058         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
16059         here as a static method. Take an additional bool out parameter
16060         `must_do_cs1540_check' for signaling to InstanceResolve.
16061         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
16062         member field from PropertyExpr class and made it an argument of
16063         the method instead.
16064         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
16065         check for MarshalByRefObject, and report CS0122 instead of CS1540.
16066         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
16067         and `remove_accessor' as well as InstanceResolve: report CS0122
16068         where applicable.
16069
16070         Fixes #70129.
16071
16072 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16073
16074         Fix test-327.cs, test-328.cs, and put in early infrastructure
16075         for eventually fixing #52697.
16076         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
16077         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
16078         from other methods.
16079         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
16080         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
16081         (VerifyUsing, error246): Update.
16082         * rootcontext.cs (RootContext.NamespaceLookup): Just use
16083         'NamespaceEntry.LookupNamespaceOrType'.
16084
16085 2004-12-03  Martin Baulig  <martin@ximian.com>
16086
16087         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16088         method as our child, call AnonymousMethod.Compatible() on it.
16089
16090 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16091
16092         Disable XML documentation support in 'basic' profile.
16093         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
16094         Redirect XmlElement to System.Object.
16095         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
16096         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
16097         * mcs.exe.sources: Add doc-bootstrap.cs.
16098         * doc-bootstrap.cs: New file.  Contains empty stub implementation
16099         of doc.cs.
16100
16101 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
16102
16103         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
16104           comments are allowed.
16105
16106 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16107
16108         * delegate.cs: Add checks for subtypes in paramaters and return values
16109         in VerifyMethod () to add support for Covariance/Contravariance
16110         in delegates.
16111         
16112 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
16113
16114         * report.cs: Remove extra closing parenthesis.
16115
16116         * convert.cs (Error_CannotImplicitConversion): If the name of the
16117         types are the same, provide some extra information.
16118
16119         * class.cs (FieldBase): Use an unused bit field from the field to
16120         encode the `has_offset' property from the FieldMember.  This saves
16121         a couple of Ks on bootstrap compilation.
16122
16123         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16124         method as our child, return the AnonymousMethod resolved
16125         expression.
16126
16127         * expression.cs (New.DoResolve): Allow return values from
16128         NewDelegate to also include AnonymousMethods.
16129
16130         Fixes #70150.
16131
16132 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
16133
16134         Fix bug #70102
16135         * attribute.cs (Resolve): Improved implementation of params
16136         attribute arguments.
16137
16138         * support.cs (ParameterData): Add HasParams to be faster.
16139
16140 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
16141
16142         all things are for /doc support:
16143
16144         * doc.cs: new file that supports XML documentation generation.
16145         * mcs.exe.sources: added doc.cs.
16146         * driver.cs:
16147           Handle /doc command line option.
16148           Report error 2006 instead of 5 for missing file name for /doc.
16149           Generate XML documentation when required, after type resolution.
16150         * cs-tokenizer.cs:
16151           Added support for picking up documentation (/// and /** ... */),
16152           including a new XmlCommentState enumeration.
16153         * cs-parser.jay:
16154           Added lines to fill Documentation element for field, constant,
16155           property, indexer, method, constructor, destructor, operator, event
16156           and class, struct, interface, delegate, enum.
16157           Added lines to warn incorrect comment.
16158         * rootcontext.cs :
16159           Added Documentation field (passed only when /doc was specified).
16160         * decl.cs:
16161           Added DocComment, DocCommentHeader, GenerateDocComment() and
16162           OnGenerateDocComment() and some supporting private members for
16163           /doc feature to MemberCore.
16164         * class.cs:
16165           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
16166         * delegate.cs:
16167           Added overriden DocCommentHeader.
16168         * enum.cs:
16169           Added overriden DocCommentHeader and GenerateDocComment().
16170
16171 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
16172
16173         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
16174         unwrapping the enumeration values, chain to
16175         DoConstantNumericPromotions again, so we can promote things to the
16176         fundamental types (takes care of enums that are bytes, sbytes).
16177
16178         Fixes bug #62054.
16179
16180 2004-12-01  Raja R Harinath  <rharinath@novell.com>
16181
16182         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
16183         Fix long-standing bug in type-lookup.  Use FindType instead of
16184         LookupType when ec.ResolvingTypeTree.
16185         (Attribute.ResolveType, Attribute.Resolve)
16186         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
16187         Update to changes.
16188         (Attributes.Search): Remove internal version.  Update.
16189         (Attributes.SearchMulti): Update.
16190         (Attributes.GetClsCompliantAttribute): Remove.
16191         (Attributes.GetIndexerNameAttribute): Remove.
16192         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
16193         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
16194         * class.cs (Indexer.Define): Likewise.
16195
16196 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
16197
16198         Fix bug #68790
16199         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
16200         MarshallByReference members access.
16201
16202         * expression.cs: Use CheckMarshallByRefAccess;
16203         Better error CS0197 message.
16204
16205         * report.cs: Print whole related error message.
16206
16207 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16208
16209         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16210         the current directory to help debugging.
16211
16212 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16213
16214         * class (GetClassBases): Better error 60 report.
16215         (EventProperty): Disabled warning 67 detection.
16216
16217 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16218
16219         Fix bug #60324
16220         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16221
16222         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16223         precise values.
16224
16225 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16226
16227         Fix bug #49488
16228         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16229
16230         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16231
16232 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16233
16234         * attribute.cs (Attribute.Resolve): Refine error reporting and
16235         report a cs0117 if the identifier does not exist, to distinguish
16236         from 0617 which is a miss-use of the actual identifier.
16237
16238         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16239         between cs0070 and cs0079.
16240
16241         * class.cs (MemberBase.DoDefine): When reporting a wrong
16242         accessibility level, we use MethodCore to compare instead of
16243         Method (this was a regression in some refactoring effort).
16244
16245         So now we correctly report cs0056 again.
16246
16247         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16248         testing the target_type (which was known to be object_type) and
16249         not the source type (which is anonymous_method).
16250
16251         Fixed reporting of error cs1660.
16252
16253         * expression.cs (UserCast.Source): Expose the underlying cast.
16254
16255         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16256         allowed types to find a match to int32 first (most common).
16257
16258         In addition, it ignores any ImplicitUserConversions that did an
16259         internal implicit conversion (as the switch statement allows only
16260         one integral conversion to exist).
16261
16262         * class.cs (PartialContainer.Create): rename `name' to
16263         `member_name' for clarity.  Then replace the string calls with a
16264         call to MemberName.GetPartialName, as now using
16265         MemberName.ToString is an error (this is due to the side effects
16266         it had, that were fixed in the past).
16267
16268         This will restore the error reporting on a number of partial class
16269         errors that were missusing this (and getting an exception as a
16270         results, which is now just a plain textual warning, because
16271         yyparse debug output would crash otherwise).
16272
16273 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16274
16275         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16276
16277 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16278
16279         * rootcontext.cs (LookupType): Make sure to cache lookups that
16280         don't give us a negative result. This saves about 5% of corlib
16281         compilation time.
16282
16283 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16284
16285         * report.cs (AbstractMessage.Print): messages are sent to stderr
16286
16287         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16288         non-interface in the list of interfaces (at this point, either
16289         parent was properly set, or a base class is being listed in the
16290         interfaces section).
16291
16292         This flags error 1722, and resolves the crash from bug 69259.
16293
16294 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16295
16296         * statement.cs (Using.EmitExpressionFinally): make this work right
16297         for valuetypes. Fixes 69926.
16298
16299 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16300
16301         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16302         converted to an enum" here, before we try to change the underlying
16303         type.  This code exists, but it is a different code path than the
16304         one used while encoding constants.
16305
16306         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16307         old bug: when converting from the null literal to a pointer,
16308         return an EmptyCast, not the NullLiteral.
16309
16310         This fixes #69921, the recent null_type changes probably made this
16311         bug more prominent.
16312
16313         (ImplicitReferenceConversionExists): In addition, resynchronized
16314         the code here, so it matches the same code in
16315         ImplicitReferenceConversionExists for the `from any class-type S
16316         to any interface-type T'.
16317         
16318
16319 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16320
16321         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16322
16323 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16324
16325         * cs-parser.jay: Use verbosity accordingly. 
16326
16327 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16328
16329         * expression.cs (Unary.ResolveOperator): Do not report warning;
16330         AddressOf reads from variable.
16331         
16332         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16333
16334 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16335
16336         Fix bug #69462
16337
16338         * attribute.cs (Attributable): Removed CheckTargets.
16339         (Attributes.Emit): Explicit attribute targets are tested here.
16340
16341         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16342         not enabled for interfaces.
16343
16344         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16345         (GetAssemblyName): Ouch next bug there.
16346
16347 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16348
16349         * expression.cs: Error 275 added.
16350         
16351 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16352
16353         Fix bug #69177 (Implemented decimal constant support)
16354
16355         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16356         (BinaryFold): Add DecimalConstant.
16357
16358         * const.cs (Define): Decimal constant 
16359         (is not constant.
16360         (ChangeType): Add decimal type handling.
16361         (LookupConstantValue): Don't set value for decimal type but
16362         emit DecimalConstantAttribute. Needed for constant optimization.
16363
16364         * constant.cs (ToDecimal): New method.
16365         (ConvertToDecimal): New method.
16366         (IntConstant): Implemented ConvertToDecimal.
16367         (DecimalConstant.Emit): Emit optimized version for decimals in
16368         int range.
16369
16370         * expression.cs (ResolveOperator): Changed order of constant
16371         reduction to work correctly with native types which have
16372         overloaded operators.
16373         (ResolveMemberAccess): Extract constant value from attribute
16374         for decimal type.
16375
16376         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16377
16378         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16379         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16380         (ChangeType): Decimal is special.
16381         (TypeToCoreType): Add decimal type.
16382
16383 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16384
16385         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16386         decimal types.
16387
16388 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16389
16390         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16391         test cs1667-5.cs.
16392
16393 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16394
16395         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16396
16397         * pending.cs (PendingImplementation): Grab only interfaces.
16398
16399 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16400
16401         * statement.cs (ForeachHelperMethods): Add location member and
16402         error 202 detection.
16403
16404 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16405
16406         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16407         automatically handled by executable.make.
16408         (PROGRAM): Make profile-specific.
16409
16410 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16411
16412         * expression.cs (DoResolveBase): Fixed wrong warning for out
16413         variables.
16414
16415 2004-11-18  Martin Baulig  <martin@ximian.com>
16416
16417         Merged latest changes into gmcs.  Please keep this comment in
16418         here, it makes it easier for me to see what changed in MCS since
16419         the last time I merged.
16420
16421 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16422
16423         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16424         (TypeHandle.GetMemberCache): New.
16425         (TypeHandle.TypeHandle): Update.
16426         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16427         (TypeManager.LookupParentInterfacesCache):
16428         Rename from LookupInterfaceCache.  Optimize slightly.
16429         (TypeManager.MemberLookup_FindMembers): Update.
16430         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16431         multi-type variant.
16432         (AddCacheContents): Rename from AddHashtable.
16433         * class.cs (TypeContainer.parent_container): Remove.
16434         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16435         (TypeContainer.DoDefineMembers): Don't initialize it.
16436         Update to name changes.
16437         
16438 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16439
16440         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16441         that factors the code to check access modifiers on override.  
16442
16443         (PropertyBase): Use the code here.
16444
16445         Patch from Lluis S'anchez, fixes bug #69361.
16446
16447 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16448
16449         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16450         routine that is used to report the use of a captured variable
16451         whose address has been taken.
16452
16453         There are two checks: one when variables are being captured and
16454         the other check is when the address of a variable is taken. 
16455         
16456         (because an anonymous methods might be resolved before *or* after
16457         the address has been taken) and 
16458
16459         * expression.cs (Conditional.DoResolve): Remove the special
16460         casing that Martin added to trueExpr and falseExpr being both
16461         NullLiteral.  We get the right behavior now just by introducing
16462         the null_type into the compiler. 
16463
16464         * convert.cs (ExplicitConversion): Change the code to use
16465         null_type instead of testing `expr is NullLiteral'.
16466         (ImplicitConversionStandard): use null_type too.
16467         (ImplicitReferenceConversionExists): use null_type too.
16468         (ImplicitReferenceConversion): use null_type too.
16469
16470         * literal.cs: The type of `NullLiteral' is now null_type instead
16471         of object_type. 
16472         (Resolve): Set the type here.
16473
16474         * typemanager.cs: Introduce null_type.
16475
16476 2004-11-17  Martin Baulig  <martin@ximian.com>
16477
16478         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16479         direction, like FindMembers() does.  Fixes #69546, testcase is in
16480         test-315.cs.    
16481
16482 2004-11-16  Martin Baulig  <martin@ximian.com>
16483
16484         This is based on a patch from Marek Safar, see bug #69082.
16485         Fixes bugs #63705 and #67130.
16486
16487         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16488         method; create a MemberCache for an interface type and cache the
16489         result.
16490
16491         * decl.cs (IMemberContainer.ParentContainer): Removed.
16492         (IMemberContainer.ParentCache): New property.
16493         (MemberCache.SetupCacheForInterface): Removed.
16494         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16495         to create a cache for an interface's "parent".
16496
16497         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16498         interfaces too.
16499
16500 2004-11-16  Martin Baulig  <martin@ximian.com>
16501
16502         Merged back from gmcs; these changes already went into gmcs a
16503         couple of weeks ago.
16504
16505         * typemanager.cs
16506         (TypeManager.AddUserType): Removed the `ifaces' argument.
16507         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16508         `TypeExpr []'.
16509         (TypeManager.AddUserInterface): Removed.
16510         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16511         `TypeExpr []'.
16512         (TypeManager.GetInterfaces): Likewise.
16513         (TypeManager.GetExplicitInterfaces): Likewise.
16514
16515         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16516
16517         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16518         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16519
16520 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16521
16522         * statement.cs: Avoid adding bools to a hashtable.
16523
16524 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16525
16526         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16527         calling an unsafe method from a safe location.
16528
16529 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16530
16531         Fix #69167
16532         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16533
16534 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16535
16536         * namespace.cs (VerifyUsing): use GetPartialName instead of
16537         ToString. 
16538
16539 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16540
16541         * statement.cs (Return.Resolve): Fix regression in typo: if
16542         `in_exc', we have to request a NeedReturnLabel, this was a typo
16543         introduced in the anonymous method check-in.  Fixes #69131.
16544
16545         * Indexers were using the ShortName when defining themselves,
16546         causing a regression in the compiler bootstrap when applying the
16547         patch from 2004-11-02 (first part), now they use their full name
16548         and the bug is gone.
16549
16550 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16551
16552         * driver.cs: Strip the path from the names of embedded resources. Fixes
16553         #68519.
16554
16555 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16556
16557         Fix error message regression: cs0104-2.cs.
16558         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16559         (AliasEntry.Resolve): Update.
16560         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16561         'silent' flag.
16562         (RootContext.LookupType): Update.
16563
16564 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16565
16566         * cs-parser.jay: Add support for handling accessor modifiers
16567         * class: Add support port accessor modifiers and error checking,
16568         define PropertyMethod.Define as virtual (not abstract anymore)
16569         * ecore.cs: Add checking for proeprties access with access modifiers
16570         * iterators.cs: Modify Accessor constructor call based in the modified
16571         constructor
16572 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16573
16574         * expression.cs (StringConcat): Handle being called twice,
16575         as when we have a concat in a field init with more than two
16576         ctors in the class
16577
16578 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16579
16580         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16581         special case explicit implementations, we should always produce
16582         the .property or .event declaration.
16583         
16584         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16585         since it will not return correct data if people use this
16586         unresolved in the presence of using statements (see test-313).
16587
16588         * class.cs (MethodData.Define): If we are an explicit interface
16589         implementation, set the method name to the full name of the
16590         interface plus the name of the method.  
16591
16592         Notice that using the method.MethodName.GetFullName() does not
16593         work, as it will only contain the name as declared on the source
16594         file (it can be a shorthand in the presence of using statements)
16595         and not the fully qualifed type name, for example:
16596
16597         using System;
16598
16599         class D : ICloneable {
16600                 object ICloneable.Clone ()  {
16601                 }
16602         }
16603
16604         Would produce a method called `ICloneable.Clone' instead of
16605         `System.ICloneable.Clone'.
16606
16607         * namespace.cs (Alias.Resolve): Use GetPartialName.
16608         
16609 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16610
16611         * cs-parser.jay: Add error 1055 report.
16612
16613 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16614
16615         * assign.cs (Assign.DoResolve): Only do the transform of
16616         assignment into a New if the types are compatible, if not, fall
16617         through and let the implicit code deal with the errors and with
16618         the necessary conversions. 
16619
16620 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16621
16622         * cs-parser.jay: Add error 1031 report.
16623
16624         * cs-tokenizer.cs: Add location for error 1038.
16625
16626 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16627
16628         * cs-parser.jay: Add error 1016 report.
16629
16630 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16631
16632         * cs-parser.jay: Add errors 1575,1611 report.
16633
16634 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16635
16636         * cs-parser.jay: Add error 1001 report.
16637
16638 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16639
16640         Fix #68850
16641         * attribute.cs (GetMarshal): Add method argument for
16642         caller identification.
16643
16644         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16645         agument for GetMarshal and RuntimeMissingSupport.
16646
16647 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16648
16649         * attribute.cs (ExtractSecurityPermissionSet): Removed
16650         TypeManager.code_access_permission_type.
16651
16652         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16653
16654 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16655
16656         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16657         for obsolete use of a variable here.   Fixes regression on errors
16658         cs0619-25 and cs0619-26.
16659
16660 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16661
16662         Fix #62358, implemented security attribute encoding.
16663
16664         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16665         Tests permitted SecurityAction for assembly or other types.
16666         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16667         data from SecurityPermissionAttribute to PermisionSet class.
16668
16669         * class.cs (ApplyAttributeBuilder): Added special handling
16670         for System.Security.Permissions.SecurityAttribute based types.
16671
16672         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16673         special handling for System.Security.Permissions.SecurityAttribute
16674         based types.
16675
16676         * enum.cs (ApplyAttributeBuilder): Added special handling
16677         for System.Security.Permissions.SecurityAttribute based types.
16678
16679         * parameter.cs (ApplyAttributeBuilder): Added special handling
16680         for System.Security.Permissions.SecurityAttribute based types.
16681
16682         * rootcontext.cs: Next 2 core types.
16683
16684         * typemanager.cs (TypeManager.security_permission_attr_type):
16685         Built in type for the SecurityPermission Attribute.
16686         (code_access_permission_type): Build in type.
16687
16688 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16689
16690         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16691         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16692         all of this information into
16693         EmitContext.EmitCapturedVariableInstance.
16694         
16695         * codegen.cs (EmitCapturedVariableInstance): move here the
16696         funcionality of emitting an ldarg.0 in the presence of a
16697         remapping.   This centralizes the instance emit code.
16698
16699         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16700         then emit a load of this: it means that we have reached the
16701         topmost ScopeInfo: the one that contains the pointer to the
16702         instance of the class hosting the anonymous method.
16703
16704         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16705         captures to the topmost CaptureContext.
16706
16707 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16708
16709         * expression.cs (LocalVariableReference): Move the knowledge about
16710         the iterators into codegen's EmitCapturedVariableInstance.
16711
16712 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16713
16714         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16715         all code paths return a value from an anonymous method (it is the
16716         same as the 161 error, but for anonymous methods).
16717
16718 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16719
16720         The introduction of anonymous methods in the compiler changed
16721         various ways of doing things in the compiler.  The most
16722         significant one is the hard split between the resolution phase
16723         and the emission phases of the compiler.
16724
16725         For instance, routines that referenced local variables no
16726         longer can safely create temporary variables during the
16727         resolution phase: they must do so from the emission phase,
16728         since the variable might have been "captured", hence access to
16729         it can not be done with the local-variable operations from the runtime.
16730         
16731         * statement.cs 
16732
16733         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16734         is a toplevel block.
16735
16736         (ToplevelBlock): A new kind of Block, these are the blocks that
16737         are created by the parser for all toplevel method bodies.  These
16738         include methods, accessors and anonymous methods.
16739
16740         These contain some extra information not found in regular blocks:
16741         A pointer to an optional CaptureContext (for tracking captured
16742         local variables and parameters).  A pointer to the parent
16743         ToplevelBlock.
16744         
16745         (Return.Resolve): Catch missmatches when returning a value from an
16746         anonymous method (error 1662).
16747         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16748         phase.
16749
16750         (Break.Resolve): ditto.
16751
16752         (SwitchLabel): instead of defining the labels during the
16753         resolution phase, we now turned the public ILLabel and ILLabelCode
16754         labels into methods called GetILLabelCode() and GetILLabel() that
16755         only define the label during the Emit phase.
16756
16757         (GotoCase): Track the SwitchLabel instead of the computed label
16758         (its contained therein).  Emit the code by using
16759         SwitchLabel.GetILLabelCode ().
16760
16761         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16762         whether the Local has been captured or not.
16763
16764         (LocalInfo.IsCaptured): New property, used to tell whether the
16765         local has been captured.
16766         
16767         * anonymous.cs: Vastly updated to contain the anonymous method
16768         support.
16769
16770         The main classes here are: CaptureContext which tracks any
16771         captured information for a toplevel block and ScopeInfo used to
16772         track the activation frames for various local variables.   
16773
16774         Each toplevel block has an optional capture context associated
16775         with it.  When a method contains an anonymous method both the
16776         toplevel method and the anonymous method will create a capture
16777         context.   When variables or parameters are captured, they are
16778         recorded on the CaptureContext that owns them, for example:
16779
16780         void Demo () {
16781              int a;
16782              MyDelegate d = delegate {
16783                  a = 1;
16784              }
16785         }
16786
16787         Here `a' will be recorded as captured on the toplevel
16788         CapturedContext, the inner captured context will not have anything
16789         (it will only have data if local variables or parameters from it
16790         are captured in a nested anonymous method.
16791
16792         The ScopeInfo is used to track the activation frames for local
16793         variables, for example:
16794
16795         for (int i = 0; i < 10; i++)
16796                 for (int j = 0; j < 10; j++){
16797                    MyDelegate d = delegate {
16798                         call (i, j);
16799                    }
16800                 }
16801
16802         At runtime this captures a single captured variable `i', but it
16803         captures 10 different versions of the variable `j'.  The variable
16804         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
16805         recorded on a child.  
16806
16807         The toplevel ScopeInfo will also track information like the `this'
16808         pointer if instance variables were referenced (this is necessary
16809         as the anonymous method lives inside a nested class in the host
16810         type of the method). 
16811
16812         (AnonymousMethod): Expanded to track the Toplevel, implement
16813         `AnonymousMethod.Compatible' to tell whether an anonymous method
16814         can be converted to a target delegate type. 
16815
16816         The routine now also produces the anonymous method content
16817
16818         (AnonymousDelegate): A helper class that derives from
16819         DelegateCreation, this is used to generate the code necessary to
16820         produce the delegate for the anonymous method that was created. 
16821
16822         * assign.cs: API adjustments for new changes in
16823         Convert.ImplicitStandardConversionExists.
16824
16825         * class.cs: Adjustments to cope with the fact that now toplevel
16826         blocks are of type `ToplevelBlock'. 
16827
16828         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
16829         insteda of standard blocks.
16830
16831         Flag errors if params arguments are passed to anonymous methods.
16832
16833         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
16834         `CurrentAnonymousMethod' which points to the current Anonymous
16835         Method.  The variable points to the AnonymousMethod class that
16836         holds the code being compiled.  It is set in the new EmitContext
16837         created for the anonymous method.
16838
16839         (EmitContext.Phase): Introduce a variable and an enumeration to
16840         assist in enforcing some rules about when and where we are allowed
16841         to invoke certain methods (EmitContext.NeedsReturnLabel is the
16842         only one that enfonces this right now).
16843
16844         (EmitContext.HaveCaptureInfo): new helper method that returns
16845         whether we have a CapturedContext initialized.
16846
16847         (EmitContext.CaptureVariable): New method used to register that a
16848         LocalInfo must be flagged for capturing. 
16849
16850         (EmitContext.CapturedParameter): New method used to register that a
16851         parameters must be flagged for capturing. 
16852         
16853         (EmitContext.CapturedField): New method used to register that a
16854         field must be flagged for capturing. 
16855
16856         (EmitContext.HaveCapturedVariables,
16857         EmitContext.HaveCapturedFields): Return whether there are captured
16858         variables or fields. 
16859
16860         (EmitContext.EmitMethodHostInstance): This is used to emit the
16861         instance for the anonymous method.  The instance might be null
16862         (static methods), this (for anonymous methods that capture nothing
16863         and happen to live side-by-side with the current method body) or a
16864         more complicated expression if the method has a CaptureContext.
16865
16866         (EmitContext.EmitTopBlock): Routine that drives the emission of
16867         code: it will first resolve the top block, then emit any metadata
16868         and then emit the code.  The split is done so that we can extract
16869         any anonymous methods and flag any captured variables/parameters.
16870         
16871         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
16872         during this phase, the ILGenerator should not be used as labels
16873         and local variables declared here might not be accessible to any
16874         code that is part of an anonymous method.  
16875
16876         Exceptions to this include the temporary variables that are
16877         created by some statements internally for holding temporary
16878         variables. 
16879         
16880         (EmitContext.EmitMeta): New routine, in charge of emitting all the
16881         metadata for a cb
16882
16883         (EmitContext.TemporaryReturn): This method is typically called
16884         from the Emit phase, and its the only place where we allow the
16885         ReturnLabel to be defined other than the EmitMeta.  The reason is
16886         that otherwise we would have to duplicate a lot of logic in the
16887         Resolve phases of various methods that today is on the Emit
16888         phase. 
16889
16890         (EmitContext.NeedReturnLabel): This no longer creates the label,
16891         as the ILGenerator is not valid during the resolve phase.
16892
16893         (EmitContext.EmitThis): Extended the knowledge in this class to
16894         work in anonymous methods in addition to iterators. 
16895
16896         (EmitContext.EmitCapturedVariableInstance): This emits whatever
16897         code is necessary on the stack to access the instance to a local
16898         variable (the variable will be accessed as a field).
16899
16900         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
16901         EmitContext.EmitAddressOfParameter): Routines to support
16902         parameters (not completed at this point). 
16903         
16904         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
16905         will also remove the parameters.
16906
16907         * convert.cs (Convert): Define a `ConstantEC' which points to a
16908         null.  This is just to prefity some code that uses
16909         ImplicitStandardConversion code and do not have an EmitContext
16910         handy.
16911
16912         The idea is to flag explicitly that at that point in time, it is
16913         known that the conversion will not trigger the delegate checking
16914         code in implicit conversions (which requires a valid
16915         EmitContext). 
16916
16917         Everywhere: pass new EmitContext parameter since
16918         ImplicitStandardConversionExists now requires it to check for
16919         anonymous method conversions. 
16920
16921         (Convert.ImplicitStandardConversionExists): If the type of an
16922         expression is the anonymous_method_type, and the type is a
16923         delegate, we invoke the AnonymousMethod.Compatible method to check
16924         whether an implicit conversion is possible. 
16925
16926         (Convert.ImplicitConversionStandard): Only do implicit method
16927         group conversions if the language level is not ISO_1.
16928
16929         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
16930         MethodInfo for the Invoke method.  used by Delegate and
16931         AnonymousDelegate.
16932
16933         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
16934         method conversions if the target type is a delegate.
16935
16936         Removed extra debugging nops.
16937
16938         (LocalVariableReference): Turn the `local_info' into a public
16939         field. 
16940
16941         Add `prepared' field, the same hack used for FieldExprs to cope
16942         with composed assignments, as Local variables do not necessarily
16943         operate purely on the stack as they used to: they can be captured
16944         fields. 
16945
16946         Add `temp' for a temporary result, like fields.
16947
16948         Refactor DoResolve and DoResolveLValue into DoResolveBase.
16949
16950         It now copes with Local variables that are captured and emits the
16951         proper instance variable to load it from a field in the captured
16952         case. 
16953
16954         (ParameterReference.DoResolveBase): During the resolve phase,
16955         capture parameters if we are in an anonymous method.
16956
16957         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
16958         anonymous method, use the EmitContext helper routines to emit the
16959         parameter reference.
16960
16961         * iterators.cs: Set RemapToProxy to true/false during the
16962         EmitDispose class.
16963
16964         * parameters.cs (GetParameterByName): New helper method. 
16965
16966         * typemanager.cs (anonymous_method_type) a new type that
16967         represents an anonyous method.  This is always an internal type,
16968         used as a fencepost to test against the anonymous-methodness of an
16969         expression. 
16970         
16971 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
16972
16973         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
16974         561 report.
16975         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
16976
16977 2004-10-18  Martin Baulig  <martin@ximian.com>
16978
16979         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
16980         `Type' directly, but call ResolveType() on it.
16981         (Catch.Resolve): Likewise.
16982         (Foreach.Resolve): Likewise.
16983
16984 2004-10-18  Martin Baulig  <martin@ximian.com>
16985
16986         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
16987         `Type' directly, but call ResolveType() on it.
16988         (Probe.DoResolve): Likewise.
16989         (ArrayCreation.LookupType): Likewise.
16990         (TypeOf.DoResolve): Likewise.
16991         (SizeOf.DoResolve): Likewise.
16992
16993 2004-10-18  Martin Baulig  <martin@ximian.com>
16994
16995         * expression.cs (Invocation.BetterFunction): Put back
16996         TypeManager.TypeToCoreType().
16997
16998 2004-10-18  Raja R Harinath  <rharinath@novell.com>
16999
17000         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
17001         the ResolveType.
17002
17003 2004-10-18  Martin Baulig  <martin@ximian.com>
17004
17005         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
17006         `Type' directly, but call ResolveType() on it.
17007
17008 2004-10-18  Martin Baulig  <martin@ximian.com>
17009
17010         * class.cs (FieldMember.Define): Don't access the TypeExpr's
17011         `Type' directly, but call ResolveType() on it.
17012         (MemberBase.DoDefine): Likewise.
17013
17014         * expression.cs (New.DoResolve): Don't access the TypeExpr's
17015         `Type' directly, but call ResolveType() on it.
17016         (ComposedCast.DoResolveAsTypeStep): Likewise.
17017
17018         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
17019         `Type' directly, but call ResolveType() on it.
17020
17021 2004-10-17  John Luke  <john.luke@gmail.com>
17022
17023         * class.cs (Operator.GetSignatureForError): use CSharpName
17024
17025         * parameter.cs (Parameter.GetSignatureForError): Returns
17026         correct name even if was not defined.
17027
17028 2004-10-13  Raja R Harinath  <rharinath@novell.com>
17029
17030         Fix #65816.
17031         * class.cs (TypeContainer.EmitContext): New property.
17032         (DefineNestedTypes): Create an emitcontext for each part.
17033         (MethodCore.DoDefineParameters): Use container's emitcontext.
17034         Pass type array to InternalParameters.
17035         (MemberBase.DoDefine): Use container's emitcontext.
17036         (FieldMember.Define): Likewise.
17037         (Event.Define): Likewise.
17038         (SetMethod.GetParameterInfo): Change argument to EmitContext.
17039         Pass type array to InternalParameters.
17040         (SetIndexerMethod.GetParameterInfo): Likewise.
17041         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
17042         * delegate.cs (Define): Pass emitcontext to
17043         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
17044         array to InternalParameters.
17045         * expression.cs (ParameterReference.DoResolveBase): Pass
17046         emitcontext to GetParameterInfo.
17047         (ComposedCast.DoResolveAsTypeStep): Remove check on
17048         ec.ResolvingTypeTree.
17049         * parameter.cs (Parameter.Resolve): Change argument to
17050         EmitContext.  Use ResolveAsTypeTerminal.
17051         (Parameter.GetSignature): Change argument to EmitContext.
17052         (Parameters.ComputeSignature): Likewise.
17053         (Parameters.ComputeParameterTypes): Likewise.
17054         (Parameters.GetParameterInfo): Likewise.
17055         (Parameters.ComputeAndDefineParameterTypes): Likewise.
17056         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
17057         * support.cs (InternalParameters..ctor): Remove variant that takes
17058         a DeclSpace.
17059         * typemanager.cs (system_intptr_expr): New.
17060         (InitExpressionTypes): Initialize it.
17061
17062 2004-10-12  Chris Toshok  <toshok@ximian.com>
17063
17064         * cs-parser.jay: fix location for try_statement and catch_clause.
17065
17066 2004-10-11  Martin Baulig  <martin@ximian.com>
17067
17068         * report.cs: Don't make --fatal abort on warnings, we have
17069         -warnaserror for that.
17070
17071 2004-10-07  Raja R Harinath  <rharinath@novell.com>
17072
17073         More DeclSpace.ResolveType avoidance.
17074         * decl.cs (MemberCore.InUnsafe): New property.
17075         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
17076         with newly created EmitContext.
17077         (FieldMember.Define): Likewise.
17078         * delegate.cs (Delegate.Define): Likewise.
17079         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
17080         only if normal name-lookup fails.
17081         (TypeExpr.DoResolve): Enable error-checking.
17082         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
17083         (SizeOf.DoResolve): Likewise.
17084         (ComposedCast.DoResolveAsTypeStep): Likewise.
17085         (StackAlloc.DoResolve): Likewise.
17086         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
17087         (Block.Unsafe): New property.
17088         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
17089         (Unsafe): Set 'unsafe' flag of contained block.
17090         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
17091         (Fixed.Resolve): Likewise.
17092         (Catch.Resolve): Likewise.
17093         (Using.ResolveLocalVariableDecls): Likewise.
17094         (Foreach.Resolve): Likewise.
17095
17096 2004-10-05  John Luke <john.luke@gmail.com>
17097
17098         * cs-parser.jay: add location to error CS0175
17099
17100 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
17101
17102         * ecore.cs (Expression.Constantity): Add support for turning null
17103         into a constant.
17104
17105         * const.cs (Const.Define): Allow constants to be reference types
17106         as long as the value is Null.
17107
17108 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
17109
17110         * namespace.cs (NamespaceEntry.Using): No matter which warning
17111         level is set, check if this namespace name has already been added.
17112
17113 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
17114
17115         * expression.cs: reftype [!=]= null should always use br[true,false].
17116         # 67410
17117
17118 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
17119
17120         Fix #67108
17121         * attribute.cs: Enum conversion moved to 
17122         GetAttributeArgumentExpression to be applied to the all
17123         expressions.
17124
17125 2004-10-01  Raja R Harinath  <rharinath@novell.com>
17126
17127         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
17128         * class.c (TypeContainer.DefineType): Flag error if
17129         base types aren't accessible due to access permissions.
17130         * decl.cs (DeclSpace.ResolveType): Move logic to
17131         Expression.ResolveAsTypeTerminal.
17132         (DeclSpace.ResolveTypeExpr): Thin layer over
17133         Expression.ResolveAsTypeTerminal.
17134         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
17135         Refactor code into NestedAccess.  Use it.
17136         (DeclSpace.NestedAccess): New.
17137         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
17138         argument to silence errors.  Check access permissions.
17139         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
17140         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
17141         (Cast.DoResolve): Likewise.
17142         (New.DoResolve): Likewise.
17143         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
17144         (TypeOf.DoResolve): Likewise.
17145
17146         * expression.cs (Invocation.BetterConversion): Return the Type of
17147         the better conversion.  Implement section 14.4.2.3 more faithfully.
17148         (Invocation.BetterFunction): Make boolean.  Make correspondence to
17149         section 14.4.2.2 explicit.
17150         (Invocation.OverloadResolve): Update.
17151         (Invocation): Remove is_base field.
17152         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
17153         (Invocation.Emit): Likewise.
17154
17155 2004-09-27  Raja R Harinath  <rharinath@novell.com>
17156
17157         * README: Update to changes.
17158
17159 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
17160
17161         * cs-parser.jay: Reverted 642 warning fix.
17162
17163 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17164
17165         Fix bug #66615
17166         * decl.cs (FindMemberWithSameName): Indexer can have more than
17167         1 argument.
17168
17169 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17170
17171         * expression.cs (LocalVariableReference.DoResolveLValue):
17172         Do not report warning 219 for out values.
17173         (EmptyExpression.Null): New member to avoid extra allocations.
17174
17175 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17176
17177         * cs-parser.jay: Fix wrong warning 642 report.
17178
17179         * cs-tokenizer.cs (CheckNextToken): New helper;
17180         Inspect next character if is same as expected.
17181
17182 2004-09-23  Martin Baulig  <martin@ximian.com>
17183
17184         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
17185         (Convert.ImplicitReferenceConversionExists): Likewise.
17186
17187 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17188
17189         * class.cs (Operator.Define): Add error 448 and 559 report.
17190
17191 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17192
17193         * class.cs (MemberBase.IsTypePermitted): New protected
17194         method for checking error CS0610.
17195
17196 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17197
17198         * class.cs (TypeContainer.HasExplicitLayout): New property
17199         Returns whether container has StructLayout attribute set Explicit.
17200         (FieldMember): New abstract class for consts and fields.
17201         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
17202         (Field): Reuse FieldMember.
17203
17204         * const.cs (Const): Reuse FieldMember.
17205
17206         * rootcontext.cs: EmitConstants call moved to class.
17207
17208 2004-09-22  Martin Baulig  <martin@ximian.com>
17209
17210         Thanks to Peter Sestoft for this bug report.
17211
17212         * expression.cs (Conditional): If both the `trueExpr' and the
17213         `falseExpr' is a NullLiteral, return a NullLiteral.
17214
17215 2004-09-22  Martin Baulig  <martin@ximian.com>
17216
17217         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17218         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17219         for the "get_Current" call.
17220
17221 2004-09-22  Martin Baulig  <martin@ximian.com>
17222
17223         Marek and me just fixed one of our oldest bugs: #28562 :-)
17224
17225         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17226
17227         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17228         we're an EnumConstant, just return that.
17229         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17230         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17231         to get the value which'll actually be written into the attribute.
17232         However, we have to use GetValue() to access the attribute's value
17233         in the compiler.        
17234
17235 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17236
17237         * constant.cs (Constant.IsNegative): New abstract property
17238         IsNegative.
17239
17240         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17241         (StackAlloc.DoResolve): Reused IsNegative.
17242
17243 2004-09-21  Martin Baulig  <martin@ximian.com>
17244
17245         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17246         if we're used in an iterator, we may be called from different
17247         methods.
17248
17249         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17250         we actually have an exception block.
17251
17252 2004-09-20  John Luke <jluke@cfl.rr.com>
17253
17254         * class.cs, cs-parser.jay: Improve the error report for 1520:
17255         report the actual line where the error happens, not where the
17256         class was declared.
17257
17258         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17259         Pass location information that was available elsewhere.
17260
17261 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17262
17263         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17264         runtime to delay sign assemblies.
17265
17266 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17267
17268         * cs-parser.jay: Do not report the stack trace, this is barely
17269         used nowadays.
17270
17271 2004-08-22  John Luke  <john.luke@gmail.com>
17272  
17273         * driver.cs : check that a resource id is not already used
17274         before adding it, report CS1508 if it is, bug #63637
17275
17276 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17277
17278         * ecore.cs: Removed dead code.
17279
17280 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17281
17282         * class.cs: Do not report warning CS0067 on the interfaces.
17283
17284 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17285
17286         * cs-parser.jay: Add error 504 report.
17287
17288 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17289
17290         * rootcontext.cs: WarningLevel is 4 by default now.
17291
17292         * statement.cs (Fixed.Resolve): Do not null
17293         VariableInfo.
17294
17295 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17296
17297         Fixed bug #55780
17298         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17299         deep search when property is not virtual.
17300         (PropertyExpr.ResolveAccessors): Make one call for both
17301         accessors.
17302
17303 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17304
17305         Fixed bug #65766
17306         * statement.cs: Error 152 report constains also location.
17307
17308 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17309
17310         Fixed bug #65766
17311         * const.cs: Explicitly set constant as static.
17312
17313 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17314
17315         Fixed bug #64226
17316         * cs-parser.jay: Add error 1017 report.
17317
17318 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17319
17320         Fixed bug #59980, #64224
17321         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17322
17323         * typemanager.cs (IsSpecialMethod): Simplified
17324
17325 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17326
17327         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17328         condition with better params.
17329
17330 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17331
17332         Fixed bug #65238
17333         * attribute.cs (Resolve): Property has to have both
17334         accessors.
17335
17336 2004-09-14  Martin Baulig  <martin@ximian.com>
17337
17338         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17339
17340 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17341
17342         Fixed bug #61902
17343         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17344         called and is obsolete then this member suppress message
17345         when call is inside next [Obsolete] method or type.
17346
17347         * expression.cs: Use TestObsoleteMethodUsage member.
17348
17349 2004-09-14  Martin Baulig  <martin@ximian.com>
17350
17351         * cs-parser.jay: Sync a bit with the GMCS version.
17352
17353 2004-09-14  Martin Baulig  <martin@ximian.com>
17354
17355         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17356         (CSharpParser.yacc_verbose_flag): New public field.
17357
17358         * genericparser.cs: Removed.
17359
17360 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17361
17362         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17363
17364 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17365
17366         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17367
17368 2004-09-10  Martin Baulig  <martin@ximian.com>
17369
17370         Backported my MemberName changes from GMCS into MCS.
17371
17372         - we are now using a special `MemberName' class instead of using
17373         strings; in GMCS, the `MemberName' also contains the type
17374         arguments.
17375
17376         - changed the grammar rules a bit:
17377           * the old `member_name' is now a `namespace_or_type_name':
17378             The rule is that we use `namespace_or_type_name' everywhere
17379             where we expect either a "member name" (GetEnumerator) or a
17380             "member name" with an explicit interface name
17381             (IEnumerable.GetEnumerator).
17382             In GMCS, the explicit interface name may include type arguments
17383             (IEnumerable<T>.GetEnumerator).
17384           * we use `member_name' instead of just `IDENTIFIER' for
17385             "member names":
17386             The rule is that we use `member_name' wherever a member may
17387             have type parameters in GMCS.       
17388
17389         * decl.cs (MemberName): New public class.
17390         (MemberCore.MemberName): New public readonly field.
17391         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17392         (DeclSpace): Likewise.
17393
17394         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17395         * enum.cs (Enum.ctor): Likewise.
17396
17397         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17398         MemberName.     
17399         (AliasEntry.ctor): Take a MemberName, not an Expression.
17400         (AliasEntry.UsingAlias): Likewise.
17401
17402         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17403         (IMethodData.MemberName): Changed type from string to MemberName.
17404         (MemberBase.ExplicitInterfaceName): Likewise.
17405         (AbstractPropertyEventMethod.SetupName): Make this private.
17406         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17407         argument; compute the member name here.
17408         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17409         on the `member.MemberName' and the `prefix'.
17410
17411         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17412         not `type_name'.
17413         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17414         thus, we get a `MemberName' instead of a `string'.  These
17415         declarations may have type parameters in GMCS.
17416         (interface_method_declaration, delegate_declaration): Likewise.
17417         (class_declaration, interface_declaration): Likewise.
17418         (method_header): Use `namespace_or_type_name' instead of
17419         `member_name'.  We may be an explicit interface implementation.
17420         (property_declaration, event_declaration): Likewise.
17421         (member_name): This is now just an `IDENTIFIER', not a
17422         `namespace_or_type_name'.
17423         (type_name, interface_type): Removed.
17424         (namespace_or_type_name): Return a MemberName, not an Expression.
17425         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17426         call GetTypeExpression() on the MemberName to get an expression.
17427         (IndexerDeclaration.interface_type): Changed type from string to
17428         MemberName.
17429         (MakeName): Operate on MemberName's instead of string's.
17430
17431 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17432
17433         Fix bug #55770.
17434         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17435         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17436         lookup to avoid symbols introduced by 'using'.
17437         * rootcontext.cs (NamespaceLookup): Update.
17438
17439 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17440
17441         * class.cs (TypeContainer.DoDefineMembers): Do not call
17442         DefineDefaultConstructor for static classes.
17443
17444 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17445
17446         * attribute.cs (Attribute.Resolve): Add error 653 report.
17447
17448         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17449         report.
17450         (Method.ApplyAttributeBuilder): Add error 685 report.
17451         (Operator.Define): Add error 564 report.
17452
17453         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17454
17455         * expression.cs (Invocation.DoResolve): Add error
17456         245 and 250 report.
17457
17458         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17459         error 674 report.
17460
17461 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17462
17463         * class.cs (ConstructorInitializer.Resolve):
17464         Wrong error number (515->516).
17465
17466 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17467
17468         * class.cs (Indexer.Define): Add error 631 report.
17469
17470 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17471
17472         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17473
17474 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17475
17476         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17477
17478 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17479
17480         * cs-parser.jay: Added error CS0241 report.
17481
17482 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17483
17484         * cs-parser.jay (fixed_statement): Introduce a scope for the
17485         declaration in the 'fixed' statement.
17486
17487 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17488
17489         * cs-parser.jay: Added CS0230 error report.
17490
17491 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17492
17493         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17494
17495 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17496
17497         * expression.cs (Argument.Resolve): Added error CS0192 and
17498         CS0199 report.
17499
17500 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17501
17502         C# 2.0 #pragma warning feature
17503
17504         * cs-tokenizer.cs (PreProcessPragma): New method; 
17505         Handles #pragma directive.
17506
17507         * report.cs (WarningRegions): New class; Support
17508         class for #pragma warning directive. It tests whether
17509         warning is enabled for a given line.
17510
17511 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17512
17513         * const.cs: Add more descriptive error report, tahnks to
17514         Sebastien. 
17515
17516 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17517
17518         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17519
17520 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17521
17522         * expression.cs: Apply patch from Ben: Remove dead code from
17523         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17524         as that code just threw an exception anwyays.
17525
17526         * const.cs: Remove the call to the turnintoconstant, for details
17527         see bug: #63144
17528         
17529         * literal.cs: The type of the null-literal is the null type;  So
17530         we use a placeholder type (literal.cs:System.Null, defined here)
17531         for it.
17532
17533         * expression.cs (Conditional.DoResolve): Remove some old code that
17534         is no longer needed, conversions have been fixed.
17535
17536         (ArrayCreationExpression.DoResolve): Return false if we fail to
17537         resolve the inner expression.
17538
17539 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17540
17541         Fix test-290.cs.
17542         * cs-parser.jay (delegate_declaration): Record a delegate
17543         declaration as a type declaration.
17544         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17545
17546 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17547
17548         * parameter.cs: Do not crash if the type can not be resolved. 
17549
17550         * expression.cs: Report errors with unsafe pointers, fixes #64896
17551
17552 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17553
17554         * expression.cs: Pointer arith always needs to do a conv.i
17555         if the operand is a long. fix 65320
17556
17557 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17558
17559         Fixed cs0619-37.cs, cs0619-38.cs
17560
17561         * enum.cs (GetObsoleteAttribute): Removed.
17562
17563         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17564         on Enum member is double staged. The first is tested member
17565         and then enum.
17566
17567 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17568
17569         Fixed #56986, #63631, #65231
17570
17571         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17572         adds member to name container.
17573         (TypeContainer.AddToTypeContainer): New method, adds type to
17574         name container.
17575         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17576         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17577         AddOperator): Simplified by reusing AddToMemberContainer.
17578         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17579         instead of field.
17580         (Method.CheckForDuplications): Fixed implementation to test all
17581         possibilities.
17582         (MemberBase): Detection whether member is explicit interface
17583         implementation is now in constructor.
17584         (MemberBase.UpdateMemberName): Handles IndexerName.
17585         (Accessor): Changed to keep also location information.
17586         (AbstractPropertyEventMethod): Is derived from MemberCore.
17587         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17588         will be emited or not.
17589         (PropertyBase.AreAccessorsDuplicateImplementation):
17590         Tests whether accessors are not in collision with some method.
17591         (Operator): Is derived from MethodCore to simplify common
17592         operations.
17593
17594         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17595         must be performed.
17596         (DeclSpace.AddToContainer): Adds the member to defined_names
17597         table. It tests for duplications and enclosing name conflicts.
17598
17599         * enum.cs (EnumMember): Clean up to reuse the base structures
17600
17601 2004-09-03  Martin Baulig  <martin@ximian.com>
17602
17603         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17604         into TypeContainer, to make partial classes work again.
17605
17606 2004-09-03  Martin Baulig  <martin@ximian.com>
17607
17608         * rootcontext.cs (RootContext.V2): Removed.
17609
17610 2004-03-23  Martin Baulig  <martin@ximian.com>
17611
17612         * expression.cs (Invocation.OverloadResolve): Added `bool
17613         may_fail' argument and use it instead of the Location.IsNull() hack.
17614
17615 2004-09-03  Martin Baulig  <martin@ximian.com>
17616
17617         Merged latest changes into gmcs.  Please keep this comment in
17618         here, it makes it easier for me to see what changed in MCS since
17619         the last time I merged.
17620
17621 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17622
17623         Fix #61128.
17624         * expression.cs (BetterConversion): Don't allow either conversion 
17625         to be null.  Remove redundant implicit conversion test when 'q ==
17626         null' -- when this function is invoked, we already know that the
17627         implicit conversion exists.
17628         (BetterFunction): Assume that 'best' is non-null.  Remove
17629         redundant reimplementation of IsApplicable when 'best' is null.
17630         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17631         number of arguments.
17632         (IsAncestralType): Extract from OverloadResolve.
17633         (OverloadResolve): Make robust to the MethodGroupExpr being
17634         unsorted.  Implement all the logic of Section 14.5.5.1, and
17635         support overloading of methods from multiple applicable types.
17636         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17637
17638         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17639         (RealError, Warning): Append type of report to related symbol.
17640
17641 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17642
17643         * enum.cs: Fixed CLS-Compliance checks for enum members.
17644         Error tests cs3008-8.cs, cs3014-8.cs
17645
17646 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17647
17648         Fixed bug #62342, #63102
17649         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17650         like ImplementMethod.
17651
17652 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17653
17654         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17655         Fixed bug #65170.
17656
17657 2004-09-02  Martin Baulig  <martin@ximian.com>
17658
17659         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17660         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17661         on the MethodBase.
17662
17663 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17664
17665         C# 2.0 Static classes implemented
17666
17667         * class.cs (TypeContainer): instance_constructors,
17668         initialized_fields, initialized_static_fields,
17669         default_constructor, base_inteface_types are protected to be
17670         accessible from StaticClass.
17671         (TypeContainer.DefineDefaultConstructor): New virtual method
17672         for custom default constructor generating
17673         (StaticClass): New class to handle "Static classes" feature.
17674
17675         * cs-parser.jay: Handle static keyword on class like instance
17676         of StaticClass.
17677
17678         * driver.cs: Added "/langversion" command line switch with two
17679         options (iso-1, default).
17680
17681 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17682
17683         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17684
17685 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17686
17687         * delegate.cs: Style.
17688
17689 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17690
17691         * delegate.cs: Add seperate instance expr field for miguel.
17692
17693 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17694
17695         * PointerArithmetic (Resolve): make sure we are not doing
17696         pointer arith on void*. Also, make sure we are resolved
17697         by not setting eclass until resolve.
17698
17699         All callers: Make sure that PointerArithmetic gets resolved.
17700
17701 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17702
17703         * ArrayCreation (LookupType): If the type does not resolve 
17704         to an array, give an error.
17705
17706 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17707
17708         * statement.cs (Try.Resolve): Fixed bug #64222
17709
17710 2004-08-27  Martin Baulig  <martin@ximian.com>
17711
17712         * class.cs
17713         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17714         crash here.     
17715
17716 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17717
17718         * ecore.cs (Constantify): Get underlying type via
17719         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17720         Windows in special cases.
17721
17722 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17723
17724         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17725         for obtaining also private methods.
17726         (GetRemoveMethod): Used GetRemoveMethod (true)
17727         for obtaining also private methods.
17728
17729 2004-08-24  Martin Baulig  <martin@ximian.com>
17730
17731         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17732         MethodAttributes.HideBySig for operators.
17733
17734 2004-08-23  Martin Baulig  <martin@ximian.com>
17735
17736         Back to the old error reporting system :-)
17737
17738         * report.cs (Message): Removed.
17739         (Report.MessageData, ErrorData, WarningData): Removed.
17740         (Report.Error, Warning): Back to the old system.
17741
17742 2004-08-23  Martin Baulig  <martin@ximian.com>
17743
17744         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17745
17746         * class.cs (TypeContainer.ParentContainer): New public virtual
17747         method; replaces the explicit interface implementation.
17748         (ClassPart.ParentContainer): Override.
17749
17750 2004-08-23  Martin Baulig  <martin@ximian.com>
17751
17752         * statement.cs (Switch): Added support for constant switches; see
17753         #59428 or test-285.cs.
17754
17755 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17756
17757         Fixed bug #62740.
17758         * statement.cs (GetEnumeratorFilter): Removed useless
17759         logic because C# specs is strict. GetEnumerator must be
17760         public.
17761
17762 2004-08-22  Martin Baulig  <martin@ximian.com>
17763
17764         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17765         a switch and may break, reset the barrier.  Fixes #59867.
17766
17767 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17768
17769         CLS-Compliance speed up (~5% for corlib)
17770
17771         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17772         New method. Tests container for CLS-Compliant names
17773
17774         * class.cs (TypeContainer.VerifyClsName): New method.
17775         Checks whether container name is CLS Compliant.
17776         (Constructor): Implements IMethodData.
17777
17778         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17779         low-case table for CLS Compliance test.
17780         (MemberCache.VerifyClsParameterConflict): New method.
17781         Checks method parameters for CS3006 error.
17782
17783         * enum.cs (EnumMember): Is derived from MemberCore.
17784         (Enum.VerifyClsName): Optimized for better performance.
17785
17786 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17787
17788         * report.cs: Renamed Error_T to Error and changed all
17789         references.
17790
17791 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17792
17793         * class.cs (TypeContainer.IndexerArrayList): New inner class
17794         container for indexers.
17795         (TypeContainer.DefaultIndexerName): New constant for default
17796         indexer name. Replaced all "Item" with this constant.
17797         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
17798
17799         * typemanager.cs (TypeManager.default_member_ctor): Cache here
17800         DefaultMemberAttribute constructor.
17801
17802 2004-08-05  Martin Baulig  <martin@ximian.com>
17803
17804         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
17805         Fix bug #59429.
17806
17807 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
17808
17809         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
17810         multi platforms problem.
17811
17812         * compiler.csproj: Included shared files.
17813
17814 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17815
17816         Fix bug 60333, 55971 in the more general way
17817         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17818         Added arg_type argument for constant conversion.
17819         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
17820
17821 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17822
17823         Fix bug #59760
17824         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
17825         OperatorArrayList, MethodCoreArrayList for typecontainer
17826         containers. Changed class member types to these new types.
17827         (MethodArrayList.DefineMembers): Added test for CS0659.
17828
17829 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
17830
17831         * cfold.cs: Synchronize the folding with the code in expression.cs
17832         Binary.DoNumericPromotions for uint operands.
17833
17834         * attribute.cs: Revert patch from Raja, it introduced a regression
17835         while building Blam-1.2.1 (hard to isolate a test case).
17836
17837 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17838
17839         Fix for #55382
17840         * class.cs:
17841         (TypeContainer.Define): Renamed to DefineContainerMembers because of
17842         name collision.
17843         (MethodCore.parent_method): New member. The method we're overriding
17844         if this is an override method.
17845         (MethodCore.CheckBase): Moved from Method class and made common.
17846         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
17847         private.
17848         (MethodCore.CheckForDuplications): New abstract method. For custom
17849         member duplication search in a container
17850         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
17851         method and its return type.
17852         (Event.conflict_symbol): New member. Symbol with same name in the
17853         parent class.
17854
17855         * decl.cs:
17856         (MemberCache.FindMemberWithSameName): New method. The method
17857         is looking for conflict with inherited symbols.
17858
17859 2004-08-04  Martin Baulig  <martin@ximian.com>
17860
17861         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
17862
17863         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
17864
17865 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17866
17867         * report.cs (Message): New enum for better error, warning reference in
17868         the code.
17869         (MessageData): New inner abstract class. It generally handles printing of
17870         error and warning messages.
17871         Removed unused Error, Warning, Message methods.
17872
17873 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17874
17875         Fix for cs0592-8.cs test
17876         * attribute.cs
17877         (Attributable.ValidAttributeTargets): Made public.
17878         (Attribute.ExplicitTarget): New member for explicit target value.
17879         (Attribute.CheckTargets): Now we translate explicit attribute
17880         target to Target here.
17881
17882 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
17883
17884         * ecore.cs (MethodGroupExpr): new IsBase property.
17885
17886         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
17887
17888         * delegate.cs (DelegateCreation): store a MethodGroupExpr
17889         rather than an instance expr.
17890
17891         (DelegateCreation.Emit): Use the method group rather than
17892         the instance expression. Also, if you have base.Foo as the
17893         method for a delegate, make sure to emit ldftn, not ldftnvirt.
17894
17895         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
17896
17897         (NewDelegate.DoResolve): Only check for the existance of Invoke
17898         if the method is going to be needed. Use MethodGroupExpr.
17899
17900         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
17901
17902         * expression.cs: For pointer arith., make sure to use
17903         the size of the type, not the size of the pointer to
17904         the type.
17905
17906 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17907
17908         Fix for #60722
17909         * class.cs (Class): Added error CS0502 test.
17910
17911 2004-08-03  John Luke  <jluke@cfl.rr.com>
17912             Raja R Harinath  <rharinath@novell.com>
17913
17914         Fix for #60997.
17915         * attribute.cs (Attribute.complained_before): New flag.
17916         (Attribute.ResolveType, Attribute.Resolve),
17917         (Attribute.DefinePInvokeMethod): Set it.
17918         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
17919         
17920 2004-08-03  Martin Baulig  <martin@ximian.com>
17921
17922         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
17923         use a user-defined operator; we still need to do numeric
17924         promotions in case one argument is a builtin type and the other
17925         one has an implicit conversion to that type.  Fixes #62322.
17926
17927 2004-08-02  Martin Baulig  <martin@ximian.com>
17928
17929         * statement.cs (LocalInfo.Flags): Added `IsThis'.
17930         (LocalInfo.IsThis): New public property.
17931         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
17932
17933 2004-08-01  Martin Baulig  <martin@ximian.com>
17934
17935         * class.cs (TypeContainer.GetClassBases): Don't set the default
17936         here since we may get called from GetPartialBases().
17937         (TypeContainer.DefineType): If GetClassBases() didn't return a
17938         parent, use the default one.
17939
17940 2004-07-30  Duncan Mak  <duncan@ximian.com>
17941
17942         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
17943
17944 2004-07-30  Martin Baulig  <martin@ximian.com>
17945
17946         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
17947
17948         * class.cs (SourceMethod): New public class, derive from the
17949         symbol writer's ISourceMethod.
17950         (Method): Use the new symbol writer API.
17951
17952         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
17953         as argument and use the new symbol writer.
17954
17955         * location.cs
17956         (SourceFile): Implement the symbol writer's ISourceFile.
17957         (Location.SymbolDocument): Removed.
17958         (Location.SourceFile): New public property.
17959
17960         * symbolwriter.cs: Use the new symbol writer API.
17961
17962 2004-07-30  Raja R Harinath  <rharinath@novell.com>
17963
17964         * Makefile (install-local): Remove.  Functionality moved to
17965         executable.make.
17966
17967 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17968
17969         * Makefile: Install mcs.exe.config file together with mcs.exe.
17970         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
17971         correct runtime version.
17972         
17973 2004-07-25  Martin Baulig  <martin@ximian.com>
17974
17975         * class.cs
17976         (TypeContainer.RegisterOrder): Removed, this was unused.
17977         (TypeContainer, interface_order): Removed.
17978         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
17979         TypeContainer as argument since we can also be called with a
17980         `PartialContainer' for a partial class/struct/interface.
17981         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
17982         of checking whether we're an `Interface' - we could be a
17983         `PartialContainer'.
17984         (PartialContainer.Register): Override; call
17985         AddClass()/AddStruct()/AddInterface() on our parent.
17986
17987         * cs-parser.jay (interface_member_declaration): Add things to the
17988         `current_container', not the `current_class'.
17989
17990         * rootcontext.cs (RegisterOrder): The overloaded version which
17991         takes an `Interface' was unused, removed.
17992
17993         * typemanager.cs (TypeManager.LookupInterface): Return a
17994         `TypeContainer', not an `Interface'.
17995         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
17996         contain a `PartialContainer' for an interface, so check it's
17997         `Kind' to figure out what it is.
17998
17999 2004-07-25  Martin Baulig  <martin@ximian.com>
18000
18001         * class.cs (Class.DefaultTypeAttributes): New public constant.
18002         (Struct.DefaultTypeAttributes): Likewise.
18003         (Interface.DefaultTypeAttributes): Likewise.
18004         (PartialContainer.TypeAttr): Override this and add the
18005         DefaultTypeAttributes.
18006
18007 2004-07-25  Martin Baulig  <martin@ximian.com>
18008
18009         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
18010         we can just use the `Parent' field instead.
18011
18012 2004-07-25  Martin Baulig  <martin@ximian.com>
18013
18014         * class.cs (TypeContainer.Emit): Renamed to EmitType().
18015
18016 2004-07-25  Martin Baulig  <martin@ximian.com>
18017
18018         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
18019         our parts before defining any methods.
18020         (TypeContainer.VerifyImplements): Make this virtual.
18021         (ClassPart.VerifyImplements): Override and call VerifyImplements()
18022         on our PartialContainer.
18023
18024 2004-07-25  Martin Baulig  <martin@ximian.com>
18025
18026         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
18027
18028         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
18029         argument, we can just use the `Parent' field instead.
18030
18031         * class.cs
18032         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
18033         (MemberBase.DoDefine): Likewise.
18034
18035 2004-07-24  Martin Baulig  <martin@ximian.com>
18036
18037         * decl.cs (MemberCore.Parent): New public field.
18038         (DeclSpace.Parent): Moved to MemberCore.
18039
18040         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
18041         (MemberBase.ctor): Added TypeContainer argument, pass it to our
18042         parent's .ctor.
18043         (FieldBase, Field, Operator): Likewise.
18044         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
18045         (EventField, Event): Likewise.
18046
18047 2004-07-23  Martin Baulig  <martin@ximian.com>
18048
18049         * class.cs (PartialContainer): New public class.
18050         (ClassPart): New public class.
18051         (TypeContainer): Added support for partial classes.
18052         (TypeContainer.GetClassBases): Splitted some of the functionality
18053         out into GetNormalBases() and GetPartialBases().
18054
18055         * cs-tokenizer.cs (Token.PARTIAL): New token.
18056         (Tokenizer.consume_identifier): Added some hacks to recognize
18057         `partial', but only if it's immediately followed by `class',
18058         `struct' or `interface'.
18059
18060         * cs-parser.jay: Added support for partial clases.
18061
18062 2004-07-23  Martin Baulig  <martin@ximian.com>
18063
18064         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
18065         a `DeclSpace' and also made it readonly.
18066         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
18067         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
18068         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
18069
18070         * cs-parser.jay: Pass the `current_class', not the
18071         `current_container' (at the moment, this is still the same thing)
18072         to a new Method, Property, Event, Indexer or Constructor.
18073
18074 2004-07-23  Martin Baulig  <martin@ximian.com>
18075
18076         * cs-parser.jay (CSharpParser): Added a new `current_class' field
18077         and removed the `current_interface' one.
18078         (struct_declaration, class_declaration, interface_declaration):
18079         Set `current_class' to the newly created class/struct/interface;
18080         set their `Bases' and call Register() before parsing their body.
18081
18082 2004-07-23  Martin Baulig  <martin@ximian.com>
18083
18084         * class.cs (Kind): New public enum.
18085         (TypeContainer): Made this class abstract.
18086         (TypeContainer.Kind): New public readonly field.
18087         (TypeContainer.CheckDef): New public method; moved here from
18088         cs-parser.jay.
18089         (TypeContainer.Register): New public abstract method.
18090         (TypeContainer.GetPendingImplementations): New public abstract
18091         method.
18092         (TypeContainer.GetClassBases): Removed the `is_class' and
18093         `is_iface' parameters.
18094         (TypeContainer.DefineNestedTypes): Formerly known as
18095         DoDefineType().
18096         (ClassOrStruct): Made this class abstract.
18097
18098         * tree.cs (RootTypes): New public type. 
18099
18100 2004-07-20  Martin Baulig  <martin@ximian.com>
18101
18102         * tree.cs (Tree.RecordNamespace): Removed.
18103         (Tree.Namespaces): Removed.
18104
18105         * rootcontext.cs (RootContext.IsNamespace): Removed.
18106
18107         * cs-parser.jay (namespace_declaration): Just create a new
18108         NamespaceEntry here.
18109
18110 2004-07-20  Martin Baulig  <martin@ximian.com>
18111
18112         * statement.cs (ExceptionStatement): New abstract class.  This is
18113         now used as a base class for everyone who's using `finally'.
18114         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
18115         our local variables before using them.
18116
18117         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
18118         virtual method.  This is used by Yield.Resolve() to "steal" an
18119         outer block's `finally' clauses.
18120         (FlowBranchingException): The .ctor now takes an ExceptionStatement
18121         argument.
18122
18123         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
18124         version which takes an ExceptionStatement.  This version must be
18125         used to create exception branchings.
18126
18127         * iterator.cs
18128         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
18129         (Iterator.EmitMoveNext): Added exception support; protect the
18130         block with a `fault' clause, properly handle 'finally' clauses.
18131         (Iterator.EmitDispose): Run all the `finally' clauses here.
18132
18133 2004-07-20  Martin Baulig  <martin@ximian.com>
18134
18135         * iterator.cs: This is the first of a set of changes in the
18136         iterator code.  Match the spec more closely: if we're an
18137         IEnumerable, then GetEnumerator() must be called.  The first time
18138         GetEnumerator() is called, it returns the current instance; all
18139         subsequent invocations (if any) must create a copy.
18140
18141 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
18142
18143         * expression.cs: Resolve the constant expression before returning
18144         it. 
18145
18146 2004-07-19  Martin Baulig  <martin@ximian.com>
18147
18148         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
18149         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
18150         the return type of the new EmitContext.
18151
18152 2004-07-18  Martin Baulig  <martin@ximian.com>
18153
18154         * class.cs (Property.Define): Fix iterators.
18155
18156         * iterators.cs (Iterator.Define): Moved the
18157         `container.AddInterator (this)' call here from the .ctor; only do
18158         it if we resolved successfully.
18159
18160 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
18161
18162         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
18163         `true' for preprocessing directives that we parse.  The return
18164         value indicates whether we should return to regular tokenizing or
18165         not, not whether it was parsed successfully.
18166
18167         In the past if we were in: #if false ... #line #endif, we would
18168         resume parsing after `#line'.  See bug 61604.
18169
18170         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
18171         building: IsEnumType should return true only for enums, not for
18172         enums or System.Enum itself.  This fixes #61593.
18173
18174         Likely what happened is that corlib was wrong: mcs depended on
18175         this bug in some places.  The bug got fixed, we had to add the
18176         hack, which caused bug 61593.
18177
18178         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
18179         that was a workaround for the older conditions.
18180
18181 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
18182
18183         * assign.cs: IAssignMethod has a new interface, as documented
18184         inline. All assignment code now uses this new api.
18185
18186         * ecore.cs, expression.cs: All classes which implement
18187         IAssignMethod now use the new interface.
18188
18189         * expression.cs (Invocation): add a hack to EmitCall so that
18190         IndexerAccess can be the target of a compound assignment without
18191         evaluating its arguments twice.
18192
18193         * statement.cs: Handle changes in Invocation api.
18194
18195 2004-07-16  Martin Baulig  <martin@ximian.com>
18196
18197         * iterators.cs: Rewrote this.  We're now using one single Proxy
18198         class for both the IEnumerable and the IEnumerator interface and
18199         `Iterator' derives from Class so we can use the high-level API.
18200
18201         * class.cs (TypeContainer.AddIterator): New method.
18202         (TypeContainer.DoDefineType): New protected virtual method, which
18203         is called from DefineType().
18204         (TypeContainer.DoDefineMembers): Call DefineType() and
18205         DefineMembers() on all our iterators.
18206         (TypeContainer.Emit): Call Emit() on all our iterators.
18207         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18208
18209         * codegen.cs (EmitContext.CurrentIterator): New public field.
18210
18211 2004-07-15  Martin Baulig  <martin@ximian.com>
18212
18213         * typemanager.cs
18214         (TypeManager.not_supported_exception_type): New type.   
18215
18216 2004-07-14  Martin Baulig  <martin@ximian.com>
18217
18218         * iterators.cs: Use real error numbers.
18219
18220 2004-07-14  Martin Baulig  <martin@ximian.com>
18221
18222         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18223         requires this to be a System.Collection.IEnumerable and not a
18224         class implementing that interface.
18225         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18226
18227 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18228
18229         * class.cs: Fixed previous fix, it broke some error tests.
18230
18231 2004-07-12  Martin Baulig  <martin@ximian.com>
18232
18233         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18234         Fixes #61293.
18235
18236 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18237
18238         * assign.cs (LocalTemporary): Add new argument: is_address,If
18239         `is_address' is true, then the value that we store is the address
18240         to the real value, and not the value itself.
18241         
18242         * ecore.cs (PropertyExpr): use the new local temporary
18243         stuff to allow us to handle X.Y += z (where X is a struct)
18244
18245 2004-07-08  Martin Baulig  <martin@ximian.com>
18246
18247         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18248         not always return, just like we're doing in Using.Resolve().
18249
18250 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18251
18252         * cs-parser.jay (fixed_statement): flag this as Pinned.
18253
18254 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18255
18256         * typemanager.cs (TypeManager): Removed MakePinned method, this
18257         mechanism is replaced with the .NET 2.x compatible mechanism of
18258         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18259
18260         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18261         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18262         `IsFixed' property which has a different meaning.
18263
18264 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18265
18266         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18267         visible from inside a nested class, not just the names of the
18268         immediately enclosing class.
18269         Fix for bug #60730.
18270
18271 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18272
18273         * expression.cs (BetterConversion): Remove buggy special-case
18274         handling of "implicit constant expression conversions".  At this
18275         point, we already know that the conversion is possible -- we're
18276         only checking to see which is better.
18277
18278 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18279
18280         * cs-parser.jay: Added error CS0210 test.
18281
18282 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18283
18284         * cs-parser.jay: Added error CS0134 test.
18285
18286 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18287
18288         Fix bug #52507
18289         * cs-parser.jay: Added error CS0145 test.
18290
18291 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18292
18293         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18294
18295 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18296         
18297         * expression.cs (StackAlloc.Resolve): The argument may not
18298         be a constant; deal with this case.
18299         
18300 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18301
18302         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18303         GetIndexerAttributeValue.
18304         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18305
18306         * class.cs (Indexer.Define): Added error tests for CS0415,
18307         CS0609.
18308
18309 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18310
18311         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18312         property code.
18313
18314 2004-06-23  Martin Baulig  <martin@ximian.com>
18315
18316         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18317         neither return nor throw, reset the barrier as well.  Fixes #60457.
18318
18319 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18320
18321         * class.cs : EventAttributes is now set to None by default.
18322           This fixes bug #60459.
18323
18324 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18325
18326         Fix bug #60219
18327         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18328         Don't throw exception but return null (it's sufficient now).
18329
18330 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18331
18332         * typemanager.cs (GetArgumentTypes): Faster implementation.
18333
18334 2004-06-18  Martin Baulig  <martin@ximian.com>
18335
18336         * attribute.cs (Attribute.Resolve): Check whether we're an
18337         EmptyCast which a Constant child.  Fixes #60333.
18338
18339 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18340
18341         * statement.cs (EmitCollectionForeach): Account for the fact that
18342         not all valuetypes are in areas which we can take the address of.
18343         For these variables, we store to a temporary variable. Also, make
18344         sure that we dont emit a `callvirt' on a valuetype method.
18345
18346 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18347
18348         * expression.cs (StackAlloc.DoReSolve): Added test for
18349         negative parameter (CS0247).
18350
18351 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18352
18353         Fix bug #59792
18354         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18355
18356 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18357
18358         Fix bug #59781
18359         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18360         ulong.
18361
18362 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18363
18364         Fix bug #58254 & cs1555.cs, cs1556.cs
18365         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18366
18367 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18368
18369         * cs-parser.jay: Added error CS1669 test for indexers.
18370
18371 2004-06-11  Martin Baulig  <martin@ximian.com>
18372
18373         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18374         call this twice: for params and varargs methods.
18375
18376 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18377
18378         * class.cs:
18379         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18380
18381 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18382
18383         * attribute.cs (Attribute.GetValidTargets): Made public.
18384
18385         * class.cs: 
18386         (AbstractPropertyEventMethod): New class for better code sharing.
18387         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18388         CS1667 report.
18389         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18390
18391 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18392
18393         Fix bug #59477.
18394         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18395         that the call to Resolve is part of a MemberAccess.
18396         (Expression.Resolve): Use it for SimpleName resolution.
18397         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18398         Add 'intermediate' boolean argument.
18399         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18400         error message when the SimpleName can be resolved ambiguously
18401         between an expression and a type.
18402         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18403         public.
18404         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18405         call on the left-side.
18406
18407 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18408
18409         * class.cs:
18410         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18411
18412 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18413
18414         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18415
18416 2004-06-11  Martin Baulig  <martin@ximian.com>
18417
18418         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18419         varargs methods if applicable.
18420
18421 2004-06-11  Martin Baulig  <martin@ximian.com>
18422
18423         * expression.cs (Invocation.EmitCall): Don't use
18424         `method.CallingConvention == CallingConventions.VarArgs' since the
18425         method could also have `CallingConventions.HasThis'.
18426
18427 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18428
18429         * class.cs (Event.GetSignatureForError): Implemented.
18430         Fixed crash in error test cs3010.cs
18431
18432 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18433
18434         * cs-tokenizer.cs: Change the way we track __arglist to be
18435         consistent with the other keywords.
18436
18437 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18438
18439         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18440         tomorrow.
18441
18442 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18443
18444         * codegen.cs: Check that all referenced assemblies have a strongname
18445         before strongnaming the compiled assembly. If not report error CS1577.
18446         Fix bug #56563. Patch by Jackson Harper.
18447         * typemanager.cs: Added a method to return all referenced assemblies.
18448         Fix bug #56563. Patch by Jackson Harper.
18449
18450 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18451
18452         * class.cs:
18453         (Method.ApplyAttributeBuilder): Moved and added conditional
18454         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18455
18456         * delegate.cs:
18457         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18458
18459 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18460
18461         Fixed #59640
18462         * class.cs: (EventField.attribute_targets): Changed default target.
18463
18464 2004-06-08  Martin Baulig  <martin@ximian.com>
18465
18466         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18467
18468 2004-06-08  Martin Baulig  <martin@ximian.com>
18469
18470         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18471
18472 2004-06-07  Martin Baulig  <martin@ximian.com>
18473
18474         Added support for varargs methods.
18475
18476         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18477         keyword.
18478
18479         * cs-parser.jay: Added support for `__arglist'.
18480
18481         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18482
18483         * expression.cs (Argument.AType): Added `ArgList'.
18484         (Invocation): Added support for varargs methods.
18485         (ArglistAccess): New public class.
18486         (Arglist): New public class.
18487
18488         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18489
18490         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18491         a method's top-level block if the method has varargs.
18492
18493         * support.cs (ReflectionParameters, InternalParameters): Added
18494         support for varargs methods.    
18495
18496 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18497
18498         * class.cs: Provide location in indexer error report.
18499
18500         * driver.cs: Use standard names.
18501
18502         * namespace.cs: Catch the use of using after a namespace has been
18503         declared also on using aliases.
18504
18505 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18506
18507         Bug #50820.
18508         * typemanager.cs (closure_private_ok, closure_invocation_type)
18509         (closure_qualifier_type, closure_invocation_assembly)
18510         (FilterWithClosure): Move to ...
18511         (Closure): New internal nested class.
18512         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18513         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18514         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18515         (MemberLookup, MemberLookupFailed): Use it.
18516         * expression.cs (New.DoResolve): Treat the lookup for the
18517         constructor as being qualified by the 'new'ed type.
18518         (Indexers.GetIndexersForTypeOrInterface): Update.
18519
18520 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18521
18522         * attribute.cs
18523         (GetConditionalAttributeValue): New method. Returns
18524         condition of ConditionalAttribute.
18525         (SearchMulti): New method.  Returns all attributes of type 't'.
18526         Use it when attribute is AllowMultiple = true.
18527         (IsConditionalMethodExcluded): New method.
18528
18529         * class.cs
18530         (Method.IsExcluded): Implemented. Returns true if method has conditional
18531         attribute and the conditions is not defined (method is excluded).
18532         (IMethodData): Extended interface for ConditionalAttribute support.
18533         (PropertyMethod.IsExcluded): Implemented.
18534
18535         * decl.cs
18536         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18537
18538         * expression.cs
18539         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18540         on the method.
18541
18542 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18543
18544         * expression.cs (ArrayCreationExpression): Make this just an
18545         `expression'. It can't be a statement, so the code here was
18546         dead.
18547
18548 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18549
18550         Fixed #59072
18551         * typemanager.cs (GetFullNameSignature): New method for
18552         MethodBase types.
18553
18554 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18555
18556         Fixed #56452
18557         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18558         Use this method when MethodBuilder is null.
18559         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18560         Added test for error CS0626 (MONO reports error for this situation).
18561         (IMethodData.GetSignatureForError): Extended interface.
18562
18563 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18564
18565         * attribute.cs
18566         (AttributeTester.GetObsoleteAttribute): Returns instance of
18567         ObsoleteAttribute when type is obsolete.
18568
18569         * class.cs
18570         (TypeContainer.VerifyObsoleteAttribute): Override.
18571         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18572         (MethodCode.VerifyObsoleteAttribute): Override.
18573         (MemberBase.VerifyObsoleteAttribute): Override.
18574
18575         * decl.cs
18576         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18577         and report proper error.
18578
18579         *delegate.cs
18580         Delegate.VerifyObsoleteAttribute): Override.
18581
18582         * ecore.cs
18583         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18584         and report proper error.
18585         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18586
18587         * enum.cs
18588         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18589         and enum member.
18590
18591         * expression.cs
18592         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18593         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18594         Added test for ObsoleteAttribute.
18595
18596         * statement.cs
18597         (Catch): Derived from Statement.
18598
18599 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18600  
18601         Fixed bug #59071 & cs0160.cs
18602  
18603         * statement.cs (Try.Resolve): Check here whether order of catch
18604         clauses matches their dependencies.
18605
18606 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18607
18608         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18609         caused a regression: #59343.  Referencing nested classes from an
18610         assembly stopped working.
18611
18612 2004-05-31  Martin Baulig  <martin@ximian.com>
18613
18614         MCS is now frozen for beta 2.
18615
18616 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18617
18618         * convert.cs: add a trivial cache for overload operator resolution.
18619
18620 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18621
18622         * decl.cs: If possible, use lookuptypedirect here. We can only do
18623         this if there is no `.' after the namespace. Avoids using
18624         LookupType, which does lots of slow processing.
18625         (FindNestedType) New method, does what it says :-).
18626         * namespace.cs: use LookupTypeDirect.
18627         * rootcontext.cs: use membercache, if possible.
18628         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18629
18630 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18631
18632         * expression.cs:
18633         According to the spec, 
18634
18635         In a member access of the form E.I, if E is a single identifier,
18636         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18637         field, property, localvariable, or parameter with the same type as
18638         the meaning of E as a type-name (§3.8), then both possible
18639         meanings of E are permitted.
18640
18641         We did not check that E as a simple-name had the same type as E as
18642         a type name.
18643
18644         This trivial check gives us 5-7% on bootstrap time.
18645
18646 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18647
18648         * expression.cs (Invocation.OverloadResolve): Avoid the
18649         use of hashtables and boxing here by allocating on demand.
18650
18651 2004-05-30  Martin Baulig  <martin@ximian.com>
18652
18653         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18654         we're doing a silent lookup.  Don't try to lookup nested types in
18655         TypeManager.object_type (thanks to Ben Maurer).
18656
18657 2004-05-30  Martin Baulig  <martin@ximian.com>
18658
18659         Committing a patch from Ben Maurer.
18660
18661         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18662
18663 2004-05-29  Martin Baulig  <martin@ximian.com>
18664
18665         * class.cs (IMethodData.ShouldIgnore): New method.
18666
18667         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18668         `Location' argument, we don't need it anywhere.  Use
18669         `IMethodData.ShouldIgnore ()' instead of
18670         `MethodData.GetMethodFlags ()'.
18671         (TypeManager.AddMethod): Removed.
18672         (TypeManager.AddMethod2): Renamed to AddMethod.
18673
18674 2004-05-29  Martin Baulig  <martin@ximian.com>
18675
18676         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18677
18678         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18679         converting from a class type S to an interface type and we already
18680         have an object on the stack, don't box it again.  Fixes #52578.
18681
18682 2004-05-29  Martin Baulig  <martin@ximian.com>
18683
18684         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18685         Added support for `params' parameters.  Fixes #59267.
18686
18687 2004-05-29  Martin Baulig  <martin@ximian.com>
18688
18689         * literal.cs (NullPointer): Provide a private .ctor which sets
18690         `type' to TypeManager.object_type.  Fixes #59048.
18691
18692 2004-05-29  Martin Baulig  <martin@ximian.com>
18693
18694         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18695         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18696
18697         * ecore.cs (EventExpr.instance_expr): Make the field private.
18698
18699 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18700
18701         Fixed bug #50080 & cs0214-2.cs
18702         * expression.cs (Cast.DoResolve): Check unsafe context here.
18703         
18704         * statement.cs (Resolve.DoResolve): Likewise.
18705
18706 2004-05-26  Martin Baulig  <martin@ximian.com>
18707
18708         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18709
18710         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18711         (RootContext.LookupType): Pass down the `silent' flag.
18712
18713 2004-05-25  Martin Baulig  <martin@ximian.com>
18714
18715         * expression.cs
18716         (MethodGroupExpr.IdenticalTypeName): New public property.
18717         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18718         expression actually refers to a type.
18719
18720 2004-05-25  Martin Baulig  <martin@ximian.com>
18721
18722         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18723         for #56176 and made it actually work.
18724
18725 2004-05-25  Martin Baulig  <martin@ximian.com>
18726
18727         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18728         (FieldExpr, PropertyExpr): Override and implement
18729         CacheTemporaries.  Fixes #52279.
18730
18731 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18732
18733         * location.cs: In the new compiler listing a file twice is a
18734         warning, not an error.
18735
18736 2004-05-24  Martin Baulig  <martin@ximian.com>
18737
18738         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18739         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18740
18741 2004-05-24  Martin Baulig  <martin@ximian.com>
18742
18743         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18744         walking the `using' list.  Fixes #53921.
18745
18746 2004-05-24  Martin Baulig  <martin@ximian.com>
18747
18748         * const.cs (Const.LookupConstantValue): Added support for
18749         EmptyCast's; fixes #55251.
18750
18751 2004-05-24  Martin Baulig  <martin@ximian.com>
18752
18753         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18754         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18755         which does the CS0135 check.  The reason is that we first need to
18756         check whether the variable actually exists.
18757
18758 2004-05-24  Martin Baulig  <martin@ximian.com>
18759
18760         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18761         than RootContext.LookupType() to find the explicit interface
18762         type.  Fixes #58584.
18763
18764 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18765
18766         * Makefile: Simplify.  Use executable.make.
18767         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18768
18769 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18770
18771         * decl.cs:
18772         * enum.cs:
18773         Use the invariant culture when doing String.Compare for CLS case
18774         sensitivity.
18775         
18776 2004-05-23  Martin Baulig  <martin@ximian.com>
18777
18778         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18779         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18780
18781         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18782         
18783 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18784
18785         * class.cs (MemberBase.Define): Reuse MemberType member for 
18786         resolved type. Other methods can use it too.
18787
18788 2004-05-23  Martin Baulig  <martin@ximian.com>
18789
18790         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18791         the variable also exists in the current block (otherwise, we need
18792         to report a CS0103).  Fixes #58670.
18793
18794 2004-05-23  Martin Baulig  <martin@ximian.com>
18795
18796         * flowanalysis.cs (Reachability.Reachable): Compute this
18797         on-the-fly rather than storing it as a field.
18798
18799 2004-05-23  Martin Baulig  <martin@ximian.com>
18800
18801         * flowanalysis.cs (Reachability.And): Manually compute the
18802         resulting `barrier' from the reachability.      
18803        
18804 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18805
18806         Fix bug #57835
18807         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
18808         instance of ObsoleteAttribute when symbol is obsolete.
18809
18810         * class.cs
18811         (IMethodData): Extended interface for ObsoleteAttribute support.
18812
18813 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18814
18815         * attribute.cs: Fix bug #55970
18816
18817 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18818
18819         Fix bug #52705
18820         * attribute.cs
18821         (GetObsoleteAttribute): New method. Creates the instance of
18822         ObsoleteAttribute.
18823         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
18824         ObsoleteAttribute when member is obsolete.
18825         (AttributeTester.Report_ObsoleteMessage): Common method for
18826         Obsolete error/warning reporting.
18827
18828         * class.cs
18829         (TypeContainer.base_classs_type): New member for storing parent type.
18830
18831         * decl.cs
18832         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
18833         for this MemberCore.
18834
18835 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18836
18837         * attribute.cs, const.cs: Fix bug #58590
18838
18839 2004-05-21  Martin Baulig  <martin@ximian.com>
18840
18841         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
18842         out parameters if the end of the method is unreachable.  Fixes
18843         #58098. 
18844
18845 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18846
18847         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
18848         Hari was right, why extra method.
18849
18850 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18851
18852         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
18853
18854 2004-05-20  Martin Baulig  <martin@ximian.com>
18855
18856         Merged this back from gmcs to keep the differences to a minumum.
18857
18858         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
18859         instead of a Declspace.
18860         (Attribute.ResolveType): Likewise.
18861         (Attributes.Search): Likewise.
18862         (Attributes.Contains): Likewise.
18863         (Attributes.GetClsCompliantAttribute): Likewise.
18864
18865         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
18866         argument.
18867         (MethodData.ApplyAttributes): Take an EmitContext instead of a
18868         DeclSpace.
18869
18870 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
18871
18872         Fix bug #58688 (MCS does not report error when the same attribute
18873         is assigned twice)
18874
18875         * attribute.cs (Attribute.Emit): Distinction between null and default.
18876
18877 2004-05-19  Raja R Harinath  <rharinath@novell.com>
18878
18879         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
18880         of a top-level attribute without an attribute target.
18881         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
18882         Make non-static.
18883         (Attribute.Conditional_GetConditionName), 
18884         (Attribute.Obsolete_GetObsoleteMessage): Update.
18885         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
18886         part of ScanForIndexerName.
18887         (Attribute.CanIgnoreInvalidAttribute): New function.
18888         (Attribute.ScanForIndexerName): Move to ...
18889         (Attributes.ScanForIndexerName): ... here.
18890         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
18891         (Attributes.Search): New internal variant that can choose not to
18892         complain if types aren't resolved.  The original signature now
18893         complains.
18894         (Attributes.GetClsCompliantAttribute): Use internal variant, with
18895         complaints suppressed.
18896         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
18897         only if it not useful.
18898         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
18899         top-level for attributes that are shared between the assembly
18900         and a top-level class.
18901         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
18902         * class.cs: Update to reflect changes.
18903         (DefineIndexers): Fuse loops.
18904         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
18905         a couple more variants of attribute names.
18906
18907 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
18908
18909         Fix bug #52585 (Implemented explicit attribute declaration)
18910
18911         * attribute.cs:
18912         (Attributable.ValidAttributeTargets): New abstract method. It gets
18913         list of valid attribute targets for explicit target declaration.
18914         (Attribute.Target): It holds target itself.
18915         (AttributeSection): Removed.
18916         (Attribute.CheckTargets): New method. It checks whether attribute
18917         target is valid for the current element.
18918
18919         * class.cs:
18920         (EventProperty): New class. For events that are declared like
18921         property (with add and remove accessors).
18922         (EventField): New class. For events that are declared like field.
18923         class.cs
18924
18925         * cs-parser.jay: Implemented explicit attribute target declaration.
18926
18927         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
18928         Override ValidAttributeTargets.
18929
18930         * parameter.cs:
18931         (ReturnParameter): Class for applying custom attributes on 
18932         the return type.
18933         (ParameterAtribute): New class. Class for applying custom
18934         attributes on the parameter type.
18935
18936 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
18937
18938         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
18939         definitions. 
18940
18941         (Method): Allow UNSAFE here.
18942
18943         * modifiers.cs: Support unsafe reporting.
18944
18945 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
18946
18947         * decl.cs: Fix bug #58478.
18948
18949 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18950
18951         * statement.cs: When checking for unreachable code on an EmptyStatement,
18952         set the location. Fixes bug #58488.
18953
18954 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
18955
18956         * driver.cs: Add -pkg handling.
18957
18958         From Gonzalo: UseShelLExecute=false
18959
18960 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
18961
18962         * attribute.cs:
18963         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
18964         for attribute.
18965         (Attribute.IsClsCompliaceRequired): Moved to base for better
18966         accesibility.
18967         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
18968         when attribute is AttributeUsageAttribute.
18969         (Attribute.GetValidTargets): Simplified.
18970         (Attribute.GetAttributeUsage): New method returns AttributeUsage
18971         attribute for this type.
18972         (Attribute.ApplyAttributes): Method renamed to Emit and make
18973         non-static.
18974         (GlobalAttributeSection): New class for special handling of global
18975         attributes (assembly, module).
18976         (AttributeSection.Emit): New method.
18977
18978         * class.cs: Implemented Attributable abstract methods.
18979         (MethodCore.LabelParameters): Moved to Parameter class.
18980         (Accessor): Is back simple class.
18981         (PropertyMethod): Implemented Attributable abstract class.
18982         (DelegateMethod): Implemented Attributable abstract class.
18983         (Event): New constructor for disctintion between normal Event
18984         and Event with accessors.
18985
18986         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
18987
18988         * codegen.cs, const.cs, decl.cs, delegate.cs:
18989         (CommonAssemblyModulClass): Implemented Attributable abstract class
18990         and simplified.
18991
18992         * enum.cs: Implement IAttributeSupport interface.
18993         (EnumMember): New class for emum members. Implemented Attributable
18994         abstract class
18995
18996         * parameter.cs:
18997         (ParameterBase): Is abstract.
18998         (ReturnParameter): New class for easier [return:] attribute handling.
18999
19000         * typemanager.cs: Removed builder_to_attr.
19001
19002 2004-05-11  Raja R Harinath  <rharinath@novell.com>
19003
19004         Fix bug #57151.
19005         * attribute.cs (Attribute.GetPositionalValue): New function.
19006         * class.cs (TypeContainer.VerifyMembers): New function.
19007         (TypeContainer.Emit): Use it.
19008         (ClassOrStruct): New base class for Class and Struct.
19009         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
19010         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
19011         class.
19012         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
19013         then each non-static field should have a FieldOffset attribute.
19014         Otherwise, none of the fields should have a FieldOffset attribute.
19015         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
19016         and FieldOffset attributes.
19017         * typemanager.cs (TypeManager.struct_layout_attribute_type)
19018         (TypeManager.field_offset_attribute_type): New core types.
19019         (TypeManager.InitCoreTypes): Initialize them.
19020
19021 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
19022
19023         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
19024         Return correct type.
19025         From bug #58270.
19026
19027 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
19028
19029         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
19030         be implicitly converted to ulong.
19031         
19032         * expression.cs: The logic for allowing operator &, | and ^ worked
19033         was wrong, it worked before because we did not report an error in
19034         an else branch.  Fixes 57895.
19035
19036         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
19037         allow volatile fields to be reference types.
19038
19039 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
19040
19041         * driver.cs: Add support for /debug-
19042
19043 2004-05-07  Raja R Harinath  <rharinath@novell.com>
19044
19045         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
19046         Add a 'complain' parameter to silence errors.
19047         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
19048         silently overlooked type-resolutions.
19049         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
19050         to reflect changes.
19051         (Attributes.Search): New function.
19052         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
19053         (Attributes.GetAttributeFullName): Remove hack.
19054         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
19055         Update to reflect changes.
19056         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
19057         Use Attributes.Search instead of nested loops.
19058
19059 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
19060
19061         * decl.cs:
19062         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
19063         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
19064         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
19065
19066         * report.cs: (Report.Warning): Renamed to Warning_T because of
19067         parameter collision.
19068
19069 2004-05-05  Raja R Harinath  <rharinath@novell.com>
19070
19071         * expression.cs (MemberAccess.ResolveMemberAccess):
19072         Exit with non-zero status after Report.Error.
19073         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
19074         Likewise.
19075         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
19076
19077 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19078
19079         * support.cs: Don't hang when the file is empty.
19080
19081 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19082
19083         * support.cs: In SeekableStreamReader, compute the preamble size of the
19084           underlying stream. Position changes should take into account that initial
19085           count of bytes.
19086
19087 2004-05-03  Todd Berman  <tberman@sevenl.net>
19088
19089         * driver.cs: remove unused GetSysVersion function.
19090
19091 2004-05-03  Todd Berman  <tberman@sevenl.net>
19092
19093         * driver.cs: Remove the hack from saturday, as well as the hack
19094         from jackson (LoadAssemblyFromGac), also adds the CWD to the
19095         link_paths to get that bit proper.
19096
19097 2004-05-01  Todd Berman  <tberman@sevenl.net>
19098
19099         * driver.cs: Try a LoadFrom before a Load, this checks the current
19100         path. This is currently a bug in mono that is be fixed, however, this
19101         provides a workaround for now. This will be removed when the bug
19102         is fixed.
19103
19104 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
19105
19106         * CryptoConvert.cs: Updated to latest version. Fix issue with 
19107         incomplete key pairs (#57941).
19108
19109 2004-05-01  Todd Berman  <tberman@sevenl.net>
19110
19111         * driver.cs: Remove '.' from path_chars, now System.* loads properly
19112         from the GAC
19113
19114 2004-04-30  Jackson Harper  <jackson@ximian.com>
19115
19116         * codegen.cs: Open keys readonly.
19117         
19118 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19119
19120         * typemanager.cs: don't report cyclic struct layout when a struct
19121         contains 2 or more fields of the same type. Failed for Pango.AttrShape
19122         which has 2 Pango.Rectangle fields.
19123
19124 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19125
19126         * expression.cs: Handle IntPtr comparisons with IL code
19127         rather than a method call.
19128
19129 2004-04-29  Martin Baulig  <martin@ximian.com>
19130
19131         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
19132         the list of PropertyInfo's in class hierarchy and find the
19133         accessor.  Fixes #56013.
19134
19135 2004-04-29  Martin Baulig  <martin@ximian.com>
19136
19137         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
19138
19139 2004-04-29  Martin Baulig  <martin@ximian.com>
19140
19141         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19142
19143         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
19144
19145 2004-04-29  Martin Baulig  <martin@ximian.com>
19146
19147         * class.cs (ConstructorInitializer.Resolve): Check whether the
19148         parent .ctor is accessible.  Fixes #52146.
19149
19150 2004-04-29  Martin Baulig  <martin@ximian.com>
19151
19152         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19153
19154         * statement.cs (Using.EmitLocalVariableDecls): Use
19155         TypeManager.idisposable_type, not typeof (IDisposable).
19156         (Foreach.EmitCollectionForeach): Added support for valuetypes.
19157
19158 2004-04-29  Martin Baulig  <martin@ximian.com>
19159
19160         * class.cs (Event.Define): Don't emit the field and don't set
19161         RTSpecialName and SpecialName for events on interfaces.  Fixes
19162         #57703. 
19163
19164 2004-04-29  Raja R Harinath  <rharinath@novell.com>
19165
19166         Refactor Attribute.ApplyAttributes.
19167         * attribute.cs (Attributable): New base class for objects that can
19168         have Attributes applied on them.
19169         (Attribute): Make AttributeUsage fields public.
19170         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
19171         (Attribute.IsInternalCall): New property.
19172         (Attribute.UsageAttr): Convert to a public read-only property.
19173         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
19174         (Attribute.ResolveType, Attribute.Resolve)
19175         (Attribute.ScanForIndexerName): Update to reflect changes.
19176         (Attribute.CheckAttributeTarget): Re-format.
19177         (Attribute.ApplyAttributes): Refactor, to various
19178         Attributable.ApplyAttributeBuilder methods.
19179         * decl.cs (MemberCore): Make Attributable.
19180         * class.cs (Accessor): Make Attributable.
19181         (MethodData.ApplyAttributes): Use proper attribute types, not
19182         attribute names.
19183         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
19184         (TypeContainer.ApplyAttributeBuilder)
19185         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
19186         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
19187         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
19188         (Operator.ApplyAttributeBuilder): New factored-out methods.
19189         * const.cs (Const.ApplyAttributeBuilder): Likewise.
19190         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
19191         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
19192         * parameter.cs (ParameterBase): New Attributable base class
19193         that can also represent Return types.
19194         (Parameter): Update to the changes.
19195
19196 2004-04-29  Jackson Harper  <jackson@ximian.com>
19197
19198         * driver.cs: Prefer the corlib system version when looking for
19199         assemblies in the GAC. This is still a hack, but its a better hack
19200         now.
19201         
19202 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19203
19204         * decl.cs, enum.cs: Improved error 3005 reporting.
19205   
19206         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19207         (related_symbols): New private member for list of symbols
19208         related to reported error/warning.
19209         
19210         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19211
19212 2004-04-29  Martin Baulig  <martin@ximian.com>
19213
19214         * ecore.cs (Expression.Constantify): If we're an enum and
19215         TypeManager.TypeToCoreType() doesn't give us another type, use
19216         t.UnderlyingSystemType.  Fixes #56178.  
19217
19218 2004-04-29  Martin Baulig  <martin@ximian.com>
19219
19220         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19221         interfaces and for each interface, only add members directly
19222         declared in that interface.  Fixes #53255.
19223
19224 2004-04-28  Martin Baulig  <martin@ximian.com>
19225
19226         * expression.cs (ConditionalLogicalOperator): Use a temporary
19227         variable for `left' to avoid that we evaluate it more than once;
19228         bug #52588.
19229
19230 2004-04-28  Martin Baulig  <martin@ximian.com>
19231
19232         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19233         `void[]' (CS1547).
19234
19235 2004-04-28  Martin Baulig  <martin@ximian.com>
19236
19237         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19238         void (CS1547).
19239
19240         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19241         whether the type is not void (CS1547).
19242
19243 2004-04-28  Martin Baulig  <martin@ximian.com>
19244
19245         * expression.cs (Unary.DoResolveLValue): Override this and report
19246         CS0131 for anything but Operator.Indirection.
19247
19248 2004-04-28  Martin Baulig  <martin@ximian.com>
19249
19250         Committing a patch from Ben Maurer; see bug #50820.
19251
19252         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19253         check for classes.
19254
19255         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19256         classes.        
19257
19258 2004-04-28  Martin Baulig  <martin@ximian.com>
19259
19260         Committing a patch from Ben Maurer; see bug #50820.
19261
19262         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19263         check for classes.
19264
19265         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19266         classes.        
19267
19268 2004-04-28  Martin Baulig  <martin@ximian.com>
19269
19270         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19271         (Block.AddLabel): Call DoLookupLabel() to only search in the
19272         current block.
19273
19274 2004-04-28  Martin Baulig  <martin@ximian.com>
19275
19276         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19277         comparing StringConstants and NullLiterals in Equality and Inequality.
19278
19279 2004-04-28  Jackson Harper  <jackson@ximian.com>
19280
19281         * driver.cs: Attempt to load referenced assemblies from the
19282         GAC. This is the quick and dirty version of this method that
19283         doesnt take into account versions and just takes the first
19284         canidate found. Will be good enough for now as we will not have more
19285         then one version installed into the GAC until I update this method.
19286
19287 2004-04-28  Martin Baulig  <martin@ximian.com>
19288
19289         * typemanager.cs (TypeManager.CheckStructCycles): New public
19290         static method to check for cycles in the struct layout.
19291
19292         * rootcontext.cs (RootContext.PopulateTypes): Call
19293         TypeManager.CheckStructCycles() for each TypeContainer.
19294         [Note: We only need to visit each type once.]
19295
19296 2004-04-28  Martin Baulig  <martin@ximian.com>
19297
19298         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19299
19300         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19301         success and added `out object value'.  Use a `bool resolved' field
19302         to check whether we've already been called rather than
19303         `ConstantValue != null' since this breaks for NullLiterals.
19304
19305 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19306
19307         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19308         setting of this flag, since the 'set' method may be non-public.
19309
19310 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19311
19312         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19313         check on current_vector.Block.
19314
19315 2004-04-27  Martin Baulig  <martin@ximian.com>
19316
19317         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19318         a field initializer.  Fixes #56459.
19319
19320 2004-04-27  Martin Baulig  <martin@ximian.com>
19321
19322         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19323         we're not attempting to use an indexer.  Fixes #52154.
19324
19325 2004-04-27  Martin Baulig  <martin@ximian.com>
19326
19327         * statement.cs (Return): Don't create a return label if we don't
19328         need it; reverts my change from January 20th.  Thanks to Ben
19329         Maurer for this.
19330
19331 2004-04-27  Martin Baulig  <martin@ximian.com>
19332
19333         According to the spec, `goto' can only leave a nested scope, but
19334         never enter it.
19335
19336         * statement.cs (Block.LookupLabel): Only lookup in the current
19337         block, don't recurse into parent or child blocks.
19338         (Block.AddLabel): Check in parent and child blocks, report
19339         CS0140/CS0158 if we find a duplicate.
19340         (Block): Removed this indexer for label lookups.
19341         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19342         this already does the error reporting for us.
19343
19344         * flowanalysis.cs
19345         (FlowBranching.UsageVector.Block): New public variable; may be null.
19346         (FlowBranching.CreateSibling): Added `Block' argument.
19347         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19348         label for the target of a `goto' and check whether we're not
19349         leaving a `finally'.
19350
19351 2004-04-27  Martin Baulig  <martin@ximian.com>
19352
19353         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19354         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19355         just for returns).
19356
19357 2004-04-27  Martin Baulig  <martin@ximian.com>
19358
19359         * statement.cs (Block.AddLabel): Also check for implicit blocks
19360         and added a CS0158 check.
19361
19362 2004-04-27  Martin Baulig  <martin@ximian.com>
19363
19364         * flowanalysis.cs (FlowBranchingLoop): New class.
19365         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19366         UsageVector's instead of an ArrayList.
19367         (FlowBranching.Label): Likewise.
19368         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19369         (FlowBranching.AddBreakVector): New method.
19370
19371 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19372
19373         * attribute.cs: Small regression fix: only convert the type if we
19374         the type is different, fixes System.Drawing build.
19375
19376 2004-04-27  Martin Baulig  <martin@ximian.com>
19377
19378         * attribute.cs (Attribute.Resolve): If we have a constant value
19379         for a named field or property, implicity convert it to the correct
19380         type.
19381
19382 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19383
19384         * statement.cs (Block.Block): Implicit blocks share
19385         'child_variable_names' fields with parent blocks.
19386         (Block.AddChildVariableNames): Remove.
19387         (Block.AddVariable): Mark variable as "used by a child block" in
19388         every surrounding block.
19389         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19390         been used in a child block, complain about violation of "Invariant
19391         meaning in blocks" rule.
19392         * cs-parser.jay (declare_local_variables): Don't use
19393         AddChildVariableNames.
19394         (foreach_statement): Don't create an implicit block: 'foreach'
19395         introduces a scope.
19396
19397 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19398
19399         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19400         converting from 0L to ulong.  Fixes 57522.
19401
19402 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19403
19404         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19405         derived class hides via 'new' keyword field from base class (test-242.cs).
19406         TODO: Handle this in the more general way.
19407         
19408         * class.cs (CheckBase): Ditto.
19409
19410 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19411
19412         * decl.cs (caching_flags): New member for storing cached values
19413         as bit flags.
19414         (MemberCore.Flags): New enum where bit flags for caching_flags
19415         are defined.
19416         (MemberCore.cls_compliance): Moved to caching_flags.
19417         (DeclSpace.Created): Moved to caching_flags.
19418
19419         * class.cs: Use caching_flags instead of DeclSpace.Created
19420         
19421 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19422
19423         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19424         if we are only a derived class, not a nested class.
19425
19426         * typemanager.cs: Same as above, but do this at the MemberLookup
19427         level (used by field and methods, properties are handled in
19428         PropertyExpr).   Allow for the qualified access if we are a nested
19429         method. 
19430
19431 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19432
19433         * class.cs: Refactoring.
19434         (IMethodData): New inteface; Holds links to parent members
19435         to avoid member duplication (reduced memory allocation).
19436         (Method): Implemented IMethodData interface.
19437         (PropertyBase): New inner classes for get/set methods.
19438         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19439         (Event): New inner classes for add/remove methods.
19440         (Event.DelegateMethod): Implemented IMethodData interface.
19441
19442         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19443         EmitContext (related to class.cs refactoring).
19444
19445 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19446
19447         * delegate.cs (Delegate.VerifyApplicability): If the number of
19448         arguments are the same as the number of parameters, first try to
19449         verify applicability ignoring  any 'params' modifier on the last
19450         parameter.
19451         Fixes #56442.
19452
19453 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19454
19455         * class.cs (TypeContainer.AddIndexer): Use
19456         'ExplicitInterfaceName' to determine if interface name was
19457         explicitly specified.  'InterfaceType' is not initialized at this time.
19458         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19459         Indexers array is already in the required order.  Initialize
19460         'IndexerName' only if there are normal indexers.
19461         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19462         (TypeContainer.Emit): Emit DefaultMember attribute only if
19463         IndexerName is initialized.
19464         Fixes #56300.
19465
19466 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19467
19468         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19469         Fixes #57007
19470
19471 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19472
19473         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19474         attributes.
19475         Fix for #56456.
19476
19477         * attribute.cs (Attribute.Resolve): Check for duplicate named
19478         attributes.
19479         Fix for #56463.
19480
19481 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19482
19483         * iterators.cs (MarkYield): track whether we are in an exception,
19484         and generate code accordingly.  Use a temporary value to store the
19485         result for our state.
19486
19487         I had ignored a bit the interaction of try/catch with iterators
19488         since their behavior was not entirely obvious, but now it is
19489         possible to verify that our behavior is the same as MS .NET 2.0
19490
19491         Fixes 54814
19492
19493 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19494
19495         * iterators.cs: Avoid creating temporaries if there is no work to
19496         do. 
19497
19498         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19499         Enumerations, use TypeManager.EnumToUnderlying and call
19500         recursively. 
19501
19502         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19503         bug #57013
19504
19505         (This.Emit): Use EmitContext.EmitThis to emit our
19506         instance variable.
19507
19508         (This.EmitAssign): Ditto.
19509
19510         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19511         codepaths, we will move all the functionality into
19512         Mono.CSharp.This 
19513
19514         (FieldExpr.EmitAssign): Ditto.
19515
19516         This fixes several hidden bugs that I uncovered while doing a code
19517         review of this today.
19518
19519         * codegen.cs (EmitThis): reworked so the semantics are more clear
19520         and also support value types "this" instances.
19521
19522         * iterators.cs: Changed so that for iterators in value types, we
19523         do not pass the value type as a parameter.  
19524
19525         Initialization of the enumerator helpers is now done in the caller
19526         instead of passing the parameters to the constructors and having
19527         the constructor set the fields.
19528
19529         The fields have now `assembly' visibility instead of private.
19530
19531 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19532
19533         * expression.cs (Argument.Resolve): Check if fields passed as ref
19534         or out are contained in a MarshalByRefObject.
19535
19536         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19537         another compiler type.
19538
19539 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19540
19541         * class.cs (Indexer.Define): use the new name checking method.
19542         Also, return false on an error.
19543         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19544         (is_identifier_[start/part]_character): make static.
19545
19546 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19547
19548         * expression.cs (Binary.ResolveOperator): Do no append strings
19549         twice: since we can be invoked more than once (array evaluation)
19550         on the same concatenation, take care of this here.  Based on a fix
19551         from Ben (bug #56454)
19552
19553 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19554
19555         * codegen.cs: Fix another case where CS1548 must be reported (when 
19556         delay-sign isn't specified and no private is available #56564). Fix
19557         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19558         error when MCS is used on the MS runtime and we need to delay-sign 
19559         (which seems unsupported by AssemblyBuilder - see #56621).
19560
19561 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19562
19563         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19564         (TypeManager.ComputeNamespaces): Faster implementation for
19565         Microsoft runtime.
19566
19567         * compiler.csproj: Updated AssemblyName to mcs.
19568
19569 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19570
19571         * rootcontext.cs: Add new types to the boot resolution.
19572
19573         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19574         MulticastDelegate is not allowed.
19575
19576         * typemanager.cs: Add new types to lookup: System.TypedReference
19577         and ArgIterator.
19578
19579         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19580         check for TypedReference or ArgIterator, they are not allowed. 
19581
19582         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19583         makes us properly catch 1510 in some conditions (see bug 56016 for
19584         details). 
19585
19586 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19587
19588         * CryptoConvert.cs: update from corlib version
19589         with endian fixes.
19590
19591 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19592
19593         * class.cs (Indexer.Define): Check indexername declaration
19594
19595 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19596
19597         * attribute.cs (IsClsCompliant): Fixed problem with handling
19598         all three states (compliant, not-compliant, undetected).
19599
19600 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19601
19602         * attribute.cs (Attribute): Location is now public.
19603         (Resolve): Store resolved arguments (pos_values) in attribute class.
19604         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19605         (GetClsCompliantAttributeValue): New method that gets
19606         CLSCompliantAttribute value.
19607         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19608         if exists else null.
19609         (AttributeTester): New class for CLS-Compliant verification routines.
19610
19611         * class.cs (Emit): Add CLS-Compliant verification.
19612         (Method.GetSignatureForError): Implemented.
19613         (Constructor.GetSignatureForError): Implemented
19614         (Constructor.HasCompliantArgs): Returns if constructor has
19615         CLS-Compliant arguments.
19616         (Constructor.Emit): Override.
19617         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19618         is needed to test only parameters.
19619         (FieldBase.GetSignatureForError): Implemented.
19620         (TypeContainer): New member for storing base interfaces.
19621         (TypeContainer.FindMembers): Search in base interfaces too.
19622
19623         * codegen.cs (GetClsComplianceAttribute): New method that gets
19624         assembly or module CLSCompliantAttribute value.
19625         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19626         for assembly.
19627         (ModuleClass.Emit): Add error 3012 test.
19628
19629         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19630
19631         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19632         state for all decl types.
19633         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19634         if CLS-Compliant tests are required.
19635         (IsClsCompliaceRequired): New method. Analyze whether code
19636         must be CLS-Compliant.
19637         (IsExposedFromAssembly): New method. Returns true when MemberCore
19638         is exposed from assembly.
19639         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19640         value or gets cached value.
19641         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19642         is explicitly marked with CLSCompliantAttribute.
19643         (IsIdentifierClsCompliant): New abstract method. This method is
19644         used to testing error 3005.
19645         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19646         for identifier and parameters CLS-Compliant testing.
19647         (VerifyClsCompliance): New method. The main virtual method for
19648         CLS-Compliant verifications.
19649         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19650         null. I don't know why is null (too many public members !).
19651         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19652         and get value of first CLSCompliantAttribute that found.
19653
19654         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19655         (VerifyClsCompliance): Override and add extra tests.
19656
19657         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19658         clscheck- disable CLS-Compliant verification event if assembly is has
19659         CLSCompliantAttribute(true).
19660
19661         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19662         ApllyAttribute is now called in emit section as in the other cases.
19663         Possible future Emit integration.
19664         (IsIdentifierClsCompliant): New override.
19665         (VerifyClsCompliance): New override.
19666         (GetEnumeratorName): Returns full enum name.
19667
19668         * parameter.cs (GetSignatureForError): Implemented.
19669
19670         * report.cs (WarningData): New struct for Warning message information.
19671         (LocationOfPreviousError): New method.
19672         (Warning): New method. Reports warning based on the warning table.
19673         (Error_T): New method. Reports error based on the error table.
19674
19675         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19676         verifications are done here.
19677
19678         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19679
19680         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19681         CLSCompliantAttribute.
19682         (all_imported_types): New member holds all imported types from other
19683         assemblies.
19684         (LoadAllImportedTypes): New method fills static table with exported types
19685         from all referenced assemblies.
19686         (Modules): New property returns all assembly modules.
19687
19688 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19689
19690         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19691         throwing a parser error.
19692
19693         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19694         which removes the hardcoded get_/set_ prefixes for properties, as
19695         IL allows for the properties to be named something else.  
19696
19697         Bug #56013
19698
19699         * expression.cs: Do not override operand before we know if it is
19700         non-null.  Fix 56207
19701
19702 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19703
19704         * typemanager.cs: support for pinned variables.
19705
19706 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19707
19708         * decl.cs, typemanager.cs: Avoid using an arraylist
19709         as a buffer if there is only one result set.
19710
19711 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19712
19713         * expression.cs: Make sure you cant call a static method
19714         with an instance expression, bug #56174.
19715
19716 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19717
19718         * class.cs (IsDuplicateImplementation): Improve error reporting to
19719         flag 663 (method only differs in parameter modifier).
19720
19721         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19722         in preprocessor directives.
19723
19724         * location.cs (LookupFile): Allow for the empty path.
19725
19726         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19727         better approach for some of that patch, but its failing with the
19728         CharSet enumeration.  For now try/catch will do.
19729
19730         * typemanager.cs: Do not crash if a struct does not have fields.
19731         Fixes 56150.
19732
19733 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19734
19735         * expression.cs: cs0213, cant fix a fixed expression.
19736         fixes 50231.
19737
19738 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19739
19740         * cs-parser.jay: detect invalid embeded statements gracefully.
19741         bug #51113.
19742
19743 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19744
19745         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19746         As a regex:
19747         s/
19748         the invocation type may not be a subclass of the tye of the item/
19749         The type of the item must be a subclass of the invocation item.
19750         /g
19751
19752         Fixes bug #50820.
19753
19754 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19755
19756         * attribute.cs: Added methods to get a string and a bool from an
19757         attribute. Required to information from AssemblyKeyFileAttribute,
19758         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19759         * codegen.cs: Modified AssemblyName creation to include support for
19760         strongnames. Catch additional exceptions to report them as CS1548.
19761         * compiler.csproj: Updated include CryptoConvert.cs.
19762         * compiler.csproj.user: Removed file - user specific configuration.
19763         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19764         Mono.Security assembly. The original class is maintained and tested in
19765         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19766         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19767         like CSC 8.0 (C# v2) supports.
19768         * Makefile: Added CryptoConvert.cs to mcs sources.
19769         * rootcontext.cs: Added new options for strongnames.
19770
19771 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19772
19773         * driver.cs: For --expect-error, report error code `2'
19774         if the program compiled with no errors, error code `1' if
19775         it compiled with an error other than the one expected.
19776
19777 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19778
19779         * compiler.csproj: Updated for Visual Studio .NET 2003.
19780         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19781         * compiler.sln: Updated for Visual Studio .NET 2003.
19782
19783 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19784
19785         * expression.cs: Fix bug #47234. We basically need to apply the
19786         rule that we prefer the conversion of null to a reference type
19787         when faced with a conversion to 'object' (csc behaviour).
19788
19789 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19790
19791         * statement.cs: Shorter form for foreach, eliminates
19792         a local variable. r=Martin.
19793
19794 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19795
19796         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
19797         checks if we can use brtrue/brfalse to test for 0.
19798         * expression.cs: use the above in the test for using brtrue/brfalse.
19799         cleanup code a bit.
19800
19801 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19802
19803         * expression.cs: Rewrite string concat stuff. Benefits:
19804
19805         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
19806         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
19807         rather than a concat chain.
19808
19809         * typemanager.cs: Add lookups for more concat overloads.
19810
19811 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19812
19813         * expression.cs: Emit shorter il code for array init.
19814
19815         newarr
19816         dup
19817         // set 1
19818
19819         // set 2
19820
19821         newarr
19822         stloc.x
19823
19824         ldloc.x
19825         // set 1
19826
19827         ldloc.x
19828         // set 2
19829
19830 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
19831
19832         * statement.cs: Before, two switch blocks would be merged if the
19833         total size of the blocks (end_item - begin_item + 1) was less than
19834         two times the combined sizes of the blocks.
19835
19836         Now, it will only merge if after the merge at least half of the
19837         slots are filled.
19838
19839         fixes 55885.
19840
19841 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
19842
19843         * class.cs : csc build fix for GetMethods(). See bug #52503.
19844
19845 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19846
19847         * expression.cs: Make sure fp comparisons work with NaN.
19848         This fixes bug #54303. Mig approved this patch a long
19849         time ago, but we were not able to test b/c the runtime
19850         had a related bug.
19851
19852 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
19853
19854         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
19855
19856 2004-03-19  Martin Baulig  <martin@ximian.com>
19857
19858         * class.cs (MemberCore.IsDuplicateImplementation): Report the
19859         error here and not in our caller.
19860
19861 2004-03-19  Martin Baulig  <martin@ximian.com>
19862
19863         * interface.cs: Completely killed this file.
19864         (Interface): We're now a TypeContainer and live in class.cs.
19865
19866         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
19867         argument; we're now also called for interfaces.
19868         (TypeContainer.DefineMembers): Allow this method being called
19869         multiple times.
19870         (TypeContainer.GetMethods): New public method; formerly known as
19871         Interface.GetMethod().  This is used by PendingImplementation.
19872         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
19873         it's now private and non-static.
19874         (Interface): Moved this here; it's now implemented similar to
19875         Class and Struct.
19876         (Method, Property, Event, Indexer): Added `bool is_interface'
19877         argument to their .ctor's.
19878         (MemberBase.IsInterface): New public field.
19879
19880         * cs-parser.jay: Create normal Method, Property, Event, Indexer
19881         instances instead of InterfaceMethod, InterfaceProperty, etc.
19882         (opt_interface_base): Removed; we now use `opt_class_base' instead.
19883         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
19884
19885 2004-03-19  Martin Baulig  <martin@ximian.com>
19886
19887         * class.cs (MethodCore.IsDuplicateImplementation): New private
19888         method which does the CS0111 checking.
19889         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
19890         Use IsDuplicateImplementation().
19891
19892 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19893
19894         * decl.cs (FindMemberToOverride): New method to find the correct
19895         method or property to override in the base class.
19896         * class.cs
19897             - Make Method/Property use the above method to find the
19898               version in the base class.
19899             - Remove the InheritableMemberSignatureCompare as it is now
19900               dead code.
19901
19902         This patch makes large code bases much faster to compile, as it is
19903         O(n) rather than O(n^2) to do this validation.
19904
19905         Also, it fixes bug 52458 which is that nested classes are not
19906         taken into account when finding the base class member.
19907
19908         Reviewed/Approved by Martin.
19909
19910 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
19911
19912         * interface.cs: In all interface classes removed redundant
19913         member initialization.
19914
19915 2004-03-16  Martin Baulig  <martin@ximian.com>
19916
19917         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
19918
19919 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
19920
19921         * decl.cs (DefineTypeAndParents): New helper method to define a
19922         type's containers before the type itself is defined;  This is a
19923         bug exposed by the recent changes to Windows.Forms when an
19924         implemented interface was defined inside a class that had not been
19925         built yet.   
19926
19927         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
19928
19929         (Check): Loop correctly to report errors modifiers
19930         (UNSAFE was not in the loop, since it was the same as TOP).
19931
19932         * interface.cs: Every interface member now takes a ModFlags,
19933         instead of a "is_new" bool, which we set on the base MemberCore. 
19934
19935         Every place where we called "UnsafeOk" in the interface, now we
19936         call the proper member (InterfaceMethod.UnsafeOK) instead to get
19937         the unsafe settings from the member declaration instead of the
19938         container interface. 
19939
19940         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
19941
19942         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
19943         `set_indexer_name' to the pending bits (one per type).
19944
19945         We fixed a bug today that was picking the wrong method to
19946         override, since for properties the existing InterfaceMethod code
19947         basically ignored the method name.  Now we make sure that the
19948         method name is one of the valid indexer names.
19949
19950 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
19951  
19952         * support.cs (SeekableStreamReader): Keep track of stream byte
19953         positions and don't mix them with character offsets to the buffer.
19954
19955         Patch from Gustavo Giráldez
19956
19957 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
19958
19959         * interface.cs (InterfaceSetGetBase): Removed double member
19960         initialization, base class does it as well.
19961
19962 2004-03-13  Martin Baulig  <martin@ximian.com>
19963
19964         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
19965         when compiling corlib.
19966
19967 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
19968
19969         * convert.cs (ExplicitConversion): We were reporting an error on
19970         certain conversions (object_type source to a value type, when the
19971         expression was `null') before we had a chance to pass it through
19972         the user defined conversions.
19973
19974         * driver.cs: Replace / and \ in resource specifications to dots.
19975         Fixes 50752
19976
19977         * class.cs: Add check for duplicate operators.  Fixes 52477
19978
19979 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
19980
19981         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
19982         that are in the middle of the statements, not only at the end.
19983         Fixes #54987
19984
19985         * class.cs (TypeContainer.AddField): No longer set the
19986         `HaveStaticConstructor' flag, now we call it
19987         `UserDefineStaticConstructor' to diferentiate the slightly
19988         semantic difference.
19989
19990         The situation is that we were not adding BeforeFieldInit (from
19991         Modifiers.TypeAttr) to classes that could have it.
19992         BeforeFieldInit should be set to classes that have no static
19993         constructor. 
19994
19995         See:
19996
19997         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
19998
19999         And most importantly Zoltan's comment:
20000
20001         http://bugzilla.ximian.com/show_bug.cgi?id=44229
20002
20003         "I think beforefieldinit means 'it's ok to initialize the type sometime 
20004          before its static fields are used', i.e. initialization does not need
20005          to be triggered by the first access to the type. Setting this flag
20006          helps the JIT to compile better code, since it can run the static
20007          constructor at JIT time, and does not need to generate code to call it
20008          (possibly lots of times) at runtime. Unfortunately, mcs does not set
20009          this flag for lots of classes like String. 
20010          
20011          csc sets this flag if the type does not have an explicit static 
20012          constructor. The reasoning seems to be that if there are only static
20013          initalizers for a type, and no static constructor, then the programmer
20014          does not care when this initialization happens, so beforefieldinit
20015          can be used.
20016          
20017          This bug prevents the AOT compiler from being usable, since it 
20018          generates so many calls to mono_runtime_class_init that the AOT code
20019          is much slower than the JITted code. The JITted code is faster, 
20020          because it does not generate these calls if the vtable is type is
20021          already initialized, which is true in the majority of cases. But the
20022          AOT compiler can't do this."
20023
20024 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
20025
20026         * class.cs (MethodData.Emit): Refactor the code so symbolic
20027         information is generated for destructors;  For some reasons we
20028         were taking a code path that did not generate symbolic information
20029         before. 
20030
20031 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20032
20033         * class.cs: Create a Constructor.CheckBase method that
20034         takes care of all validation type code. The method
20035         contains some code that was moved from Define.
20036
20037         It also includes new code that checks for duplicate ctors.
20038         This fixes bug #55148.
20039
20040 2004-03-09  Joshua Tauberer <tauberer@for.net>
20041
20042         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
20043         a { ... }-style array creation invokes EmitStaticInitializers
20044         which is not good for reference-type arrays.  String, decimal
20045         and now null constants (NullCast) are not counted toward
20046         static initializers.
20047
20048 2004-03-05  Martin Baulig  <martin@ximian.com>
20049
20050         * location.cs (SourceFile.HasLineDirective): New public field;
20051         specifies whether the file contains or is referenced by a "#line"
20052         directive.
20053         (Location.DefineSymbolDocuments): Ignore source files which
20054         either contain or are referenced by a "#line" directive.        
20055
20056 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
20057
20058         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
20059         direct access to our parent, so check the method inline there.
20060
20061 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20062
20063         * expression.cs (Invocation.EmitCall): Miguel's last commit
20064         caused a regression. If you had:
20065
20066             T t = null;
20067             t.Foo ();
20068
20069         In Foo the implict this would be null.
20070
20071 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
20072
20073         * expression.cs (Invocation.EmitCall): If the method is not
20074         virtual, do not emit a CallVirt to it, use Call.
20075
20076         * typemanager.cs (GetFullNameSignature): Improve the method to
20077         cope with ".ctor" and replace it with the type name.
20078
20079         * class.cs (ConstructorInitializer.Resolve): Now the method takes
20080         as an argument the ConstructorBuilder where it is being defined,
20081         to catch the recursive constructor invocations.
20082
20083 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
20084
20085         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
20086         routines to check if a type is an enumerable/enumerator allow
20087         classes that implement the IEnumerable or IEnumerator interfaces.
20088
20089         * class.cs (Property, Operator): Implement IIteratorContainer, and
20090         implement SetYields.
20091
20092         (Property.Define): Do the block swapping for get_methods in the
20093         context of iterators.   We need to check if Properties also
20094         include indexers or not.
20095
20096         (Operator): Assign the Block before invoking the
20097         OperatorMethod.Define, so we can trigger the Iterator code
20098         replacement. 
20099
20100         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
20101         Property and Operator classes are not created when we parse the
20102         declarator but until we have the block completed, so we use a
20103         singleton SimpleIteratorContainer.Simple to flag whether the
20104         SetYields has been invoked.
20105
20106         We propagate this setting then to the Property or the Operator to
20107         allow the `yield' to function.
20108
20109 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
20110
20111         * codegen.cs: Implemented attribute support for modules.
20112         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
20113         Assembly/Module functionality.
20114
20115         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
20116         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
20117         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
20118
20119 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
20120
20121         * interface.cs (FindMembers): The operation is performed on all base
20122         interfaces and not only on the first. It is required for future CLS Compliance patch.
20123
20124 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20125
20126         * statement.cs, codegen.cs:
20127         This patch deals with patterns such as:
20128
20129         public class List : IEnumerable {
20130
20131                 public MyEnumerator GetEnumerator () {
20132                         return new MyEnumerator(this);
20133                 }
20134
20135                 IEnumerator IEnumerable.GetEnumerator () {
20136                         ...
20137                 }
20138                 
20139                 public struct MyEnumerator : IEnumerator {
20140                         ...
20141                 }
20142         }
20143
20144         Before, there were a few things we did wrong:
20145         1) we would emit callvirt on a struct, which is illegal
20146         2) we emited ldarg when we needed to emit ldarga
20147         3) we would mistakenly call the interface methods on an enumerator
20148         type that derived from IEnumerator and was in another assembly. For example:
20149
20150         public class MyEnumerator : IEnumerator
20151
20152         Would have the interface methods called, even if there were public impls of the
20153         method. In a struct, this lead to invalid IL code.
20154
20155 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
20156
20157         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
20158           renamed to Emit.
20159
20160         * delegate.cs (Define): Fixed crash when delegate type is undefined.
20161
20162 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
20163
20164         * cs-parser.jay: Fix small regression: we were not testing V2
20165         compiler features correctly.
20166
20167         * interface.cs: If the emit context is null, then create one
20168
20169 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
20170
20171         * decl.cs (GetSignatureForError): New virtual method to get full name
20172           for error messages.
20173
20174         * attribute.cs (IAttributeSupport): New interface for attribute setting.
20175           Now it is possible to rewrite ApplyAttributes method to be less if/else.
20176
20177         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
20178           Duplicated members and code in these classes has been removed.
20179           Better encapsulation in these classes.
20180
20181 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
20182
20183         * assign.cs (Assign.DoResolve): When dealing with compound
20184         assignments, there is a new rule in ECMA C# 2.4 (might have been
20185         there before, but it is documented here) that states that in:
20186
20187         a op= b;
20188
20189         If b is of type int, and the `op' is a shift-operator, then the
20190         above is evaluated as:
20191
20192         a = (int) a op b 
20193
20194         * expression.cs (Binary.ResolveOperator): Instead of testing for
20195         int/uint/long/ulong, try to implicitly convert to any of those
20196         types and use that in pointer arithmetic.
20197
20198         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
20199         method to print information for from the type, not from the
20200         null-method we were given.
20201
20202 2004-02-01  Duncan Mak  <duncan@ximian.com>
20203
20204         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20205         parsing for cmd, fixes bug #53694.
20206
20207 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20208
20209         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20210         in the member name duplication tests. Property and operator name duplication
20211         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20212
20213 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20214
20215         * interface.cs (PopulateMethod): Fixed crash when interface method
20216         returns not existing type (error test cs0246-3.cs).
20217
20218 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20219
20220         * cs-parser.jay (interface_accessors): Re-write actions to also
20221         store attributes attached to get and set methods. Fix spelling
20222         while at it.
20223
20224         (inteface_property_declaration): Modify accordingly.
20225
20226         (InterfaceAccessorInfo): New helper class to store information to pass
20227         around between rules that use interface_accessors.
20228
20229         * interface.cs (Emit): Apply attributes on the get and set
20230         accessors of properties and indexers too.
20231
20232         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20233         right MethodBuilder when applying attributes to the get and set accessors.
20234
20235 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20236
20237         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20238
20239 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20240
20241         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20242
20243 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20244
20245         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20246         changes that treat `yield' specially when present before `break'
20247         or `return' tokens.
20248
20249         * cs-tokenizer.cs: yield is no longer a keyword.
20250
20251 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20252
20253         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20254         setting for default constructors.
20255         For default constructors are almost every time set wrong Modifier. The
20256         generated IL code has been alright. But inside mcs this values was
20257         wrong and this was reason why several of my CLS Compliance tests
20258         failed.
20259
20260 2004-01-22  Martin Baulig  <martin@ximian.com>
20261
20262         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20263         not a QualifiedIdentifier.  This is what `type_name_expression'
20264         was previously doing.
20265         (type_name_expression): Removed; the code is now in
20266         `namespace_or_type_name'.
20267         (qualified_identifier): Removed, use `namespace_or_type_name'
20268         instead.
20269         (QualifiedIdentifier): Removed this class.      
20270
20271 2004-01-22  Martin Baulig  <martin@ximian.com>
20272
20273         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20274         not a string as alias name.
20275
20276 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20277
20278         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20279         #52730 bug, and instead compute correctly the need to use a
20280         temporary variable when requesting an address based on the
20281         static/instace modified of the field and the constructor.
20282  
20283 2004-01-21  Martin Baulig  <martin@ximian.com>
20284
20285         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20286         class and namespace before looking up aliases.  Fixes #52517.
20287
20288 2004-01-21  Martin Baulig  <martin@ximian.com>
20289
20290         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20291         assinged in a 'try'; fixes exception4.cs.
20292
20293 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20294         * class.cs : Implemented parameter-less constructor for TypeContainer
20295
20296         * decl.cs: Attributes are now stored here. New property OptAttributes
20297
20298         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20299
20300         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20301
20302 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20303
20304         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20305           (CSharpSignature): New method for indexer and property signature.
20306
20307 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20308
20309         * pending.cs (IsVirtualFilter): Faster implementation.
20310
20311 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20312
20313         * typemanager.cs: Avoid inclusion of same assembly more than once.
20314
20315 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20316
20317         * cs-parser.jay: Fixed problem where the last assembly attribute
20318           has been applied also to following declaration (class, struct, etc.)
20319           
20320 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20321
20322         * class.cs: Added error CS0538, CS0539 reporting.
20323         Fixed crash on Microsoft runtime when field type is void.
20324
20325         * cs-parser.jay: Added error CS0537 reporting.
20326
20327         * pending.cs: Added error CS0535 reporting.
20328         Improved error report for errors CS0536, CS0534.
20329
20330 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20331
20332         Merge a few bits from the Anonymous Method MCS tree.
20333
20334         * statement.cs (ToplevelBlock): New class for toplevel methods,
20335         will hold anonymous methods, lifted variables.
20336
20337         * cs-parser.jay: Create toplevel blocks for delegates and for
20338         regular blocks of code. 
20339
20340 2004-01-20  Martin Baulig  <martin@ximian.com>
20341
20342         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20343         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20344         and `NeedExplicitReturn'; added `IsLastStatement'.
20345         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20346         have a `ReturnLabel' or we're not unreachable.
20347
20348         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20349         child's reachability; don't just override ours with it.  Fixes
20350         #58058 (lluis's example).
20351         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20352         InFinally(), InLoop(), InSwitch() and
20353         BreakCrossesTryCatchBoundary() methods.
20354
20355         * statement.cs (Return): Do all error checking in Resolve().
20356         Unless we are the last statement in a top-level block, always
20357         create a return label and jump to it.
20358         (Break, Continue): Do all error checking in Resolve(); also make
20359         sure we aren't leaving a `finally'.
20360         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20361         statement in a top-level block.
20362         (Block.Flags): Added `IsDestructor'.
20363         (Block.IsDestructor): New public property.
20364
20365 2004-01-20  Martin Baulig  <martin@ximian.com>
20366
20367         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20368
20369 2004-01-20  Martin Baulig  <martin@ximian.com>
20370
20371         * statement.cs (Statement.ResolveUnreachable): New public method.
20372         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20373         (Block.Resolve): Resolve unreachable statements.
20374
20375 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20376
20377         * expression.cs: We need to fix the case where we do
20378         not have a temp variable here.
20379
20380         * assign.cs: Only expression compound assignments need
20381         temporary variables.
20382
20383 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20384
20385         * flowanalysis.cs: Reduce memory allocation in a few ways:
20386           - A block with no variables should not allocate a bit
20387             vector for itself.
20388           - A method with no out parameters does not need any tracking
20389             for assignment of the parameters, so we need not allocate
20390             any data for it.
20391           - The arrays:
20392                 public readonly Type[] VariableTypes;
20393                 public readonly string[] VariableNames;
20394             Are redundant. The data is already stored in the variable
20395             map, so we need not allocate another array for it.
20396           - We need to add alot of checks for if (params | locals) == null
20397             due to the first two changes.
20398
20399 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20400
20401         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20402         implement IMemoryLocation, we store a copy on a local variable and
20403         take the address of it.  Patch from Benjamin Jemlich
20404
20405         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20406         to use a special "type_name_expression" rule which reduces the
20407         number of "QualifiedIdentifier" classes created, and instead
20408         directly creates MemberAccess expressions.
20409
20410 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20411
20412         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20413         that fixes #52853.  Null literal assignment to ValueType
20414
20415         * class.cs (MethodData.Emit): Instead of checking the name of the
20416         method to determine if its a destructor, create a new derived
20417         class from Method called Destructor, and test for that.  
20418
20419         * cs-parser.jay: Create a Destructor object instead of a Method.  
20420
20421         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20422
20423         Fixes: 52933
20424
20425 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20426
20427         * expression.cs (Binary.ResolveOperator): Perform an implicit
20428         conversion from MethodGroups to their delegate types on the
20429         Addition operation.
20430
20431         * delegate.cs: Introduce a new class DelegateCreation that is the
20432         base class for `NewDelegate' and `ImplicitDelegateCreation',
20433         factor some code in here.
20434
20435         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20436         conversion from MethodGroups to compatible delegate types. 
20437
20438         * ecore.cs (Expression.Resolve): Do not flag error 654
20439         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20440         we allow conversions from MethodGroups to delegate types now.
20441
20442         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20443         assignments in v2 either.
20444
20445 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20446
20447         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20448         static read-only fields in ctors.
20449
20450         Applied patch from Benjamin Jemlich 
20451
20452         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20453
20454 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20455
20456         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20457         here to return true, as they can be used like this:
20458
20459                 (XXX) int.MEMBER ()
20460
20461         Fixed 49836 and all the other dups
20462
20463 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20464
20465         * driver.cs: Implement /win32res and /win32icon.
20466
20467 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20468
20469         * cs-parser.jay: Add a rule to improve error handling for the
20470         common mistake of placing modifiers after the type.
20471
20472 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20473
20474         * cs-parser.jay (interface_event_declaration): Catch
20475         initialization of events on interfaces, and report cs0068
20476
20477         * cs-parser.jay (interface_event_declaration): Catch
20478         initialization of events. 
20479
20480         * ecore.cs: Better report missing constructors.
20481
20482         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20483         the error reporting done in the wrong place.  Fix.
20484
20485         * expression.cs (Binary.ResolveOperator): Catch the 
20486         operator + (E x, E y) error earlier, and later allow for implicit
20487         conversions in operator +/- (E e, U x) from U to the underlying
20488         type of E.
20489
20490         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20491         52596, if the container class is abstract, the default constructor
20492         is protected otherwise its public (before, we were always public).
20493
20494         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20495         fixed statement.
20496
20497         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20498         Jemlich that fixes bug #52597, MCS was generating invalid code for
20499         idisposable structs.   Thanks to Ben for following up with this
20500         bug as well.
20501
20502 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20503
20504         * driver.cs: Allow assemblies without code to be generated, fixes
20505         52230.
20506
20507 2004-01-07  Nick Drochak <ndrochak@gol.com>
20508
20509         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20510
20511 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20512
20513         * cs-parser.jay: Add rules to improve error reporting if fields or
20514         methods are declared at the namespace level (error 116)
20515
20516         * Add rules to catch event add/remove
20517
20518 2004-01-04  David Sheldon <dave-mono@earth.li>
20519
20520   * expression.cs: Added matching ")" to error message for 
20521   CS0077
20522
20523 2004-01-03 Todd Berman <tberman@gentoo.org>
20524
20525         * ecore.cs, attribute.cs:
20526         Applying fix from #52429.
20527
20528 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20529
20530         * ecore.cs, expression.cs, statement.cs:
20531         Total rewrite of how we handle branching. We
20532         now handle complex boolean expressions with fewer
20533         jumps. As well if (x == 0) no longer emits a ceq.
20534
20535         if (x is Foo) is much faster now, because we generate
20536         better code.
20537
20538         Overall, we get a pretty big improvement on our benchmark
20539         tests. The code we generate is smaller and more readable.
20540
20541         I did a full two-stage bootstrap. The patch was reviewed
20542         by Martin and Miguel.
20543
20544 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20545
20546         * cs-parser.jay: Make primary_expression not take a QI.
20547         we dont need this because the member_access rule covers
20548         us here. So we replace the rule with just IDENTIFIER.
20549
20550         This has two good effects. First, we remove a s/r conflict.
20551         Second, we allocate many fewer QualifiedIdentifier objects.
20552
20553 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20554
20555         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20556         set the correct information via SRE. This prevents
20557         hanging on the MS runtime. Fixes #29374.
20558
20559 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20560
20561         * convert.cs: correctly handle conversions to value types
20562         from Enum and ValueType as unboxing conversions.
20563
20564         Fixes bug #52569. Patch by Benjamin Jemlich.
20565
20566 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20567
20568         * expression.cs (BetterConversion): Prefer int -> uint
20569         over int -> ulong (csc's behaviour). This fixed bug #52046.
20570
20571 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20572
20573         * decl.cs (MemberCache.FindMembers): now returns a
20574         MemberInfo [].
20575
20576         * typemanager.cs: In general, go with with ^^.
20577         (CopyNewMethods): take an IList.
20578         (RealMemberLookup): Only allocate an arraylist
20579         if we copy from two sets of methods.
20580
20581         This change basically does two things:
20582         1) Fewer array lists allocated due to CopyNewMethods.
20583         2) the explicit cast in MemberList costed ALOT.
20584
20585 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20586
20587         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20588         a hashtable to avoid needless string allocations when an identifier is
20589         used more than once (the common case).
20590
20591 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20592
20593         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20594         is broken, it will not return anything. So, we
20595         have to use the information we have in mcs to
20596         do the task.
20597
20598         * typemanager.cs: Add a cache for GetInterfaces,
20599         since this will now be used more often (due to ^^)
20600
20601         (GetExplicitInterfaces) New method that gets the
20602         declared, not effective, interfaces on a type
20603         builder (eg, if you have interface IFoo, interface
20604         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20605         { IBar }.
20606
20607         This patch makes MCS able to bootstrap itself on
20608         Windows again.
20609
20610 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20611
20612         * expression.cs: Remove the Nop's that Miguel put
20613         in by mistake.
20614
20615 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20616
20617         * report.cs, codegen.cs: Give the real stack trace to
20618         the error when an exception is thrown.
20619
20620 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20621
20622         * decl.cs: only allocate hashtables for ifaces if 
20623         it is an iface!
20624
20625 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20626
20627         * expression.cs: fix the error from cs0121-2.cs
20628         (a parent interface has two child interfaces that
20629         have a function with the same name and 0 params
20630         and the function is called through the parent).
20631
20632 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20633
20634         * class.cs, rootcontext.cs, typmanager.cs: do not
20635         leak pointers.
20636
20637 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20638
20639         * codegen.cs: remove stack for the ec flow branching.
20640         It is already a linked list, so no need.
20641
20642 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20643
20644         * Makefile: Allow custom profiler here.
20645
20646 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20647
20648         * typemanager.cs (LookupType):
20649           - Use a static char [], because split takes
20650             a param array for args, so it was allocating
20651             every time.
20652           - Do not store true in a hashtable, it boxes.
20653
20654 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20655
20656         * flowanalysis.cs: bytify common enums.
20657
20658 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20659
20660         * modifiers.cs: Add a new set of flags for the
20661         flags allowed on explicit interface impls.
20662         * cs-parser.jay: catch the use of modifiers in
20663         interfaces correctly.
20664         * class.cs: catch private void IFoo.Blah ().
20665
20666         All related to bug #50572.
20667
20668 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20669
20670         * decl.cs: Rewrite the consistant accessability checking.
20671         Accessability is not linear, it must be implemented in
20672         a tableish way. Fixes #49704.
20673
20674 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20675
20676         * expression.cs: Handle negation in a checked context.
20677         We must use subtraction from zero. Fixes #38674.
20678
20679 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20680
20681         * class.cs: Ignore static void main in DLLs.
20682         * rootcontext.cs: Handle the target type here,
20683         since we are have to access it from class.cs
20684         * driver.cs: account for the above.
20685
20686 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20687
20688         * report.cs: Give line numbers and files if available.
20689
20690 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20691
20692         * driver.cs: Implement /addmodule.
20693
20694         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20695         ModuleBuilders.
20696
20697 2003-12-20  Martin Baulig  <martin@ximian.com>
20698
20699         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20700         (FieldBase.IsAssigned): Removed this field.
20701         (FieldBase.SetAssigned): New public method.
20702         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20703
20704 2003-12-20  Martin Baulig  <martin@ximian.com>
20705
20706         * expression.cs (LocalVariableReference.DoResolve): Don't set
20707         `vi.Used' if we're called from DoResolveLValue().
20708
20709         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20710         returns the usage vector it just merged into the current one -
20711         pass this one to UsageWarning().
20712         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20713         of the `EmitContext', don't call this recursively on our children.
20714
20715 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20716
20717         * driver.cs: Implement /target:module.
20718
20719 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20720
20721         * support.cs (CharArrayHashtable): New helper class.
20722
20723         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20724         char arrays, not strings, so we can avoid creating a string in
20725         consume_identifier if the identifier is a keyword.
20726
20727 2003-12-16  Martin Baulig  <martin@ximian.com>
20728
20729         * statement.cs (LocalInfo.Assigned): Removed this property.
20730         (LocalInfo.Flags): Removed `Assigned'.
20731         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20732         and uses flow analysis.
20733         (Block.UsageWarning): Made this method private.
20734         (Block.Resolve): Call UsageWarning() if appropriate.
20735
20736         * expression.cs (LocalVariableReference.DoResolve): Always set
20737         LocalInfo.Used here.
20738
20739 2003-12-13  Martin Baulig  <martin@ximian.com>
20740
20741         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20742         any value here; we're now using flow analysis to figure out
20743         whether a statement/block returns a value.
20744
20745 2003-12-13  Martin Baulig  <martin@ximian.com>
20746
20747         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20748         working again.
20749         (FlowBranching.MergeFinally): Don't call
20750         `branching.CheckOutParameters()' here, this is called in
20751         MergeTopBlock().
20752         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20753         when adding the `finally' vector.       
20754
20755 2003-12-13  Martin Baulig  <martin@ximian.com>
20756
20757         * flowanalysis.cs
20758         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20759         actually work and also fix #48962.
20760
20761 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20762
20763         * decl.cs: Do not check System.Object for nested types,
20764         since we know it does not have any. Big bang for buck:
20765
20766         BEFORE:
20767            Run 1:   8.35 seconds
20768            Run 2:   8.32 seconds
20769            corlib:  17.99 seconds
20770         AFTER:
20771            Run 1:   8.17 seconds
20772            Run 2:   8.17 seconds
20773            corlib:  17.39 seconds
20774
20775 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20776
20777         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20778         time we are returning 0 members, so we save alot here.
20779
20780 2003-12-11  Martin Baulig  <martin@ximian.com>
20781
20782         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20783         `MergeChild()', also just take the `FlowBranching' as argument;
20784         call Merge() on it and return the result.
20785         (FlowBranching.Merge): We don't need to do anything if we just
20786         have one sibling.
20787
20788 2003-12-11  Martin Baulig  <martin@ximian.com>
20789
20790         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20791         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20792         Maurer for this idea.
20793
20794 2003-12-11  Martin Baulig  <martin@ximian.com>
20795
20796         * flowanalysis.cs (MergeResult): This class is now gone; we now
20797         use the `UsageVector' for this.  The reason for this is that if a
20798         branching just has one sibling, we don't need to "merge" them at
20799         all - that's the next step to do.
20800         (FlowBranching.Merge): We now return a `UsageVector' instead of a
20801         `MergeResult'.
20802
20803 2003-12-11  Martin Baulig  <martin@ximian.com>
20804
20805         Reworked flow analyis and made it more precise and bug-free.  The
20806         most important change is that we're now using a special `Reachability'
20807         class instead of having "magic" meanings of `FlowReturns'.  I'll
20808         do some more cleanups and optimizations and also add some more
20809         documentation this week.
20810
20811         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
20812         largely reworked this class.
20813         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
20814         the new `Reachability' class instead of having "magic" values here.
20815         (FlowBranching): We're now using an instance of `Reachability'
20816         instead of having separate `Returns', `Breaks' etc. fields.
20817
20818         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
20819         based on flow analysis; ignore the return value of block.Emit ().
20820
20821 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
20822
20823         * driver.cs typemanager.cs: Find the mono extensions to corlib even
20824         if they are private.
20825
20826 2003-12-09  Martin Baulig  <martin@ximian.com>
20827
20828         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
20829         call them directly on the UsageVector.
20830
20831 2003-12-09  Martin Baulig  <martin@ximian.com>
20832
20833         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
20834         Changed return type from `FlowReturns' to `Reachability'.
20835
20836 2003-12-09  Martin Baulig  <martin@ximian.com>
20837
20838         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
20839         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
20840         `Reachable' fields with a single `Reachability' one.
20841
20842 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20843
20844         * class.cs (FindMembers): Remove foreach's.
20845
20846         Bootstrap times:
20847
20848         BEFORE
20849                 Run 1:   8.74 seconds
20850                 Run 2:   8.71 seconds
20851
20852         AFTER
20853                 Run 1:   8.64 seconds
20854                 Run 2:   8.58 seconds
20855
20856
20857 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20858
20859         * cs-parser.jay:
20860         * gen-treedump.cs:
20861         * statement.cs:
20862         This patch does a few things:
20863                 1. EmptyStatement is now a singleton, so it is never reallocated.
20864                 2. All blah is EmptyStatement constructs have been changed to
20865                    blah == EmptyStatement.Value, which is much faster and valid
20866                    now that EmptyStatement is a singleton.
20867                 3. When resolving a block, rather than allocating a new array for
20868                    the non-empty statements, empty statements are replaced with
20869                    EmptyStatement.Value
20870                 4. Some recursive functions have been made non-recursive.
20871         Mainly the performance impact is from (3), however (1) and (2) are needed for
20872         this to work. (4) does not make a big difference in normal situations, however
20873         it makes the profile look saner.
20874
20875         Bootstrap times:
20876
20877         BEFORE
20878         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20879         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20880         Total memory allocated: 56397 KB
20881
20882         AFTER
20883         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
20884         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
20885         Total memory allocated: 55666 KB
20886
20887 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20888
20889         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
20890         than the hashtable in a hashtable version
20891
20892         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
20893         we always end up concating a string. This results in a huge perf
20894         loss, because many strings have to be tracked by the GC. In this
20895         patch, we first use a hashtable that works with two keys, so that
20896         the strings do not need to be concat'ed.
20897
20898         Bootstrap times:
20899         BEFORE
20900                 Run 1:   8.74 seconds
20901                 Run 2:   8.71 seconds
20902
20903         AFTER
20904                 Run 1:   8.65 seconds
20905                 Run 2:   8.56 seconds
20906
20907 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20908
20909         * Makefile: Add a new target `do-time' that does a quick and simple
20910         profile, leaving easy to parse output.
20911
20912 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20913
20914         * codegen.cs (Init): Create the dynamic assembly with 
20915         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
20916
20917 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20918
20919         * support.cs: Make the PtrHashtable use only one
20920         instance of its comparer.
20921
20922 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
20923
20924         * typemanager.cs: Fix lookup of GetNamespaces.
20925
20926 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
20927
20928         * expression.cs: Removed redundant line.
20929
20930         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
20931         ArrayLists, use for loops with bounds.  
20932
20933         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
20934         arraylist.
20935
20936         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
20937         arraylists, use for loop with bounds.
20938
20939         The above three changes give us a 0.071 second performance
20940         improvement out of 3.294 seconds down to 3.223.  On my machine
20941         the above changes reduced the memory usage by 1,387 KB during
20942         compiler bootstrap.
20943
20944         * cs-parser.jay (QualifiedIdentifier): New class used to represent
20945         QualifiedIdentifiers.  Before we created a new string through
20946         concatenation, and mostly later on, the result would be
20947         manipulated by DecomposeQI through string manipulation.
20948
20949         This reduced the compiler memory usage for bootstrapping from
20950         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
20951         compile times in 0.05 seconds.
20952
20953 2003-11-28  Dick Porter  <dick@ximian.com>
20954
20955         * support.cs: Do string compares with the Invariant culture.
20956
20957         * rootcontext.cs: 
20958         * gen-treedump.cs: 
20959         * expression.cs: 
20960         * driver.cs: 
20961         * decl.cs: 
20962         * codegen.cs: 
20963         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
20964         the comparison is done with the Invariant culture.
20965
20966 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
20967
20968         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
20969         GetEnumerator method.
20970
20971         (ProbeCollectionType): Iterate starting at the most specific type
20972         upwards looking for a GetEnumerator
20973
20974         * expression.cs: Shift count can be up to 31 for int/uint and 63
20975         for long/ulong.
20976
20977 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
20978
20979         * statement.cs (Block.LookupLabel): Also look for the label on the
20980         children blocks.  Use a hash table to keep track of visited
20981         nodes. 
20982
20983         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
20984         we actually did transform the other operand, otherwise fall back
20985         to the common codepath that casts to long.
20986
20987         * cs-tokenizer.cs: Use the same code pattern as the int case.
20988         Maybe I should do the parsing myself, and avoid depending on the
20989         Parse routines to get this done.
20990
20991 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
20992
20993         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20994         which fixes bug 51347.  This time test it.
20995
20996         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
20997         attributes for example can not tell the difference between these.
20998         The difference was only a syntax feature of the language. 
20999
21000         * attribute.cs: Apply attributes to delegates.
21001
21002         * delegate.cs: Call the apply attributes method.
21003
21004 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
21005
21006         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
21007         comparing 0 vs Byte.MinValue, not the value
21008
21009         (ImplicitConversionRequired): When reporting a conversion error,
21010         use error 31 to print out the constant error instead of the
21011         simpler 29.
21012
21013         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
21014         which fixes bug 51347.
21015
21016 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
21017
21018         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
21019         which fixes the -warnaserror command line option.
21020
21021 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
21022
21023         * cfold.cs (DoNumericPromotions): During constant folding of
21024         additions on UIntConstant, special case intconstants with
21025         IntConstants like we do on the expression binary operator. 
21026
21027 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
21028
21029         * convert.cs (ImplicitReferenceConversion): We were missing a case
21030         (System.Enum are not value types or class types, so we need to
21031         classify them separatedly).
21032
21033         * driver.cs: We do not support error 2007.
21034
21035 2003-11-12 Jackson Harper <jackson@ximian.com>
21036
21037         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
21038         system directory. Also use the full file name so users can
21039         libraries names mscorlib-o-tron.dll in a non system dir.
21040
21041 2003-11-10  Martin Baulig  <martin@ximian.com>
21042
21043         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
21044         (TypeManager.InitCoreTypes): Initialize them here, but instead of
21045         calling `ResolveType()' on them, directly assign their `Type'.
21046
21047 2003-11-08  Martin Baulig  <martin@ximian.com>
21048
21049         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
21050         return value and the `out parent' parameter.
21051         (TypeContainer.DefineType): Moved the CS0644 check into
21052         GetClassBases().  Don't pass the interface types to the
21053         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
21054         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
21055
21056         * ecore.cs (TypeExpr.IsAttribute): New property.
21057         (TypeExpr.GetInterfaces): New method.
21058
21059         * interface.cs (Interface.GetInterfaceTypeByName): Return a
21060         TypeExpr instead of a Type.
21061         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
21062         (Interface.DefineType): Don't pass the interface types to the
21063         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
21064         them later and then call `TypeBulider.AddInterfaceImplementation()'.
21065
21066         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
21067         instead of a `Type[]'.
21068         (TypeManager.RegisterBuilder): Likewise.
21069         (TypeManager.AddUserInterface): Likewise.
21070         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
21071         `Type[]' and also return a `TypeExpr[]'.
21072         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
21073
21074 2003-11-08  Martin Baulig  <martin@ximian.com>
21075
21076         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
21077         Expression.     
21078
21079 2003-11-08  Martin Baulig  <martin@ximian.com>
21080
21081         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
21082         TypeManager.ResolveExpressionTypes().
21083
21084         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
21085         instead of an Expression.
21086         (TypeExpr): This is now an abstract base class for `TypeExpression'.
21087         (TypeExpression): New public class; formerly known as `TypeExpr'.
21088
21089         * expression.cs (ComposedCast): Derive from TypeExpr.
21090
21091         * typemanager.cs (TypeManager.system_*_expr): These are now
21092         TypExpr's instead of Expression's.
21093         (TypeManager.ResolveExpressionTypes): New public static function;
21094         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
21095         of them.        
21096
21097 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
21098
21099         * expression.cs (New.DoResolve): Do not dereference value that
21100         might be a null return.
21101
21102         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
21103         sure that the constant value has the right type.  Fixes an
21104         unreported bug, similar to 50425.
21105
21106         * const.cs (Const.LookupConstantValue): Call
21107         ImplicitStandardConversionExists before doing a conversion to
21108         avoid havng the TypeManager.ChangeType do conversions.
21109
21110         Reduced the number of casts used
21111
21112         (Const.ChangeType): New routine to enable reuse of the constant
21113         type changing code from statement.
21114
21115         * typemanager.cs (ChangeType): Move common initialization to
21116         static global variables.
21117
21118         Fixes #50425.
21119
21120         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
21121         every value type to go through, even if it was void.  Fix that. 
21122
21123         * cs-tokenizer.cs: Use is_identifier_start_character on the start
21124         character of the define, and the is_identifier_part_character for
21125         the rest of the string.
21126
21127 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
21128
21129         * expression.cs (UnaryMutator.EmitCode): When I updated
21130         LocalVariableReference.DoResolve, I overdid it, and dropped an
21131         optimization done on local variable references.
21132
21133 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
21134
21135         * ecore.cs: Convert the return from Ldlen into an int.
21136
21137 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
21138
21139         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
21140         the accessibility, this is a special case for toplevel non-public
21141         classes (internal for instance).
21142
21143 2003-10-20  Nick Drochak <ndrochak@gol.com>
21144
21145         * ecore.cs: Fix typo and build.  Needed another right paren.
21146
21147 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
21148
21149         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
21150         `internal' case regular and protected, but not allowing protected
21151         to be evaluated later.  Bug 49840
21152
21153 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
21154
21155         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
21156         to kb.Nlast, and not the kb.nFirst to isolate the switch
21157         statement.
21158
21159         Extract the underlying type, so enumerations of long/ulong are
21160         treated like long/ulong.
21161
21162 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
21163
21164         * expression.cs (New): Overload the meaning of RequestedType to
21165         track the possible creation of the NewDelegate type, since
21166         DoResolve is invoked more than once for new constructors on field
21167         initialization.
21168
21169         See bugs: #48800 and #37014
21170
21171         * cs-parser.jay (declare_local_constants): Take an arraylist
21172         instead of a single constant.
21173
21174         (local_constant_declaration): It should take a
21175         constant_declarators, not a constant_declarator.  Fixes 49487
21176
21177         * convert.cs: Fix error report.
21178
21179 2003-10-13 Jackson Harper <jackson@ximian.com>
21180
21181         * typemanager.cs (TypeToCoreType): Add float and double this fixes
21182         bug #49611
21183
21184 2003-10-09  Martin Baulig  <martin@ximian.com>
21185
21186         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
21187         to the .ctor.
21188         (MethodCore.DoDefineParameters): Removed the TypeContainer
21189         argument; use the DeclSpace which was passed to the .ctor instead.
21190         (MethodCore.CheckParameter): Take a DeclSpace instead of a
21191         TypeContainer; we only need a DeclSpace here.
21192
21193 2003-10-09  Martin Baulig  <martin@ximian.com>
21194
21195         * class.cs (MethodData): Added additional `DeclSpace ds' argument
21196         to the .ctor.
21197         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
21198         EmitContext's .ctor.    
21199
21200 2003-10-09  Martin Baulig  <martin@ximian.com>
21201
21202         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21203         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21204         AsAccessible(), moved them as well.
21205
21206         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21207
21208 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21209
21210         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21211
21212 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21213
21214         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21215         generation for >=, as spotted by Paolo, bug 48679.  
21216         Patch from David Waite.
21217
21218         * cs-tokenizer.cs: Add handling for #pragma.
21219
21220         * cs-parser.jay: Allow for both yield and yield return in the
21221         syntax.  The anti-cobolization of C# fight will go on!
21222
21223         * class.cs (TypeBuilder.DefineType): Catch error condition here
21224         (Parent.DefineType erroring out and returning null).
21225
21226         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21227         coping with enumerations variables, we were mistakenly processing
21228         them as a regular value type instead of built-in types.  Fixes the
21229         bug #48063
21230
21231         * typemanager.cs (IsBuiltinOrEnum): New method.
21232
21233 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21234
21235         * cs-parser.jay: Upgrade: yield now needs the return clause.
21236
21237 2003-09-19  Martin Baulig  <martin@ximian.com>
21238
21239         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21240         `MemberCache parent' argument.  Normally, an interface doesn't
21241         have a parent type except System.Object, but we use this in gmcs
21242         for generic type parameters.
21243
21244 2003-09-18  Martin Baulig  <martin@ximian.com>
21245
21246         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21247         on `type.IsInterface'; don't check whether the type has a parent
21248         to determine whether it's an interface.
21249
21250 2003-09-15  Martin Baulig  <martin@ximian.com>
21251
21252         * class.cs (TypeContainer.DefineType): Added an error flag to
21253         avoid reporting duplicate CS0146's ("class definition is
21254         circular.").
21255
21256         * driver.cs (Driver.MainDriver): Abort if
21257         RootContext.ResolveTree() reported any errors.
21258
21259 2003-09-07  Martin Baulig  <martin@ximian.com>
21260
21261         * report.cs (Error, Warning): Added overloaded versions which take
21262         a `params object[] args' and call String.Format().
21263
21264 2003-09-07  Martin Baulig  <martin@ximian.com>
21265
21266         * decl.cs (DeclSpace..ctor): Don't call
21267         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21268         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21269         (DeclSpace.RecordDecl): New method.
21270
21271         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21272
21273 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21274
21275         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21276         value attributes to be applied to ParameterBuilders.
21277
21278         * class.cs (MethodCore.LabelParameters): Make static and more
21279         generic so that it can be used from other places - like interface
21280         methods, for instance.
21281
21282         * interface.cs (Interface.Emit): Call LabelParameters before
21283         emitting attributes on the InterfaceMethod.
21284
21285 2003-08-26  Martin Baulig  <martin@ximian.com>
21286
21287         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21288         resolving aliases; fixes #47927.
21289
21290 2003-08-26  Martin Baulig  <martin@ximian.com>
21291
21292         * statement.cs (Using.DoResolve): This is internally emitting a
21293         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21294         do not always return.  Fixes #47681.
21295
21296 2003-08-26  Martin Baulig  <martin@ximian.com>
21297
21298         * decl.cs (MemberCore): Moved WarningNotHiding(),
21299         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21300         into MemberBase.
21301         (AdditionResult): Make this nested in DeclSpace.
21302         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21303         argument; call NamespaceEntry.Define() unless we're nested in a
21304         class or struct.
21305
21306         * namespace.cs (Namespace.DefineName): New public function.  This
21307         is called from DeclSpace's .ctor to add 
21308         (Namespace.Lookup): Include DeclSpaces in the lookup.
21309
21310         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21311
21312         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21313
21314 2003-08-25  Martin Baulig  <martin@ximian.com>
21315
21316         * convert.cs (Convert.ExplicitReferenceConversion): When
21317         converting from an interface type to a class, unbox if the target
21318         type is a struct type.  Fixes #47822.
21319
21320 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21321
21322         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21323         #47854.
21324
21325 2003-08-22  Martin Baulig  <martin@ximian.com>
21326
21327         * class.cs (TypeManager.DefineType): When defining a nested type,
21328         call DefineType() on our parent; fixes #47801.
21329
21330 2003-08-22  Martin Baulig  <martin@ximian.com>
21331
21332         * class.cs (MethodData.Define): While checking if a method is an
21333         interface implementation, improve the test a bit more to fix #47654.
21334
21335 2003-08-22  Martin Baulig  <martin@ximian.com>
21336
21337         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21338         correctly; fixes #47722.
21339
21340 2003-08-22  Martin Baulig  <martin@ximian.com>
21341
21342         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21343         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21344
21345         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21346
21347 2003-08-22  Martin Baulig  <martin@ximian.com>
21348
21349         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21350         can only be assigned in static constructors.  Fixes #47161.
21351
21352 2003-08-22  Martin Baulig  <martin@ximian.com>
21353
21354         Rewrote and improved the flow analysis code.
21355
21356         * flowbranching.cs (FlowBranching): Make this class abstract.
21357         (FlowBranching.CreateBranching): New static function to create a
21358         new flow branching.
21359         (FlowBranchingBlock, FlowBranchingException): New classes.
21360         (FlowBranching.UsageVector.Type): New public readonly field.
21361         (FlowBranching.UsageVector.Breaks): Removed the setter.
21362         (FlowBranching.UsageVector.Returns): Removed the setter.
21363         (FlowBranching.UsageVector): Added Break(), Return(),
21364         NeverReachable() and Throw() methods to modify the reachability.
21365         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21366         done by FlowBranching.Merge().
21367         (FlowBranching.UsageVector.MergeChild): New method; merges the
21368         merge result into the current vector.
21369         (FlowBranching.Merge): New abstract method to merge a branching.
21370
21371 2003-08-12  Martin Baulig  <martin@ximian.com>
21372
21373         * expression.cs (Indirection.CacheTemporaries): Create the
21374         LocalTemporary with the pointer type, not its element type.
21375
21376 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21377
21378         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21379         token was a keyword or not.
21380
21381         Add `error' options where an IDENTIFIER was expected;  Provide
21382         CheckToken and CheckIdentifierToken convenience error reporting
21383         functions. 
21384
21385         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21386
21387         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21388         NameSpaceEntry NameSpaceEntry.
21389
21390         (LookupInterfaceOrClass): Avoid creating a full qualified name
21391         from namespace and name: avoid doing lookups when we know the
21392         namespace is non-existant.   Use new Tree.LookupByNamespace which
21393         looks up DeclSpaces based on their namespace, name pair.
21394
21395         * driver.cs: Provide a new `parser verbose' to display the
21396         exception thrown during parsing.  This is turned off by default
21397         now, so the output of a failure from mcs is more graceful.
21398
21399         * namespace.cs: Track all the namespaces defined in a hashtable
21400         for quick lookup.
21401
21402         (IsNamespace): New method
21403
21404 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21405
21406         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21407         we know that we need to concatenate (full typename can never be
21408         null). 
21409
21410         * class.cs: ditto.
21411
21412         * statement.cs: Use a bitfield;  Do not initialize to null things
21413         which are done by the constructor by default.
21414
21415         * cs-parser.jay: bug fix, parameter was 4, not 3.
21416
21417         * expression.cs: Just use the property;
21418
21419         * statement.cs: No need for GetVariableInfo method.
21420
21421 2003-08-08  Martin Baulig  <martin@ximian.com>
21422
21423         * flowanalysis.cs (FlowReturns): This is now nested in the
21424         `FlowBranching' class.
21425         (MyBitVector): Moved this here from statement.cs.
21426         (FlowBranching.SiblingType): New enum type.
21427         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21428
21429 2003-08-07  Martin Baulig  <martin@ximian.com>
21430
21431         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21432         `FlowBranching' class and called `BranchingType'.
21433
21434 2003-08-07  Martin Baulig  <martin@ximian.com>
21435
21436         * flowanalysis.cs: Moved all the control flow analysis code into
21437         its own file.
21438
21439 2003-08-07  Martin Baulig  <martin@ximian.com>
21440
21441         * assign.cs (Assign.DoResolve): `target' must either be an
21442         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21443         #37319.
21444
21445 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21446
21447         * expression.cs (BinaryMethod): This kind of expression is created by the
21448         Binary class if it determines that the operator has to be handled
21449         by a method.
21450
21451         (BinaryDelegate): This kind of expression is created if we are
21452         dealing with a + or - operator on delegates.
21453
21454         (Binary): remove method, argumetns, and DelegateOperator: when
21455         dealing with methods, 
21456
21457         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21458
21459         * statement.cs (Block): use bitfields for the three extra booleans
21460         we had in use.   Remove unused topblock parameter.
21461
21462         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21463
21464         * assign.cs: Drop extra unneeded tests.
21465
21466 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21467
21468         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21469
21470         * statement.cs (Foreach): Use VariableStorage instead of
21471         LocalBuilders.   
21472
21473         * codegen.cs (VariableStorage): New class used by clients that
21474         require a variable stored: locals or fields for variables that
21475         need to live across yield.
21476
21477         Maybe provide a convenience api for EmitThis+EmitLoad?
21478
21479         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21480         these bad boys.
21481
21482 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21483
21484         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21485         RemapParameterLValue): New methods that are used to turn a
21486         precomputed FieldInfo into an expression like this:
21487
21488                 instance.FieldInfo
21489
21490         The idea is to use this instead of making LocalVariableReference
21491         have more than one meaning.
21492
21493         * cs-parser.jay: Add error production to BASE.
21494
21495         * ecore.cs: Deal with TypeManager.GetField returning null, which
21496         is now a valid return value.
21497
21498         (FieldExprNoAddress): New expression for Fields whose address can
21499         not be taken.
21500
21501         * expression.cs (LocalVariableReference): During the resolve
21502         phases, create new expressions if we are in a remapping context.
21503         Remove code that dealt with remapping here.
21504
21505         (ParameterReference): same.
21506
21507         (ProxyInstance): New expression, like the `This' expression, but
21508         it is born fully resolved.  We know what we are doing, so remove
21509         the errors that are targeted to user-provided uses of `this'.
21510
21511         * statement.cs (Foreach): our variable is now stored as an
21512         Expression;  During resolution, follow the protocol, dont just
21513         assume it will return this.
21514
21515 2003-08-06  Martin Baulig  <martin@ximian.com>
21516
21517         * support.cs (SeekableStreamReader.cs): New public class.
21518
21519         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21520         SeekableStreamReader instead of the normal StreamReader.
21521
21522 2003-08-04  Martin Baulig  <martin@ximian.com>
21523
21524         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21525         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21526         deambiguate casts and delegate invocations.
21527         (parenthesized_expression): Use the new tokens to ensure this is
21528         not a cast of method invocation.
21529
21530         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21531         when reading a `)' and Deambiguate_CloseParens () was previously
21532         called.
21533
21534         * expression.cs (ParenthesizedExpression): New class.  This is
21535         just used for the CS0075 test.
21536         (Binary.DoResolve): Check for CS0075.   
21537
21538 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21539
21540         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21541         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21542         reference comparison.
21543
21544         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21545         examine the ReturnType for equality - this is necessary in the
21546         cases of implicit and explicit operators whose signature also
21547         includes the return type.
21548
21549 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21550
21551         * namespace.cs: Cache the result of the namespace computation,
21552         instead of computing it every time.
21553
21554 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21555
21556         * decl.cs: Use a global arraylist that we reuse over invocations
21557         to avoid excesive memory consumption.  Reduces memory usage on an
21558         mcs compile by one meg (45 average).
21559
21560         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21561         private, work around that.
21562
21563 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21564
21565         * literal.cs (IntLiteral): Define Zero and One static literals. 
21566
21567         * cs-parser.jay (integer_literal): use static literals to reduce
21568         memory usage for the most used literals (0, 1 and -1).  211kb
21569         reduced in memory usage.
21570
21571         Replace all calls to `new ArrayList' with `new
21572         ArrayList(4)' which is a good average number for most allocations,
21573         and also requires only 16 bytes of memory for its buffer by
21574         default. 
21575
21576         This reduced MCS memory usage in seven megabytes for the RSS after
21577         bootstrapping.
21578
21579 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21580
21581         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21582         handle params methods the correct way by forming only one
21583         applicable set with params and normal methods in them. Earlier we
21584         were looking at params methods only if we found no normal methods
21585         which was not the correct thing to do.
21586
21587         (Invocation.BetterFunction): Take separate arguments indicating
21588         when candidate and the best method are params methods in their
21589         expanded form.
21590
21591         This fixes bugs #43367 and #46199.
21592
21593         * attribute.cs: Documentation updates.
21594
21595         (CheckAttribute): Rename to CheckAttributeTarget.
21596         (GetValidPlaces): Rename to GetValidTargets.
21597
21598         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21599         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21600
21601         Fixes bug #44468.
21602
21603 2003-07-28  Martin Baulig  <martin@ximian.com>
21604
21605         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21606         name when looking up the base class of a nested class.  Fixes #46977.
21607
21608 2003-07-26  Martin Baulig  <martin@ximian.com>
21609
21610         * expression.cs (Indexers.Indexer): New nested struct; contains
21611         getter, setter and the indexer's type.
21612         (Indexers.Properties): This is now an ArrayList of
21613         Indexers.Indexer's.
21614         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21615         indexer doesn't have any getters.
21616
21617         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21618         for embedded property and indexer assignments.
21619
21620 2003-07-26  Martin Baulig  <martin@ximian.com>
21621
21622         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21623         preprocessor directive is not the first non-whitespace character
21624         on a line.
21625
21626 2003-07-26  Martin Baulig  <martin@ximian.com>
21627
21628         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21629         namespace parsing, follow the spec more closely.
21630
21631         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21632         NamespaceEntry.Lookup().
21633
21634 2003-07-25  Martin Baulig  <martin@ximian.com>
21635
21636         * MethodCore.cs (OverridesSomething): New public field; it's set
21637         from TypeContainer.DefineMembers if this method overrides
21638         something (which doesn't need to be a method).  Fix #39462.
21639
21640 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21641
21642         * typemanager.cs (GetMembers): Ensure that the list of members is
21643         reversed. This keeps things in sync.
21644
21645         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21646         find an AttributeUsage attribute.
21647
21648         * expression.cs (Invocation.OverloadResolve): Perform the check
21649         which disallows Invoke to be directly called on a Delegate.
21650
21651         (Error_InvokeOnDelegate): Report error cs1533.
21652
21653 2003-07-25  Martin Baulig  <martin@ximian.com>
21654
21655         * expression.cs (Indexers.GetIndexersForType): Only look in the
21656         interface hierarchy if the requested type is already an
21657         interface.  Fixes #46788 while keeping #46502 fixed.
21658
21659 2003-07-25  Martin Baulig  <martin@ximian.com>
21660
21661         * class.cs (TypeContainer.DefineMembers): Check whether all
21662         readonly fields have been assigned and report warning CS0649 if
21663         not.
21664
21665         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21666         a valuetype.
21667
21668 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21669
21670         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21671         returned from GetMethods to make things consistent with the
21672         assumptions MCS makes about ordering of methods.
21673
21674         This should comprehensively fix bug #45127 and it does :-)
21675
21676         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21677         ordering is actually reverse.
21678
21679         * Clean up some debug messages I left lying around.
21680
21681         * interface.cs (Populate*): Get rid of code which emits attributes
21682         since the stage in which we emit attributes is the 'Emit' stage,
21683         not the define stage.
21684
21685         (Emit): Move attribute emission for interface members here.
21686
21687 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21688
21689         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21690         closely: we eliminate methods in base types when we have an
21691         applicable method in a top-level type.
21692
21693         Please see section 14.5.5.1 for an exact description of what goes
21694         on. 
21695
21696         This fixes bug #45127 and a host of other related to corlib compilation.
21697
21698         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21699         array is the method corresponding to the top-level type (this is
21700         because of the changes made to icall.c) so we change this
21701         accordingly.
21702
21703         (MethodGroupExpr.Name): This too.
21704
21705         * typemanager.cs (GetElementType): New method which does the right
21706         thing when compiling corlib. 
21707
21708         * everywhere: Make use of the above in the relevant places.
21709
21710 2003-07-22  Martin Baulig  <martin@ximian.com>
21711
21712         * cs-parser.jay (invocation_expression): Moved
21713         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21714         `cast_expression', but create a InvocationOrCast which later
21715         resolves to either an Invocation or a Cast.
21716
21717         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21718         method; call this before EmitStatement() to make sure that this
21719         expression can be used as a statement.
21720
21721         * expression.cs (InvocationOrCast): New class; resolves to either
21722         an Invocation or a Cast.
21723
21724         * statement.cs (StatementExpression): Call ResolveStatement() on
21725         the ExpressionStatement before emitting it.
21726
21727 2003-07-21  Martin Baulig  <martin@ximian.com>
21728
21729         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21730         `ref' and `out' attributes match; fixes #46220.
21731         (MemberAccess.ResolveMemberAccess): You can't reference a type
21732         through an expression; fixes #33180.
21733         (Indexers.GetIndexersForType): Don't return the indexers from
21734         interfaces the class implements; fixes #46502.
21735
21736 2003-07-21  Martin Baulig  <martin@ximian.com>
21737
21738         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21739         CS0661 checks; fixes bug #30442.
21740
21741 2003-07-21  Martin Baulig  <martin@ximian.com>
21742
21743         * decl.cs (AdditionResult): Added `Error'.
21744
21745         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21746
21747         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21748         makes cs0031.cs actually work.
21749
21750 2003-07-20  Martin Baulig  <martin@ximian.com>
21751
21752         * namespace.cs: Fixed that bug which caused a crash when compiling
21753         the debugger's GUI.
21754
21755 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21756
21757         * typemanager.cs (LookupTypeReflection): Never expose types which
21758         are NotPublic, NestedPrivate, NestedAssembly, or
21759         NestedFamANDAssem.  We used to return these, and later do a check
21760         that would report a meaningful error, but the problem is that we
21761         would not get the real match, if there was a name override.
21762
21763 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21764
21765         * namespace.cs (Namespace, Name): Do not compute the namespace
21766         name dynamically, compute it in the constructor.  This reduced
21767         memory usage by 1697 KB.
21768
21769         * driver.cs: Use --pause to pause at the end.
21770
21771 2003-07-17  Peter Williams  <peter@newton.cx>
21772
21773         * Makefile: Change the name of the test target so that it doesn't
21774         conflict with the recursive test target.
21775
21776 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21777
21778         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21779         AddressOf): Do not use EmitThis, that was wrong, use the actual
21780         this pointer.
21781
21782 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21783
21784         * class.cs (MethodData.Define): While checking if a method is an
21785         interface implementation, improve the test: If we are not public
21786         (use new test here: use the computed MethodAttributes directly,
21787         instead of the parsed modifier flags) check if the `implementing'
21788         method comes from an interface or not.
21789
21790         * pending.cs (VerifyPendingMethods): Slightly better error
21791         message.
21792
21793         * makefile: add test target that does the mcs bootstrap.
21794
21795 2003-07-16  Ravi Pratap  <ravi@ximian.com>
21796
21797         * interface.cs (Define): Do nothing here since there are no
21798         members to populate etc. Move the attribute emission out of here
21799         since this was just totally the wrong place to put it. Attribute
21800         application happens during the 'Emit' phase, not in the 'Define'
21801         phase.
21802
21803         (Emit): Add this method and move the attribute emission here
21804
21805         * rootcontext.cs (EmitCode): Call the Emit method on interface
21806         types too.
21807
21808 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21809
21810         * expression.cs (OverloadResolve): Report error only if Location
21811         is not 'Null' which means that there was a probe going on.
21812
21813 2003-07-14  Martin Baulig  <martin@ximian.com>
21814
21815         * expression.cs (ConditionalLogicalOperator): New public class to
21816         implement user defined conditional logical operators.
21817         This is section 14.11.2 in the spec and bug #40505.
21818
21819 2003-07-14  Martin Baulig  <martin@ximian.com>
21820
21821         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
21822
21823 2003-07-14  Martin Baulig  <martin@ximian.com>
21824
21825         * codegen.cs (EmitContext.InFixedInitializer): New public field.
21826
21827         * ecore.cs (IVariable.VerifyFixed): New interface method.
21828
21829         * expression.cs (Unary.ResolveOperator): When resolving the `&'
21830         operator, check whether the variable is actually fixed.  Fixes bug
21831         #36055.  Set a variable definitely assigned when taking its
21832         address as required by the spec.
21833
21834         * statement.cs (LocalInfo.IsFixed): New field.
21835         (LocalInfo.MakePinned): Set `IsFixed' to true.
21836
21837 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21838
21839         * attribute.cs (Attribute.Resolve): While doing a Member lookup
21840         for .ctors, ensure that we only ask for members declared in the
21841         attribute type (BindingFlags.DeclaredOnly).
21842
21843         Fixes bug #43632.
21844
21845         * expression.cs (Error_WrongNumArguments): Report error 1501
21846         correctly the way CSC does.
21847
21848 2003-07-13  Martin Baulig  <martin@ximian.com>
21849
21850         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
21851         lookup on the fully qualified name, to make things like "X.X" work
21852         where "X.X" is a fully qualified type name, but we also have a
21853         namespace "X" in the using list.  Fixes #41975.
21854
21855 2003-07-13  Martin Baulig  <martin@ximian.com>
21856
21857         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
21858         function. If we're a CompoundAssign, we need to create an embedded
21859         CompoundAssign, not an embedded Assign.
21860         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
21861         Fixes #45854.
21862
21863 2003-07-13  Martin Baulig  <martin@ximian.com>
21864
21865         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
21866         work to fix bug #46088.
21867
21868 2003-07-13  Ravi Pratap <ravi@ximian.com>
21869
21870         * class.cs (Operator.Emit): Do not emit attributes here - it is
21871         taken care of by the Method class that we delegate too. This takes
21872         care of bug #45876.
21873
21874 2003-07-10  Martin Baulig  <martin@ximian.com>
21875
21876         * expression.cs (TypeOfVoid): New class.
21877         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
21878
21879 2003-07-10  Martin Baulig  <martin@ximian.com>
21880
21881         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
21882         bug #35957.
21883
21884 2003-07-10  Martin Baulig  <martin@ximian.com>
21885
21886         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
21887         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
21888
21889         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
21890
21891         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
21892
21893 2003-07-10  Martin Baulig  <martin@ximian.com>
21894
21895         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
21896         of decimal.  Fixes #42850.
21897
21898         NOTE: I also fixed the created byte blob, but this doesn't work on
21899         the MS runtime and csc never produces any byte blobs for decimal
21900         arrays.
21901
21902 2003-07-10  Martin Baulig  <martin@ximian.com>
21903
21904         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
21905         structs; fixes #32068.
21906         (Block.AddChildVariableNames): Fixed #44302.
21907
21908 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21909
21910         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
21911
21912 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21913
21914         * attribute.cs: And this test is onger needed.
21915
21916 2003-07-08  Martin Baulig  <martin@ximian.com>
21917
21918         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
21919         inaccessible types.  Fixes #36313.
21920
21921         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
21922
21923         * namespace.cs (NamespaceEntry): Create implicit entries for all
21924         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
21925         implicit entries for N1.N2 and N1.
21926
21927 2003-07-08  Martin Baulig  <martin@ximian.com>
21928
21929         Rewrote the handling of namespaces to fix a lot of the issues
21930         wrt. `using' aliases etc.
21931
21932         * namespace.cs (Namespace): Splitted this class into a
21933         per-assembly `Namespace' and a per-file `NamespaceEntry'.
21934
21935         * typemanager.cs (TypeManager.IsNamespace): Removed.
21936         (TypeManager.ComputeNamespaces): Only compute namespaces from
21937         loaded assemblies here, not the namespaces from the assembly we're
21938         currently compiling.
21939
21940 2003-07-08  Martin Baulig  <martin@ximian.com>
21941
21942         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
21943
21944 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21945
21946         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
21947         already fixed it.  
21948
21949         I thought about the memory savings here, but LookupTypeReflection
21950         is used under already very constrained scenarios.  Compiling
21951         corlib or mcs only exposes one hit, so it would not really reduce
21952         any memory consumption.
21953
21954 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21955
21956         * typemanager.cs: fixes bug #45889 by only adding public types from
21957         other assemblies to the list of known types.
21958
21959 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21960
21961         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
21962         on the type we resolved.
21963
21964 2003-07-05  Martin Baulig  <martin@ximian.com>
21965
21966         * pending.cs (PendingImplementation.ParentImplements): Don't
21967         create the proxy if the parent is abstract.
21968
21969         * class.cs (TypeContainer.DefineIndexers): Process explicit
21970         interface implementations first.  Fixes #37714.
21971
21972 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
21973
21974         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
21975         defined recursively;  but since we modify the input parameters
21976         (left is set to `this' temporarily), we reset this value if the
21977         left_is_explicit is false, which gives the original semantics to
21978         the code.  
21979
21980         * literal.cs (NullPointer): new class used to represent a null
21981         literal in a pointer context.
21982
21983         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
21984         type is a pointer, use a NullPointer object instead of a
21985         NullLiteral.   Closes 43687
21986
21987         (ExplicitConversion): Convert pointer values using
21988         the conv opcode to the proper type.
21989
21990         * ecore.cs (New): change ValueTypeVariable property into a method,
21991         that returns whether the valuetype is suitable for being used.
21992
21993         * expression.cs (Binary.DoNumericPromotions): Only return if we
21994         the int constant was a valid uint, and we can return both left and
21995         right as uints.  If not, we continue processing, to trigger the
21996         type conversion.  This fixes 39018.
21997
21998         * statement.cs (Block.EmitMeta): During constant resolution, set
21999         the CurrentBlock property on the emitcontext, so that we resolve
22000         constants propertly.
22001
22002 2003-07-02  Martin Baulig  <martin@ximian.com>
22003
22004         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
22005         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
22006
22007         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
22008         than emitting it here.
22009
22010         * statement.cs: Fixed some more flow analysis bugs.
22011
22012 2003-07-02  Martin Baulig  <martin@ximian.com>
22013
22014         * class.cs (MethodData.Define): When implementing interface
22015         methods, set Final unless we're Virtual.
22016
22017         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
22018         check work for interface methods.
22019
22020 2003-07-01  Martin Baulig  <martin@ximian.com>
22021
22022         * ecore.cs (EmitContext.This): Replaced this property with a
22023         GetThis() method which takes a Location argument.  This ensures
22024         that we get the correct error location for a CS0188.
22025
22026 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
22027
22028         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
22029         ImplicitStandardConversion.
22030
22031         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
22032
22033 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
22034
22035         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
22036         optimization.
22037
22038 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
22039
22040         * class.cs (Constructor.Define): Turn off initlocals for unsafe
22041         constructors.
22042
22043         (MethodData.Define): Turn off initlocals for unsafe methods.
22044
22045 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
22046
22047         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
22048         complete;  Fixes #37521.
22049
22050         * delegate.cs: Use Modifiers.TypeAttr to compute the
22051         TypeAttributes, instead of rolling our own.  This makes the flags
22052         correct for the delegates.
22053
22054 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
22055
22056         * class.cs (Constructor.Define): Set the private flag for static
22057         constructors as well.
22058
22059         * cs-parser.jay (statement_expression): Set the return value to
22060         null, to avoid a crash when we catch an error.
22061
22062 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
22063
22064         * cs-parser.jay: Applied patch from Jackson that adds support for
22065         extern and unsafe modifiers to destructor declarations.
22066
22067         * expression.cs: Report error 21 if the user is trying to index a
22068         System.Array.
22069
22070         * driver.cs: Add an error message, suggested by the bug report.
22071
22072         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
22073         if we do not have a ": this ()" constructor initializer.  Fixes 45149
22074
22075 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
22076
22077         * namespace.cs: Add some information to reduce FAQs.
22078
22079 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
22080
22081         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
22082         underlying enumeration types.  Fixes #43915.
22083
22084         * expression.cs: Treat ushort/short as legal values to be used in
22085         bitwise operations.
22086
22087 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22088
22089         * delegate.cs: transfer custom attributes for paramenters from
22090         the delegate declaration to Invoke and BeginInvoke.
22091
22092 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22093
22094         * attribute.cs: handle custom marshalers and emit marshal info
22095         for fields, too.
22096
22097 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
22098
22099         * makefile.gnu: Added anonymous.cs to the compiler sources.
22100
22101 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
22102
22103         * iterators.cs: Change the name of the proxy class to include two
22104         underscores.
22105
22106         * cs-parser.jay: Update grammar to include anonymous methods.
22107
22108         * anonymous.cs: new file.
22109
22110 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
22111
22112         * class.cs (Field.Define): Add missing test for pointers and
22113         safety. 
22114
22115 2003-05-27  Ravi Pratap  <ravi@ximian.com>
22116
22117         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
22118         we use the stobj opcode.
22119
22120         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
22121         since it wasn't the correct fix. 
22122
22123         It still is puzzling that we are required to use stobj for IntPtr
22124         which seems to be a ValueType.
22125
22126 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
22127
22128         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
22129         during regular simple name resolution.   Now, the trick is that
22130         instead of returning for processing the simplename, we do a
22131         TypeManager.LookupType (ie, a rooted lookup as opposed to a
22132         contextual lookup type).   If a match is found, return that, if
22133         not, return for further composition.
22134
22135         This fixes long-standing 30485.
22136
22137         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
22138         using the address to initialize an object, do an Stobj instead of
22139         using the regular Stelem.
22140
22141         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
22142         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
22143         Because if we are a BaseIndexerAccess that value will be true.
22144         Fixes 43643.
22145
22146         * statement.cs (GotoCase.Resolve): Return after reporting an
22147         error, do not attempt to continue. 
22148
22149         * expression.cs (PointerArithmetic.Emit): If our operand is a
22150         long, convert our constants to match the operand before
22151         multiplying.  Convert to I type before adding.   Fixes 43670.
22152
22153 2003-05-14  Ravi Pratap  <ravi@ximian.com>
22154
22155         * enum.cs (ImplicitConversionExists) : Rename to
22156         ImplicitEnumConversionExists to remove ambiguity. 
22157
22158         * ecore.cs (NullCast): New type of cast expression class which
22159         basically is very similar to EmptyCast with the difference being
22160         it still is a constant since it is used only to cast a null to
22161         something else
22162         (eg. (string) null)
22163
22164         * convert.cs (ImplicitReferenceConversion): When casting a null
22165         literal, we return a NullCast.
22166
22167         * literal.cs (NullLiteralTyped): Remove - I don't see why this
22168         should be around anymore.
22169
22170         The renaming (reported was slightly wrong). Corrections:
22171
22172         ConvertImplicitStandard -> ImplicitConversionStandard
22173         ConvertExplicitStandard -> ExplicitConversionStandard
22174
22175         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
22176         before passing them in !
22177
22178         * convert.cs (ImplicitConversionStandard): When comparing for
22179         equal expr and target types, ensure that expr is not a
22180         NullLiteral.
22181
22182         In general, we must not be checking (expr_type ==
22183         target_type) in the top level conversion methods
22184         (ImplicitConversion, ExplicitConversion etc). This checking is
22185         done in the methods that they delegate to.
22186
22187 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
22188
22189         * convert.cs: Move Error_CannotConvertType,
22190         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
22191         ImplicitNumericConversion, ImplicitConversionExists,
22192         ImplicitUserConversionExists, StandardConversionExists,
22193         FindMostEncompassedType, FindMostSpecificSource,
22194         FindMostSpecificTarget, ImplicitUserConversion,
22195         ExplicitUserConversion, GetConversionOperators,
22196         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
22197         TryImplicitIntConversion, Error_CannotConvertImplicit,
22198         ConvertImplicitRequired, ConvertNumericExplicit,
22199         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
22200         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
22201         its own file.
22202
22203         Perform the following renames:
22204
22205         StandardConversionExists -> ImplicitStandardConversionExists
22206         ConvertImplicit -> ImplicitConversion
22207         ConvertImplicitStandard -> ImplicitStandardConversion
22208         TryImplicitIntConversion -> ImplicitIntConversion
22209         ConvertImplicitRequired -> ImplicitConversionRequired
22210         ConvertNumericExplicit -> ExplicitNumericConversion
22211         ConvertReferenceExplicit -> ExplicitReferenceConversion
22212         ConvertExplicit -> ExplicitConversion
22213         ConvertExplicitStandard -> ExplicitStandardConversion
22214
22215 2003-05-19  Martin Baulig  <martin@ximian.com>
22216
22217         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22218         (TypeInfo): Added support for structs having structs as fields.
22219
22220         * ecore.cs (FieldExpr): Implement IVariable.
22221         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22222         VariableInfo for the field.
22223
22224 2003-05-18  Martin Baulig  <martin@ximian.com>
22225
22226         * expression.cs (This.DoResolve): Report a CS0027 if we're
22227         emitting a field initializer.
22228
22229 2003-05-18  Martin Baulig  <martin@ximian.com>
22230
22231         * expression.cs (This.ResolveBase): New public function.
22232         (This.DoResolve): Check for CS0188.
22233
22234         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22235         This.Resolve().
22236
22237         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22238         `instance_expression' to null if we don't have any non-static
22239         methods.
22240
22241 2003-05-18  Martin Baulig  <martin@ximian.com>
22242
22243         Reworked the way how local variables and parameters are handled by
22244         the flow analysis code.
22245
22246         * statement.cs (TypeInfo, VariableMap): New public classes.
22247         (VariableInfo): New public class.  This is now responsible for
22248         checking whether a variable has been assigned.  It is used for
22249         parameters and local variables.
22250         (Block.EmitMeta): Take the InternalParameters as argument; compute
22251         the layout of the flow vectors here.
22252         (Block.LocalMap, Block.ParameterMap): New public properties.
22253         (FlowBranching): The .ctor doesn't get the InternalParameters
22254         anymore since Block.EmitMeta() now computes the layout of the flow
22255         vector.
22256         (MyStructInfo): This class is now known as `StructInfo' and nested
22257         in `TypeInfo'; we don't access this directly anymore.
22258
22259         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22260         property and removed IsAssigned(), IsFieldAssigned(),
22261         SetAssigned() and SetFieldAssigned(); we now call them on the
22262         VariableInfo so we don't need to duplicate this code everywhere.
22263
22264         * expression.cs (ParameterReference): Added `Block block' argument
22265         to the .ctor.
22266         (LocalVariableReference, ParameterReference, This): The new
22267         VariableInfo class is now responsible for all the definite
22268         assignment stuff.
22269
22270         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22271         IsParameterAssigned, SetParameterAssigned): Removed.
22272
22273 2003-05-18  Martin Baulig  <martin@ximian.com>
22274
22275         * typemanager.cs (InitCoreTypes): Try calling
22276         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22277         the 3-args-version.  Corlib now also needs our `void_type'.
22278         (GetMethod): Added overloaded version which takes an optional
22279         `bool report_errors' to allow lookups of optional methods.
22280
22281 2003-05-12  Martin Baulig  <martin@ximian.com>
22282
22283         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22284         only used for locals and not for parameters.
22285
22286 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22287
22288         * support.cs (InternalParameters.ParameterType): Return the
22289         ExternalType of the parameter.
22290
22291         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22292         they were unused.
22293
22294 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22295
22296         * class.cs (MethodData.Define): Do not set the `newslot' on
22297         interface members, if they are also flagged as "override".
22298
22299         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22300         better code for ++i and i++.  This only works for static fields
22301         and local variables.
22302
22303         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22304         want to pull the DeclSpace out of the builder_to_declspace instead
22305         of the TypeBuilder (like in TypeContainer.FindMembers).
22306
22307         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22308         instead of LookupTypeContainer.  Fixes the crash on .NET for
22309         looking up interface members.
22310
22311         * const.cs: Create our own emit context during the Definition
22312         stage, so that constants are evaluated in the proper context, when
22313         a recursive definition happens.
22314
22315 2003-05-11  Martin Baulig  <martin@ximian.com>
22316
22317         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22318         new block for a switch section.
22319         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22320         the adding/lookup in the switch block.  Fixes #39828.
22321
22322 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22323
22324         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22325         functionality: I needed to convert the data after I had performed
22326         the add/sub operation into the operands type size.
22327
22328         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22329         pass the type for the box operation, otherwise the resulting
22330         object would have been of type object.
22331
22332         (BoxedCast): Add constructor to specify the type to box as.
22333
22334 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22335
22336         * iterators.cs: I was reusing the `count' variable inadvertently,
22337         take steps to not allow this to happen.
22338
22339 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22340
22341         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22342         by creating an array at the point where the params starts and
22343         putting all those arguments there, then adjusting the size of the
22344         array.
22345
22346 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22347
22348         * expression.cs (New.AddressOf): Implement interface
22349         IMemoryLocation.  This is used when the `new' operator is used in
22350         the context of an invocation to a method on a value type.
22351
22352         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22353         example. 
22354
22355         * namespace.cs: Also check the using aliases here.
22356
22357         * driver.cs: Move the test for using validity after the types have
22358         been entered, so we do a single pass that also includes the using
22359         aliases. 
22360
22361         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22362         in the regular case.   CreateSiblingForFinally is doing extra
22363         error checking.
22364
22365         * attribute.cs (GetAttributeArgumentExpression): Store the result
22366         on an out value, and use the return value to indicate failure
22367         instead of using null (which is a valid return for Constant.GetValue).
22368
22369         * statement.cs: Perform the analysis flow for the increment
22370         portion after the statement, because this will be the real flow of
22371         execution.  Fixes #42385
22372
22373         * codegen.cs (EmitContext.EmitArgument,
22374         EmitContext.EmitStoreArgument): New helper functions when the
22375         RemapToProxy flag is set.
22376
22377         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22378         function.
22379
22380         Add support for remapping parameters. 
22381
22382         * iterators.cs: Propagate parameter values;  Store parameter
22383         values in the proxy classes.
22384
22385 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22386
22387         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22388         need a proxy reference;  I do not know what I was thinking
22389
22390         * cs-parser.jay (constructor_initializer): catch another error,
22391         and display nice message.
22392
22393         (field_declaration): catch void field declaration
22394         to flag a better error. 
22395
22396         * class.cs (MemberBase.CheckBase): Report an error instead of a
22397         warning if a new protected member is declared in a struct. 
22398         (Field.Define): catch the error of readonly/volatile.
22399
22400         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22401
22402         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22403         volatile variable is taken
22404
22405 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22406
22407         * statement.cs (Fixed.Resolve): Report an error if we are not in
22408         an unsafe context.
22409
22410 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22411
22412         * typemanager.cs: reuse the code that handles type clashes for
22413         delegates and enumerations.
22414
22415         * class.cs (Report28): Always report.
22416
22417         * expression.cs (EncodeAsAttribute): Allow nulls here.
22418
22419 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22420
22421         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22422         the functionality for testing whether an expression is valid for
22423         an attribute here.  Also handle the case of arrays of elements
22424         being stored. 
22425
22426         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22427         encoding a linear array into an array of objects that are suitable
22428         to be passed to an CustomAttributeBuilder.
22429
22430         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22431
22432         * ecore.cs: (FieldExpr): Handle field remapping here.
22433
22434         * iteratators.cs: Pass the instance variable (if the method is an
22435         instance method) to the constructors, so we can access the field
22436         variables on the class.
22437
22438         TODO: Test this with structs.  I think the THIS variable on
22439         structs might have to be a pointer, and not a refenrece
22440
22441 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22442
22443         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22444         local variables to fields in a proxy class.
22445
22446         * iterators.cs (PopulateProxy): Rename our internal fields to
22447         <XXX>.  
22448         Create a <THIS> field if we are an instance method, so we can
22449         reference our parent container variables.
22450         (MapVariable): Called back from the EmitContext code to enter a
22451         new variable to field mapping into the proxy class (we just create
22452         a FieldBuilder).
22453
22454         * expression.cs
22455         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22456         for using the remapped locals to fields.
22457
22458         I placed the code here, because that gives the same semantics to
22459         local variables, and only changes the Emit code.
22460
22461         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22462         statements inside iterators.
22463         (VariableInfo): Add a FieldBuilder for the cases when we are
22464         remapping local variables to fields in a proxy class
22465
22466         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22467         current_block != null.
22468
22469         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22470         not cope with strings, as it has been moved to the
22471         TableSwitchEmit.  Fixed bug in switch generation.
22472
22473         * expression.cs (New.DoResolve): Provide more context for the user
22474         when reporting an error.
22475
22476         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22477         pointers. 
22478
22479         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22480         check the permissions for it.  Note than in a type-resolution
22481         context the check was already present in DeclSpace.ResolveType,
22482         but was missing from the MemberAccess.
22483
22484         (ArrayCreation.CheckIndices): warn if the user has
22485         more nested levels of expressions, but there are no more
22486         dimensions specified.  Avoids crash on bug 41906.
22487
22488 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22489
22490         * statement.cs (Block): replace Implicit bool, for a generic
22491         flags.   
22492         New flag: `Unchecked'.  This is used during the EmitMeta phase
22493         (which is out-of-line with the regular Resolve/Emit process for a
22494         statement, as this is done ahead of time, but still gets a chance
22495         to call constant resolve).
22496
22497         (Block.Flags): new enum for adding a new flag.
22498
22499         (Block.EmitMeta): track the state of unchecked.
22500
22501         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22502         to enable constant resolution to work there as well.
22503
22504 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22505
22506         * typemanager.cs (ienumerable_type): Also look up
22507         System.Collections.IEnumerable. 
22508
22509 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22510
22511         TODO: Test more than one conditional per method.
22512
22513         * class.cs (Indexer.Define): Report the location where the user is
22514         referencing the unsupported feature.
22515
22516         (MethodData): Overload the use of `conditionals' to
22517         minimize the creation of needless ArrayLists.   This saves roughly
22518         212kb on my machine.
22519
22520         (Method): Implement the new IIteratorContainer interface.
22521         (Method.SetYields): Implement the method by setting the ModFlags
22522         to contain METHOD_YIELDS.
22523
22524         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22525         which just got set to null.
22526
22527         * iterators.cs: New file.
22528
22529         (Yield, YieldBreak): New statements.
22530
22531         * statement.cs (Return.Resolve): Flag an error if we are used in
22532         an iterator method.
22533
22534         * codegen.cs (InIterator): New flag set if the code is being
22535         compiled in an iterator method.
22536
22537         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22538         internal modifier, and we just use it to avoid adding extra
22539         fields, as this is seldom used.  
22540
22541         * cs-parser.jay: Add yield_statement (yield and yield break).
22542
22543         * driver.cs: New flag -v2 to turn on version 2 features. 
22544
22545         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22546         hashtable when v2 is enabled.
22547
22548 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22549
22550         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22551         there is already a namespace defined with this name.
22552
22553         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22554         people upgraded their corlibs.
22555
22556         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22557         always use fully qualified types, no need to use the compiler
22558         front end.
22559
22560         (TypeManager.IsNamespace): Use binarysearch.
22561
22562         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22563         AddDelegate): I did not quite use the new IsValid API properly: I
22564         have to pass the short-name and the fullname.  I was passing only
22565         the basename instead of the fullname sometimes. 
22566
22567         (TypeContainer.DefineType): call NamespaceClash.
22568
22569         * interface.cs (Interface.DefineType): use NamespaceClash before
22570         defining the type.
22571
22572         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22573         defining the type.
22574
22575         * enum.cs: (Enum.DefineType): use NamespaceClash before
22576         defining the type.
22577
22578         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22579         speed increase.  First, use the negative_hits cache when we get a
22580         negative.  Second, add the type with its full original name
22581         instead of the new . and + encoded name (reflection uses + to
22582         separate type from a nested type).  Use LookupTypeReflection
22583         directly which bypasses the type->name hashtable (that we already
22584         know does not contain the type.
22585
22586         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22587         location/container type. 
22588
22589         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22590
22591 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22592
22593         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22594
22595         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22596         method is being referenced in the method group from a static
22597         context, and report error 120 if so.
22598
22599         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22600         Error118. 
22601
22602         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22603         is created, we create the A namespace).
22604
22605         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22606         Fixes #41591
22607
22608 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22609
22610         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22611         invocation to ModuleBuilder.GetType with the same values will
22612         return a new type instance, so we need to cache its return
22613         values. 
22614
22615         * expression.cs (Binary.ResolveOperator): Only allow the compare
22616         operators on enums if they are of the same type.
22617
22618         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22619         types of ValueType on their own case.  Before we were giving them
22620         the same treatment as objects.
22621
22622         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22623         fullname.  Short name is used to compare against container name.
22624         Fullname is used to check against defined namespace names.
22625
22626         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22627         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22628
22629         (Method.CheckBase): Call parent.
22630         (MemberBase.CheckBase): Check for protected members on sealed
22631         classes.
22632         (PropertyBase.CheckBase): Call parent.
22633         (Field.Define): Call parent.
22634
22635         * report.cs: Negative error codes are now mapped to 8000 - code,
22636         so that the display is render more nicely.
22637
22638         * typemanager.cs: Do not use try/catch, instead report a regular
22639         error. 
22640
22641         (GetPointerType, GetReferenceType): These methods provide
22642         mechanisms to obtain the T* and T& from a T.  We had the code
22643         previously scattered around the code base, and it also used
22644         TypeManager.LookupType that would go through plenty of caches.
22645         This one goes directly to the type source.
22646
22647         In some places we did the Type.GetType followed by
22648         ModuleBuilder.GetType, but not in others, so this unifies the
22649         processing as well.
22650
22651         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22652         statements now that we have namespace information.
22653
22654         * typemanager.cs (IsNamespace): New method, returns whether the
22655         string presented is a namespace or not.
22656
22657         (ComputeNamespaces): New public entry point, computes the list of
22658         available namespaces, using the GetNamespaces API call in Mono, or
22659         the slower version in MS.NET.   
22660
22661         Now before we start the semantic analysis phase, we have a
22662         complete list of namespaces including everything that the user has
22663         provided.
22664
22665         Deleted old code to cache namespaces in .nsc files.
22666
22667 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22668
22669         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22670         class/struct location definition Location for the implicit
22671         constructor location.
22672
22673         (Operator.Define): Use the location of the operator for the
22674         implicit Method definition.
22675
22676         (Constructor.Emit): use the constructor location for the implicit
22677         base initializer constructor.
22678
22679         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22680         and the Expression class now contains two new methods:
22681
22682         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22683         isolate type lookup from the rest of the resolution process.
22684
22685         Since we use Expressions to hold type definitions due to the way
22686         we parse the input we have historically overloaded Resolve to
22687         perform the Type lookups if a special flag is passed.  Now this is
22688         eliminated and two methods take their place. 
22689
22690         The differences in the two methods between xStep and xTerminal is
22691         that xStep is involved in our current lookup system that uses
22692         SimpleNames to compose a name, while xTerminal is used just to
22693         catch the case where the simplename lookup failed.
22694
22695 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22696
22697         * expression.cs (ResolveMemberAccess): Remove redundant code.
22698         TypeExpr expressions are always born fully resolved.
22699
22700         * interface.cs (PopulateMethod): Do not lookup the types twice.
22701         We were doing it once during SemanticAnalysis and once during
22702         PopulateMethod.
22703
22704         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22705         in local variable type definitions, were being returned as a
22706         SimpleName (we decomposed everything into a string), that is
22707         because primary_expression was being used instead of a type in the
22708         grammar (reduce/reduce conflicts).
22709
22710         The part that was wrong is that we converted the expression into a
22711         string (an oversimplification in one hand, compounded with primary
22712         expressions doing string concatenation).
22713
22714         So things like:
22715
22716         A.B.C [] x;
22717
22718         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22719         using clauses from working on this particular context.  And a type
22720         was being matched directly against "A.B.C[]".
22721
22722         We now use the correct approach, and allow for ComposedCast to be
22723         part of the unary expression.  So the "A.B.C []" become a composed
22724         cast of "A.B.C" (as a nested group of MemberAccess with a
22725         SimpleName at the end) plus the rank composition "[]". 
22726
22727         Also fixes 35567
22728
22729 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22730
22731         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22732         for the access level checking.
22733
22734         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22735         `TypeContainer container', because I kept getting confused when I
22736         was debugging this code.
22737
22738         * expression.cs (Indexers): Instead of tracking getters/setters,
22739         we now track them in parallel.  We create one arraylist less, but
22740         most importantly it is possible now for the LValue code to find a
22741         matching get for a set.
22742
22743         (IndexerAccess.DoResolveLValue): Update the code.
22744         GetIndexersForType has been modified already to extract all the
22745         indexers from a type.  The code assumed it did not.
22746
22747         Also make the code set the correct return type for the indexer.
22748         This was fixed a long time ago for properties, but was missing for
22749         indexers.  It used to be void_type.
22750
22751         (Binary.Emit): Test first for doubles instead of
22752         floats, as they are more common.
22753
22754         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22755         when dealing with floats and the <=, >= operators.  This fixes bug
22756         #39314 
22757
22758         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22759         to load the array value by emitting a load on the foreach variable
22760         type.  This was incorrect.  
22761
22762         We now emit the code to load an element using the the array
22763         variable type, and then we emit the conversion operator.
22764
22765         Fixed #40176
22766
22767 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22768
22769         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22770
22771 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22772
22773         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22774         test for protection before we test for signatures. 
22775
22776         (MethodSignature.ToString): implement.
22777
22778         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22779         to the case where we reduced into a LongConstant.
22780
22781         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22782         depend on whether the information is acurrate, because the
22783         Microsoft runtime will always claim that the array type is public,
22784         regardless of the real state.
22785
22786         If the type is a pointer, another problem happens: the type is
22787         reported as non-public in Microsoft.  
22788
22789         In both cases we have to call CheckAccessLevel recursively with
22790         the underlying type as the argument to be tested.
22791
22792 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22793
22794         * assign.cs (Assign.Emit): If we are dealing with a compound
22795         assignment expression, we should use the code path that stores the
22796         intermediate result in a temporary value.  This fixes #40903.
22797
22798         *expression.cs (Indirection.ToString): Provide ToString method for
22799         debugging. 
22800
22801 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
22802
22803         * class.cs: Null out fields holding references to Block objects so
22804         they can be garbage collected.
22805
22806         * expression.cs (OverloadResolve): Remove unused local.
22807
22808 2003-04-07  Martin Baulig  <martin@ximian.com>
22809
22810         * codegen.cs (EmitContext.CurrentFile): New public field.
22811         (EmitContext.Mark): Use the CurrentFile to check whether the
22812         location is in the correct file.
22813         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
22814
22815 2003-04-07  Martin Baulig  <martin@ximian.com>
22816
22817         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
22818
22819         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
22820         location.  [FIXME: The location argument which gets passed to this
22821         method is sometimes wrong!]
22822
22823 2003-04-07  Nick Drochak <ndrochak@gol.com>
22824
22825         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
22826
22827 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
22828
22829         * expression.cs (Indirection.EmitAssign): We were using the
22830         temporary, but returning immediately instead of continuing the
22831         EmitAssing flow.
22832
22833 2003-04-06  Martin Baulig  <martin@ximian.com>
22834
22835         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
22836         if it's a nested child, but also deriving from the outer class.
22837         See test 190.cs.
22838
22839         * typemanager.cs (IsNestedChildOf): Make this work if it's a
22840         nested child, but also deriving from the outer class.  See
22841         test-190.cs.
22842         (FilterWithClosure): We may access private members of the outer
22843         class if we're a nested child and deriving from the outer class.
22844         (RealMemberLookup): Only set `closure_private_ok' if the
22845         `original_bf' contained BindingFlags.NonPublic.
22846
22847 2003-04-05  Martin Baulig  <martin@ximian.com>
22848
22849         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
22850
22851 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
22852
22853         * class.cs (Event.Define): Do not allow abstract events to have
22854         initializers. 
22855
22856 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
22857
22858         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
22859         block in event declarations.
22860
22861         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
22862         value type, get its address.
22863
22864         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
22865         leaving a class on the stack instead of a boolean value (int
22866         0/1).  Change the code so we compare against null, and then the
22867         result against zero.
22868
22869         * class.cs (TypeContainer.GetClassBases): We were checking for the
22870         parent class being sealed too late.
22871
22872         * expression.cs (Binary.Emit): For <= and >= when dealing with
22873         floating point values, use cgt.un and clt.un instead of cgt and
22874         clt alone.
22875
22876 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
22877
22878         * statement.cs: Apply the same optimization as MS: skip the 
22879         GetEnumerator returning an IEnumerator, and use the one returning a 
22880         CharEnumerator instead. This allows us to avoid the try-finally block 
22881         and the boxing.
22882
22883 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
22884
22885         * cs-parser.jay: Attributes cannot be applied to
22886                          namespaces. Fixes #40473
22887
22888 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22889
22890         * class.cs:
22891         (Add*): check if the name is valid using the full name for constants,
22892         fields, properties and events.
22893
22894 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
22895
22896         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
22897         char constants to be part of the enumeration.
22898
22899         * expression.cs (Conditional.DoResolve): Add support for operator
22900         true. Implements the missing functionality from 14.12
22901
22902         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
22903         operator true/false as required by the spec.
22904
22905         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
22906         implicit conversion to boolean.
22907
22908         * statement.cs (Statement.ResolveBoolean): A boolean expression is
22909         also one where the type implements `operator true'. 
22910
22911         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
22912         get an expression that will invoke operator true based on an
22913         expression.  
22914
22915         (GetConversionOperators): Removed the hack that called op_True
22916         here.  
22917
22918         (Expression.ResolveBoolean): Move this from Statement.
22919
22920 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
22921
22922         * ecore.cs (FieldExpr): do not allow initialization of initonly
22923         fields on derived classes
22924
22925 2003-03-13  Martin Baulig  <martin@ximian.com>
22926
22927         * statement.cs (Block.Emit): Call ig.BeginScope() and
22928         ig.EndScope() when compiling with debugging info; call
22929         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
22930
22931 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
22932
22933         * expression.cs (Indexers): Do not construct immediately, allow
22934         for new members to be appended as we go.  Fixes 38143
22935
22936 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22937
22938         * expression.cs: save/restore context when resolving an unchecked
22939         expression.
22940
22941 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
22942
22943         * cfold.cs: Catch division by zero in modulus operator during
22944         constant folding.
22945
22946 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
22947
22948         * interface.cs (Interface.DefineMembers): Avoid defining members
22949         twice. 
22950
22951 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
22952
22953         * driver.cs: handle the +/- options for -noconfig
22954
22955         * statement.cs (Unckeched.Resolve): Also track the state of
22956         unchecked in the Resolve phase.
22957
22958 2003-02-27  Martin Baulig  <martin@ximian.com>
22959
22960         * ecore.cs (Expression.MemberLookup): Don't create a
22961         MethodGroupExpr for something which is not a method.  Fixes #38291.
22962
22963 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
22964
22965         * class.cs (MemberBase.CheckParameters): Also check that the type
22966         is unmanaged if it is a pointer.
22967
22968         * expression.cs (SizeOf.Resolve): Add location information.
22969
22970         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
22971         a managed type is declared.
22972
22973         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
22974         parameter modifiers as well.  Fixes bug 38606
22975
22976         * class.cs: Very sad.  Am backing out the speed up changes
22977         introduced by the ArrayList -> Array in the TypeContainer, as they
22978         were not actually that much faster, and introduced a bug (no error
22979         reports on duplicated methods).
22980
22981         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
22982         source first, this will guarantee that we have a valid expression
22983         before calling in lower levels functions that will require a
22984         resolved object.  Then use this original_source in the
22985         target.ResolveLValue instead of the original source that was
22986         passed to us.
22987
22988         Another change.  Use target.Resolve instead of LValueResolve.
22989         Although we are resolving for LValues, we will let the Assign code
22990         take care of that (it will be called again from Resolve).  This
22991         basically allows code like this:
22992
22993         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
22994         class Y { void A (X x) { x [0] += o; }
22995
22996         The problem was that the indexer was trying to resolve for
22997         set_Item (idx, object o) and never finding one.  The real set_Item
22998         was set_Item (idx, X).  By delaying the process we get the right
22999         semantics. 
23000
23001         Fixes bug 36505
23002
23003 2003-02-23  Martin Baulig  <martin@ximian.com>
23004
23005         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
23006         while calling DoEmit ().
23007
23008         * codegen.cs (EmitContext.Mark): Don't mark locations in other
23009         source files; if you use the #line directive inside a method, the
23010         compiler stops emitting line numbers for the debugger until it
23011         reaches the end of the method or another #line directive which
23012         restores the original file.
23013
23014 2003-02-23  Martin Baulig  <martin@ximian.com>
23015
23016         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
23017
23018 2003-02-23  Martin Baulig  <martin@ximian.com>
23019
23020         * statement.cs (Block.AddChildVariableNames): We need to call this
23021         recursively, not just for our immediate children.
23022
23023 2003-02-23  Martin Baulig  <martin@ximian.com>
23024
23025         * class.cs (Event.Define): Always make the field private, like csc does.
23026
23027         * typemanager.cs (TypeManager.RealMemberLookup): Make events
23028         actually work, fixes bug #37521.
23029
23030 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
23031
23032         * delegate.cs: When creating the various temporary "Parameters"
23033         classes, make sure that we call the ComputeAndDefineParameterTypes
23034         on those new parameters (just like we do with the formal ones), to
23035         allow them to be resolved in the context of the DeclSpace.
23036
23037         This fixes the bug that Dick observed in Bugzilla #38530.
23038
23039 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
23040
23041         * expression.cs (ResolveMemberAccess): When resolving a constant,
23042         do not attempt to pull a constant if the value was not able to
23043         generate a valid constant.
23044
23045         * const.cs (LookupConstantValue): Do not report more errors than required.
23046
23047 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23048
23049         * expression.cs: fixes bug #38328.
23050
23051 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23052
23053         * class.cs: Changed all the various members that can be part of a
23054         class from being an ArrayList to be an Array of the right type.
23055         During the DefineType type_list, interface_list, delegate_list and
23056         enum_list are turned into types, interfaces, delegates and enums
23057         arrays.  
23058
23059         And during the member population, indexer_list, event_list,
23060         constant_list, field_list, instance_constructor_list, method_list,
23061         operator_list and property_list are turned into their real arrays.
23062
23063         Although we could probably perform this operation earlier, for
23064         good error reporting we need to keep the lists and remove the
23065         lists for longer than required.
23066
23067         This optimization was triggered by Paolo profiling the compiler
23068         speed on the output of `gen-sample-program.pl' perl script. 
23069
23070         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
23071         not crash in methods like MemberLookupFailed that use this field.  
23072
23073         This problem arises when the compiler fails to resolve a type
23074         during interface type definition for example.
23075
23076 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23077
23078         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
23079         inherit from System.Object, so we have to stop at null, not only
23080         when reaching System.Object.
23081
23082 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
23083
23084         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
23085         DeclaredOnly because the parent indexer might have had a different
23086         name, but did not loop until the top of the hierarchy was reached.
23087
23088         The problem this one fixes is 35492: when a class implemented an
23089         indexer from an interface, we were getting the interface method
23090         (which was abstract) and we were flagging an error (can not invoke
23091         abstract method).
23092
23093         This also keeps bug 33089 functioning, and test-148 functioning.
23094
23095         * typemanager.cs (IsSpecialMethod): The correct way of figuring
23096         out if a method is special is to see if it is declared in a
23097         property or event, or whether it is one of the predefined operator
23098         names.   This should fix correctly #36804.
23099
23100 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
23101
23102         The goal here is to remove the dependency on EmptyCast.Peel ().
23103         Killing it completely.
23104
23105         The problem is that currently in a number of places where
23106         constants are expected, we have to "probe" for an EmptyCast, and
23107         Peel, which is not the correct thing to do, as this will be
23108         repetitive and will likely lead to errors. 
23109
23110         The idea is to remove any EmptyCasts that are used in casts that
23111         can be reduced to constants, so we only have to cope with
23112         constants. 
23113
23114         This bug hunt was triggered by Bug 37363 and the desire to remove
23115         the duplicate pattern where we were "peeling" emptycasts to check
23116         whether they were constants.  Now constants will always be
23117         constants.
23118
23119         * ecore.cs: Use an enumconstant here instead of wrapping with
23120         EmptyCast.  
23121
23122         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
23123         throwing me off.  By handling this we can get rid of a few hacks.
23124
23125         * statement.cs (Switch): Removed Peel() code.
23126
23127 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
23128
23129         * class.cs: Location information for error 508
23130
23131         * expression.cs (New.DoResolve): Add a guard against double
23132         resolution of an expression.  
23133
23134         The New DoResolve might be called twice when initializing field
23135         expressions (see EmitFieldInitializers, the call to
23136         GetInitializerExpression will perform a resolve on the expression,
23137         and later the assign will trigger another resolution
23138
23139         This leads to bugs (#37014)
23140
23141         * delegate.cs: The signature for EndInvoke should contain any ref
23142         or out parameters as well.  We were not doing this in the past. 
23143
23144         * class.cs (Field.Define): Do not overwrite the type definition
23145         inside the `volatile' group.  Turns out that volatile enumerations
23146         were changing the type here to perform a validity test, which
23147         broke conversions. 
23148
23149 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
23150
23151         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
23152         and structs, we do not want to load the instance variable
23153
23154         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
23155         enum_type has to be handled like an object reference (implicit
23156         conversions exists from this to object), but the regular IsClass
23157         and IsValueType tests will never return true for this one.
23158
23159         Also we use TypeManager.IsValueType instead of type.IsValueType,
23160         just for consistency with the rest of the code (this is only
23161         needed if we ever use the construct exposed by test-180.cs inside
23162         corlib, which we dont today).
23163
23164 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
23165
23166         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
23167         just InternalCall.
23168
23169 2003-02-09  Martin Baulig  <martin@ximian.com>
23170
23171         * namespace.cs (Namespace..ctor): Added SourceFile argument.
23172         (Namespace.DefineNamespaces): New static public method; this is
23173         called when we're compiling with debugging to add all namespaces
23174         to the symbol file.
23175
23176         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
23177         pass it to the Namespace's .ctor.
23178
23179         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
23180         and MethodBase arguments; pass the namespace ID to the symwriter;
23181         pass the MethodBase instead of the token to the symwriter.
23182         (SymbolWriter.DefineNamespace): New method to add a namespace to
23183         the symbol file.
23184
23185 2003-02-09  Martin Baulig  <martin@ximian.com>
23186
23187         * symbolwriter.cs: New file.  This is a wrapper around
23188         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
23189         methods here in near future.
23190
23191 2003-02-09  Martin Baulig  <martin@ximian.com>
23192
23193         * codegen.cs (EmitContext.Mark): Just pass the arguments to
23194         ILGenerator.MarkSequencePoint() which are actually used by the
23195         symbol writer.
23196
23197 2003-02-09  Martin Baulig  <martin@ximian.com>
23198
23199         * location.cs (SourceFile): New public sealed class.  This
23200         contains the name and an index which is used in the location's token.
23201         (Location): Reserve an appropriate number of bits in the token for
23202         the source file instead of walking over that list, this gives us a
23203         really huge performance improvement when compiling with debugging.
23204
23205         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23206         `SourceFile' argument instead of a string.
23207         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23208         but don't parse/tokenize here, we need to generate the list of all
23209         source files before we do that.
23210         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23211         the files.
23212
23213         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23214         instead of a string.
23215
23216         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23217         of a string.
23218
23219 2003-02-09  Martin Baulig  <martin@ximian.com>
23220
23221         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23222         filename on `#line default'.
23223
23224 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23225
23226         * statement.cs: don't clear the pinned var when the fixed statement
23227         returns from the method (fixes bug#37752).
23228
23229 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23230
23231         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23232         to IsValueType.
23233
23234 2003-02-07  Martin Baulig  <martin@ximian.com>
23235
23236         * driver.cs: Removed the `--debug-args' command line argument.
23237
23238         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23239         automatically by the AsssemblyBuilder.
23240         (CodeGen.InitializeSymbolWriter): We don't need to call any
23241         initialization function on the symbol writer anymore.  This method
23242         doesn't take any arguments.
23243
23244 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23245
23246         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23247         from referenced assemblies as well.
23248
23249 2003-02-02  Martin Baulig  <martin@ximian.com>
23250
23251         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23252
23253 2003-02-02  Martin Baulig  <martin@ximian.com>
23254
23255         * class.cs (Constructor.Emit): Open the symbol writer before
23256         emitting the constructor initializer.
23257         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23258         single-stepping through constructor initializers.
23259
23260 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23261
23262         * class.cs: Handle error 549: do not allow virtual methods in
23263         sealed classes. 
23264
23265 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23266
23267         * decl.cs: Check access levels when resolving types
23268
23269 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23270
23271         * statement.cs: Add parameters and locals set in catch blocks that might 
23272         return to set vector
23273
23274 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23275
23276         * class.cs (Operator): Set the SpecialName flags for operators.
23277
23278         * expression.cs (Invocation.DoResolve): Only block calls to
23279         accessors and operators on SpecialName methods.
23280
23281         (Cast.TryReduce): Handle conversions from char constants.
23282
23283
23284 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23285
23286         * statement.cs: small memory and time optimization in FlowBranching.
23287
23288 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23289
23290         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23291         problem that the last fix but in the other sid (Set).
23292
23293         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23294         access when there is no indexer in the hierarchy.
23295
23296 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23297
23298         * class.cs: Combine some if statements.
23299
23300 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23301
23302         * driver.cs: fixed bug #37187.
23303
23304 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23305
23306         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23307         any indexer, it's needed to build a list with all the indexers in the
23308         hierarchy (AllGetters), else we have problems. Fixes #35653.
23309
23310 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23311
23312         * class.cs (MethodData.Define): It is wrong for an interface
23313         implementation to be static in both cases: explicit and implicit.
23314         We were only handling this in one case.
23315
23316         Improve the if situation there to not have negations.
23317
23318         * class.cs (Field.Define): Turns out that we do not need to check
23319         the unsafe bit on field definition, only on usage.  Remove the test.
23320
23321 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23322
23323         * driver.cs: use assembly.Location instead of Codebase (the latest
23324         patch made mcs fail when using MS assemblies).
23325
23326 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23327
23328         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23329         get the path to *corlib.dll.
23330
23331 2003-01-21  Nick Drochak <ndrochak@gol.com>
23332
23333         * cs-tokenizer.cs:
23334         * pending.cs:
23335         * typemanager.cs: Remove compiler warnings
23336
23337 2003-01-20  Duncan Mak  <duncan@ximian.com>
23338
23339         * AssemblyInfo.cs: Bump the version number to 0.19.
23340
23341 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23342
23343         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23344
23345 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23346
23347         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23348
23349 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23350
23351         * cs-parser.jay: Small fix: we were not comparing the constructor
23352         name correctly.   Thanks to Zoltan for the initial pointer.
23353
23354 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23355
23356         * cs-tokenizer.cs: Set file name when specified with #line
23357
23358 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23359
23360         * cs-parser.jay: Only perform the constructor checks here if we
23361         are named like the class;  This will help provider a better
23362         error.  The constructor path is taken when a type definition is
23363         not found, but most likely the user forgot to add the type, so
23364         report that rather than the constructor error.
23365
23366 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23367
23368         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23369         allocations.
23370
23371 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23372
23373         * cs-parser.jay: Add cleanup call.
23374
23375 2003-01-13  Duncan Mak  <duncan@ximian.com>
23376
23377         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23378         consistent with other methods.
23379
23380 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23381
23382         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23383
23384 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23385
23386         * attribute.cs: only set GuidAttr to true when we have a
23387         GuidAttribute.
23388
23389 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23390
23391         * ecore.cs:
23392         * expression.cs:
23393         * typemanager.cs: fixes to allow mcs compile corlib with the new
23394         Type.IsSubclassOf fix.
23395
23396 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23397
23398         * expression.cs (LocalVariableReference.DoResolve): Classify a
23399         constant as a value, not as a variable.   Also, set the type for
23400         the variable.
23401
23402         * cs-parser.jay (fixed_statement): take a type instead of a
23403         pointer_type, so we can produce a better error message later.
23404
23405         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23406         as an error.  
23407
23408         (For.DoEmit): Make inifinite loops have a
23409         non-conditional branch back.
23410
23411         (Fixed.DoEmit): First populate the pinned variables, then emit the
23412         statement, then clear the variables.  Before I was emitting the
23413         code once for each fixed piece.
23414
23415
23416 2003-01-08  Martin Baulig  <martin@ximian.com>
23417
23418         * statement.cs (FlowBranching.MergeChild): A break in a
23419         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23420
23421 2003-01-08  Martin Baulig  <martin@ximian.com>
23422
23423         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23424         lives in the same number space than `param_map'.  Fixes #36154.
23425
23426 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23427
23428         * cs-parser.jay (constructor_declaration): Set the
23429         Constructor.ModFlags before probing for it.  This makes the
23430         compiler report 514, 515 and 132 (the code was there, but got
23431         broken). 
23432
23433         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23434         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23435         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23436
23437 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23438
23439         * enum.cs: create the enum static fields using the enum type.
23440
23441 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23442
23443         * class.cs: don't try to create the ParamBuilder for the return
23444         type if it's not needed (and handle it breaking for the ms runtime
23445         anyway).
23446
23447 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23448
23449         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23450
23451 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23452
23453         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23454         the command.   This showed up while compiling the JANET source
23455         code, which used \r as its only newline separator.
23456
23457 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23458
23459         * class.cs (Method.Define): If we are an operator (because it
23460         reuses our code), then set the SpecialName and HideBySig.  #36128
23461
23462 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23463
23464         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23465         exception, report error 120 `object reference required'.
23466
23467         * driver.cs: Add --pause option, used during to measure the size
23468         of the process as it goes with --timestamp.
23469
23470         * expression.cs (Invocation.DoResolve): Do not allow methods with
23471         SpecialName to be invoked.
23472
23473 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23474
23475         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23476         number before adding it.
23477
23478 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23479
23480         * ecore.cs (StandardImplicitConversion): When in an unsafe
23481         context, we allow conversion between void * to any other pointer
23482         type. This fixes bug #35973.
23483
23484 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23485
23486         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23487         is not thrown when extensionless outputs are used 
23488
23489 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23490
23491         * rootcontext.cs: fixed compilation of corlib.
23492
23493 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23494
23495         * attribute.cs (Attributes.Contains): Add new method.
23496
23497         * class.cs (MethodCore.LabelParameters): if the parameter is an
23498         `out' parameter, check that no attribute `[In]' has been passed.
23499
23500         * enum.cs: Handle the `value__' name in an enumeration.
23501
23502 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23503
23504         * decl.cs: Added special case to allow overrides on "protected
23505         internal" methods
23506
23507 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23508
23509         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23510         since it makes much more sense.
23511
23512         (Attributes.ctor): Don't require a Location parameter.
23513
23514         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23515
23516         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23517         since we already have that information per attribute.
23518
23519         * everywhere : make appropriate changes.
23520
23521         * class.cs (LabelParameters): Write the code which actually
23522         applies attributes to the return type. We can't do this on the MS
23523         .NET runtime so we flag a warning in the case an exception is
23524         thrown.
23525
23526 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23527
23528         * const.cs: Handle implicit null conversions here too.
23529
23530 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23531
23532         * class.cs (MethodCore.LabelParameters): Remove the extra
23533         Type [] parameter since it is completely unnecessary. Instead
23534         pass in the method's attributes so that we can extract
23535         the "return" attribute.
23536
23537 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23538
23539         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23540         of ignoring it and letting the compile continue.
23541
23542         * typemanager.cs (ChangeType): use an extra argument to return an
23543         error condition instead of throwing an exception.
23544
23545 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23546
23547         * expression.cs (Unary.TryReduce): mimic the code for the regular
23548         code path.  Perform an implicit cast in the cases where we can
23549         implicitly convert to one of the integral types, and then reduce
23550         based on that constant.   This fixes bug #35483.
23551
23552 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23553
23554         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23555
23556 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23557
23558         * namespace.cs: fixed bug #35489.
23559
23560 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23561
23562         * class.cs: Remove some dead code.
23563
23564         * cs-parser.jay: Estimate the number of methods needed
23565         (RootContext.MethodCount);
23566
23567         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23568         numbers instead of StringBuilders.
23569
23570         * support.cs (PtrHashtable): Add constructor with initial size;
23571         We can now reduce reallocations of the method table.
23572
23573 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23574
23575         * attribute.cs (ApplyAttributes): Keep track of the emitted
23576         attributes on a per-target basis. This fixes bug #35413.
23577
23578 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23579
23580         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23581         default to the Windows 1252 encoding.
23582
23583         (UnixParseOption): Support version, thanks to Alp for the missing
23584         pointer. 
23585
23586         * AssemblyInfo.cs: Add nice assembly information.
23587
23588         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23589         (bug 35169).
23590
23591         * cs-parser.jay: Allow a trailing comma before the close bracked
23592         in the attribute_section production.
23593
23594         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23595         address of the instance was being taken, I will take this out,
23596         because we take the address of the object immediately here.
23597
23598 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23599
23600         * typemanager.cs (AreMultipleAllowed): Take care of the most
23601         obvious case where attribute type is not in the current assembly -
23602         stupid me ;-)
23603
23604 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23605
23606         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23607         definitions, instead of doing that afterwards.  
23608
23609         Also we use a nice little hack, depending on the constructor, we
23610         know if we are a "composed" name or a simple name.  Hence, we
23611         avoid the IndexOf test, and we avoid 
23612
23613         * codegen.cs: Add code to assist in a bug reporter to track down
23614         the source of a compiler crash. 
23615
23616 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23617
23618         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23619         types have been emitted for a given element and flag an error
23620         if something which does not have AllowMultiple set is used more
23621         than once.
23622
23623         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23624         attribute types and their corresponding AllowMultiple properties
23625
23626         (AreMultipleAllowed): Check the property for a given type.
23627
23628         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23629         property in the case we have a TypeContainer.
23630
23631         (Attributes.AddAttribute): Detect duplicates and just skip on
23632         adding them. This trivial fix catches a pretty gross error in our
23633         attribute emission - global attributes were being emitted twice!
23634
23635         Bugzilla bug #33187 is now fixed.
23636
23637 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23638
23639         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23640         instead of pp_and).
23641
23642         * expression.cs (Binary.ResolveOperator): I can only use the
23643         Concat (string, string, string) and Concat (string, string,
23644         string, string) if the child is actually a concatenation of
23645         strings. 
23646
23647 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23648
23649         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23650         context where we need a 2-character lookahead.
23651
23652         * pending.cs (PendingImplementation): Rework so we can keep track
23653         of interface types all the time, and flag those which were
23654         implemented by parents as optional.
23655
23656 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23657
23658         * expression.cs (Binary.ResolveOperator): Use
23659         String.Concat(string,string,string) or
23660         String.Concat(string,string,string,string) when possible. 
23661
23662         * typemanager: More helper methods.
23663
23664
23665 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23666
23667         * pending.cs: remove the bogus return from GetMissingInterfaces()
23668         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23669
23670 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23671
23672         * namespace.cs: avoid duplicated 'using xxx' being added to
23673         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23674         when we get more than one 'using' statement for the same namespace.
23675         Report a CS0105 warning for it.
23676
23677 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23678
23679         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23680         of calling getChar/putback, uses internal knowledge of it.    
23681
23682         (xtoken): Reorder tokenizer so most common patterns are checked
23683         first.  This reduces the compilation time in another 5% (from 8.11s
23684         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23685
23686         The parsing time is 22% of the compilation in mcs, and from that
23687         64% is spent on the tokenization process.  
23688
23689         I tried using a binary search for keywords, but this is slower
23690         than the hashtable.  Another option would be to do a couple of
23691         things:
23692
23693                 * Not use a StringBuilder, instead use an array of chars,
23694                   with a set value.  Notice that this way we could catch
23695                   the 645 error without having to do it *afterwards*.
23696
23697                 * We could write a hand-parser to avoid the hashtable
23698                   compares altogether.
23699
23700         The identifier consumption process takes 37% of the tokenization
23701         time.  Another 15% is spent on is_number.  56% of the time spent
23702         on is_number is spent on Int64.Parse:
23703
23704                 * We could probably choose based on the string length to
23705                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23706                   computations. 
23707
23708         Another 3% is spend on wrapping `xtoken' in the `token' function.
23709
23710         Handle 0xa0 as whitespace (#34752)
23711
23712 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23713
23714         * typemanager.cs (IsCLRType): New routine to tell whether a type
23715         is one of the builtin types.  
23716
23717         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23718         typecode in more places instead of doing pointer comparissions.
23719         We could leverage some knowledge about the way the typecodes are
23720         laid out.
23721
23722         New code to cache namespaces in assemblies, it is currently not
23723         invoked, to be used soon.
23724
23725         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23726
23727         * expression.cs (Binary.ResolveOperator): specially handle
23728         strings, and do not perform user-defined operator overloading for
23729         built-in types.
23730
23731 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23732
23733         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23734         internalcall as it is a pretty simple operation;  Avoid whenever
23735         possible to call Char.IsLetter.
23736
23737         (consume_identifier): Cut by half the number of
23738         hashtable calls by merging the is_keyword and GetKeyword behavior.
23739
23740         Do not short-circuit, because if we do, we
23741         report errors (ie, #if false && true would produce an invalid
23742         directive error);
23743
23744
23745 2002-11-24  Martin Baulig  <martin@ximian.com>
23746
23747         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23748         check constant ranges and report a CS0221.  Fixes #33186.
23749
23750 2002-11-24  Martin Baulig  <martin@ximian.com>
23751
23752         * cs-parser.jay: Make this work for uninitialized variable
23753         declarations in the `for' initializer.  Fixes #32416.
23754
23755 2002-11-24  Martin Baulig  <martin@ximian.com>
23756
23757         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23758         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23759
23760 2002-11-24  Martin Baulig  <martin@ximian.com>
23761
23762         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23763         argument; if true, we also check for user-defined conversions.
23764         This is only needed if both arguments are of a user-defined type.
23765         Fixes #30443, added test-175.cs.
23766         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23767
23768         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23769
23770 2002-11-24  Martin Baulig  <martin@ximian.com>
23771
23772         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23773         function to get the store opcode.
23774         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23775         only emit the Ldelema if the store opcode is Stobj.  You must run
23776         both test-34 and test-167 to test this.  Fixes #34529.
23777
23778 2002-11-23  Martin Baulig  <martin@ximian.com>
23779
23780         * ecore.cs (Expression.MemberLookup): Added additional
23781         `qualifier_type' argument which is used when we're being called
23782         from MemberAccess.DoResolve() and null if we're called from a
23783         SimpleName lookup.
23784         (Expression.MemberLookupFailed): New method to report errors; this
23785         does the CS1540 check and reports the correct error message.
23786
23787         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23788         argument for the CS1540 check and redone the way how we're dealing
23789         with private members.  See the comment in the source code for details.
23790         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23791         `closure_start_type' to `closure_qualifier_type' and check whether
23792         it's not null.  It was not this filter being broken, it was just
23793         being called with the wrong arguments.
23794
23795         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
23796         and pass it the correct `qualifier_type'; this also does the error
23797         handling for us.
23798
23799 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
23800
23801         * expression.cs (Invocation.EmitParams): If the we are dealing
23802         with a non-built-in value type, load its address as well.
23803
23804         (ArrayCreation): Use a a pretty constant instead
23805         of the hardcoded value 2.   Use 6 instead of 2 for the number of
23806         static initializers.  
23807
23808         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
23809         because they are not really value types, just glorified integers. 
23810
23811         * driver.cs: Do not append .exe, the CSC compiler does not do it.
23812
23813         * ecore.cs: Remove redundant code for enumerations, make them use
23814         the same code path as everything else, fixes the casting issue
23815         with enumerations in Windows.Forms.
23816
23817         * attribute.cs: Do only cast to string if it is a string, the
23818         validation happens later.
23819
23820         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
23821         people upgrade their corlibs.
23822
23823         * ecore.cs: Oops, enumerations were not following the entire code path
23824
23825 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
23826
23827         * typemanager.cs (FilterWithClosure): Commented out the test for
23828         1540 in typemanager.cs, as it has problems when accessing
23829         protected methods from a parent class (see test-174.cs). 
23830
23831         * attribute.cs (Attribute.ValidateGuid): new method.
23832         (Attribute.Resolve): Use above.
23833
23834 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
23835
23836         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
23837
23838         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
23839         handling for enumerations, as we only needed the TypeContainer
23840         functionality to begin with (this is required for the fix below to
23841         work for enums that reference constants in a container class for
23842         example). 
23843
23844         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
23845
23846         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
23847         a valid TypeBuilder to perform lookups on.o
23848
23849         * class.cs (InheritableMemberSignatureCompare): Use true in the
23850         call to GetGetMethod and GetSetMethod, because we are comparing
23851         the signature, and we need to get the methods *even* if they are
23852         private. 
23853
23854         (PropertyBase.CheckBase): ditto.
23855
23856         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
23857         GotoCase.Resolve): Use Peel on EmpytCasts.
23858
23859         * ecore.cs (EmptyCast): drop child, add Peel method.
23860
23861 2002-11-17  Martin Baulig  <martin@ximian.com>
23862
23863         * ecore.cs (EmptyCast.Child): New public property.
23864
23865         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
23866         label resolved to an EmptyCast.  Fixes #34162.
23867         (GotoCase.Resolve): Likewise.
23868         (Block.EmitMeta): Likewise.
23869
23870 2002-11-17  Martin Baulig  <martin@ximian.com>
23871
23872         * expression.cs (Invocation.BetterConversion): Prefer int over
23873         uint; short over ushort; long over ulong for integer literals.
23874         Use ImplicitConversionExists instead of StandardConversionExists
23875         since we also need to check for user-defined implicit conversions.
23876         Fixes #34165.  Added test-173.cs.
23877
23878 2002-11-16  Martin Baulig  <martin@ximian.com>
23879
23880         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
23881         with the `true' and `false' literals.  Fixes #33151.
23882
23883 2002-11-16  Martin Baulig  <martin@ximian.com>
23884
23885         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
23886         October 22nd; don't do the cs1540 check for static members.
23887
23888         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
23889         now using our own filter here and doing the cs1540 check again.
23890
23891 2002-11-16  Martin Baulig  <martin@ximian.com>
23892
23893         * support.cs (InternalParameters): Don't crash if we don't have
23894         any fixed parameters.  Fixes #33532.
23895
23896 2002-11-16  Martin Baulig  <martin@ximian.com>
23897
23898         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
23899         when looking up static methods to make this work on Windows.
23900         Fixes #33773.
23901
23902 2002-11-16  Martin Baulig  <martin@ximian.com>
23903
23904         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
23905         a setter rather than using PropertyInfo.CanWrite.
23906
23907 2002-11-15  Nick Drochak  <ndrochak@gol.com>
23908
23909         * class.cs: Allow acces to block member by subclasses. Fixes build
23910         breaker.
23911
23912 2002-11-14  Martin Baulig  <martin@ximian.com>
23913
23914         * class.cs (Constructor.Emit): Added the extern/block check.
23915         Fixes bug #33678.
23916
23917 2002-11-14  Martin Baulig  <martin@ximian.com>
23918
23919         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
23920         iteration while looking for indexers, this is needed because the
23921         indexer may have a different name in our base classes.  Fixed the
23922         error reporting (no indexers at all, not get accessor, no
23923         overloaded match).  Fixes bug #33089.
23924         (IndexerAccess.DoResolveLValue): Likewise.
23925
23926 2002-11-14  Martin Baulig  <martin@ximian.com>
23927
23928         * class.cs (PropertyBase.CheckBase): Make this work for multiple
23929         indexers.  Fixes the first part of bug #33089.
23930         (MethodSignature.InheritableMemberSignatureCompare): Added support
23931         for properties.
23932
23933 2002-11-13  Ravi Pratap  <ravi@ximian.com>
23934
23935         * attribute.cs (Attribute.Resolve): Catch the
23936         NullReferenceException and report it since it isn't supposed to
23937         happen. 
23938
23939 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
23940
23941         * expression.cs (Binary.EmitBranchable): Also handle the cases for
23942         LogicalOr and LogicalAnd that can benefit from recursively
23943         handling EmitBranchable.  The code now should be nice for Paolo.
23944
23945 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
23946
23947         * typemanager.cs (LookupType): Added a negative-hit hashtable for
23948         the Type lookups, as we perform quite a number of lookups on
23949         non-Types.  This can be removed once we can deterministically tell
23950         whether we have a type or a namespace in advance.
23951
23952         But this might require special hacks from our corlib.
23953
23954         * TODO: updated.
23955
23956         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
23957         and double which avoids a conversion from an integer to a double.
23958
23959         * expression.cs: tiny optimization, avoid calling IsConstant,
23960         because it effectively performs the lookup twice.
23961
23962 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
23963
23964         But a bogus return here to keep the semantics of the old code
23965         until the Mono runtime is fixed.
23966
23967         * pending.cs (GetMissingInterfaces): New method used to remove all
23968         the interfaces that are already implemented by our parent
23969         classes from the list of pending methods. 
23970
23971         * interface.cs: Add checks for calls after ResolveTypeExpr.
23972
23973 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
23974
23975         * class.cs (Class.Emit): Report warning 67: event not used if the
23976         warning level is beyond 3.
23977
23978         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
23979         being a NullLiteral.
23980
23981         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
23982         specifiers. 
23983
23984         * class.cs (TypeContainer.GetClassBases): Cover a missing code
23985         path that might fail if a type can not be resolved.
23986
23987         * expression.cs (Binary.Emit): Emit unsigned versions of the
23988         operators. 
23989
23990         * driver.cs: use error 5.
23991
23992 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23993
23994         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
23995
23996 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
23997
23998         * cs-parser.jay (switch_section): A beautiful patch from Martin
23999         Baulig that fixed 33094.
24000
24001 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
24002
24003         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
24004         Check whether the base is abstract and report an error if so.
24005
24006         * expression.cs (IndexerAccess.DoResolveLValue,
24007         IndexerAccess.DoResolve): ditto. 
24008
24009         (Invocation.DoResolve): ditto.
24010
24011         (Invocation.FullMethodDesc): Improve the report string.
24012
24013         * statement.cs (Block): Eliminate IsVariableDefined as it is
24014         basically just a wrapper for GetVariableInfo.
24015
24016         * ecore.cs (SimpleName): Use new 
24017
24018         * support.cs (ReflectionParamter.ParameterType): We unwrap the
24019         type, as we return the actual parameter ref/unref state on a
24020         different call.
24021
24022 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
24023
24024         * support.cs: Return proper flags REF/OUT fixing the previous
24025         commit.  
24026
24027         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
24028         not used to mean `ref' but `ref or out' in ParameterReference
24029
24030         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
24031         full type signature instead of calling TypeManger.CSharpName
24032         ourselves. 
24033
24034         * support.cs (InternalParameters.ParameterDesc): Do not compare
24035         directly to the modflags, because REF/OUT will actually be bitsets
24036         if set. 
24037
24038         * delegate.cs (VerifyMethod): Check also the modifiers.
24039
24040         * cs-tokenizer.cs: Fix bug where floating point values with an
24041         exponent where a sign was missing was ignored.
24042
24043         * driver.cs: Allow multiple assemblies to be specified in a single
24044         /r: argument
24045
24046 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
24047
24048         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
24049         because identifiers after a parenthesis would end up in this kind
24050         of production, and we needed to desamiguate it for having casts
24051         like:
24052
24053                 (UserDefinedType *) xxx
24054
24055 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
24056
24057         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
24058         we should set on the Bindingflags.NonPublic, but not turn on
24059         private_ok.  private_ok controls whether a Private member is
24060         returned (this is chekced on the filter routine), while the
24061         BindingFlags.NonPublic just controls whether private/protected
24062         will be allowed.   This fixes the problem part of the problem of
24063         private properties being allowed to be used in derived classes.
24064
24065         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
24066         so we can call the children DoResolveLValue method (this will
24067         properly signal errors on lvalue assignments to base properties)
24068
24069         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
24070         getter are null, and we have a property info, we know that this
24071         happened because the lookup failed, so we report an error 122 for
24072         protection level violation.
24073
24074         We also silently return if setter and getter are null in the
24075         resolve functions, this condition only happens if we have flagged
24076         the error before.  This is the other half of the problem. 
24077
24078         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
24079         not have accessibility information, that is why we were returning
24080         true in the filter function in typemanager.cs.
24081
24082         To properly report 122 (property is inaccessible because of its
24083         protection level) correctly, we report this error in ResolveAccess
24084         by failing if both the setter and the getter are lacking (ie, the
24085         lookup failed). 
24086
24087         DoResolve and DoLResolve have been modified to check for both
24088         setter/getter being null and returning silently, the reason being
24089         that I did not want to put the knowledge about this error in upper
24090         layers, like:
24091
24092         int old = Report.Errors;
24093         x = new PropertyExpr (...);
24094         if (old != Report.Errors)
24095                 return null;
24096         else
24097                 return x;
24098
24099         So the property expr is returned, but it is invalid, so the error
24100         will be flagged during the resolve process. 
24101
24102         * class.cs: Remove InheritablePropertySignatureCompare from the
24103         class, as we no longer depend on the property signature to compute
24104         whether it is possible to implement a method or not.
24105
24106         The reason is that calling PropertyInfo.GetGetMethod will return
24107         null (in .NET, in Mono it works, and we should change this), in
24108         cases where the Get Method does not exist in that particular
24109         class.
24110
24111         So this code:
24112
24113         class X { public virtual int A { get { return 1; } } }
24114         class Y : X { }
24115         class Z : Y { public override int A { get { return 2; } } }
24116
24117         Would fail in Z because the parent (Y) would not have the property
24118         defined.  So we avoid this completely now (because the alternative
24119         fix was ugly and slow), and we now depend exclusively on the
24120         method names.
24121
24122         (PropertyBase.CheckBase): Use a method-base mechanism to find our
24123         reference method, instead of using the property.
24124
24125         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
24126         routines are gone now.
24127
24128         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
24129         names, they were incorrectly named.
24130
24131         * cs-tokenizer.cs: Return are more gentle token on failure. 
24132
24133         * pending.cs (PendingImplementation.InterfaceMethod): This routine
24134         had an out-of-sync index variable, which caused it to remove from
24135         the list of pending methods the wrong method sometimes.
24136
24137 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
24138
24139         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
24140         CanWrite, because those refer to this particular instance of the
24141         property, and do not take into account the fact that we can
24142         override single members of a property.
24143
24144         Constructor requires an EmitContext.  The resolution process does
24145         not happen here, but we need to compute the accessors before,
24146         because the resolution does not always happen for properties.
24147
24148         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
24149         subclass, before we did not update this flag, but we did update
24150         bindingflags. 
24151
24152         (GetAccessors): Drop this routine, as it did not work in the
24153         presence of partially overwritten set/get methods. 
24154
24155         Notice that this broke the cs1540 detection, but that will require
24156         more thinking. 
24157
24158 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24159
24160         * class.cs:
24161         * codegen.cs:
24162         * driver.cs: issue a warning instead of an error if we don't support
24163         debugging for the platform. Also ignore a couple of errors that may
24164         arise when trying to write the symbols. Undo my previous patch.
24165
24166 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24167
24168         * driver.cs: ignore /debug switch except for Unix platforms.
24169
24170 2002-10-23  Nick Drochak  <ndrochak@gol.com>
24171
24172         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
24173
24174 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
24175
24176         * driver.cs: Do not make mcs-debug conditional, so we do not break
24177         builds that use it.
24178
24179         * statement.cs (UsageVector.MergeChildren): I would like Martin to
24180         review this patch.  But basically after all the children variables
24181         have been merged, the value of "Breaks" was not being set to
24182         new_breaks for Switch blocks.  I think that it should be set after
24183         it has executed.  Currently I set this to the value of new_breaks,
24184         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
24185         conservative, but I do not understand this code very well.
24186
24187         I did not break anything in the build, so that is good ;-)
24188
24189         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
24190
24191 2002-10-20  Mark Crichton  <crichton@gimp.org>
24192
24193         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
24194
24195 2002-10-20  Nick Drochak  <ndrochak@gol.com>
24196
24197         * cfold.cs: Fixed compile blocker.
24198
24199 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
24200
24201         * driver.cs: I was chekcing the key, not the file.
24202
24203 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24204
24205         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24206         message that we were generating - we just need to silently return
24207         a null.
24208
24209 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24210
24211         * class.cs (Event.Define): Change my previous commit, as this
24212         breaks the debugger.  This is a temporary hack, as it seems like
24213         the compiler is generating events incorrectly to begin with.
24214
24215         * expression.cs (Binary.ResolveOperator): Added support for 
24216         "U operator - (E x, E y)"
24217
24218         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24219         y)".
24220
24221         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24222         init-only variables, but this path did not take into account that
24223         there might be also instance readonly variables.  Correct this
24224         problem. 
24225
24226         This fixes bug 32253
24227
24228         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24229         delegates as well.
24230
24231         * driver.cs: Change the extension for modules to `netmodule'
24232
24233         * cs-parser.jay: Improved slightly the location tracking for
24234         the debugger symbols.
24235
24236         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24237         modifiers that were specified instead of the hardcoded value
24238         (FamAndAssem).  This was basically ignoring the static modifier,
24239         and others.  Fixes 32429.
24240
24241         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24242         fixed a bug in the process (32476)
24243
24244         * expression.cs (ArrayAccess.EmitAssign): Patch from
24245         hwang_rob@yahoo.ca that fixes bug 31834.3
24246
24247 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24248
24249         * driver.cs: Make the module extension .netmodule.
24250
24251 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24252
24253         * driver.cs: Report an error if the resource file is not found
24254         instead of crashing.
24255
24256         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24257         false, like Emit does.
24258
24259 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24260
24261         * typemanager.cs: Remove unused private member.  Also reported mcs
24262         bug to report this as a warning like csc.
24263
24264 2002-10-15  Martin Baulig  <martin@gnome.org>
24265
24266         * statement.cs (Statement.Emit): Made this a virtual method; emits
24267         the line number info and calls DoEmit().
24268         (Statement.DoEmit): New protected abstract method, formerly knows
24269         as Statement.Emit().
24270
24271         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24272
24273 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24274
24275         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24276         have fixed a remaining problem: not every AddXXXX was adding a
24277         fully qualified name.  
24278
24279         Now everyone registers a fully qualified name in the DeclSpace as
24280         being defined instead of the partial name.  
24281
24282         Downsides: we are slower than we need to be due to the excess
24283         copies and the names being registered this way.  
24284
24285         The reason for this is that we currently depend (on the corlib
24286         bootstrap for instance) that types are fully qualified, because
24287         we dump all the types in the namespace, and we should really have
24288         types inserted into the proper namespace, so we can only store the
24289         basenames in the defined_names array.
24290
24291 2002-10-10  Martin Baulig  <martin@gnome.org>
24292
24293         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24294         from bug #31834, see the bug report for a testcase which is
24295         miscompiled.
24296
24297 2002-10-10  Martin Baulig  <martin@gnome.org>
24298
24299         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24300         flow analysis code for this.
24301
24302         * statement.cs (Do, While, For): Tell the flow analysis code about
24303         infinite loops.
24304         (FlowBranching.UsageVector): Added support for infinite loops.
24305         (Block.Resolve): Moved the dead code elimination here and use flow
24306         analysis to do it.
24307
24308 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24309
24310         * class.cs (Field.Define): Catch cycles on struct type
24311         definitions. 
24312
24313         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24314         fields if the fields are static.  We only need to check instance
24315         fields. 
24316
24317         * expression.cs (As.DoResolve): Test for reference type.
24318
24319         * statement.cs (Using.ResolveExpression): Use
24320         ConvertImplicitRequired, not ConvertImplicit which reports an
24321         error on failture
24322         (Using.ResolveLocalVariableDecls): ditto.
24323
24324         * expression.cs (Binary.ResolveOperator): Report errors in a few
24325         places where we had to.
24326
24327         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24328
24329 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24330
24331         * expression.cs: Use StoreFromPtr instead of extracting the type
24332         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24333
24334         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24335         an enumeration value to a System.Enum, but System.Enum is not a
24336         value type, but an class type, so we need to box.
24337
24338         (Expression.ConvertExplicit): One codepath could return
24339         errors but not flag them.  Fix this.  Fixes #31853
24340
24341         * parameter.cs (Resolve): Do not allow void as a parameter type.
24342
24343 2002-10-06  Martin Baulig  <martin@gnome.org>
24344
24345         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24346         if it's a class type and not a struct.  Fixes #31815.
24347
24348 2002-10-06  Martin Baulig  <martin@gnome.org>
24349
24350         * statement.cs: Reworked the flow analysis code a bit to make it
24351         usable for dead code elimination.
24352
24353 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24354
24355         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24356
24357 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24358
24359         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24360         to fix the test 165, will investigate deeper.
24361
24362 2002-10-04  Martin Baulig  <martin@gnome.org>
24363
24364         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24365         finally blocks actually work.
24366         (Try.Resolve): We don't need to create a sibling for `finally' if
24367         there is no finally block.
24368
24369 2002-10-04  Martin Baulig  <martin@gnome.org>
24370
24371         * class.cs (Constructor.Define): The default accessibility for a
24372         non-default constructor is private, not public.
24373
24374 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24375
24376         * class.cs (Constructor): Make AllowedModifiers public, add
24377         EXTERN.
24378
24379         * cs-parser.jay: Perform the modifiers test here, as the
24380         constructor for the Constructor class usually receives a zero
24381         because of the way we create it (first we create, later we
24382         customize, and we were never checking the modifiers).
24383
24384         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24385         is a version of LookupTypeReflection that includes the type-name
24386         cache.  This can be used as a fast path for functions that know
24387         the fully qualified name and are only calling into *.GetType() to
24388         obtain a composed type.
24389
24390         This is also used by TypeManager.LookupType during its type
24391         composition.
24392
24393         (LookupType): We now also track the real type name, as sometimes
24394         we can get a quey for the real type name from things like
24395         ComposedCast.  This fixes bug 31422.
24396
24397         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24398         complete type fullname, it does not have to go through the type
24399         resolution system to obtain the composed version of the type (for
24400         obtaining arrays or pointers).
24401
24402         (Conditional.Emit): Use the EmitBoolExpression to
24403         generate nicer code, as requested by Paolo.
24404
24405         (ArrayCreation.CheckIndices): Use the patch from
24406         hwang_rob@yahoo.ca to validate the array initializers. 
24407
24408 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24409
24410         * class.cs (ConstructorInitializer.Emit): simplify code by using
24411         Invocation.EmitCall, and at the same time, fix the bugs in calling
24412         parent constructors that took variable arguments. 
24413
24414         * ecore.cs (Expression.ConvertNumericExplicit,
24415         Expression.ImplicitNumericConversion): Remove the code that
24416         manually wrapped decimal (InternalTypeConstructor call is now gone
24417         as well).
24418
24419         * expression.cs (Cast.TryReduce): Also handle decimal types when
24420         trying to perform a constant fold on the type.
24421
24422         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24423
24424         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24425         that only turned off an error report, and did nothing else. 
24426
24427 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24428
24429         * driver.cs: Handle and ignore /fullpaths
24430
24431 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24432
24433         * expression.cs (Binary.ResolveOperator): Catch the case where
24434         DoNumericPromotions returns true, 
24435
24436         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24437
24438 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24439
24440         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24441         report error 70.
24442
24443 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24444
24445         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24446         conversion exists, but it is also required that the conversion be
24447         performed.  This manifested in "(Type64Enum) 2".  
24448
24449         * class.cs (TypeManager.AddMethod): The fix is not to change
24450         AddEnum, because that one was using a fully qualified name (every
24451         DeclSpace derivative does), but to change the AddMethod routine
24452         that was using an un-namespaced name.  This now correctly reports
24453         the duplicated name.
24454
24455         Revert patch until I can properly fix it.  The issue
24456         is that we have a shared Type space across all namespaces
24457         currently, which is wrong.
24458
24459         Options include making the Namespace a DeclSpace, and merge
24460         current_namespace/current_container in the parser.
24461
24462 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24463
24464         * cs-parser.jay: Improve error reporting when we get a different
24465         kind of expression in local_variable_type and
24466         local_variable_pointer_type. 
24467
24468         Propagate this to avoid missleading errors being reported.
24469
24470         * ecore.cs (ImplicitReferenceConversion): treat
24471         TypeManager.value_type as a target just like object_type.   As
24472         code like this:
24473
24474         ValueType v = 1;
24475
24476         Is valid, and needs to result in the int 1 being boxed before it
24477         is assigned to the value type v.
24478
24479         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24480         to validate the enumeration name.
24481
24482         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24483         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24484         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24485
24486         * ecore.cs (TryImplicitIntConversion): When doing an
24487         implicit-enumeration-conversion, check if the type is 64-bits and
24488         perform a conversion before passing to EnumConstant.
24489
24490 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24491
24492         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24493         report ambiguous type references.  Unlike the MS version, we
24494         report what the ambiguity is.   Innovation at work ;-)
24495
24496         (DeclSpace.FindType): Require a location argument to
24497         display when we display an ambiguous error.
24498
24499         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24500
24501         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24502
24503         * expression.cs (EmitDynamicInitializers): Apply patch from
24504         hwang_rob@yahoo.ca that fixes the order in which we emit our
24505         initializers. 
24506
24507 2002-09-21  Martin Baulig  <martin@gnome.org>
24508
24509         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24510         delegate takes no arguments.
24511
24512 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24513
24514         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24515         from integers.
24516
24517         * expression.cs: Extract the underlying type.
24518
24519         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24520
24521         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24522
24523 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24524
24525         * class.cs (TypeContainer.DefineType): We can not use the nice
24526         PackingSize with the size set to 1 DefineType method, because it
24527         will not allow us to define the interfaces that the struct
24528         implements.
24529
24530         This completes the fixing of bug 27287
24531
24532         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24533         means also structs.  This fixes part of the problem. 
24534         (Expresion.ImplicitReferenceConversionExists): ditto.
24535
24536         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24537         error if there were no errors reported during the type lookup
24538         process, to avoid duplicates or redundant errors.  Without this
24539         you would get an ambiguous errors plus a type not found.  We have
24540         beaten the user enough with the first error.  
24541
24542         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24543         reference. 
24544
24545         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24546         during the resolution process, stop the lookup, this avoids
24547         repeated error reports (same error twice).
24548
24549         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24550
24551         * typemanager.cs (LookupType): Redo the type lookup code to match
24552         the needs of System.Reflection.  
24553
24554         The issue is that System.Reflection requires references to nested
24555         types to begin with a "+" sign instead of a dot.  So toplevel
24556         types look like: "NameSpace.TopLevelClass", and nested ones look
24557         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24558         levels. 
24559
24560 2002-09-19  Martin Baulig  <martin@gnome.org>
24561
24562         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24563         says that a method always returns or always throws an exception,
24564         don't report the CS0161.
24565
24566         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24567         set `Returns = new_returns'.
24568
24569 2002-09-19  Martin Baulig  <martin@gnome.org>
24570
24571         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24572         to an enum constant, check for a CS0176.
24573
24574 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24575
24576         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24577         for operators that must be in pairs and report errors.
24578
24579         * ecore.cs (SimpleName.DoResolveType): During the initial type
24580         resolution process, when we define types recursively, we must
24581         check first for types in our current scope before we perform
24582         lookups in the enclosing scopes.
24583
24584         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24585
24586         (Invocation.VerifyArgumentsCompat): Call
24587         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24588         I thought we were supposed to always call this, but there are a
24589         few places in the code where we dont do it.
24590
24591 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24592
24593         * driver.cs: Add support in -linkres and -resource to specify the
24594         name of the identifier.
24595
24596 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24597
24598         * ecore.cs (StandardConversionExists): Sync with the conversion
24599         code: allow anything-* to void* conversions.
24600
24601         (FindMostSpecificSource): Use an Expression argument
24602         instead of a Type, because we might be handed over a Literal which
24603         gets a few more implicit conversions that plain types do not.  So
24604         this information was being lost.
24605
24606         Also, we drop the temporary type-holder expression when not
24607         required.
24608
24609 2002-09-17  Martin Baulig  <martin@gnome.org>
24610
24611         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24612         this is an explicit interface implementation.
24613
24614 2002-09-17  Martin Baulig  <martin@gnome.org>
24615
24616         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24617         different `IndexerName' attributes.
24618
24619         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24620         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24621         virtual CommonResolve().
24622
24623 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24624
24625         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24626         and convert that to the UnderlyingType.
24627
24628         * statement.cs (Foreach.Resolve): Indexers are just like variables
24629         or PropertyAccesses.
24630
24631         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24632         inside quoted strings, we were not doing this before.
24633
24634 2002-09-16  Martin Baulig  <martin@gnome.org>
24635
24636         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24637         resolve it.  This is needed for the definite assignment check of the
24638         instance expression, fixes bug #29846.
24639         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24640
24641 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24642
24643         * parameter.cs: Fix compile error.  Cannot reference static member
24644         from an instance object.  Is this an mcs bug?
24645
24646 2002-09-14  Martin Baulig  <martin@gnome.org>
24647
24648         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24649         multiple times.  Fixes bug #30295, added test-166.cs.
24650
24651 2002-09-14  Martin Baulig  <martin@gnome.org>
24652
24653         * statement.cs (Block.Emit): Don't emit unreachable code.
24654         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24655         `break' statements.
24656         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24657
24658 2002-09-14  Martin Baulig  <martin@gnome.org>
24659
24660         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24661         is set.
24662
24663 2002-09-14  Martin Baulig  <martin@gnome.org>
24664
24665         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24666         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24667         be false on the ms runtime.
24668
24669 2002-09-13  Martin Baulig  <martin@gnome.org>
24670
24671         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24672         the CS0038 error message.
24673
24674 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24675
24676         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24677         constant inside, return it.
24678
24679 2002-09-12  Martin Baulig  <martin@gnome.org>
24680
24681         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24682         implicit conversion can be done between enum types.
24683
24684         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24685         check whether an implicit conversion to the current enum's UnderlyingType
24686         exists and report an error if not.
24687
24688         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24689         without debugging support.
24690
24691         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24692         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24693
24694 2002-09-12  Martin Baulig  <martin@gnome.org>
24695
24696         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24697
24698         * ecore.cs (IMemberExpr.DeclaringType): New property.
24699         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24700         nonstatic member of an outer type (CS0038).
24701
24702 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24703
24704         * driver.cs: Activate the using-error detector at warning level
24705         4 (at least for MS-compatible APIs).
24706
24707         * namespace.cs (VerifyUsing): Small buglett fix.
24708
24709         * pending.cs (PendingImplementation): pass the container pointer. 
24710
24711         * interface.cs (GetMethods): Allow for recursive definition.  Long
24712         term, I would like to move every type to support recursive
24713         definitions, not the current ordering mechanism that we have right
24714         now.
24715
24716         The situation is this: Attributes are handled before interfaces,
24717         so we can apply attributes to interfaces.  But some attributes
24718         implement interfaces, we will now handle the simple cases
24719         (recursive definitions will just get an error).  
24720
24721         * parameter.cs: Only invalidate types at the end if we fail to
24722         lookup all types.  
24723
24724 2002-09-09  Martin Baulig  <martin@gnome.org>
24725
24726         * ecore.cs (PropertyExpr.Emit): Also check for
24727         TypeManager.system_int_array_get_length so this'll also work when
24728         compiling corlib.  Fixes #30003.
24729
24730 2002-09-09  Martin Baulig  <martin@gnome.org>
24731
24732         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24733         and throw an exception if we can't get the type's size.  Fixed #30040,
24734         added test-165.cs.
24735
24736 2002-09-09  Martin Baulig  <martin@gnome.org>
24737
24738         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24739
24740         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24741         context.  Fixes bug #30027.
24742
24743         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24744         virtual functions.  Fixes bug #30043, added test-164.cs.
24745
24746 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24747
24748         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24749
24750 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24751
24752         * driver.cs: Use an object to get the windows codepage since it's not a
24753         static property.
24754
24755 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24756
24757         * statement.cs (For.Emit): for infinite loops (test == null)
24758         return whether there is a break inside, not always "true".
24759
24760         * namespace.cs (UsingEntry): New struct to hold the name of the
24761         using definition, the location where it is defined, and whether it
24762         has been used in a successful type lookup.
24763
24764         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24765         strings.
24766
24767         * decl.cs: ditto.
24768
24769 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24770
24771         * attribute.cs : Fix incorrect code which relied on catching
24772         a NullReferenceException to detect a null being passed in
24773         where an object was expected.
24774
24775 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24776
24777         * statement.cs (Try): flag the catch variable as assigned
24778
24779         * expression.cs (Cast): Simplified by using ResolveType instead of
24780         manually resolving.
24781
24782         * statement.cs (Catch): Fix bug by using ResolveType.
24783
24784 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24785
24786         * expression.cs (BetterConversion): Special case for when we have
24787         a NullLiteral as the argument and we have to choose between string
24788         and object types - we choose string the way csc does.
24789
24790         * attribute.cs (Attribute.Resolve): Catch the
24791         NullReferenceException and report error #182 since the Mono
24792         runtime no more has the bug and having this exception raised means
24793         we tried to select a constructor which takes an object and is
24794         passed a null.
24795
24796 2002-09-05  Ravi Pratap  <ravi@ximian.com>
24797
24798         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
24799         message (1502, 1503) when we can't locate a method after overload
24800         resolution. This is much more informative and closes the bug
24801         Miguel reported.
24802
24803         * interface.cs (PopulateMethod): Return if there are no argument
24804         types. Fixes a NullReferenceException bug.
24805
24806         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
24807         expressions too. Previously we were checking only in one place for
24808         positional arguments leaving out named arguments.
24809
24810         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
24811         type to the enum type is not allowed. Remove code corresponding to
24812         that.
24813
24814         (ConvertNumericExplicit): Allow explicit conversions from
24815         the underlying type to enum type. This precisely follows the spec
24816         and closes a bug filed by Gonzalo.
24817
24818 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24819
24820         * compiler.csproj:
24821         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
24822
24823 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
24824
24825         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
24826         it was important that we stored the right value after the
24827         reduction in `converted'.
24828
24829 2002-09-04  Martin Baulig  <martin@gnome.org>
24830
24831         * location.cs (Location.SymbolDocument): Use full pathnames for the
24832         source files.
24833
24834 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
24835
24836         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
24837         of the expression resolve mechanism, because that will catch the
24838         SimpleName error failures.
24839
24840         (Conditional): If we can not resolve the
24841         expression, return, do not crash.
24842
24843 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24844
24845         * cs-tokenizer.cs:
24846         (location): display token name instead of its number.
24847
24848 2002-08-28  Martin Baulig  <martin@gnome.org>
24849
24850         * expression.cs (Binary.ResolveOperator): Don't silently return
24851         but return an error if an operator cannot be applied between two
24852         enum types.
24853
24854 2002-08-28  Martin Baulig  <martin@gnome.org>
24855
24856         * class.cs (Constructor.Define): Set the permission attributes
24857         correctly instead of making all constructors public.
24858
24859 2002-08-28  Martin Baulig  <martin@gnome.org>
24860
24861         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
24862         for private members before reporting a CS0103; if we find anything,
24863         it's a CS0122.
24864
24865 2002-08-28  Martin Baulig  <martin@gnome.org>
24866
24867         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
24868         to check whether `closure_start_type == closure_invocation_type',
24869         we also need to check whether `m.DeclaringType == closure_invocation_type'
24870         before bypassing the permission checks.  We might be accessing
24871         protected/private members from the base class.
24872         (TypeManager.RealMemberLookup): Only set private_ok if private
24873         members were requested via BindingFlags.NonPublic.
24874
24875         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
24876
24877         * expression.cs (MemberAccess.ResolveMemberAccess): Set
24878         MethodGroupExpr.IsExplicitImpl if appropriate.
24879         (Invocation.DoResolve): Don't report the CS0120 for explicit
24880         interface implementations.
24881
24882 2002-08-27  Martin Baulig  <martin@gnome.org>
24883
24884         * expression.cs (Invocation.DoResolve): If this is a static
24885         method and we don't have an InstanceExpression, we must report
24886         a CS0120.
24887
24888 2002-08-25  Martin Baulig  <martin@gnome.org>
24889
24890         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
24891         `==' between a valuetype and an object.
24892
24893 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
24894
24895         * ecore.cs (TypeExpr): Provide a ToString method.
24896
24897 2002-08-24  Martin Baulig  <martin@gnome.org>
24898
24899         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
24900         now called proggie.dbg and it's a binary file.
24901
24902 2002-08-23  Martin Baulig  <martin@gnome.org>
24903
24904         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
24905
24906 2002-08-23  Martin Baulig  <martin@gnome.org>
24907
24908         * struct.cs (MyStructInfo.ctor): Make this work with empty
24909         structs; it's not allowed to use foreach() on null.
24910
24911 2002-08-23  Martin Baulig  <martin@gnome.org>
24912
24913         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
24914         writer the full pathname of the generated assembly.
24915
24916 2002-08-23  Martin Baulig  <martin@gnome.org>
24917
24918         * statements.cs (FlowBranching.UsageVector.MergeChildren):
24919         A `finally' block never returns or breaks; improved handling of
24920         unreachable code.
24921
24922 2002-08-23  Martin Baulig  <martin@gnome.org>
24923
24924         * statement.cs (Throw.Resolve): Allow `throw null'.
24925
24926 2002-08-23  Martin Baulig  <martin@gnome.org>
24927
24928         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
24929         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
24930         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
24931         MemberLookup would return a wrong event if this is an explicit
24932         interface implementation and the class has an event with the same
24933         name.
24934
24935 2002-08-23  Martin Baulig  <martin@gnome.org>
24936
24937         * statement.cs (Block.AddChildVariableNames): New public method.
24938         (Block.AddChildVariableName): Likewise.
24939         (Block.IsVariableNameUsedInChildBlock): Likewise.
24940         (Block.AddVariable): Check whether a variable name has already
24941         been used in a child block.
24942
24943         * cs-parser.jay (declare_local_variables): Mark all variable names
24944         from the current block as being used in a child block in the
24945         implicit block.
24946
24947 2002-08-23  Martin Baulig  <martin@gnome.org>
24948
24949         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
24950         find the symbol writer.
24951
24952         * driver.cs: csc also allows the arguments to /define being
24953         separated by commas, not only by semicolons.
24954
24955 2002-08-23  Martin Baulig  <martin@gnome.org>
24956
24957         * interface.cs (Interface.GetMembers): Added static check for events.
24958
24959 2002-08-15  Martin Baulig  <martin@gnome.org>
24960
24961         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
24962         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
24963
24964         * ecore.cs (Expression.MemberLookup): Added documentation and explained
24965         why the MethodData.EmitDestructor() change was necessary.
24966
24967 2002-08-20  Martin Baulig  <martin@gnome.org>
24968
24969         * class.cs (TypeContainer.FindMembers): Added static check for events.
24970
24971         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
24972
24973         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
24974         use Type.GetEvents(), not Type.FindMembers().
24975
24976 2002-08-20  Martin Baulig  <martin@gnome.org>
24977
24978         * decl.cs (MemberCache): Added a special method cache which will
24979         be used for method-only searched.  This ensures that a method
24980         search will return a MethodInfo with the correct ReflectedType for
24981         inherited methods.      
24982
24983 2002-08-20  Martin Baulig  <martin@gnome.org>
24984
24985         * decl.cs (DeclSpace.FindMembers): Made this public.
24986
24987 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24988
24989         * delegate.cs: fixed build on windows.
24990         [FIXME:  Filed as bug #29150: MCS must report these errors.]
24991
24992 2002-08-19  Ravi Pratap  <ravi@ximian.com>
24993
24994         * ecore.cs (StandardConversionExists): Return a false
24995         if we are trying to convert the void type to anything else
24996         since that is not allowed.
24997
24998         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
24999         we flag error 70 in the event an event is trying to be accessed
25000         directly from outside the declaring type.
25001
25002 2002-08-20  Martin Baulig  <martin@gnome.org>
25003
25004         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
25005         MemberCache from typemanager.cs to decl.cs.
25006
25007 2002-08-19  Martin Baulig  <martin@gnome.org>
25008
25009         * class.cs (TypeContainer): Implement IMemberContainer.
25010         (TypeContainer.DefineMembers): Create the MemberCache.
25011         (TypeContainer.FindMembers): Do better BindingFlags checking; only
25012         return public members if BindingFlags.Public was given, check
25013         whether members are static.
25014
25015 2002-08-16  Martin Baulig  <martin@gnome.org>
25016
25017         * decl.cs (DeclSpace.Define): Splitted this in Define and
25018         DefineMembers.  DefineMembers is called first and initializes the
25019         MemberCache.
25020
25021         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
25022         DefineMembers() on all our DeclSpaces.
25023
25024         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
25025         but call DefineMembers() on all nested interfaces.  We call their
25026         Define() in our new Define() function.
25027
25028         * interface.cs (Interface): Implement IMemberContainer.
25029         (Interface.Define): Moved all code except the attribute stuf to
25030         DefineMembers().
25031         (Interface.DefineMembers): Initialize the member cache.
25032
25033         * typemanager.cs (IMemberFinder): Removed this interface, we don't
25034         need this anymore since we can use MemberCache.FindMembers directly.
25035
25036 2002-08-19  Martin Baulig  <martin@gnome.org>
25037
25038         * typemanager.cs (MemberCache): When creating the cache for an
25039         interface type, add all inherited members.
25040         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
25041         to `out bool used_cache' and documented it.
25042         (TypeManager.MemberLookup): If we already used the cache in the first
25043         iteration, we don't need to do the interfaces check.
25044
25045 2002-08-19  Martin Baulig  <martin@gnome.org>
25046
25047         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
25048         here from IMemberFinder and don't implement this interface anymore.
25049         (DeclSpace.MemberCache): Moved here from IMemberFinder.
25050
25051         * typemanager.cs (IMemberFinder): This interface is now only used by
25052         classes which actually support the member cache.
25053         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
25054         since we only put DeclSpaces into this Hashtable.
25055         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
25056         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
25057
25058 2002-08-16  Martin Baulig  <martin@gnome.org>
25059
25060         * typemanager.cs (ICachingMemberFinder): Removed.
25061         (IMemberFinder.MemberCache): New property.
25062         (TypeManager.FindMembers): Merged this with RealFindMembers().
25063         This function will never be called from TypeManager.MemberLookup()
25064         so we can't use the cache here, just the IMemberFinder.
25065         (TypeManager.MemberLookup_FindMembers): Check whether the
25066         IMemberFinder has a MemberCache and call the cache's FindMembers
25067         function.
25068         (MemberCache): Rewrote larger parts of this yet another time and
25069         cleaned it up a bit.
25070
25071 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
25072
25073         * driver.cs (LoadArgs): Support quoting.
25074
25075         (Usage): Show the CSC-like command line arguments.
25076
25077         Improved a few error messages.
25078
25079 2002-08-15  Martin Baulig  <martin@gnome.org>
25080
25081         * typemanager.cs (IMemberContainer.Type): New property.
25082         (IMemberContainer.IsInterface): New property.
25083
25084         The following changes are conditional to BROKEN_RUNTIME, which is
25085         defined at the top of the file.
25086
25087         * typemanager.cs (MemberCache.MemberCache): Don't add the base
25088         class'es members, but add all members from TypeHandle.ObjectType
25089         if we're an interface.
25090         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
25091         is the current type.
25092         (MemberCache.CacheEntry.Container): Removed this field.
25093         (TypeHandle.GetMembers): Include inherited members.
25094
25095 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25096
25097         * typemanager.cs: fixed compilation and added a comment on a field that
25098         is never used.
25099
25100 2002-08-15  Martin Baulig  <martin@gnome.org>
25101
25102         * class.cs (ConstructorInitializer.Resolve): In the
25103         Expression.MemberLookup call, use the queried_type as
25104         invocation_type.
25105
25106         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
25107         declared' attribute, it's always true.
25108         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
25109         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
25110         temporary wrapper for FindMembers which tells MemberLookup whether
25111         members from the base classes are included in the return value.
25112         This will go away soon.
25113         (TypeManager.MemberLookup): Use this temporary hack here; once the
25114         new MemberCache is completed, we don't need to do the DeclaredOnly
25115         looping here anymore since the MemberCache will take care of this.
25116         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
25117         (MemberCache): When creating the MemberCache for a class, get
25118         members from the current class and all its base classes.
25119         (MemberCache.CacheEntry.Container): New field.  This is a
25120         temporary hack until the Mono runtime is fixed to distinguish
25121         between ReflectedType and DeclaringType.  It allows us to use MCS
25122         with both the MS runtime and the unfixed Mono runtime without
25123         problems and without accecting performance.
25124         (MemberCache.SearchMembers): The DeclaredOnly looping from
25125         TypeManager.MemberLookup is now done here.      
25126
25127 2002-08-14  Martin Baulig  <martin@gnome.org>
25128
25129         * statement.cs (MyStructInfo.MyStructInfo): Don't call
25130         Type.GetFields on dynamic types but get the fields from the
25131         corresponding TypeContainer.
25132         (MyStructInfo.GetStructInfo): Added check for enum types.
25133
25134         * typemanager.cs (MemberList.IsSynchronized): Implemented.
25135         (MemberList.SyncRoot): Implemented.
25136         (TypeManager.FilterWithClosure): No need to check permissions if
25137         closure_start_type == closure_invocation_type, don't crash if
25138         closure_invocation_type is null.
25139
25140 2002-08-13  Martin Baulig  <martin@gnome.org>
25141
25142         Rewrote TypeContainer.FindMembers to use a member cache.  This
25143         gives us a speed increase of about 35% for the self-hosting MCS
25144         build and of about 15-20% for the class libs (both on GNU/Linux).
25145
25146         * report.cs (Timer): New class to get enhanced profiling.  This
25147         whole class is "TIMER" conditional since it remarkably slows down
25148         compilation speed.
25149
25150         * class.cs (MemberList): New class.  This is an IList wrapper
25151         which we're now using instead of passing MemberInfo[]'s around to
25152         avoid copying this array unnecessarily.
25153         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
25154         (ICachingMemberFinder, IMemberContainer): New interface.
25155         (TypeManager.FilterWithClosure): If `criteria' is null, the name
25156         has already been checked, otherwise use it for the name comparision.
25157         (TypeManager.FindMembers): Renamed to RealMemberFinder and
25158         provided wrapper which tries to use ICachingMemberFinder.FindMembers
25159         if possible.  Returns a MemberList, not a MemberInfo [].
25160         (TypeHandle): New class, implements IMemberContainer.  We create
25161         one instance of this class per type, it contains a MemberCache
25162         which is used to do the member lookups.
25163         (MemberCache): New class.  Each instance of this class contains
25164         all members of a type and a name-based hash table.
25165         (MemberCache.FindMembers): This is our new member lookup
25166         function.  First, it looks up all members of the requested name in
25167         the hash table.  Then, it walks this list and sorts out all
25168         applicable members and returns them.
25169
25170 2002-08-13  Martin Baulig  <martin@gnome.org>
25171
25172         In addition to a nice code cleanup, this gives us a performance
25173         increase of about 1.4% on GNU/Linux - not much, but it's already
25174         half a second for the self-hosting MCS compilation.
25175
25176         * typemanager.cs (IMemberFinder): New interface.  It is used by
25177         TypeManager.FindMembers to call FindMembers on a TypeContainer,
25178         Enum, Delegate or Interface.
25179         (TypeManager.finder_to_member_finder): New PtrHashtable.
25180         (TypeManager.finder_to_container): Removed.
25181         (TypeManager.finder_to_delegate): Removed.
25182         (TypeManager.finder_to_interface): Removed.
25183         (TypeManager.finder_to_enum): Removed.
25184
25185         * interface.cs (Interface): Implement IMemberFinder.
25186
25187         * delegate.cs (Delegate): Implement IMemberFinder.
25188
25189         * enum.cs (Enum): Implement IMemberFinder.
25190
25191         * class.cs (TypeContainer): Implement IMemberFinder.
25192
25193 2002-08-12  Martin Baulig  <martin@gnome.org>
25194
25195         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
25196
25197 2002-08-12  Martin Baulig  <martin@gnome.org>
25198
25199         * ecore.cs (ITypeExpression): New interface for expressions which
25200         resolve to a type.
25201         (TypeExpression): Renamed to TypeLookupExpression.
25202         (Expression.DoResolve): If we're doing a types-only lookup, the
25203         expression must implement the ITypeExpression interface and we
25204         call DoResolveType() on it.
25205         (SimpleName): Implement the new ITypeExpression interface.
25206         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25207         hack, the situation that we're only looking up types can't happen
25208         anymore when this method is called.  Moved the type lookup code to
25209         DoResolveType() and call it.
25210         (SimpleName.DoResolveType): This ITypeExpression interface method
25211         is now doing the types-only lookup.
25212         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25213         (ResolveFlags): Added MaskExprClass.
25214
25215         * expression.cs (MemberAccess): Implement the ITypeExpression
25216         interface.
25217         (MemberAccess.DoResolve): Added support for a types-only lookup
25218         when we're called via ITypeExpression.DoResolveType().
25219         (ComposedCast): Implement the ITypeExpression interface.
25220
25221         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25222         Expression.Resolve() with ResolveFlags.Type instead.
25223
25224 2002-08-12  Martin Baulig  <martin@gnome.org>
25225
25226         * interface.cs (Interface.Define): Apply attributes.
25227
25228         * attribute.cs (Attribute.ApplyAttributes): Added support for
25229         interface attributes.
25230
25231 2002-08-11  Martin Baulig  <martin@gnome.org>
25232
25233         * statement.cs (Block.Emit): Only check the "this" variable if we
25234         do not always throw an exception.
25235
25236         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25237         whether the property has a set accessor.
25238
25239 2002-08-11  Martin Baulig  <martin@gnome.org>
25240
25241         Added control flow analysis support for structs.
25242
25243         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25244         with control flow analysis turned off.
25245         (IVariable): New interface.
25246         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25247         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25248         (FieldExpr.DoResolve): Resolve the instance expression with flow
25249         analysis turned off and do the definite assignment check after the
25250         resolving when we know what the expression will resolve to.
25251
25252         * expression.cs (LocalVariableReference, ParameterReference):
25253         Implement the new IVariable interface, only call the flow analysis
25254         code if ec.DoFlowAnalysis is true.
25255         (This): Added constructor which takes a Block argument.  Implement
25256         the new IVariable interface.
25257         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25258         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25259         This does the definite assignment checks for struct members.
25260
25261         * class.cs (Constructor.Emit): If this is a non-static `struct'
25262         constructor which doesn't have any initializer, call
25263         Block.AddThisVariable() to tell the flow analysis code that all
25264         struct elements must be initialized before control returns from
25265         the constructor.
25266
25267         * statement.cs (MyStructInfo): New public class.
25268         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25269         argument to this indexer.  If non-zero, check an individual struct
25270         member, not the whole struct.
25271         (FlowBranching.CheckOutParameters): Check struct members.
25272         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25273         overloaded versions of these methods which take an additional
25274         `int field_idx' argument to check struct members.
25275         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25276         overloaded versions of these methods which take an additional
25277         `string field_name' argument to check struct member.s
25278         (VariableInfo): Implement the IVariable interface.
25279         (VariableInfo.StructInfo): New public property.  Returns the
25280         MyStructInfo instance of the variable if it's a struct or null.
25281         (Block.AddThisVariable): New public method.  This is called from
25282         Constructor.Emit() for non-static `struct' constructor which do
25283         not have any initializer.  It creates a special variable for the
25284         "this" instance variable which will be checked by the flow
25285         analysis code to ensure that all of the struct's fields are
25286         initialized before control returns from the constructor.
25287         (UsageVector): Added support for struct members.  If a
25288         variable/parameter is a struct with N members, we reserve a slot
25289         in the usage vector for each member.  A struct is considered fully
25290         initialized if either the struct itself (slot 0) or all its
25291         members are initialized.
25292
25293 2002-08-08  Martin Baulig  <martin@gnome.org>
25294
25295         * driver.cs (Driver.MainDriver): Only report an error CS5001
25296         if there were no compilation errors.
25297
25298         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25299         `UnsafeContext' property to determine whether the parent is in
25300         unsafe context rather than checking the parent's ModFlags:
25301         classes nested in an unsafe class are unsafe as well.
25302
25303 2002-08-08  Martin Baulig  <martin@gnome.org>
25304
25305         * statement.cs (UsageVector.MergeChildren): Distinguish between
25306         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25307         we return.  Added test17() and test18() to test-154.cs.
25308
25309 2002-08-08  Martin Baulig  <martin@gnome.org>
25310
25311         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25312         Family access, make sure the invoking type isn't a subclass of the
25313         queried type (that'd be a CS1540).
25314
25315         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25316         this method which takes an additional `Type invocation_type'.
25317
25318         * expression.cs (BaseAccess.DoResolve): Use the base type as
25319         invocation and query type.
25320         (MemberAccess.DoResolve): If the lookup failed and we're about to
25321         report a CS0122, try a lookup with the ec.ContainerType - if this
25322         succeeds, we must report a CS1540.
25323
25324 2002-08-08  Martin Baulig  <martin@gnome.org>
25325
25326         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25327         (MethodGroupExpr): Implement the IMemberExpr interface.
25328
25329         * expression (MemberAccess.ResolveMemberAccess): No need to have
25330         any special code for MethodGroupExprs anymore, they're now
25331         IMemberExprs.   
25332
25333 2002-08-08  Martin Baulig  <martin@gnome.org>
25334
25335         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25336         Family, FamANDAssem and FamORAssem permissions.
25337         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25338
25339 2002-08-08  Martin Baulig  <martin@gnome.org>
25340
25341         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25342         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25343         or loop block.
25344
25345 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25346
25347         * driver.cs: implemented /resource option to embed managed resources.
25348
25349 2002-08-07  Martin Baulig  <martin@gnome.org>
25350
25351         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25352         (FieldBase.HasFieldInitializer): New public property.
25353         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25354         returns the field initializer and makes sure it is only resolved once.
25355         (TypeContainer.EmitFieldInitializers): Call
25356         FieldBase.GetInitializerExpression to get the initializer, this ensures
25357         that it isn't resolved multiple times.
25358
25359         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25360         the resolving process (SimpleName/MemberLookup) that we're currently
25361         emitting a field initializer (which must not access any instance members,
25362         this is an error CS0236).
25363
25364         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25365         argument, if the `IsFieldInitializer' flag is set, we must report and
25366         error CS0236 and not an error CS0120.   
25367
25368 2002-08-07  Martin Baulig  <martin@gnome.org>
25369
25370         * ecore.cs (IMemberExpr): New public interface.
25371         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25372         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25373         if the expression is an IMemberExpr.
25374
25375         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25376         to be null, implicitly default to `this' if we're non-static in
25377         this case.  Simplified the code a lot by using the new IMemberExpr
25378         interface.  Also fixed bug #28176 here.
25379
25380 2002-08-06  Martin Baulig  <martin@gnome.org>
25381
25382         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25383         ParameterReferences during semantic analysis so that we can do a
25384         type-only search when resolving Cast, TypeOf and SizeOf.
25385         (block): Pass the `current_local_parameters' to the Block's
25386         constructor.
25387
25388         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25389         argument to the constructor.
25390         (ConstructorInitializer.Resolve): Create a temporary implicit
25391         block with the parameters.
25392
25393         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25394         references here if we aren't doing a type-only search.
25395
25396         * statement.cs (Block): Added constructor which takes a
25397         `Parameters parameters' argument.
25398         (Block.Parameters): New public property.
25399
25400         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25401         to `Parameters' and made it public readonly.
25402
25403 2002-08-06  Martin Baulig  <martin@gnome.org>
25404
25405         * ecore.cs (Expression.Warning): Made this public as well.
25406
25407         * report.cs (Report.Debug): Print the contents of collections.
25408
25409 2002-08-06  Martin Baulig  <martin@gnome.org>
25410
25411         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25412         used to tell Resolve() which kinds of expressions it may return.
25413         (Expression.Resolve): Added overloaded version of this method which
25414         takes a `ResolveFlags flags' argument.  This can be used to tell
25415         Resolve() which kinds of expressions it may return.  Reports a
25416         CS0118 on error.
25417         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25418         ResolveFlags.SimpleName.
25419         (Expression.Error118): Added overloaded version of this method which
25420         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25421         which kinds of expressions are allowed.
25422
25423         * expression.cs (Argument.ResolveMethodGroup): New public method.
25424         Resolves an argument, but allows a MethodGroup to be returned.
25425         This is used when invoking a delegate.
25426
25427         * TODO: Updated a bit.
25428
25429 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25430
25431         Fixed compilation with csc.
25432
25433         * ecore.cs: Expression.Error made public. Is this correct? Should
25434         Warning be made public too?
25435
25436         * expression.cs: use ea.Location instead of ea.loc.
25437         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25438
25439 2002-08-06  Martin Baulig  <martin@gnome.org>
25440
25441         * ecore.cs (Expression.loc): Moved the location here instead of
25442         duplicating it in all derived classes.
25443         (Expression.Location): New public property.
25444         (Expression.Error, Expression.Warning): Made them non-static and
25445         removed the location argument.
25446         (Expression.Warning): Added overloaded version which takes an
25447         `int level' argument.
25448         (Expression.Error118): Make this non-static and removed the
25449         expression and location arguments.
25450         (TypeExpr): Added location argument to the constructor.
25451
25452         * expression.cs (StaticCallExpr): Added location argument to
25453         the constructor.
25454         (Indirection, PointerArithmetic): Likewise.
25455         (CheckedExpr, UnCheckedExpr): Likewise.
25456         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25457         (StringPtr): Likewise.
25458
25459
25460 2002-08-05  Martin Baulig  <martin@gnome.org>
25461
25462         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25463
25464         * assign.cs (Assign.DoResolve): Check whether the source
25465         expression is a value or variable.
25466
25467         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25468         while resolving the corresponding blocks.
25469
25470         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25471         an error, don't silently return null.
25472
25473         * statement.cs (Block.AddVariable): Do the error reporting here
25474         and distinguish between CS0128 and CS0136.
25475         (Block.DoResolve): Report all unused labels (warning CS0164).
25476         (LabeledStatement): Pass the location to the constructor.
25477         (LabeledStatement.HasBeenReferenced): New property.
25478         (LabeledStatement.Resolve): Set it to true here.
25479
25480         * statement.cs (Return.Emit): Return success even after reporting
25481         a type mismatch error (CS0126 or CS0127), this is what csc does and
25482         it avoids confusing the users with any consecutive errors.
25483
25484 2002-08-05  Martin Baulig  <martin@gnome.org>
25485
25486         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25487
25488         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25489
25490         * expression.cs (MemberAccess.DoResolve): Silently return if an
25491         error has already been reported.
25492
25493         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25494         error has already been reported.
25495
25496 2002-08-05  Martin Baulig  <martin@gnome.org>
25497
25498         * statement.cs (UsageVector): Only initialize the `parameters'
25499         vector if we actually have any "out" parameters.
25500
25501 2002-08-05  Martin Baulig  <martin@gnome.org>
25502
25503         * expression.cs (Binary.ResolveOperator): When combining delegates,
25504         they must have the same type.
25505
25506 2002-08-05  Martin Baulig  <martin@gnome.org>
25507
25508         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25509         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25510         work with the ms runtime and we also don't need it: if we're a
25511         PropertyBuilder and not in the `indexer_arguments' hash, then we
25512         are a property and not an indexer.
25513
25514         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25515         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25516         since the latter one doesn't work with the ms runtime.
25517
25518 2002-08-03  Martin Baulig  <martin@gnome.org>
25519
25520         Fixed bugs #27998 and #22735.
25521
25522         * class.cs (Method.IsOperator): New public field.
25523         (Method.CheckBase): Report CS0111 if there's already a method
25524         with the same parameters in the current class.  Report CS0508 when
25525         attempting to change the return type of an inherited method.
25526         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25527         and it's not marked abstract or extern.
25528         (PropertyBase): New abstract base class for Property and Indexer.
25529         (PropertyBase.CheckBase): Moved here from Property and made it work
25530         for indexers.
25531         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25532         the same so we can reuse it there.
25533         (Property, Indexer): Derive from PropertyBase.
25534         (MethodSignature.inheritable_property_signature_filter): New delegate
25535         to find properties and indexers.
25536
25537         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25538         argument and improved error reporting.
25539
25540         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25541         EmptyReadOnlyParameters and made it a property.
25542
25543         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25544         version of this method which takes a `PropertyInfo indexer'.
25545         (TypeManager.RegisterIndexer): New method.
25546
25547         * class.cs: Added myself as author of this file :-)
25548
25549 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25550
25551         * class.cs: fixed compilation on windoze.
25552
25553 2002-08-03  Martin Baulig  <martin@gnome.org>
25554
25555         * interface.cs (Interface.GetInterfaceBases): Check whether all
25556         base interfaces are at least as accessible than the current one.
25557
25558         * class.cs (TypeContainer.GetClassBases): Check whether base types
25559         are at least as accessible than the current type.
25560         (TypeContainer.AsAccessible): Implemented and made non-static.
25561         (MemberBase.CheckParameters): Report errors if the accessibility
25562         checks fail.
25563
25564         * delegate.cs (Delegate.Delegate): The default visibility is
25565         internal for top-level types and private for nested types.
25566         (Delegate.Define): Report errors if the accessibility checks fail.
25567
25568         * enum.cs (Enum.Enum): The default visibility is internal for
25569         top-level types and private for nested types.
25570         (Enum.DefineType): Compute the correct visibility.
25571
25572         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25573         function which takes a `bool is_toplevel' instead of a TypeContainer.
25574
25575         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25576         builtin type.
25577
25578 2002-08-02  Martin Baulig  <martin@gnome.org>
25579
25580         * expression.cs (LocalVariableReferenc): Added constructor which
25581         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25582         (LocalVariableReference.IsReadOnly): New property.
25583         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25584         variable is readonly, use our own readonly flag to do this; you can
25585         use the new constructor to get a writable reference to a read-only
25586         variable.
25587
25588         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25589         reference to the local variable.
25590
25591 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25592
25593         * rootcontext.cs (ResolveCore): Also include System.Exception
25594
25595         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25596         we reach an EmptyStatement.
25597
25598         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25599         is also fine.
25600
25601         * expression.cs (Binary.ResolveOperator): Check error result in
25602         two places.
25603
25604         use brtrue/brfalse directly and avoid compares to null.
25605
25606 2002-08-02  Martin Baulig  <martin@gnome.org>
25607
25608         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25609         Fixes bug #28407, added test-155.cs.
25610
25611 2002-08-01  Martin Baulig  <martin@gnome.org>
25612
25613         * class.cs (Event.EmitDefaultMethod): Make this work with static
25614         events.  Fixes #28311, added verify-3.cs.
25615
25616 2002-08-01  Martin Baulig  <martin@gnome.org>
25617
25618         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25619         `is_disposable' fields.
25620         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25621         `hm.is_disposable' if we're using the collection pattern.
25622         (Foreach.EmitCollectionForeach): Use the correct type for the
25623         enumerator's local variable, only emit the try/finally block if
25624         necessary (fixes #27713).
25625
25626 2002-08-01  Martin Baulig  <martin@gnome.org>
25627
25628         * ecore.cs (Expression.report118): Renamed to Error118 and made
25629         it public static.
25630
25631         * statement.cs (Throw.Resolve): Check whether the expression is of
25632         the correct type (CS0118) and whether the type derives from
25633         System.Exception (CS0155).
25634         (Catch.Resolve): New method.  Do the type lookup here and check
25635         whether it derives from System.Exception (CS0155).
25636         (Catch.CatchType, Catch.IsGeneral): New public properties.
25637
25638         * typemanager.cs (TypeManager.exception_type): Added.
25639
25640 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25641
25642         * driver.cs: Updated About function.
25643
25644 2002-07-31  Martin Baulig  <martin@gnome.org>
25645
25646         Implemented Control Flow Analysis.
25647
25648         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25649         (EmitContext.CurrentBranching): Added.
25650         (EmitContext.StartFlowBranching): Added.
25651         (EmitContext.EndFlowBranching): Added.
25652         (EmitContext.KillFlowBranching): Added.
25653         (EmitContext.IsVariableAssigned): Added.
25654         (EmitContext.SetVariableAssigned): Added.
25655         (EmitContext.IsParameterAssigned): Added.
25656         (EmitContext.SetParameterAssigned): Added.
25657         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25658         Added control flow analysis stuff here.
25659
25660         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25661         resolve the expression as lvalue.
25662         (LocalVariableReference.DoResolve): Check whether the variable has
25663         already been assigned.
25664         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25665         the parameter as assigned here.
25666         (ParameterReference.DoResolve): Check whether the parameter has already
25667         been assigned.
25668         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25669         expression as lvalue.
25670
25671         * statement.cs (FlowBranching): New class for the flow analysis code.
25672         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25673         (LabeledStatement.IsDefined): New public property.
25674         (LabeledStatement.AddUsageVector): New public method to tell flow
25675         analyis that the label may be reached via a forward jump.
25676         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25677         flow analysis.
25678         (VariableInfo.Number): New public field.  This is used by flow analysis
25679         to number all locals of a block.
25680         (Block.CountVariables): New public property.  This is the number of
25681         local variables in this block (including the locals from all parent
25682         blocks).
25683         (Block.EmitMeta): Number all the variables.
25684
25685         * statement.cs: Added flow analysis support to all classes.
25686
25687 2002-07-31  Martin Baulig  <martin@gnome.org>
25688
25689         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25690         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25691         then use this argument.
25692
25693         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25694
25695         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25696         use this to specify /define options.
25697
25698 2002-07-29  Martin Baulig  <martin@gnome.org>
25699
25700         * statement.cs (Fixed): Moved all code that does variable lookups
25701         and resolvings from Emit to Resolve.
25702
25703         * statement.cs (For): Moved all code that does variable lookups
25704         and resolvings from Emit to Resolve.
25705
25706         * statement.cs (Using): Moved all code that does variable lookups
25707         and resolvings from Emit to Resolve.
25708
25709 2002-07-29  Martin Baulig  <martin@gnome.org>
25710
25711         * attribute.cs (Attribute.Resolve): Explicitly catch a
25712         System.NullReferenceException when creating the
25713         CustromAttributeBuilder and report a different warning message.
25714
25715 2002-07-29  Martin Baulig  <martin@gnome.org>
25716
25717         * support.cs (ParameterData.ParameterName): Added method to
25718         get the name of a parameter.
25719
25720         * typemanager.cs (TypeManager.IsValueType): New public method.
25721
25722 2002-07-29  Martin Baulig  <martin@gnome.org>
25723
25724         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25725         is a flag which specifies that it's either ref or out.
25726         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25727         the out parameter to `out Parameter.Modifier mod', also set the
25728         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25729
25730         * support.cs (InternalParameters.ParameterModifier): Distinguish
25731         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25732         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25733
25734         * expression.cs (Argument.GetParameterModifier): Distinguish
25735         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25736         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25737
25738 2002-07-29  Martin Baulig  <martin@gnome.org>
25739
25740         * expression.cs (ParameterReference.ParameterReference): Added
25741         `Location loc' argument to the constructor.
25742
25743         * cs-parser.jay: Pass location to ParameterReference.
25744
25745 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25746
25747         * statement.cs (Try): Initialize the location.
25748
25749         * cs-parser.jay: pass location to Try.
25750
25751         * expression.cs (Unary.Reduce): Change the prototype to return
25752         whether a constant fold could be performed or not.  The result is
25753         returned in an out parameters.  In the case of Indirection and
25754         AddressOf, we want to perform the full tests.
25755
25756 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25757
25758         * statement.cs (Statement.Emit): Flag dead code.
25759
25760 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25761
25762         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25763
25764 2002-07-27  Martin Baulig  <martin@gnome.org>
25765
25766         * class.cs (MethodData.Define): Put back call to
25767         TypeManager.AddMethod(), accidentally commented this out.
25768
25769         * report.cs (Debug): New public method to print debugging information,
25770         this is `[Conditional ("DEBUG")]'.
25771
25772 2002-07-26  Martin Baulig  <martin@gnome.org>
25773
25774         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25775         (switch_statement): Push the current_block to the switch_stack and
25776         pop it again when we're done with the switch.
25777         (switch_section): The new block is a child of the current_block.
25778         Fixes bug #24007, added test-152.cs.
25779
25780 2002-07-27  Martin Baulig  <martin@gnome.org>
25781
25782         * expression.cs (Invocation.EmitArguments): When calling a varargs
25783         function with only its fixed arguments, we need to pass an empty
25784         array.
25785
25786 2002-07-27  Martin Baulig  <martin@gnome.org>
25787
25788         Mono 0.13 has been released.
25789
25790 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25791
25792         * driver.cs: Rename --resource to --linkres, because that is what
25793         we do currently, we dont support --resource yet.
25794
25795         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
25796
25797 2002-07-25  Martin Baulig  <martin@gnome.org>
25798
25799         * class.cs (MethodData): New public class.  This is a `method builder'
25800         class for a method or one accessor of a Property/Indexer/Event.
25801         (MethodData.GetMethodFlags): Moved here from MemberBase.
25802         (MethodData.ApplyAttributes): Likewise.
25803         (MethodData.ApplyObsoleteAttribute): Likewise.
25804         (MethodData.ApplyConditionalAttribute): Likewise.
25805         (MethodData.ApplyDllImportAttribute): Likewise.
25806         (MethodData.CheckAbstractAndExternal): Likewise.
25807         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
25808         (MethodData.Emit): Formerly known as Method.Emit().
25809         (MemberBase): Moved everything which was specific to a single
25810         accessor/method to MethodData.
25811         (Method): Create a new MethodData and call Define() and Emit() on it.
25812         (Property, Indexer, Event): Create a new MethodData objects for each
25813         accessor and call Define() and Emit() on them.
25814
25815 2002-07-25  Martin Baulig  <martin@gnome.org>
25816
25817         Made MethodCore derive from MemberBase to reuse the code from there.
25818         MemberBase now also checks for attributes.
25819
25820         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
25821         (MemberBase.GetMethodFlags): Moved here from class Method and marked
25822         as virtual.
25823         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
25824         `CallingConventions cc' and `Attributes opt_attrs' arguments.
25825         (MemberBase.ApplyAttributes): New virtual method; applies the
25826         attributes to a method or accessor.
25827         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
25828         (MemberBase.ApplyConditionalAttribute): Likewise.
25829         (MemberBase.ApplyDllImportAttribute): Likewise.
25830         (MemberBase.CheckAbstractAndExternal): Likewise.
25831         (MethodCore.ParameterTypes): This is now a property instead of a
25832         method, it's initialized from DoDefineParameters().
25833         (MethodCore.ParameterInfo): Removed the set accessor.
25834         (MethodCore.DoDefineParameters): New protected virtual method to
25835         initialize ParameterTypes and ParameterInfo.
25836         (Method.GetReturnType): We can now simply return the MemberType.
25837         (Method.GetMethodFlags): Override the MemberBase version and add
25838         the conditional flags.
25839         (Method.CheckBase): Moved some code from Define() here, call
25840         DoDefineParameters() here.
25841         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
25842         here to avoid some larger code duplication.
25843         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
25844         ensure that abstract and external accessors don't declare a body.
25845
25846         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
25847         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
25848         lookup in the attribute's parent classes, so we need to abort as soon
25849         as we found the first match.
25850         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
25851         the attribute has no arguments.
25852
25853         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
25854         of a Method.
25855
25856 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25857
25858         * cs-parser.jay: reverted previous patch.
25859
25860 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25861
25862         * cs-parser.jay: fixed bug #22119.
25863
25864 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25865
25866         * attribute.cs: fixed compilation. The error was:
25867         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
25868         be assigned to before control leaves the current method."
25869         [FIXME:  Filed as bug #28186: MCS must report this error.]
25870
25871 2002-07-25  Martin Baulig  <martin@gnome.org>
25872
25873         * attribute.cs (Attribute.Conditional_GetConditionName): New static
25874         method to pull the condition name ouf of a Conditional attribute.
25875         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
25876         the obsolete message and error flag out of an Obsolete attribute.
25877
25878         * class.cs (Method.GetMethodFlags): New public method to get the
25879         TypeManager.MethodFlags for this method.
25880         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
25881         private methods.
25882         (Method.Define): Get and apply the Obsolete and Conditional attributes;
25883         if we're overriding a virtual function, set the new private variable
25884         `parent_method'; call the new TypeManager.AddMethod().
25885
25886         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
25887         the MethodBuilder and the Method in a PtrHashtable.
25888         (TypeManager.builder_to_method): Added for this purpose.
25889         (TypeManager.MethodFlags): Added IsObsoleteError.
25890         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
25891         Obsolete and Conditional arguments in MethodBuilders.  If we discover
25892         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
25893         the message from the attribute.
25894
25895 2002-07-24  Martin Baulig  <martin@gnome.org>
25896
25897         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
25898         preprocessor directives, ensure that the argument to #define/#undef is
25899         exactly one identifier and that it's actually an identifier.
25900
25901         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
25902         did not work ....
25903
25904 2002-07-24  Martin Baulig  <martin@gnome.org>
25905
25906         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
25907         initialize it to TypeManager.object_type in the constructor.
25908         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
25909         of the `hm.get_current' method if we're using the collection pattern.
25910         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
25911         for the explicit conversion to make it work when we're using the collection
25912         pattern and the `Current' property has a different return type than `object'.
25913         Fixes #27713.
25914
25915 2002-07-24  Martin Baulig  <martin@gnome.org>
25916
25917         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
25918         does not match, but don't report any errors.  This method is called in
25919         order for all methods in a MethodGroupExpr until a matching method is
25920         found, so we don't want to bail out if the first method doesn't match.
25921         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
25922         matches, report the 123.  Fixes #28070.
25923
25924 2002-07-24  Martin Baulig  <martin@gnome.org>
25925
25926         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
25927         TypeManager.TypeToCoreType() to the top of the method so the
25928         following equality checks will work.  Fixes #28107.
25929
25930 2002-07-24  Martin Baulig  <martin@gnome.org>
25931
25932         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
25933         operand is of type uint, and the other operand is of type sbyte,
25934         short or int, the operands are converted to type long." -
25935         Actually do what this comment already told us.  Fixes bug #28106,
25936         added test-150.cs.
25937
25938 2002-07-24  Martin Baulig  <martin@gnome.org>
25939
25940         * class.cs (MethodBase): New abstract class.  This is now a base
25941         class for Property, Indexer and Event to avoid some code duplication
25942         in their Define() and DefineMethods() methods.
25943         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
25944         generic methods for Define() and DefineMethods().
25945         (FieldBase): Derive from MemberBase, not MemberCore.
25946         (Property): Derive from MemberBase, not MemberCore.
25947         (Property.DefineMethod): Moved all the code from this method to the
25948         new MethodBase.DefineAccessor(), just call it with appropriate
25949         argumetnts.
25950         (Property.Define): Call the new Property.DoDefine(), this does some
25951         sanity checks and we don't need to duplicate the code everywhere.
25952         (Event): Derive from MemberBase, not MemberCore.
25953         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
25954         accessors, this will also make them work with interface events.
25955         (Indexer): Derive from MemberBase, not MemberCore.
25956         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
25957         (Indexer.Define): Use the new MethodBase functions.
25958
25959         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
25960         argument to the constructor.
25961         (Interface.FindMembers): Added support for interface events.
25962         (Interface.PopluateEvent): Implemented.
25963
25964         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
25965
25966 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
25967
25968         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
25969         but this is required to check for a method name being the same as
25970         the containing class.  
25971
25972         Handle this now.
25973
25974 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25975
25976         * interface.cs: initialize variable.
25977
25978 2002-07-23  Martin Baulig  <martin@gnome.org>
25979
25980         Implemented the IndexerName attribute in interfaces.
25981
25982         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
25983         name if this is an explicit interface implementation.
25984         (Indexer.InterfaceIndexerName): New public variable.  If we're
25985         implementing an interface indexer, this is the IndexerName in that
25986         interface.  Otherwise, it's the IndexerName.
25987         (Indexer.DefineMethod): If we're implementing interface indexer,
25988         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
25989         and Pending.ImplementIndexer methods.
25990         (Indexer.Define): Also define the PropertyBuilder if we're
25991         implementing an interface indexer and this is neither an explicit
25992         interface implementation nor do the IndexerName match the one in
25993         the interface.
25994
25995         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
25996         If a method is defined here, then we always need to create a proxy
25997         for it.  This is used when implementing interface indexers.
25998         (Pending.IsInterfaceIndexer): New public method.
25999         (Pending.ImplementIndexer): New public method.
26000         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
26001         This is used when implementing interface indexers to define a proxy
26002         if necessary.
26003         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
26004         define a proxy if necessary.
26005
26006         * interface.cs (Interface.IndexerName): New public variable.
26007         (Interface.PopulateIndexer): Set the IndexerName.
26008         (Interface.DefineIndexers): New private method.  Populate all the
26009         indexers and make sure their IndexerNames match.
26010
26011         * typemanager.cs (IndexerPropertyName): Added support for interface
26012         indexers.
26013
26014 2002-07-22  Martin Baulig  <martin@gnome.org>
26015
26016         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
26017         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
26018         ret if HasReturnLabel.
26019         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
26020         variables.
26021
26022         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
26023         and set the ec.LoopBeginTryCatchLevel.
26024         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
26025         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
26026         the current ec.TryCatchLevel, the branch goes out of an exception
26027         block.  In this case, we need to use Leave and not Br.
26028
26029 2002-07-22  Martin Baulig  <martin@gnome.org>
26030
26031         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
26032         block unless the block does not always return or it is contained in
26033         another try { ... } catch { ... } block.  Fixes bug #26506.
26034         Added verify-1.cs to the test suite.
26035
26036 2002-07-22  Martin Baulig  <martin@gnome.org>
26037
26038         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
26039         then we do not always return.  Fixes bug #24985.
26040
26041 2002-07-22  Martin Baulig  <martin@gnome.org>
26042
26043         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
26044         lookup on a per-class level; ie. walk up the class hierarchy until we
26045         found at least one applicable method, then choose the best among them.
26046         Fixes bug #24463 and test-29.cs.
26047
26048 2002-07-22  Martin Baulig  <martin@gnome.org>
26049
26050         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
26051         return types of the methods.  The return type is not part of the
26052         signature and we must not check it to make the `new' modifier work.
26053         Fixes bug #27999, also added test-147.cs.
26054         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
26055
26056         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
26057         on the method's return type.
26058
26059 2002-07-21  Martin Baulig  <martin@gnome.org>
26060
26061         * assign.cs: Make this work if the rightmost source is a constant and
26062         we need to do an implicit type conversion.  Also adding a few more tests
26063         to test-38.cs which should have caught this.
26064
26065         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
26066         target in the makefile for this.  The makefile.gnu is primarily intended
26067         for end-users who don't want to debug the compiler.
26068
26069 2002-07-21  Martin Baulig  <martin@gnome.org>
26070
26071         * assign.cs: Improved the Assign class so it can now handle embedded
26072         assignments (X = Y = Z = something).  As a side-effect this'll now also
26073         consume less local variables.  test-38.cs now passes with MCS, added
26074         a few new test cases to that test.
26075
26076 2002-07-20  Martin Baulig  <martin@gnome.org>
26077
26078         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
26079         instructions.  Fixes bug #27977, also added test-146.cs.
26080
26081 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26082
26083         * cs-tokenizer.cs: fixed getHex ().
26084
26085 2002-07-19  Martin Baulig  <martin@gnome.org>
26086
26087         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
26088         not Type.GetType() to lookup the array type.  This is needed when
26089         we're constructing an array of a user-defined type.
26090         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
26091         single-dimensional arrays, but also for single-dimensial arrays of
26092         type decimal.
26093
26094 2002-07-19  Martin Baulig  <martin@gnome.org>
26095
26096         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
26097         this function is called, it's not allowed to share LocalBuilders
26098         among ILGenerators.
26099
26100 2002-07-19  Martin Baulig  <martin@gnome.org>
26101
26102         * expression.cs (Argument.Resolve): Report an error 118 when trying
26103         to pass a type as argument.
26104
26105 2002-07-18  Martin Baulig  <martin@gnome.org>
26106
26107         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
26108         Conv_R_Un for the signed `long' type.
26109
26110 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
26111
26112         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
26113         `expr' for the temporary result, as that will fail if we do
26114         multiple resolves on the same expression.
26115
26116 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
26117
26118         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
26119         ec.TypeContainer for looking up aliases. 
26120
26121         * class.cs (TypeContainer): Remove LookupAlias from here.
26122
26123         * decl.cs (DeclSpace); Move here.
26124
26125 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
26126
26127         * class.cs (FindMembers): Only call filter if the constructor
26128         bulider is not null.
26129
26130         Also handle delegates in `NestedTypes' now.  Now we will perform
26131         type lookups using the standard resolution process.  This also
26132         fixes a bug.
26133
26134         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
26135         This uses Expressions (the limited kind that can be parsed by the
26136         tree) instead of strings.
26137
26138         * expression.cs (ComposedCast.ToString): Implement, used to flag
26139         errors since now we have to render expressions.
26140
26141         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
26142         FormArrayType. 
26143
26144         * ecore.cs (SimpleName.ToString): ditto.
26145
26146         * cs-parser.jay: Instead of using strings to assemble types, use
26147         Expressions to assemble the type (using SimpleName, ComposedCast,
26148         MemberAccess).  This should fix the type lookups in declarations,
26149         because we were using a different code path for this.
26150
26151         * statement.cs (Block.Resolve): Continue processing statements
26152         even when there is an error.
26153
26154 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
26155
26156         * class.cs (Event.Define): Also remove the `remove' method from
26157         the list of pending items.
26158
26159         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
26160         generate more compact code. 
26161
26162 2002-07-17  Martin Baulig  <martin@gnome.org>
26163
26164         * const.cs (Const.LookupConstantValue): Add support for constant
26165         `unchecked' and `checked' expressions.
26166         Also adding test case test-140.cs for this.
26167
26168 2002-07-17  Martin Baulig  <martin@gnome.org>
26169
26170         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
26171         check whether mi.ReturnType implements the IEnumerator interface; the
26172         `==' and the IsAssignableFrom() will fail in this situation.
26173
26174 2002-07-16  Ravi Pratap  <ravi@ximian.com>
26175
26176         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
26177         here too.
26178
26179 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26180
26181         * expression.cs: fixed bug #27811.
26182
26183 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
26184
26185         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
26186         Molaro: when we are a ref, the value already contains a pointer
26187         value, do not take the address of it.
26188
26189 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
26190         * removed mb-parser.jay and mb-tokenizer.cs
26191
26192 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26193
26194         * expression.cs: check against the building corlib void type.
26195
26196 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26197
26198         * ecore.cs: fix for valuetype static readonly fields: when 
26199         initializing them, we need their address, not the address of a copy.
26200
26201 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26202
26203         * typemanager.cs: register also enum_type in corlib.
26204
26205 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26206
26207         * class.cs: allow calling this (but not base) initializers in structs.
26208
26209 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26210
26211         * ecore.cs: make sure we compare against the building base types
26212         in GetTypeSize ().
26213
26214 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26215
26216         * typemanager.cs: fix TypeToCoreType() to handle void and object
26217         (corlib gets no more typerefs after this change).
26218
26219 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26220
26221         * expression.cs (ArrayCreation.EmitArrayArguments): use
26222         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26223
26224         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26225         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26226         array indexes, the runtime actually forbids them.
26227
26228         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26229         for array arguments here.
26230
26231         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26232         instead of the default for ValueTypes.
26233
26234         (New.DoEmit): Use IsValueType instead of
26235         IsSubclassOf (value_type)
26236         (New.DoResolve): ditto.
26237         (Invocation.EmitCall): ditto.
26238
26239         * assign.cs (Assign): ditto.
26240
26241         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26242         Statements *are* currently doing part of their resolution during
26243         Emit.  
26244
26245         Expressions do always resolve during resolve, but statements are
26246         only required to propagate resolution to their children.
26247
26248 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26249
26250         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26251
26252         (LoadAssembly): Do not add the dll if it is already specified
26253
26254         (MainDriver): Add the System directory to the link path at the end,
26255         after all the other -L arguments. 
26256
26257         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26258         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26259         ldelem.u1) and using the opposite for sbytes.
26260
26261         This fixes Digger, and we can finally run it.
26262
26263         * driver.cs (UnixParseOption): Move the option parsing here.  
26264         (CSCParseOption): Implement CSC-like parsing of options.
26265
26266         We now support both modes of operation, the old Unix way, and the
26267         new CSC-like way.  This should help those who wanted to make cross
26268         platform makefiles.
26269
26270         The only thing broken is that /r:, /reference: and /lib: are not
26271         implemented, because I want to make those have the same semantics
26272         as the CSC compiler has, and kill once and for all the confussion
26273         around this.   Will be doing this tomorrow.
26274
26275         * statement.cs (Unsafe.Resolve): The state is checked during
26276         resolve, not emit, so we have to set the flags for IsUnsfe here.
26277
26278 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26279
26280         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26281         not catch the Error_ObjectRefRequired in SimpleName (as it is
26282         possible to have a class/instance variable name that later gets
26283         deambiguated), we have to check this here.      
26284
26285 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26286
26287         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26288         make static and put into Expression.
26289
26290         (Event.Define): Register the private field of the event with the 
26291         TypeManager so that GetFieldFromEvent can get at it.
26292
26293         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26294         keep track of the private field associated with an event which
26295         has no accessors.
26296
26297         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26298         private field.
26299
26300         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26301
26302 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26303
26304         * expression.cs (Binary.EmitBranchable): this routine emits the
26305         Binary expression in a branchable context.  This basically means:
26306         we need to branch somewhere, not just get the value on the stack.
26307
26308         This works together with Statement.EmitBoolExpression.
26309
26310         * statement.cs (Statement.EmitBoolExpression): Use
26311         EmitBranchable. 
26312
26313 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26314
26315         * statement.cs (For): Reduce the number of jumps in loops.
26316
26317         (For): Implement loop inversion for the For statement.
26318
26319         (Break): We can be breaking out of a Try/Catch controlled section
26320         (foreach might have an implicit try/catch clause), so we need to
26321         use Leave instead of Br.
26322
26323         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26324         now).  If the instace expression supports IMemoryLocation, we use
26325         the AddressOf method from the IMemoryLocation to extract the
26326         address instead of emitting the instance.
26327
26328         This showed up with `This', as we were emitting the instance
26329         always (Emit) instead of the Address of This.  Particularly
26330         interesting when This is a value type, as we dont want the Emit
26331         effect (which was to load the object).
26332
26333 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26334
26335         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26336
26337         * statement.cs (Checked): Set the CheckedState during the resolve
26338         process too, as the ConvCast operations track the checked state on
26339         the resolve process, and not emit.
26340
26341         * cs-parser.jay (namespace_member_declaration): Flag that we have
26342         found a declaration when we do.  This is used to flag error 1529
26343
26344         * driver.cs: Report ok when we display the help only.
26345
26346 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26347
26348         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26349
26350 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26351
26352         * cs-tokenizer.cs (define): We also have to track locally the
26353         defines.  AllDefines is just used for the Conditional Attribute,
26354         but we also need the local defines for the current source code. 
26355
26356 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26357
26358         * statement.cs (While, For, Do): These loops can exit through a
26359         Break statement, use this information to tell whether the
26360         statement is the last piece of code.
26361
26362         (Break): Flag that we break.
26363
26364         * codegen.cs (EmitContexts): New `Breaks' state variable.
26365
26366 2002-07-03  Martin Baulig  <martin@gnome.org>
26367
26368         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26369         modifiers in method declarations in structs.  Otherwise, you won't
26370         be able to override things like Object.Equals().
26371
26372 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26373
26374         * class.cs (Method, Property, Indexer): Do not allow the public
26375         modifier to be used in explicit interface implementations.
26376
26377         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26378         override modifiers in method declarations in structs
26379
26380 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26381
26382         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26383         integer or real overflow, report an error
26384
26385 2002-07-02  Martin Baulig  <martin@gnome.org>
26386
26387         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26388         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26389         to tell the runtime about our newly created System.Object and
26390         System.ValueType types.
26391
26392 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26393
26394         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26395         struct instead of Ldarg/Starg.
26396
26397 2002-07-02  Martin Baulig  <martin@gnome.org>
26398
26399         * expression.cs (Indirection.Indirection): Call
26400         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26401
26402 2002-07-02  Martin Baulig  <martin@gnome.org>
26403
26404         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26405         ValueType, call TypeManager.TypeToCoreType() on it.
26406         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26407         the OpCodes.Newarr argument.
26408
26409 2002-07-02  Martin Baulig  <martin@gnome.org>
26410
26411         * expression.cs (Invocation.EmitCall): When compiling corlib,
26412         replace all calls to the system's System.Array type to calls to
26413         the newly created one.
26414
26415         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26416         System.Array methods.
26417         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26418         from the system's System.Array type which must be replaced.
26419
26420 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26421
26422         * typemanager.cs: load unverifiable_code_ctor so we can build
26423         corlib using the correct type. Avoid using GetTypeCode() with
26424         TypeBuilders.
26425         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26426         TypeManager.object_type to allow building corlib.
26427
26428 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26429
26430         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26431
26432 2002-07-01  Martin Baulig  <martin@gnome.org>
26433
26434         * class.cs: Make the last change actually work, we need to check
26435         whether `ifaces != null' to avoid a crash.
26436
26437 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26438
26439         * class.cs: when we build structs without fields that implement
26440         interfaces, we need to add the interfaces separately, since there is
26441         no API to both set the size and add the interfaces at type creation
26442         time.
26443
26444 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26445
26446         * expression.cs: the dimension arguments to the array constructors
26447         need to be converted if they are a long.
26448
26449 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26450
26451         * class.cs: don't emit ldarg.0 if there is no parent constructor
26452         (fixes showstopper for corlib).
26453
26454 2002-06-29  Martin Baulig  <martin@gnome.org>
26455
26456         MCS now compiles corlib on GNU/Linux :-)
26457
26458         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26459         ie. check for MethodImplOptions.InternalCall.
26460
26461         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26462         and TypeManager.attribute_type are null, so we must explicitly check
26463         whether parent is not null to find out whether it's an attribute type.
26464         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26465         and SetBuilder, not only if the property is neither abstract nor external.
26466         This is necessary to set the MethodImplOptions on the accessor methods.
26467         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26468         SetBuilder, see Property.Emit().
26469
26470         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26471         populate "System.Object", "System.ValueType" and "System.Attribute" since
26472         they've already been populated from BootCorlib_PopulateCoreTypes().
26473
26474 2002-06-29  Martin Baulig  <martin@gnome.org>
26475
26476         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26477         is the NullLiteral, we also need to make sure that target_type is not
26478         an enum type.   
26479
26480 2002-06-29  Martin Baulig  <martin@gnome.org>
26481
26482         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26483         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26484         before calling BootstrapCorlib_ResolveDelegate ().
26485
26486 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26487
26488         * statement.cs: fixed build-breaker. All tests passed ok.
26489
26490 2002-06-27  Martin Baulig  <martin@gnome.org>
26491
26492         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26493         for System.Decimal when compiling corlib.
26494
26495 2002-06-27  Martin Baulig  <martin@gnome.org>
26496
26497         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26498         switch blocks which contain nothing but a default clause.
26499
26500 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26501
26502        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26503
26504 2002-06-27  Martin Baulig  <martin@gnome.org>
26505
26506         * ecore.cs (PropertyExpr.PropertyExpr): Call
26507         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26508
26509         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26510         is already a TypeBuilder.
26511
26512 2002-06-27  Martin Baulig  <martin@gnome.org>
26513
26514         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26515         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26516         the "from an array-type to System.Array" case.  This makes it work
26517         when compiling corlib.
26518
26519 2002-06-27  Martin Baulig  <martin@gnome.org>
26520
26521         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26522         non-static PropertyExpr, set its InstanceExpression.  This makes
26523         the `ICollection.Count' property work in System/Array.cs.
26524
26525 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26526
26527         * driver.cs: Made error handling more consistent.  Errors now
26528         tracked by Report class, so many methods which used to return int
26529         now return void.  Main() now prints success/failure and 
26530         errors/warnings message.
26531
26532         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26533         the magic number return values (123 and 124).  Now, if the
26534         expected error occurs, the compiler exits with success (exit value
26535         0).  If the compilation completes without seeing that particular
26536         error, the compiler exits with failure (exit value 1).  The
26537         makefile in mcs/errors has been changed to handle the new behaviour.
26538
26539         * report.cs: Made 'expected error' number a property and renamed
26540         it from 'Probe' to 'ExpectedError'.
26541
26542         * genericparser.cs: Removed error handling support, since it is
26543         now all done by Report class.
26544
26545         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26546         class, so parse() no longer returns an int.
26547
26548         * namespace.cs: Use Report.Error instead of GenericParser.error
26549
26550 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26551
26552         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26553         TypeContainer.AddOperator): At the front of the list put the
26554         explicit implementations, so they get resolved/defined first. 
26555
26556 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26557
26558         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26559         interface type is implemented by this TypeContainer.  Used during
26560         explicit interface implementation.
26561
26562         (Property.Define, Indexer.Define, Method.Define): Validate that
26563         the given interface in the explicit implementation is one of the
26564         base classes for the containing type.
26565
26566         Also if we are explicitly implementing an interface, but there is
26567         no match in the pending implementation table, report an error.
26568
26569         (Property.Define): Only define the property if we are
26570         not explicitly implementing a property from an interface.  Use the
26571         correct name also for those properties (the same CSC uses,
26572         although that is really not needed).
26573
26574         (Property.Emit): Do not emit attributes for explicitly implemented
26575         properties, as there is no TypeBuilder.
26576
26577         (Indexer.Emit): ditto.
26578
26579         Hiding then means that we do not really *implement* a pending
26580         implementation, which makes code fail.
26581
26582 2002-06-22  Martin Baulig  <martin@gnome.org>
26583
26584         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26585         the return value of Object.GetType().  [FIXME: we need to do this whenever
26586         we get a type back from the reflection library].
26587
26588 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26589
26590         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26591
26592 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26593
26594         * attribute.cs: Return null if we can not look up the type.
26595
26596         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26597         the interface types found.
26598
26599         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26600         interface types found.
26601
26602         * typemanager.cs (GetInterfaces): Make this routine returns alll
26603         the interfaces and work around the lame differences between
26604         System.Type and System.Reflection.Emit.TypeBuilder in the results
26605         result for GetInterfaces.
26606
26607         (ExpandInterfaces): Given an array of interface types, expand and
26608         eliminate repeated ocurrences of an interface.  This expands in
26609         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26610         be IA, IB, IC.
26611
26612 2002-06-21  Martin Baulig  <martin@gnome.org>
26613
26614         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26615         on System.Enum.
26616
26617 2002-06-21  Martin Baulig  <martin@gnome.org>
26618
26619         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26620         and called with one of the core types, return the corresponding typebuilder for
26621         that type.
26622
26623         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26624         element type.
26625
26626 2002-06-21  Martin Baulig  <martin@gnome.org>
26627
26628         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26629         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26630         (Expression.ConvertReferenceExplicit): Likewise.
26631
26632         * expression.cs (ElementAccess.DoResolve): Likewise.
26633         (ElementAccess.DoResolveLValue): Likewise.
26634
26635 2002-06-10  Martin Baulig  <martin@gnome.org>
26636
26637         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26638         add the "value" parameter to the parameter list.
26639
26640         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26641         to our caller.
26642
26643 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26644
26645         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26646         the argument to an int, uint, long or ulong, per the spec.  Also
26647         catch negative constants in array creation.
26648
26649 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26650
26651         * class.cs: do not allow the same interface to appear twice in
26652         the definition list.
26653
26654 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26655
26656         * ecore.cs: don't use ldlen with System.Array.
26657
26658 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26659
26660         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26661
26662 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26663
26664         * modifiers.cs: produce correct field attributes for protected
26665         internal. Easy fix so miguel can work on ther harder stuff:-)
26666
26667 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26668
26669         * pending.cs: New file.  Move the code from class.cs here.
26670         Support clearning the pending flag for all methods (when not doing
26671         explicit interface implementation).
26672
26673 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26674
26675         * rootcontext.cs: added a couple more types needed to bootstrap.
26676
26677 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26678
26679         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26680         constructor in the type, instead of any constructor in the type
26681         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26682         a bug in the Mono runtime when applying the params attribute). 
26683
26684 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26685         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26686
26687 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26688
26689         * expression.cs (Unary.ResolveOperator): Use TypeManager
26690         to resolve the type.
26691
26692 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26693
26694         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26695         attached.
26696
26697         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26698         with each member too.
26699
26700         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26701         field builders too - this takes care of the enum member case.
26702
26703 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26704
26705         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26706         address-of operator on both value types and pointers.
26707
26708 2002-06-10  Martin Baulig  <martin@gnome.org>
26709
26710         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26711         PropertyBuilder to the `property_builders' list.
26712
26713         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26714         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26715         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26716         find any indexers which are inherited from an interface.
26717
26718 2002-06-09  Martin Baulig  <martin@gnome.org>
26719
26720         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26721         the same type as the constant if necessary.  There's also a test-130.cs
26722         for this.
26723
26724         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26725
26726         * typemanager.cs (TypeManager.ChangeType): Previously known as
26727         Enum.ChangeEnumType().
26728
26729 2002-06-09  Martin Baulig  <martin@gnome.org>
26730
26731         * expression.cs (Cast.TryReduce): Added support for consts.
26732
26733 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26734
26735         * class.cs (Accessor): Hold attributes information so we can pass
26736         it along.
26737
26738         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26739         Modify to pass in attributes attached to the methods.
26740
26741         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26742
26743         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26744         to handle the Accessor kind :-)
26745
26746         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26747
26748 2002-06-08  Martin Baulig  <martin@gnome.org>
26749
26750         * expression.cs (Unary.TryReduceNegative): Added support for
26751         ULongConstants.
26752
26753 2002-06-08  Martin Baulig  <martin@gnome.org>
26754
26755         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26756         name can't be found in the `defined_names' - the caller will do a
26757         MemberLookup in this case and thus find methods in System.Enum
26758         such as Enum.IsDefined().
26759
26760 2002-06-08  Martin Baulig  <martin@gnome.org>
26761
26762         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26763         Convert.ChangeType() which works with TypeBuilder created types.
26764         (Enum.LookupEnumValue, Enum.Define): Use it here.
26765
26766         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26767         `TypeBuilder.BaseType != null' check.
26768         (TypeContainer.FindMembers): Only lookup parent members if we
26769         actually have a parent.
26770         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26771         (ConstructorInitializer.Resolve): Likewise.
26772
26773         * interface.cs (Interface.FindMembers): Added
26774         `TypeBuilder.BaseType != null' check.
26775
26776         * rootcontext.cs (RootContext.ResolveCore): Added
26777         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26778         classes_second_stage.
26779
26780         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26781         debug_type and trace_type when compiling with --nostdlib.       
26782
26783 2002-06-07  Martin Baulig  <martin@gnome.org>
26784
26785         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26786         (AddField): Set it to true when adding a non-static field.
26787         (DefineType): Use `have_nonstatic_fields' to find out whether we
26788         have non-static fields, not `Fields != null'.
26789
26790 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26791
26792         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26793         dereferencing a null on the static-field code path)
26794
26795 2002-05-30  Martin Baulig  <martin@gnome.org>
26796
26797         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
26798         to take command line arguments.  Use reflection to call the new
26799         custom `Initialize' function on the symbol writer and pass it the
26800         command line arguments.
26801
26802         * driver.cs (--debug-args): New command line argument to pass command
26803         line arguments to the symbol writer.
26804
26805 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
26806
26807         * assign.cs (DoResolve): Forgot to do the implicit conversion to
26808         the target type for indexers and properties.  Thanks to Joe for
26809         catching this.
26810
26811 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
26812
26813         * typemanager.cs (MethodFlags): returns the method flags
26814         (Obsolete/ShouldIgnore) that control warning emission and whether
26815         the invocation should be made, or ignored. 
26816
26817         * expression.cs (Invocation.Emit): Remove previous hack, we should
26818         not do this on matching a base type, we should do this based on an attribute
26819
26820         Only emit calls to System.Diagnostics.Debug and
26821         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
26822         on the command line.
26823
26824         * rootcontext.cs: Global settings for tracing and debugging.
26825
26826         * cs-tokenizer.cs (define): New utility function to track
26827         defines.   Set the global settings for TRACE and DEBUG if found.
26828
26829 2002-05-25  Ravi Pratap  <ravi@ximian.com>
26830
26831         * interface.cs (Populate*): Pass in the TypeContainer as well as
26832         the DeclSpace as parameters so that we can create EmitContexts and
26833         then use that to apply attributes etc.
26834
26835         (PopulateMethod, PopulateEvent, PopulateProperty)
26836         (PopulateIndexer): Apply attributes everywhere.
26837
26838         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
26839         etc.
26840
26841         (ApplyAttributes): Update accordingly.
26842
26843         We now apply interface attributes for all members too.
26844
26845 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
26846
26847         * class.cs (Indexer.Define); Correctly check if we are explicit
26848         implementation (instead of checking the Name for a ".", we
26849         directly look up if the InterfaceType was specified).
26850
26851         Delay the creation of the PropertyBuilder.
26852
26853         Only create the PropertyBuilder if we are not an explicit
26854         interface implementation.   This means that explicit interface
26855         implementation members do not participate in regular function
26856         lookups, and hence fixes another major ambiguity problem in
26857         overload resolution (that was the visible effect).
26858
26859         (DefineMethod): Return whether we are doing an interface
26860         implementation. 
26861
26862         * typemanager.cs: Temporary hack until we get attributes in
26863         interfaces (Ravi is working on that) and we get IndexerName
26864         support in interfaces.
26865
26866         * interface.cs: Register the indexers as properties.
26867
26868         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
26869         warning, I have verified that this is a bug in the .NET runtime
26870         (JavaScript suffers of the same problem).
26871
26872         * typemanager.cs (MemberLookup): When looking up members for
26873         interfaces, the parent of an interface is the implicit
26874         System.Object (so we succeed in searches of Object methods in an
26875         interface method invocation.  Example:  IEnumerable x;  x.ToString
26876         ()) 
26877
26878 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
26879
26880         * class.cs (Event): Events should also register if they do
26881         implement the methods that an interface requires.
26882
26883         * typemanager.cs (MemberLookup); use the new GetInterfaces
26884         method. 
26885
26886         (GetInterfaces): The code used to lookup interfaces for a type is
26887         used in more than one place, factor it here. 
26888
26889         * driver.cs: Track the errors at the bottom of the file, we kept
26890         on going.
26891
26892         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
26893         instance if the method we are calling is static!
26894
26895 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
26896
26897         * attribute.cs (ApplyAttributes): Make this function filter out
26898         the IndexerName attribute (as that attribute in reality is never
26899         applied) and return the string constant for the IndexerName
26900         attribute. 
26901
26902         * class.cs (TypeContainer.Emit): Validate that all the indexers
26903         have the same IndexerName attribute, and if so, set the
26904         DefaultName attribute on the class. 
26905
26906         * typemanager.cs: The return value might contain other stuff (not
26907         only methods).  For instance, consider a method with an "Item"
26908         property and an Item method.
26909
26910         * class.cs: If there is a problem with the parameter types,
26911         return. 
26912
26913 2002-05-24  Ravi Pratap  <ravi@ximian.com>
26914
26915         * ecore.cs (ImplicitConversionExists): Wrapper function which also
26916         looks at user defined conversion after making a call to 
26917         StandardConversionExists - we need this for overload resolution.
26918
26919         * expression.cs : Update accordingly the various method calls.
26920
26921         This fixes 2 bugs filed against implicit user defined conversions 
26922
26923 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
26924
26925         * statement.cs: Track the result of the assignment.
26926
26927 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
26928
26929         * expression.cs (MemberAccess): Improved error reporting for
26930         inaccessible members.
26931
26932 2002-05-22  Martin Baulig  <martin@gnome.org>
26933
26934         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
26935         itself with debugging support.
26936
26937 2002-05-22  Martin Baulig  <martin@gnome.org>
26938
26939         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
26940         Removed, this isn't needed anymore.
26941
26942 2002-05-20  Martin Baulig  <martin@gnome.org>
26943
26944         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
26945         be underlying type for an enum.
26946
26947 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
26948
26949         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
26950         that splits out the loading of just the core types.
26951
26952         * rootcontext.cs (ResolveCore): Split the struct resolution in
26953         two, so we can load the enumeration underlying types before any
26954         enums are used.
26955
26956         * expression.cs (Is): Bandaid until we fix properly Switch (see
26957         bug #24985 for details).
26958
26959         * typemanager.cs (ImplementsInterface): The hashtable will contain
26960         a null if there are no interfaces implemented.
26961
26962 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
26963
26964         * cs-parser.jay (indexer_declarator): It is fine to have array
26965         parameters
26966
26967 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26968
26969         * typemanager.cs: (RegisterBuilder): New function used to register
26970         TypeBuilders that implement interfaces.  Since
26971         TypeBuilder.GetInterfaces (as usual) does not work with lame
26972         Reflection.Emit. 
26973         (AddUserType): register interfaces.
26974
26975         (ImplementsInterface): Use the builder_to_ifaces hash if we are
26976         dealing with TypeBuilder.  Also, arrays are showing up as
26977         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
26978         methods can not be invoked on them!
26979
26980         * ecore.cs (ExplicitReferenceConversionExists): Made public.
26981         (ImplicitReferenceConversionExists): Split out from
26982         StandardConversionExists. 
26983
26984         * expression.cs (As): We were only implementing one of the three
26985         cases for the as operator.  We now implement them all.
26986         (Is): Implement the various other cases for Is as well.
26987
26988         * typemanager.cs (CACHE): New define used to control if we want or
26989         not the FindMembers cache.  Seems to have a negative impact on
26990         performance currently
26991
26992         (MemberLookup): Nested types have full acess to
26993         enclosing type members
26994
26995         Remove code that coped with instance/static returns for events, we
26996         now catch this in RealFindMembers.
26997
26998         (RealFindMembers): only perform static lookup if the instance
26999         lookup did not return a type or an event.  
27000
27001 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
27002
27003         * assign.cs (CompoundAssign): We pass more semantic information
27004         now to Compound Assignments than we did before: now we have all
27005         the information at hand, and now we resolve the target *before* we
27006         do the expression expansion, which allows the "CacheValue" method
27007         to have the effect we intended (before, a [x] += 1 would generate
27008         two differen ArrayAccess expressions from the ElementAccess,
27009         during the resolution process).
27010
27011         (CompoundAssign.DoResolve): Resolve target and original_source here.
27012
27013 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
27014
27015         * expression.cs (ArrayAccess): dropped debugging information. 
27016
27017         * typemanager.cs: Small bug fix: I was always returning i_members,
27018         instead of one of i_members or s_members (depending on which had
27019         the content).
27020
27021         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
27022         method is invoked before any code generation takes place, and it
27023         is a mechanism to inform that the expression will be invoked more
27024         than once, and that the method should use temporary values to
27025         avoid having side effects
27026
27027         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
27028
27029         * ecore.cs (Expression.CacheTemporaries): Provide empty default
27030         implementation.
27031
27032         * expression.cs (Indirection, ArrayAccess): Add support for
27033         CacheTemporaries in these two bad boys. 
27034
27035         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
27036         ldobj or ldind_ref.  
27037         (StoreFromPtr): Handle stobj as well.
27038
27039         * expression.cs (UnaryMutator): Share more code.
27040
27041         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
27042         down: I was not tracking the Filter function as well, which
27043         was affecting the results of the cache.
27044
27045 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
27046
27047         * attribute.cs: Remove the hack to handle the CharSet property on
27048         StructLayouts. 
27049
27050 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
27051
27052         * attribute.cs (DoResolve): More uglyness, we now only try to
27053         resolve the attribute partially, to extract the CharSet
27054         information (only if we are a StructLayout attribute).  Otherwise 
27055
27056         (GetExtraTypeInfo): Add some code to conditionally kill in the
27057         future this.   I am more and more convinced that the .NET
27058         framework has special code to handle the attribute setting on
27059         certain elements.
27060
27061         * expression.cs (IsParamsMethodApplicable): Revert my previous
27062         foreach change here, it was wrong.
27063
27064 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
27065
27066         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
27067         (pp_expr): do not abort on unknown input, just return.
27068         (eval): abort if there are pending chars.
27069
27070         * attribute.cs (Attribute.Resolve): Positional parameters are
27071         optional.  Deal with that case.
27072
27073         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
27074         the Ansi/Unicode/Auto information for the type.
27075
27076         (TypeContainer.DefineType): instantiate the EmitContext here, as
27077         we will be using it during the type definition (to resolve
27078         attributes) and during the emit phase.
27079
27080         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
27081         to pull type information out of the attributes
27082
27083         (Attribute.Resolve): track the constructor builder, and allow for
27084         multiple invocations (structs and classes will use this).
27085
27086         * ecore.cs (MemberLookupFinal): new version with all the
27087         parameters customizable.
27088
27089         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
27090         constructors.  Return if the result value is null (as the error
27091         would have been flagged already by MemberLookupFinal)
27092
27093         Do not allow instances of abstract classes or interfaces to be
27094         created.
27095
27096         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
27097         We have to compare the assembly property here when dealing with
27098         FamANDAssem and Assembly access modifiers, because we might be
27099         creating an assembly from *modules* (that means that we are not
27100         getting TypeBuilders for types defined in other modules that are
27101         part of this assembly).
27102
27103         (Method.Emit): If the method is marked abstract and has a body,
27104         emit an error. 
27105
27106         (TypeContainer.DefineMembers): If both the defined member and the
27107         parent name match are methods, then do not emit any warnings: let
27108         the Method.Define routine take care of flagging warnings.  But if
27109         there is a mismatch (method overrides something else, or method is
27110         overriwritten by something, then emit warning).
27111
27112         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
27113         set to null, this means `do not check for the return type on the
27114         signature'. 
27115
27116         (Method.Define): set the return type for the method signature to
27117         null, so that we get methods with the same name and parameters and
27118         different return types.  This is used to flag warning 114 (you are
27119         hiding a method, and you probably want to use the new/override
27120         keywords instead).
27121
27122         * typemanager.cs (MemberLookup): Implemented proper access
27123         control, closing a long standing set of bug reports.  The problem
27124         was that the Framework only has two bits: Public and NonPublic,
27125         and NonPublic includes private and protected methods, but we need
27126         to enforce the FamANDAssem, FamOrAssem and Family. 
27127
27128 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
27129
27130         * statement.cs (GotoCase): Return true: Ammounts to giving up
27131         knowledge on whether we return or not, and letting the other case
27132         be responsible for it.
27133
27134 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
27135
27136         * driver.cs: Do not load directories for each file processed, only
27137         do it if there is a pattern.
27138
27139         * ecore.cs: Report readonly assigns here as well, as we might have
27140         been resolved only by MemberAccess.
27141
27142         (SimpleName.SimpleNameResolve): Also be useful for LValue
27143         resolution.   We need this to propagate assign to local readonly variables
27144
27145         * typemanager.cs: Use a ptrhashtable for the criteria, because we
27146         do not want to reuse potential criteria memory.
27147
27148         * class.cs (MyEventBuilder): Set reflected_type;
27149
27150         * ecore.cs (Constantify): Added support for constifying bools.
27151
27152         (RootContext.LookupType): Added a cache for values looked up in
27153         the declaration space.
27154
27155         * typemanager.cs (FindMembers): Now is a front-end to
27156         RealFindMembers, and provides a two-level hashtable-based cache to
27157         the request.  
27158
27159         15% performance improvement: from 22.5 to 19.2 seconds.
27160
27161         * expression.cs (IsParamsMethodApplicable): use foreach.
27162         (Invocation.DoResolve): ditto.
27163         (New.DoResolve): ditto.
27164         (ArrayCreation.DoResolve): ditto.
27165
27166         * ecore.cs (FindMostEncompassingType): use foreach.
27167
27168         * delegate.cs (NewDelegate.DoResolve): Use foreach
27169
27170         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
27171         (RemoveMethods): use foreach.
27172
27173         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
27174         nested foreach statements instead of for, and also break out of
27175         the inner loop once a match is found.
27176
27177         (Invocation.OverloadResolve): Use foreach, simplify the code. 
27178
27179 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
27180
27181         * cfold.cs (BinaryFold): During an enumeration evaluation context,
27182         we actually unwrap the expression to allow for extra information
27183         to be extracted. 
27184
27185         * expression.cs: Use Shr_Un on unsigned operations. 
27186
27187 2002-05-08  Ravi Pratap  <ravi@ximian.com>
27188
27189         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
27190         applicable operators was not being considered correctly. This closes
27191         the bug Miguel reported.
27192
27193 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27194
27195         * attribute.cs: check that the type derives from System.Attribute
27196         and report the correct error in that case (moved the duplicate code to
27197         its own method, too).
27198
27199 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27200
27201         * attribute.cs: lookup attribute type name as the spec says: first the
27202         bare attribute name and then name + "Attribute" (nant compiles with
27203         mcs after this fix).
27204
27205 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27206
27207         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27208         Because of the way we parse things, we should try to see if a
27209         UIntConstant can fit in an integer.
27210
27211 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27212
27213         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27214         when we are in an explicit context.
27215
27216         (ConvertReferenceExplicit): When converting from Iface type S to Class
27217         T make sure the rules are implemented as an OR.
27218
27219         * parameter.cs (ParameterType): Make it a property for now although the
27220         purpose really isn't anything immediate.
27221
27222         * expression.cs (Is*Applicable): Do better checking on the parameter type
27223         of a ref/out parameter. The ones from the system assemblies are already 
27224         marked with the correct type so we don't need to do any correction.
27225
27226         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27227         the object type is standard too so include that.
27228
27229 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27230
27231         * ecore.cs (StandardConversionExists): Augment with missing code:
27232         deal with IntConstant, LongConstants and Enumerations.
27233
27234         * assign.cs: Report the error, instead of failing silently
27235
27236         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27237         typecontainer that they are declared, because the
27238         typecontainer/namespace will have the list of using clauses that
27239         need to be applied.
27240
27241         Assembly Attributes were escaping the normal registration
27242         mechanism. 
27243
27244         (EmitCode): Apply attributes within an EmitContext that represents
27245         the container they were declared on.
27246
27247         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27248
27249 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27250
27251         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27252         Revamp completely - make much cleaner as we now operate only
27253         on a set of Types.
27254
27255         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27256         to implement the logic detailed in the spec more correctly.
27257
27258         (UserDefinedConversion): Update accordingly.
27259
27260 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27261
27262         * statement.cs: Return flow analysis information up.
27263
27264         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27265         and the default.
27266
27267         (token): Do not consume an extra character before calling
27268         decimal_digits.
27269
27270 2002-05-06  Piers Haken <piersh@friskit.com>
27271
27272         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27273
27274 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27275
27276         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27277         EmitContext during the instance constructor initializer
27278         resolution, to stop access to instance variables.
27279
27280         This is mandated by the spec, last paragraph of the `constructor
27281         initializers' section. 
27282
27283 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27284
27285         * cs-parser.jay, class.cs (Accessor): new class used to represent
27286         an accessor (get or set).  In the past we used `null' to represent
27287         a missing accessor.  But this is ambiguous because there was no
27288         way to tell in abstract indexers/properties if one of them was
27289         specified.
27290
27291         Now there is a way of addressing that.
27292
27293         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27294         instead of FindMembers.
27295
27296         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27297         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27298
27299         * attribute.cs: Treat indexers and properties as the same in terms
27300         of applying attributes
27301
27302         * ecore.cs (FindMostEncompassedType): Use statically initialized
27303         EmptyExpressions()s like we do elsewhere to avoid creating useless
27304         objects (and we take this out of the tight loop).
27305
27306         (GetConversionOperators): Move the code to extract the actual
27307         operators to a separate routine to clean things up.
27308
27309 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27310
27311         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27312         events are always registered FieldBuilders.
27313
27314         * class.cs (FieldBase): New class shared by Fields 
27315
27316         * delegate.cs: If we are a toplevel delegate, use our full name.
27317         If we are a nested delegate, then only use our tail name.
27318
27319 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27320
27321         * expression.cs (IsApplicable): Ensure that we add the "&" to
27322         ref/out types before comparing it with the type of the argument.
27323
27324         (IsParamsMethodApplicable): Ditto.
27325
27326         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27327         silly me ;-)
27328
27329         * delegate.cs : Handle the case when we have more than one applicable
27330         method. Flag an error only when we finish checking all.
27331
27332 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27333
27334         * expression.cs: Add support for boolean static initializers.
27335
27336 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27337
27338         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27339
27340         * parameter.cs (ComputeParameterTypes,
27341         ComputeAndDefineParameterTypes): Better error handling: now we
27342         clear the `types' cache if we fail during any of the type lookups.
27343         We also return the status code correctly to our caller
27344
27345         * delegate.cs: If we fail to define a delegate, abort the extra
27346         steps. 
27347
27348         * expression.cs (Binary.ResolveOperator): for
27349         operator==(object,object) and operator !=(object, object) we also
27350         have to verify that there is an implicit conversion from one to
27351         the other.
27352
27353         (ArrayAccess.DoResolve): Array Access can operate on
27354         non-variables. 
27355
27356 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27357
27358         * assign.cs (CompoundAssign): A new class used as a "flag" that
27359         the assignment actually is happening as part of a compound
27360         assignment operator.
27361
27362         During compound assignment, a few new rules exist to enable things
27363         like:
27364
27365         byte b |= 1 + 2
27366
27367         From the spec:
27368
27369         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27370         to the type of x) if y is implicitly convertible to the type of x,
27371         and the operator is a builtin operator and the return type of the
27372         operator is explicitly convertible to the type of x. 
27373
27374         * rootcontext.cs: Reset warning level to 2.  4 catches various
27375         "interesting" features in mcs, we must clean this up at some
27376         point, but currently am trying to kill other bugs ;-)
27377
27378         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27379         in container classes as well.  
27380
27381         * expression.cs (Binary.ResolveOperator): Handle string case
27382         before anything else (as operator overloading does emit an error
27383         before doing anything else).
27384
27385         This code could go away when we move to a table driven model, but
27386         i could not come up with a good plan last night.
27387
27388 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27389
27390         * typemanager.cs (CSharpName): reimplementation using regex.
27391         * class.cs: added null check for fields in Emit
27392         * rootcontext.cs: set warninglevel to 4
27393
27394 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27395
27396         * typemanager.cs (CSharpName): reimplemented with Lupus
27397         suggestion.
27398
27399 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27400
27401         * statement.cs (If): correclty implement Resolve, because we were
27402         not catching sem errors in there.  The same process is needed
27403         everywhere else. 
27404         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27405
27406
27407         (Statement.Warning_DeadCodeFound): Factorize code.
27408         (While): Report dead code here too.
27409
27410         (Statement): Added Resolve virtual method to allow
27411         for resolution split from the emit code.
27412
27413 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27414
27415         * statement.cs (EmitBoolExpression): No longer try to resolve the
27416         expression here.    
27417         (MakeBoolean): New utility function that resolve, implicitly
27418         converts to boolean and tags the expression. 
27419
27420
27421         (If, Do): Implement dead code elimination.
27422         (While): Implement loop inversion
27423
27424         (Do, While, For, If): Resolve the expression prior to calling our
27425         code generation.
27426
27427 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27428
27429         * class.cs:
27430           - added method Report28 (warning: program has more than one entry point)
27431           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27432           - modified method Method.Define, the part at the end of the method
27433
27434         * rootcontext.cs: added static public Location EntryPointLocation;
27435           
27436         * ../errors/cs0028.cs : Add test case for the above warning.              
27437
27438         * typemanager.cs:
27439           - modified method CSharpName to allow arrays of primitive type to
27440             be printed nicely (e.g. instead of System.Int32[][] it now prints
27441             int[][])
27442           - added method CSharpSignature: returns the signature of a method
27443             in string format to be used in reporting errors, warnings, etc.
27444
27445         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27446         with String.Empty.
27447
27448 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27449
27450         * delegate.cs (Define): Fix extremely silly bug where I was
27451         setting the type of the 'object' parameter of the BeginInvoke
27452         method to System.IAsyncResult instead of System.Object ;-)
27453
27454 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27455
27456         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27457         here. 
27458
27459         (Constructor.Emit): return if we fail to initialize the
27460         constructor.  Another door closed!  
27461
27462         * expression.cs (New.DoResolve): Improve error message (from -6 to
27463         1501).  Use DeclaredOnly lookup to find the exact constructor.
27464
27465         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27466         loop.  This is useful.
27467
27468         * cs-parser.jay: Adjust the default parameters so that destructors
27469         have the proper signature.
27470
27471 2002-04-26  Martin Baulig  <martin@gnome.org>
27472
27473         * driver.cs (LoadAssembly): If `assembly' contains any characters
27474         which are only valid in path names and not in assembly names
27475         (currently slash, backslash and point), use Assembly.LoadFrom ()
27476         instead of Assembly.Load () on the `assembly' (before iteration
27477         over the link_paths).
27478
27479 2002-04-26  Martin Baulig  <martin@gnome.org>
27480
27481         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27482
27483 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27484
27485         * class.cs (Property): use the new typemanager.MemberLookup
27486
27487         (TypeContainer.MemberLookup): Implement using the
27488         TypeManager.MemberLookup now. 
27489
27490         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27491         and return MemberInfos, so that these can be used without an
27492         EmitContext (what we had before).
27493
27494 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27495
27496         * expression.cs: Fix the case where the argument to params if the
27497         type of the params.  I omitted handling this before.   Fixed
27498
27499 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27500
27501         * driver.cs: Call BootCorlib_PopulateCoreType
27502
27503         * class.cs (Property.CheckBase): Check for properties only, not
27504         for all members. 
27505
27506         * interface.cs: Temporary hack: try/catch around the
27507         CustomAttributeBuilder, because I am getting an exception that I
27508         do not understand.
27509
27510         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27511         types whose definitions are required to be there (attributes are
27512         defined before standard types).
27513
27514         Compute definitions as we boot the various types, as they are used
27515         immediately (value_type class will need object_type, but if we do
27516         not initialize object_type, we will pass a null, which will let
27517         the runtime pick the System.Object from the existing corlib, which
27518         is not what we want).
27519
27520 2002-04-22  Patrik Torstensson <totte@labs2.com>
27521
27522         * cs-tokenizer.cs: fixed a number of trim() issues.
27523
27524 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27525
27526         * expression.cs (Argument.Type): Ensure that we return the correct
27527         type when we have out or ref parameters [in which case we 
27528         append a "&"].
27529
27530 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27531
27532         * class.cs (Property, Indexer): Allow extern modifier in there. 
27533
27534         * typemanager.cs (InitBaseTypes): Initializes object_type and
27535         value_type, since those will be used early on during the bootstrap
27536         process to compile corlib.
27537
27538         (InitCoreTypes): Move code from here to InitBaseTypes.
27539
27540 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27541
27542         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27543         single-dimension arrays as using the ldlen opcode.  
27544
27545         Daniel Lewis discovered this optimization.  
27546
27547         * typemanager.cs: Add signature for System.Array::get_Length
27548
27549 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27550
27551         * statement.cs: report the error when the foreach does not apply to an
27552         array nor a collection.
27553
27554 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27555
27556         * expression.cs: Add implicit conversions to the operator ~.
27557
27558         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27559
27560         * typemanager.cs: Locate the decimal constructor.
27561
27562 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27563
27564         * attribute.cs: use the new property of TypeOf.
27565         * expression.cs: added 'get' property around typearg.
27566
27567         These changes fix a build breaker reported by NickD. Is this the
27568         correct way to fix?  If not, please, revert my changes and make it
27569         work :-).
27570
27571 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27572
27573         * attribute.cs: Add support for typeof in attribute invocations.
27574         I am not sure that this is right though.
27575
27576 2002-04-14  Duncan Mak  <duncan@ximian.com>
27577
27578         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27579         Binary.Operator.Division case.
27580
27581 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27582
27583         * class.cs (DefineType): Ensure that we do a proper check on
27584         attribute types and also register it with the TypeManager.
27585
27586         (TypeContainer.Targets): The default for attribute types is
27587         AttributeTargets.All.
27588
27589         * attribute.cs (ApplyAttributes): Registering the attribute type
27590         is done elsewhere, not when we discover we have a Usage attribute.
27591
27592 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27593
27594         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27595         and get rid of is_delegate parameter.
27596
27597         * everywhere : update.
27598
27599 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27600
27601         * cs-parser.jay (compilation_unit): Revamp completely to use
27602         some new ideas that I got from Rhys' grammar to solve the problems
27603         with assembly level attributes.
27604
27605         (outer_declaration): New grammar production.
27606
27607         (attribute_sections): Add.
27608
27609         (opt_attributes): Base on attribute_sections
27610
27611         (namespace_declaration): Allow opt_attributes to tackle the case
27612         when we have assembly level attributes - we are clever in this
27613         regard now ;-)
27614
27615         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27616         attributes in the non-global context.
27617
27618         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27619         instead of SetGlobalAttributes.
27620
27621         * class.cs, rootcontext.cs : Ensure we define and generate 
27622         attribute types before anything else.
27623
27624         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27625         and flag the new error -20 for the case when the attribute type
27626         does not have valid targets specified. csc does not catch this.
27627
27628         * ../errors/errors.txt : update for error # -20
27629
27630 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27631
27632         * support.cs (InternalParameters.ParameterModifier): Do some null
27633         checking and return sane values.
27634
27635         * class.cs (Method.Define): If we are a PInvoke method, ensure
27636         that we are static and extern. Report error # 601
27637
27638         * ../errors/cs0601.cs : Add test case for the above error.
27639
27640 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27641
27642         * rootcontext.cs (attribute_types): We need to keep type of
27643         all attribute types separately and emit code for them first.
27644
27645         (RegisterAttribute) : Implement.
27646
27647         * class.cs (DefineType): Check if the current Type is a custom
27648         attribute type and register it accordingly.
27649
27650         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27651         adding the first attribute twice and rename to
27652
27653         (SetGlobalAttributes): this.
27654
27655         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27656         lookups.
27657
27658         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27659         if we are processing global arguments. Hmm, I am unsure of this.
27660
27661 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27662
27663         * expression.cs: added static array of strings to avoid calling
27664         Enum.ToString () for Operator in Binary. Significant recover of
27665         performance.
27666
27667 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27668
27669         * class.cs (FindMembers): Allow the Builders of the various
27670         members to be null.  If they are skip them.  This only happens
27671         during the PInvoke declaration.
27672
27673 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27674
27675         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27676         failure, so we do not keep going afterwards.
27677
27678         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27679         wanted to pass `false' as the `is_delegate' argument.  If this is
27680         the case, why not use delegate_type == null to mean `is_delegate =
27681         false' and anything else as is_delegate = true.
27682
27683 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27684
27685         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27686         code for the section, not the beginning of the tests.
27687
27688 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27689
27690         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27691
27692         * expression.cs (Binary): same.  Warn about errors where we have
27693         Enum/Enum in operator + as well.
27694
27695 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27696
27697         * statement.cs:
27698                 - added support for switch(bool)
27699                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27700                 - add TableSwitchEmit() to handle table-based switch statements
27701
27702 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27703
27704         * expression.cs (Invocation.OverloadResolve): Factor out code which
27705         does parameter compatibility checking with arguments so that we can 
27706         re-use the code even from Delegate.VerifyApplicability
27707
27708         (VerifyArgumentsCompat): Move above code here.
27709
27710         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27711         and instead make a call to the above method.
27712
27713 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27714
27715         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27716         We use it to keep track of classes which are attribute types.
27717
27718 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27719
27720         * delegate.cs (Delegate.Define): Correctly define the types in the
27721         presence of fixed and array parameters.
27722
27723         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27724         doing FindMembers.
27725
27726         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27727         include NonPublic after the first iteration.
27728
27729         * class.cs (Indexer.CheckBase): Only check if both parents are
27730         non-null. 
27731
27732         * cs-parser.jay (accessor_body): If empty, set to null.
27733
27734         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27735         same code path here to resolve constants names that we did have in
27736         MemberAccess.DoResolve.  There is too much code duplicated here.
27737
27738 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27739
27740         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27741
27742         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27743         to MakeUnionSet.
27744
27745         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27746         tokens, numbers and strings.
27747
27748         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27749         parenthesis.
27750
27751         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27752         asyncronous parameters and the regular parameters.  
27753
27754         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27755         specify the target directory.
27756
27757         * expression.cs: (This.DoResolve): Simplify
27758         (As.Emit): Optimize, do not generate IsInst if the expression is
27759         always of the given type.
27760
27761         (Is.DoResolve): Bug fix, we were reporting both always/never for
27762         the is expression.
27763
27764         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27765         creating too many unnecessary arrays.
27766
27767 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27768
27769         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27770         fields instead of rolling our own initializer.   Takes care of all
27771         implicit conversions, and drops unnecessary static checks/argument.
27772
27773 2002-03-31  Dick Porter  <dick@ximian.com>
27774
27775         * driver.cs: use the GetDirectories() return values properly, and
27776         use "/" as path separator.
27777
27778 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27779
27780         * expression.cs (Unary): Optimize - - expr into expr.
27781         (Binary): Optimize a + (-b) into a -b.
27782
27783         * codegen.cs (CodeGen): Made all methods static.
27784
27785 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27786
27787         * rootcontext.cs: 
27788
27789         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27790         TypeBuilder property.
27791
27792         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27793         instead. 
27794
27795         * tree.cs: Removed the various RecordXXXX, and replaced with a
27796         single RecordDecl.  Removed all the accessor methods, and just
27797         left a single access point Type 
27798
27799         * enum.cs: Rename DefineEnum to DefineType.
27800
27801         * decl.cs: New abstract method `DefineType' used to unify the
27802         Defines for Enumerations, Interfaces, TypeContainers and
27803         Delegates.
27804
27805         (FindType): Moved LookupInterfaceOrClass here.  Moved the
27806         LookupBaseClasses method that used to live in class.cs and
27807         interface.cs here, and renamed to FindType.
27808
27809         * delegate.cs: Implement DefineType.  Take advantage of the
27810         refactored pattern for locating the parent builder without taking
27811         the parent_builder argument (which we know does not work if we are
27812         nested, and triggering a toplevel definition).
27813
27814 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27815
27816         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
27817         accessibility of a member has changed during override and report
27818         an error if so.
27819
27820         * class.cs (Method.Define, Property.Define): Only complain on
27821         overrides if the method is private, any other accessibility is
27822         fine (and since we just checked the permission is the same, we are
27823         good to go).
27824
27825         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
27826         and elif are processed always.  The other pre-processing
27827         directives are only processed if we are "taking" the path
27828
27829 2002-03-29  Martin Baulig  <martin@gnome.org>
27830
27831         * class.cs (Method.Emit): Only emit symbolic debugging info if the
27832         current location is not Null.
27833
27834         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
27835         a separate method so we can profile it.
27836
27837         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
27838         `span.Seconds' are just seconds, but no minutes or hours.
27839         (MainDriver): Profile the CodeGen.SaveSymbols calls.
27840
27841 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27842
27843         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
27844         Remove the gratuitous set of Final:
27845
27846                                 // If an interface implementation, then we can set Final.
27847                                 if (((flags & MethodAttributes.Abstract) == 0) &&
27848                                     implementing.DeclaringType.IsInterface)
27849                                         flags |= MethodAttributes.Final;
27850
27851         I do not know what I was smoking when I used that.
27852
27853
27854         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
27855         step into fixing the name resolution issues for delegates and
27856         unifying the toplevel name resolution.
27857
27858 2002-03-28  Martin Baulig  <martin@gnome.org>
27859
27860         * class.cs (Method.Emit): If we have a symbol writer, call its
27861         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
27862         tell it about the current method.
27863
27864         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
27865         writer that we're going to emit the first byte of IL code for a new
27866         statement (a new source line).
27867         (EmitContext.EmitTopBlock): If we have a symbol writer, call
27868         EmitContext.Mark() before emitting any code.
27869
27870         * location.cs (SymbolDocument): Return null when we're Null.
27871
27872         * statement.cs (Statement): Moved the `Location loc' variable here.
27873         (Statement.EmitBoolExpression): If we have a symbol writer, call
27874         ec.Mark() before emitting any code to tell it that we're at the
27875         beginning of a new statement.
27876         (StatementExpression): Added `Location' argument to the constructor.
27877         (Block): Added public readonly variable `StartLocation' and public
27878         variable `EndLocation'.  The latter is to be set using SetEndLocation().
27879         (Block): Added constructor which takes a start and end location.
27880         (Block.SetEndLocation): New method. This sets the end location.
27881         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
27882         local variables we create.
27883         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
27884         each statement and do also mark the begin and end of the block.
27885
27886         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
27887         tell it the current lexer.Location, use Location.Null for the end of the
27888         block.
27889         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
27890         current block, set its end location using SetEndLocation().
27891         (statement_expression): StatementExpression constructor now takes the
27892         lexer.Location as additional argument.
27893         (for_statement, declare_local_variables): Likewise.
27894         (declare_local_variables): When creating a new implicit block, use the
27895         new Block constructor and pass it the lexer.Location.
27896
27897 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27898
27899         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
27900         members also on the parent interfaces recursively.
27901
27902 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
27903
27904         * report.cs: Use new formats, since Gonzalo finished the missing
27905         bits. 
27906
27907         * expression.cs (Binary.ResolveOperator): added missing operator|
27908         operator& and operator^ for bool/bool.
27909
27910         * cs-parser.jay: CheckDef now takes a Location argument that is
27911         used to report errors more precisly (instead of reporting the end
27912         of a definition, we try to track something which is a lot closer
27913         to the source of the problem).
27914
27915         * cs-tokenizer.cs: Track global token use, so we can properly flag
27916         the use of #define/#undef after the first token has been seen.
27917
27918         Also, rename the reportXXXX to Error_DescriptiveName
27919
27920         * decl.cs (DeclSpace.IsTopLevel): Move property here from
27921         TypeContainer, so that Enum and Interface can use this too.
27922
27923         * class.cs (TypeContainer.LookupInterfaceOrClass,
27924         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
27925         `builder' argument.  Typically this was used to pass the parent
27926         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
27927         the definition).  
27928
27929         The problem is that a nested class could trigger the definition of
27930         a toplevel class, and the builder would be obviously wrong in that
27931         case. 
27932
27933         So we drop this argument, and we compute dynamically the
27934         TypeBuilder/ModuleBuilder (the correct information was available
27935         to us anyways from DeclSpace.Parent)
27936
27937         * interface.cs (Interface.DefineInterface): Drop builder
27938         parameter cleanup like class.cs
27939
27940         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
27941         like class.cs
27942
27943         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
27944         values. 
27945
27946         (Try.Emit): Propagate the returns value from the statement.
27947
27948         (Return.Emit): Even if we are leavning 
27949
27950         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
27951
27952         * modifiers.cs: Fix the computation of MethodAttributes flags.
27953
27954 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
27955
27956         * driver.cs: allow compilation of files that start with '/'.
27957         Add a default case when checking the argument of --target.
27958
27959 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
27960
27961         * interface.cs: Implement the same search algorithm for types in
27962         the interface code.
27963
27964         * delegate.cs: Do not allow multiple definition.
27965
27966         * Recovered ChangeLog that got accidentally amputated
27967
27968         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
27969
27970         * rootcontext.cs: Load manually enum to allow core classes to
27971         contain enumerations.
27972
27973         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
27974         Update to new static methods in TypeManager.
27975
27976         * typemanager.cs (GetMethod, GetConstructor): Use our
27977         implementation of FindMembers to find the members, since during
27978         corlib compilation, the types are TypeBuilders and GetMethod and
27979         GetConstructor do not work.
27980
27981         Make all methods in TypeManager static.
27982
27983         (InitCodeHelpers): Split the functionality from
27984         the InitCodeTypes function.
27985
27986         * driver.cs: Call InitCodeHelpers after we have populated the
27987         types. 
27988
27989         * cs-parser.jay (delegate_declaration): we did not used to compute
27990         the delegate name correctly for void delegates.
27991
27992 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
27993
27994         * rootcontext.cs (RootContext): Init the interface_resolve_order
27995         and type_container_resolve_order always.
27996
27997         (ResolveCore, BootstrapCorlib_ResolveClass,
27998         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
27999         compiler when compiling with --nostdlib
28000
28001         * class.cs (TypeContainer.DefineType): Check that our parent is
28002         not null.  This test is most important when we are bootstraping
28003         the core types.
28004
28005         * codegen.cs: Split out the symbol writing code.
28006
28007 2002-03-25  Martin Baulig  <martin@gnome.org>
28008
28009         * driver.cs (-g): Made -g an alias for --debug.
28010
28011 2002-03-24  Martin Baulig  <martin@gnome.org>
28012
28013         * codegen.cs (SymbolWriter): New public variable. Returns the
28014         current symbol writer.
28015         (CodeGen): Added `bool want_debugging_support' argument to the
28016          constructor. If true, tell the ModuleBuild that we want debugging
28017         support and ask it for the ISymbolWriter.
28018         (Save): If we have a symbol writer, call it's Close() method after
28019         saving the assembly.
28020
28021         * driver.c (--debug): New command line argument to create a
28022         debugger information file.
28023
28024         * location.cs (SymbolDocument): New public property. Returns an
28025         ISymbolDocumentWriter object for the current source file or null
28026         if we don't have a symbol writer.
28027
28028 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
28029
28030         * driver.cs (LoadAssembly): Correctly return when all the paths
28031         have been tried and not before.
28032
28033         * statement.cs (Switch.Emit): return the actual coverage for this
28034         statement (returns/not-returns)
28035
28036         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
28037         switch of the statement if we are the last switch section.  That
28038         kills two problems: try/catch problems (we used to emit an empty
28039         nop at the end) and switch statements where all branches would
28040         return. 
28041
28042 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
28043
28044         * driver.cs: Add default assemblies (the equivalent to the
28045         Microsoft CSC.RSP file)
28046
28047         * cs-tokenizer.cs: When updating `cols and setting it to zero,
28048         also update tokens_seen and set it to false.
28049
28050         * driver.cs: Implement --recurse for Mike.
28051
28052         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
28053         correctly splitting out the paths.
28054
28055 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
28056
28057         * interface.cs (Interface.PopulateProperty): Instead of using
28058         `parent' as the declaration space for the set parameters, use
28059         `this' 
28060
28061         * support.cs (InternalParameters): InternalParameters constructor
28062         takes a DeclSpace instead of a TypeContainer.
28063
28064         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
28065         types are being initialized, load the address of it before calling
28066         the function.  
28067
28068         (New): Provide a mechanism to disable the generation of local
28069         value type temporaries when the caller will be providing us with
28070         an address to store it.
28071
28072         (ArrayCreation.EmitDynamicInitializers): Use it.
28073
28074 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
28075
28076         * expression.cs (Invocation.EmitArguments): Only probe for array
28077         property if there is more than one argument.  Sorry about that.
28078
28079         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
28080         empty param arrays.
28081
28082         * class.cs (Method.LabelParameters): Fix incorrect code path that
28083         prevented the `ParamArrayAttribute' from being applied to the
28084         params attribute.
28085
28086 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
28087
28088         * support.cs (ReflectionParameters): Correctly compute whether the
28089         last argument is a params array.  Fixes the problem with
28090         string.Split ('a')
28091
28092         * typemanager.cs: Make the assemblies array always be non-null
28093         (empty, but non-null)
28094
28095         * tree.cs (RecordDecl): New function that abstracts the recording
28096         of names.  This reports error 101, and provides a pointer to the
28097         previous declaration.  Fixes a crash in the compiler.
28098
28099         * cs-parser.jay (constructor_declaration): Update to new grammar,
28100         and provide a constructor_body that can be empty.
28101
28102 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
28103
28104         * driver.cs: Add support for --resources.
28105
28106         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
28107         Make all types for the various array helper methods be integer.
28108
28109         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
28110         CheckState to ConvCast.
28111
28112         (ConvCast): Now it takes a `checked' state argument, to avoid
28113         depending on the emit context for the conversion, and just using
28114         the resolve time setting.
28115
28116         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
28117         instead of Invocation.EmitArguments.  We do not emit the original
28118         arguments, instead we emit those which have been converted to
28119         unsigned int expressions.
28120
28121         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
28122
28123         * codegen.cs: ditto.
28124
28125         * expression.cs (LocalVariableReference): Drop the use of the
28126         Store function that depended on the variable index.
28127
28128         * statement.cs (VariableInfo): Drop the `Idx' property from this
28129         class, as this is not taking into account the indexes for
28130         temporaries tat we generate during the execution, getting the
28131         indexes wrong.
28132
28133         * class.cs: First emit class initializers, then call the parent
28134         constructor. 
28135
28136         * expression.cs (Binary): Fix opcode emision.
28137         (UnaryMutator.EmitCode): Support checked code generation
28138
28139         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
28140         matches for events for both the Static and Instance scans,
28141         pointing to the same element.   Fix that.
28142
28143 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
28144
28145         * rootcontext.cs (ResolveTree): Always set the
28146         interface_resolve_order, because nested interfaces will be calling
28147         into us.
28148
28149         * class.cs (GetInterfaceOrClass): Track the same resolution
28150         process used by TypeManager.LookupType.  This fixes the nested
28151         type lookups in class declarations (separate path from
28152         LookupType). 
28153
28154         (TypeContainer.DefineType): Also define nested interfaces.
28155         (TypeContainer.RegisterOrder): New public function used to
28156         register the order in which child interfaces need to be closed.
28157
28158         Nested interfaces need to be closed after their parents have been
28159         created. 
28160
28161         * interface.cs (InterfaceAttr): Put all the logic for computing
28162         the interface attribute here. 
28163
28164         (DefineInterface): Register our interface order with the
28165         RootContext or with the TypeContainer depending on the case.
28166
28167 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28168
28169         * cs-parser.jay: rework foreach statement to work with the new
28170         changes to the policy on SimpleNames.
28171
28172         * report.cs: support Stacktrace on warnings as well.
28173
28174         * makefile: drop --unsafe and /unsafe from the compile.
28175
28176 2002-03-13  Ravi Pratap  <ravi@ximian.com>
28177
28178         * ecore.cs (StandardConversionExists): Modify to take an Expression
28179         as the first parameter. Ensure we do null -> reference type conversion
28180         checking.
28181
28182         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
28183         temporary Expression objects.
28184
28185 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
28186
28187         * interface.cs: workaround bug in method overloading resolution
28188         (there is already a bugzilla bug for it).
28189
28190 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28191
28192         We could also solve this problem by having a separate path for
28193         performing type lookups, instead of DoResolve, we could have a
28194         ResolveType entry point, and only participating pieces of the
28195         production (simplename, deref, array) would implement this. 
28196
28197         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
28198         signal SimpleName to only resolve type names and not attempt to
28199         resolve anything else.
28200
28201         * expression.cs (Cast): Set the flag.
28202
28203         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28204
28205         * class.cs: Only report 108 if there is no `new' modifier.
28206
28207         * cs-parser.jay: rework foreach statement to work with the new
28208         changes to the policy on SimpleNames.
28209
28210         * report.cs: support Stacktrace on warnings as well.
28211
28212         * makefile: drop --unsafe and /unsafe from the compile.
28213
28214 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28215
28216         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28217         lookups here, instead of doing that at parse time.  This means
28218         that our grammar will not introduce `LocalVariableReferences' as
28219         expressions at this point.  That solves the problem of code like
28220         this:
28221
28222         class X {
28223            static void Main ()
28224            { int X = 1;
28225             { X x = null }}}
28226
28227         This is only half the fix.  The full fix requires parameters to
28228         also be handled in this way.
28229
28230         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28231         makes the use more obvious of the DeclSpace.  The
28232         ec.TypeContainer.TypeBuilder is now only used to pull the
28233         TypeBuilder for it.
28234
28235         My theory is that I can get rid of the TypeBuilder completely from
28236         the EmitContext, and have typecasts where it is used (from
28237         DeclSpace to where it matters).  
28238
28239         The only pending problem is that the code that implements Aliases
28240         is on TypeContainer, and probably should go in DeclSpace.
28241
28242         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28243         lookups here, instead of doing that at parse time.  This means
28244         that our grammar will not introduce `LocalVariableReferences' as
28245         expressions at this point.  That solves the problem of code like
28246         this:
28247
28248         class X {
28249            static void Main ()
28250            { int X = 1;
28251             { X x = null }}}
28252
28253         This is only half the fix.  The full fix requires parameters to
28254         also be handled in this way.
28255
28256         * class.cs (Property.DefineMethod): When implementing an interface
28257         method, set newslot, when implementing an abstract method, do not
28258         set the flag (before we tried never setting it, or always setting
28259         it, which is the difference).
28260         (Indexer.DefineMethod): same.
28261         (Method.DefineMethod): same.
28262
28263         * ecore.cs: Only set the status used flag if we get back a Field.
28264
28265         * attribute.cs: Temporary hack, so Paolo can keep working.
28266
28267 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28268
28269         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28270         the unmanaged type in the case we have a MarshalAs attribute.
28271
28272         (Resolve): Handle the case when we are parsing the special MarshalAs
28273         attribute [we need to store the unmanaged type to use later]
28274
28275         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28276         MarshalAs Attribute.
28277
28278         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28279         on parameters and accordingly set the marshalling info.
28280
28281 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28282
28283         * class.cs: Optimizing slightly by removing redundant code after
28284         we switched to the `NoTypes' return value.
28285         (Property.DefineMethod): use NoTypes here too.
28286
28287         This fixes the bug I introduced in my last batch of changes.
28288
28289 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28290
28291         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28292
28293         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28294         Enums since those are types too. 
28295
28296         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28297
28298         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28299         thanks to a call during the lookup process.
28300
28301 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28302
28303         * statement.cs (Foreach): Lots of work to accomodate a particular
28304         kind of foreach statement that I had not kept in mind.  It is
28305         possible to have foreachs on classes that provide a GetEnumerator
28306         method that return objects that implement the "pattern" for using
28307         a foreach, there is no need to support GetEnumerator
28308         specifically. 
28309
28310         This is needed to compile nant.
28311
28312         * decl.cs: Only report 114 if the member is not `Finalize' and if
28313         the warning level is at least 2.
28314
28315         * class.cs: Moved the compare function from Method to
28316         MethodSignature. 
28317
28318         (MethodSignature.InheritableMemberSignatureCompare): Add new
28319         filter function that is used to extract inheritable methods from a
28320         class. 
28321
28322         (Method.Define): Use the new `inheritable_method_signature_filter'
28323         delegate
28324
28325         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28326         command. 
28327
28328 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28329
28330         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28331
28332         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28333
28334         * expression.cs: Pass location information to
28335         ConvertImplicitStandard. 
28336
28337         * class.cs: Added debugging code to track return values from
28338         interfaces. 
28339
28340 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28341
28342         * expression.cs (Is.DoResolve): If either side of the `is' is an
28343         interface, do not flag the warning.
28344
28345         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28346         for interfaces
28347
28348         * report.cs: Allow for --fatal to be used with --probe.
28349
28350         * typemanager.cs (NoTypes): Move the definition for the empty Type
28351         array here. 
28352
28353         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28354         properties. 
28355         (TypeContainer.DefineProxy): New function used to proxy to parent
28356         implementations when implementing interfaces.
28357         (TypeContainer.ParentImplements): used to lookup if our parent
28358         implements a public function that is required by an interface.
28359         (TypeContainer.VerifyPendingMethods): Hook this up.
28360
28361         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28362         `modules' and `assemblies' arraylists into arrays.  We only grow
28363         these are the very early start up of the program, so this improves
28364         the speedof LookupType (nicely measured).
28365
28366         * expression.cs (MakeByteBlob): Replaced unsafe code with
28367         BitConverter, as suggested by Paolo.
28368
28369         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28370         folding of string concatenation, but if either side is a string,
28371         and the other is not, then return null, and let the runtime use
28372         the concatenation on the string plus the object (using
28373         `Object.ToString'). 
28374
28375 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28376
28377         Constant Folding has been implemented now.
28378
28379         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28380         the error instead on types that are not supported in one's
28381         complement. 
28382
28383         * constant.cs (Constant and all children): New set of functions to
28384         perform implict and explicit conversions.
28385
28386         * ecore.cs (EnumConstant): Implement the new functions to perform
28387         conversion by proxying to the child expression.
28388
28389         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28390         own separate setting that can not be turned off from the command
28391         line using --unchecked or --checked and is only controlled using
28392         the checked/unchecked statements and expressions.  This setting is
28393         used by the constant folder to flag errors.
28394
28395         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28396         ConstantCheckState as well.   
28397
28398         During Resolve, they also have to flag the state, because the
28399         constant folder runs completely in the Resolve phase.
28400
28401         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28402         well.
28403
28404 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28405
28406         * cfold.cs: New file, this file contains the constant folder.
28407
28408         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28409         argument to track whether we are using the resulting address to
28410         load or store a value and provide better error messages. 
28411
28412         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28413         new AddressOf arguments.
28414
28415         * statement.cs (Foreach.EmitCollectionForeach): Update
28416
28417         * expression.cs (Argument.Emit): Call AddressOf with proper
28418         arguments to track usage.
28419
28420         (New.DoEmit): Call AddressOf with new arguments.
28421
28422         (Unary.Emit): Adjust AddressOf call.
28423
28424 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28425
28426         * cs-parser.jay (member_access): Change the case for pre-defined types
28427         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28428         this suggestion.
28429
28430         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28431         a method body.
28432
28433         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28434         essentially like methods and apply attributes like MethodImplOptions to them too.
28435
28436         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28437         not being null.
28438
28439         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28440         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28441         is the DeclSpace.
28442
28443         * Update code everywhere accordingly.
28444
28445         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28446
28447         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28448
28449 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28450
28451         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28452         try performing lookups against those instead of jumping straight into using
28453         the 'using' clauses.
28454
28455         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28456
28457         (LookupType): Perform lookups in implicit parents too.
28458
28459         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28460         sequence as RootContext.LookupType. 
28461
28462         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28463         the various cases of namespace lookups into this method.
28464
28465 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28466
28467         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28468         in positional arguments)
28469
28470         * class.cs (Operator): Update the AllowedModifiers to contain
28471         extern. 
28472
28473         * cs-parser.jay: Update operator declaration to allow for the
28474         operator body to be empty.
28475
28476         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28477         values. 
28478
28479 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28480
28481         * class.cs (Method.Emit): Label parameters.
28482
28483         * driver.cs: Return 1 or 0 as the program exit code.
28484
28485 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28486
28487         * expression.cs: Special case the `null' object when trying to
28488         auto-compute the type, as anything can be explicitly converted to
28489         that. 
28490
28491         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28492         spotting this Paolo.
28493
28494         (Expression.ImplicitNumericConversion): Perform comparissions of
28495         the type using the underlying type in the case of an enumeration
28496         rather than using the enumeration type for the compare.
28497
28498         Cope with the underlying == type case, which is not possible to
28499         catch before. 
28500
28501         (Expression.ConvertNumericExplicit): Perform comparissions of
28502         the type using the underlying type in the case of an enumeration
28503         rather than using the enumeration type for the compare.
28504
28505         * driver.cs: If the user does not supply an extension, assume .exe
28506
28507         * cs-parser.jay (if_statement): Rewrote so that we can track the
28508         location for the if statement.
28509
28510         * expression.cs (Binary.ConstantFold): Only concat strings when
28511         the operation is "+", not everything ;-)
28512
28513         * statement.cs (Statement.EmitBoolExpression): Take a location
28514         argument. 
28515         (If, While, Do): Track location.
28516
28517         * expression.cs (Binary.ResolveOperator): In the object + string
28518         case, I was missing a call to ConvertImplicit
28519
28520 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28521
28522         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28523         Location arguments. Ensure we use RootContext.LookupType to do our work
28524         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28525
28526         * interface.cs (PopulateMethod): Handle the type of the parameter being
28527         null gracefully.
28528
28529         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28530         have a params method with no fixed arguments and a call is made with no
28531         arguments.
28532
28533 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28534
28535         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28536         the verbatim-string-literal
28537
28538         * support.cs (InternalParameters.ParameterModifier): handle null
28539         fixed parameters.
28540         (InternalParameters.ParameterType): ditto.
28541
28542         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28543         duplicating the name of the variable parameter.
28544         (GetParameterByName): Fix bug where we were not looking up array
28545         paramters if they were the only present (thanks Paolo!).
28546         (GetParameterInfo): We only have an empty set of types if both
28547         fixed and array are set to null.
28548         (GetParameterInfo-idx): Handle FixedParameter == null
28549
28550         * cs-parser.jay: Handle the case where there is no catch
28551         statements (missing null test).
28552
28553 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28554
28555         * driver.cs (MainDriver): Be conservative on our command line
28556         handling.
28557
28558         Catch DirectoryNotFoundException when calling GetFiles.
28559
28560         (SplitPathAndPattern): Used to split the input specification into
28561         a path and a pattern that we can feed to Directory.GetFiles.
28562
28563 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28564
28565         * statement.cs (Fixed): Implement the last case of the Fixed
28566         statement (string handling).
28567
28568         * expression.cs (StringPtr): New class used to return a char * to
28569         a string;  Used by the Fixed statement.
28570
28571         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28572
28573         * expression.cs (Binary.ResolveOperator): Remove redundant
28574         MemberLookup pn parent type.
28575         Optimize union call, we do not need a union if the types are the same.
28576         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28577         type.
28578
28579         Specialize the use of MemberLookup everywhere, instead of using
28580         the default settings. 
28581
28582         (StackAlloc): Implement stackalloc keyword.
28583
28584         * cs-parser.jay: Add rule to parse stackalloc.
28585
28586         * driver.cs: Handle /h, /help, /?
28587
28588         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28589         before we supported unsafe code.
28590
28591         * makefile: add --unsafe to the self compilation of mcs.
28592
28593 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28594
28595         * expression.cs (PointerArithmetic): New class that is used to
28596         perform pointer arithmetic.
28597         (Binary.Resolve): Handle pointer arithmetic
28598         Handle pointer comparission.
28599         (ArrayPtr): Utility expression class that is used to take the
28600         address of an array.
28601
28602         (ElementAccess): Implement array access for pointers
28603
28604         * statement.cs (Fixed): Implement fixed statement for arrays, we
28605         are missing one more case before we are done.
28606
28607         * expression.cs (Indirection): Implement EmitAssign and set the
28608         ExprClass to Variable.  This allows pointer dereferences to be
28609         treated as variables, and to have values assigned to them.
28610
28611         * ecore.cs (Expression.StoreFromPtr): New utility function to
28612         store values dereferencing.
28613
28614 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28615
28616         * expression.cs (Binary.ResolveOperator): Ensure that we are
28617         not trying to operate on a void type - this fixes the reported
28618         bug.
28619
28620         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28621         the parent implementation is sealed.
28622
28623         * ../errors/cs0239.cs : Add.
28624
28625         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28626
28627         * typemanager.cs (unverifiable_code_type): Corresponds to 
28628         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28629         which have unsafe code in them.
28630
28631         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28632         unsafe context.
28633
28634 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28635
28636         * cs-tokenizer.cs: Add support for @"litreal strings"
28637
28638         Make tokenizer accept pre-processor directives
28639         on any column (remove the old C-like limitation). 
28640
28641         * rootcontext.cs (EmitCode): Emit any global attributes.
28642         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28643
28644         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28645
28646         * cs-parser.jay: Add support for global attributes.  
28647
28648 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28649
28650         * expression.cs (Indirection): New helper class.  Unary will
28651         create Indirection classes to be able to implement the
28652         IMemoryLocation interface on it.
28653
28654 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28655
28656         * cs-parser.jay (fixed_statement): reference the right statement.
28657
28658         * statement.cs (Fixed.Emit): Finish implementing the fixed
28659         statement for the &x case.
28660
28661 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28662
28663         * class.cs (Property.Define, Method.Define): Remove newslot when
28664         `implementing'.  
28665
28666         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28667         wrong.  NewSlot should only be used if the `new' keyword is present.
28668
28669         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28670         locating our system dir.  Sorry about this.
28671
28672 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28673
28674         * driver.cs (GetSystemDir): Compute correctly the location of our
28675         system assemblies.  I was using the compiler directory instead of
28676         the library directory.
28677
28678 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28679
28680         * expression.cs (BetterFunction): Put back in what Miguel commented out
28681         since it is the correct fix. The problem is elsewhere ;-)
28682
28683         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28684         parameters of the parms method are themselves compatible or not !
28685
28686         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28687         to check that a class implements an interface before saying that an implicit
28688         conversion was allowed. Use ImplementsInterface to do the checking.
28689
28690 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28691
28692         * class.cs (Method.Define): Track whether we are an explicit
28693         implementation or not.  And only call DefineMethodOverride if we
28694         are an explicit implementation.
28695
28696         (Property.DefineMethod): Ditto.
28697
28698 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28699
28700         * expression.cs (BetterFunction): Catch hideous bug which was
28701          preventing us from detecting ambiguous calls due to implicit casts i.e
28702         cs0121.
28703
28704 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28705
28706         * support.cs (Pair): Remove un-needed method.  I figured why I was
28707         getting the error in cs-parser.jay, the variable in a foreach loop
28708         is readonly, and the compiler does not really treat this as a variable.
28709
28710         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28711         instead of EQUALS in grammar.  
28712
28713         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28714
28715         * expression.cs (Unary.DoResolve): Check whether the argument is
28716         managed or not.
28717
28718 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28719
28720         * support.cs: Api for Pair to set a value.  Despite the fact that
28721         the variables are public the MS C# compiler refuses to compile
28722         code that accesses the field if the variable is part of a foreach
28723         statement. 
28724
28725         * statement.cs (Fixed): Begin implementation of the fixed
28726         statement.
28727
28728         (Block.AddVariable): Return the VariableInfo on success and null
28729         on failure instead of true/false. 
28730
28731         * cs-parser.jay (foreach): Catch errors on variables already
28732         defined (we were ignoring this value before) and properly unwind
28733         the block hierarchy
28734
28735         (fixed_statement): grammar for the fixed statement.
28736
28737 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28738
28739         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28740         pointer types to be incretemented.
28741
28742         (SizeOf): Implement.
28743
28744         * cs-parser.jay (pointer_member_access): Implement
28745         expr->IDENTIFIER production.
28746
28747         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28748         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28749         on safe contexts.
28750
28751         (Unary): Implement indirection.
28752
28753         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28754         use in non-unsafe context).
28755
28756         (SimpleName.DoResolve): Check for pointers in field access on safe
28757         contexts. 
28758
28759         (Expression.LoadFromPtr): Factor the load-indirect code in this
28760         function.  This was duplicated in UnboxCast and ParameterReference
28761
28762 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28763
28764         * expression.cs (ComposedCast): report an error if a pointer cast
28765         is used in a safe region.
28766
28767         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28768         pointer type casts in unsafe context.
28769
28770         * codegen.cs (EmitContext): Set up IsUnsafe.
28771
28772         * cs-parser.jay (non_expression_type): Add productions for pointer
28773         casts. 
28774
28775         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28776         code.  We should not use force into static mode if the method is
28777         not virtual.  Fixes bug in MIS
28778
28779         * statement.cs (Do.Emit, While.Emit, For.Emit,
28780         Statement.EmitBoolExpression): Add support to Do and While to
28781         propagate infinite loop as `I do return' semantics.
28782
28783         Improve the For case to also test for boolean constants.
28784
28785         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28786         to the list of attributes we can add.
28787
28788         Remove `EmitContext' argument.
28789
28790         * class.cs (Method.Define): Apply parameter attributes.
28791         (Constructor.Define): Apply parameter attributes.
28792         (MethodCore.LabelParameters): Move here the core of labeling
28793         parameters. 
28794
28795         * support.cs (ReflectionParameters.ParameterModifier,
28796         InternalParameters.ParameterModifier): Use IsByRef on the type and
28797         only return the OUT bit for these parameters instead of in/out/ref
28798         flags.
28799
28800         This is because I miss-understood things.  The ParameterInfo.IsIn
28801         and IsOut represent whether the parameter has the [In] and [Out]
28802         attributes set.  
28803
28804 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
28805
28806         * ecore.cs (FieldExpr.Emit): Release temporaries.
28807
28808         * assign.cs (LocalTemporary.Release): new function.
28809
28810         * codegen.cs (EmitContext.GetTemporaryStorage,
28811         EmitContext.FreeTemporaryStorage): Rework the way we deal with
28812         temporary storage.  Now we can "put back" localbuilders when we
28813         are done with them
28814
28815 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
28816
28817         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
28818         need to make a copy of the variable to generate verifiable code.
28819
28820 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
28821
28822         * driver.cs: Compute dynamically the system directory.
28823
28824         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
28825         Slower, but more generally useful.  Used by the abstract
28826         registering implementation. 
28827
28828         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
28829         the rules for the special rule on Type/instances.  First check if
28830         we have the same name, and if so, try that special static path
28831         rather than the instance path.
28832
28833 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
28834
28835         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
28836         for, while and if.
28837
28838         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
28839         Enum, ValueType, Delegate or Array for non-corlib compiles.
28840
28841         * cs-tokenizer.cs: Catch long identifiers (645)
28842
28843         * typemanager.cs (IndexerPropetyName): Ravi never tested this
28844         piece of code.
28845
28846         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
28847         fix, we were returning too early, so we were not registering
28848         pending methods from abstract classes.
28849
28850         Do not register pending methods if the class is abstract.
28851
28852         * expression.cs (Conditional.DoResolve): Report circular implicit
28853         conversions when we neecd to compute it for conditional
28854         expressions. 
28855
28856         (Is.DoResolve): If the expression is always of the provided type,
28857         flag warning 183.  If the expression can not ever be of the
28858         provided type flag warning 184.
28859
28860         * class.cs: Catch 169 as well.
28861
28862         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
28863         read. 
28864
28865 2002-01-18  Nick Drochak  <ndrochak@gol.com>
28866
28867         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
28868
28869 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
28870
28871         * interface.cs: (PopulateMethod): Check for pointers being defined
28872         only if the unsafe context is active.
28873         (PopulateProperty): ditto.
28874         (PopulateIndexer): ditto.
28875
28876         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
28877         specified.  If pointers are present, make sure that they are
28878         present in an unsafe context.
28879         (Constructor, Constructor.Define): ditto.
28880         (Field, Field.Define): ditto.
28881         (Property, Property.Define): ditto.
28882         (Event, Event.Define): ditto.
28883
28884         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
28885         hashtable if there are classes or structs defined.
28886
28887         * expression.cs (LocalVariableReference.DoResolve): Simplify this
28888         code, as the constant resolution moved.
28889
28890         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
28891         the metadata, so we can flag error 133. 
28892
28893         * decl.cs (MemberCore.UnsafeOK): New function to test that a
28894         pointer is being declared in an unsafe context.
28895
28896 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
28897
28898         * modifiers.cs (Modifiers.Check): Require a Location argument.
28899         Report error 227 for Unsafe use.
28900
28901         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
28902
28903         * statement.cs (For.Emit): If the test is null, then report that
28904         we do `return', as we wont reach anything afterwards.
28905
28906         (Switch.SwitchGoverningType): Track the expression that matched
28907         the conversion.
28908
28909         * driver.cs: Allow negative numbers as an error code to flag.
28910
28911         * cs-parser.jay: Handle 1551.
28912
28913         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
28914
28915 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28916
28917         * cs-parser.jay: Report 1518 (type declaration can only contain
28918         class, struct, interface, enum or delegate)
28919
28920         (switch_label): Report 1523 (keywords `case' or `default' must
28921         preced code)
28922
28923         (opt_switch_sections): Report 1522 (empty switch)
28924
28925         * driver.cs: Report 1515 (response file specified multiple times)
28926         Report 1516 (Source file specified multiple times).
28927
28928         * expression.cs (Argument.Resolve): Signal 1510
28929
28930         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
28931         access not allowed in static code)
28932
28933 2002-01-11  Ravi Pratap  <ravi@ximian.com>
28934
28935         * typemanager.cs (IsPointerType): Utility method which we are going
28936         to need a lot.
28937
28938         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
28939         the object type, so we take care of that.
28940
28941         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
28942
28943         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
28944         added to non-params parameters :-)
28945
28946         * typemanager.cs (CSharpName): Include 'void' type too. 
28947
28948         (void_ptr_type): Include in the set of core types.
28949
28950         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
28951         duplicating code.
28952
28953         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
28954         an unsafe context.
28955
28956         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
28957         completely forgotten about it.
28958
28959 2002-01-10  Ravi Pratap  <ravi@ximian.com>
28960
28961         * cs-parser.jay (pointer_type): Add. This begins our implementation
28962         of parsing rules for unsafe code.
28963
28964         (unsafe_statement): Implement.
28965
28966         (embedded_statement): Modify to include the above.
28967
28968         * statement.cs (Unsafe): Implement new class for unsafe blocks.
28969
28970         * codegen.cs (EmitContext.InUnsafe): Add. This determines
28971         if the current context is an unsafe one.
28972
28973         * cs-parser.jay (local_variable_pointer_type): Since local variable types
28974         are handled differently, we need separate rules for them.
28975
28976         (local_variable_declaration): Update to use local_variable_pointer_type
28977         to allow variable declarations of unmanaged pointer types.
28978
28979         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
28980         in unsafe contexts.
28981
28982         * ../errors/cs0214.cs : Add.
28983
28984 2002-01-16  Nick Drochak  <ndrochak@gol.com>
28985
28986         * makefile: remove 'response' file when cleaning.
28987
28988 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28989
28990         * cs-parser.jay: Report 1524.
28991
28992 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
28993
28994         * typemanager.cs (RegisterMethod): drop checking if we have
28995         registered this from here
28996
28997 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
28998
28999         * class.cs (Method.EmitDestructor): Implement calling our base
29000         destructor. 
29001
29002         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
29003         value of InFinally.
29004
29005         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
29006         this routine and will wrap the call in a try/catch block.  Deal
29007         with the case.
29008
29009 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
29010
29011         * ecore.cs (Expression.MemberLookup): instead of taking a
29012         parameter `same_type' that was used to tell whether we could
29013         access private members we compute our containing type from the
29014         EmitContext.
29015
29016         (FieldExpr): Added partial support for volatile fields.  This does
29017         not work for volatile fields exposed from assemblies, as I can not
29018         figure out how to extract the modreq from it.
29019
29020         Updated all the source files to use this.
29021
29022         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
29023         because it is referenced by MemberLookup very often. 
29024
29025 2002-01-09  Ravi Pratap  <ravi@ximian.com>
29026
29027         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
29028         TypeBuilder.GetCustomAttributes to retrieve what we need.
29029
29030         Get rid of redundant default_member_attr_type as this is the same as
29031         default_member_type which already exists.
29032
29033         * interface.cs, attribute.cs : Update accordingly.
29034
29035 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
29036
29037         * typemanager.cs: Enable IndexerPropertyName again.  It does not
29038         work for TYpeBuilders though.  Ravi, can you please fix this?
29039
29040         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
29041
29042         * expression.cs (Argument.Emit): Handle the case of ref objects
29043         being passed to ref functions;  
29044
29045         (ParameterReference.EmitLoad): Loads the content of the pointer
29046         without dereferencing.
29047
29048 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29049
29050         * cs-tokenizer.cs: Implemented the pre-processing expressions.
29051
29052 2002-01-08  Ravi Pratap  <ravi@ximian.com>
29053
29054         * class.cs (Indexer.DefineMethod): Incorporate the interface
29055         type in the name of the method if we are doing explicit interface
29056         implementation.
29057
29058         * expression.cs (ConversionExists): Remove as it is completely obsolete.
29059
29060         (BetterConversion): Fix extremely trivial bug where we were referring to
29061         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
29062         again !
29063
29064         * ../errors/bug16.cs : Add although we have fixed it.
29065
29066 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29067
29068         * expression.cs (BaseIndexer): Begin implementation.
29069
29070         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
29071
29072         * cs-parser.jay (indexer_declarator): Use qualified_identifier
29073         production directly to remove a shift/reduce, and implement
29074         explicit interface implementation.
29075
29076         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
29077         after a floating point suffix.
29078
29079         * expression.cs (DoNumericPromotions): Improved the conversion for
29080         uint/uint.  If we have a constant, we avoid doing a typecast to a
29081         larger type.
29082
29083         * class.cs (Indexer): Implement explicit interface implementation
29084         for indexers.
29085
29086 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29087
29088         * class.cs: make the default instance constructor public and hidebysig.
29089
29090 2001-01-03  Ravi Pratap  <ravi@ximian.com>
29091
29092         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
29093         so we can call it from elsewhere.
29094
29095         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
29096         we emit it internally if the class has a defined indexer; otherwise the user
29097         emits it by decorating the class definition with the DefaultMemberAttribute.
29098
29099         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
29100         attribute is not used on a type which defines an indexer.
29101
29102         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
29103         character when we skip whitespace.
29104
29105         * ../errors/cs0646.cs : Add.
29106
29107 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
29108
29109         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
29110         again. 
29111
29112         * makefile: Add practical target `mcs3.exe' which builds the third
29113         generation compiler. 
29114
29115         * expression.cs (New): Fix structures constructor calling.
29116
29117         * class.cs (Property, Method, Indexer): Emit Final flag on the
29118         method if we are an interface implementation and we are not
29119         abstract. 
29120
29121         * ecore.cs (PropertyExpr): New public field `IsBase', tells
29122         whether this property is referencing a `base' method.
29123
29124         * expression.cs (Invocation.EmitCall): take an extra argument:
29125         is_base, this is used to determine whether the `call' or
29126         `callvirt' opcode should be used.
29127
29128
29129         * delegate.cs: update EmitCall.
29130
29131         * class.cs (Method.Define): Set NewSlot for the cases where we are
29132         not implementing an interface method.
29133
29134         (Property.Define): ditto.
29135
29136 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
29137
29138         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
29139         'r'.  Allows mcs to parse itself fully.
29140
29141 2002-01-02  Ravi Pratap  <ravi@ximian.com>
29142
29143         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
29144         of the number of initializers that require the InitializeArray method.
29145
29146         (CheckIndices): Store the Expression in all cases - not the plain value. Also
29147         update the above field where necessary.
29148
29149         (MakeByteBlob): Update accordingly.
29150
29151         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
29152         greater than 2.
29153
29154         (EmitDynamicInitializers): Update in accordance with the new optimization.
29155
29156         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
29157         same OpCode applies.
29158
29159         * cs-parser.jay : Fix some glaring errors I introduced.
29160
29161 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
29162
29163         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
29164         so that we can check for name clashes there too.
29165
29166         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
29167         for interface indexers.
29168
29169         * interfaces.cs (Define): Emit the default member attribute.
29170
29171         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
29172         variable was being referred to while setting the value ;-)
29173
29174 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
29175
29176         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
29177         byte-by-byte information when we know the data is zero.
29178
29179         Make the block always a multiple of 4, because
29180         DefineInitializedData has a bug.
29181
29182         * assign.cs: Fix, we should assign from the temporary, not from
29183         the source. 
29184
29185         * expression.cs (MakeByteBlob): Fix my incorrect code.
29186
29187 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
29188
29189         * typemanager.cs (EnumToUnderlying): This function is used to get
29190         the underlying type from an enumeration, because it does not
29191         always work. 
29192
29193         * constant.cs: Use the I4_S form for values between -128 and 127.
29194
29195         * statement.cs (Block.LookupLabel): Looks up a label.
29196         (Block): Drop support for labeled blocks.
29197
29198         (LabeledStatement): New kind of statement that represents a label
29199         only.
29200
29201         (Goto): Finally implement this bad boy.
29202
29203         * cs-parser.jay: Update to reflect new mechanism to implement
29204         labels.
29205
29206 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29207
29208         * codegen.cs (EmitContext.This): a codegen property that keeps the
29209         a single instance of this instead of creating many different this
29210         instances. 
29211
29212         * delegate.cs (Delegate.DoResolve): Update to use the property;
29213
29214         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29215
29216         * expression.cs (BaseAccess.DoResolve): Ditto.
29217
29218 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29219
29220         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29221         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29222
29223         (InitCoreTypes): Update accordingly.
29224
29225         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29226         so we can quickly store the state.
29227
29228         (ApplyAttributes): Set the correct implementation flags
29229         for InternalCall methods.
29230
29231 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29232
29233         * expression.cs (EmitCall): if a method is not virtual, then do
29234         not use callvirt on it.
29235
29236         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29237         user defined stuff) requires the use of stobj, which takes an
29238         address on the stack instead of an array and an index.  So emit
29239         the Ldelema operation for it.
29240
29241         (EmitStoreOpcode): Use stobj for valuetypes.
29242
29243         (UnaryMutator.EmitCode): Use the right 1 value depending on
29244         whether we are dealing with int64/uint64, float or doubles.
29245
29246         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29247         constructors that I implemented last night.
29248
29249         (Constructor.IsDefault): Fix to work properly for static
29250         constructors.
29251
29252         * cs-parser.jay (CheckDef): report method signature errors.
29253         Update error number 103 to be 132.
29254
29255         * decl.cs: New AdditionResult enumeration value: MethodExists.
29256         Although we do this check for methods later on in the semantic
29257         analysis, catching repeated default constructors is so easy that
29258         we catch these here. 
29259
29260         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29261         promotions code.
29262
29263         (ParameterReference.EmitAssign, Emit): handle
29264         bools as bytes.
29265
29266         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29267         (ArrayAccess.EmitStoreOpcode): ditto.
29268
29269         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29270
29271         * expression.cs (MakeByteBlob): Complete all the missing types
29272         (uint, short, ushort, byte, sbyte)
29273
29274         * class.cs: Only init instance field initializers on instance
29275         constructors. 
29276
29277         Rename `constructors' to instance_constructors. 
29278
29279         (TypeContainer.AddConstructor): Only add constructors to the list
29280         if it is not static.
29281
29282         Make sure that we handle default_static_constructor independently
29283         everywhere where we handle instance_constructors
29284
29285 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29286
29287         * class.cs: Do not lookup or create a base initializer for a
29288         static constructor.
29289
29290         (ConstructorInitializer.Resolve): use the proper type to lookup
29291         for constructors.
29292
29293         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29294
29295         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29296         in DeclSpace. 
29297
29298         * decl.cs: CloseType is now an virtual method, the default
29299         implementation just closes this type.
29300
29301 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29302
29303         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29304         to PreserveSig by default. Also emit HideBySig on such methods.
29305
29306         Basically, set the defaults to standard values.
29307
29308         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29309         argument, if candidate is better, it can't be worse than the best !
29310
29311         (Invocation): Re-write bits to differentiate between methods being
29312         applicable in their expanded form and their normal form - for params
29313         methods of course.
29314
29315         Get rid of use_standard everywhere as only standard conversions are allowed
29316         in overload resolution. 
29317
29318         More spec conformance.
29319
29320 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29321
29322         * driver.cs: Add --timestamp, to see where the compiler spends
29323         most of its time.
29324
29325         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29326         `this' in static code.
29327
29328         (SimpleName.DoResolve): Implement in terms of a helper function
29329         that allows static-references to be passed upstream to
29330         MemberAccess.
29331
29332         (Expression.ResolveWithSimpleName): Resolve specially simple
29333         names when called by MemberAccess to implement the special
29334         semantics. 
29335
29336         (Expression.ImplicitReferenceConversion): Handle conversions from
29337         Null to reference types before others, as Null's type is
29338         System.Object. 
29339
29340         * expression.cs (Invocation.EmitCall): Handle the special case of
29341         calling methods declared on a reference type from a ValueType
29342         (Base classes System.Object and System.Enum)
29343
29344         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29345         the left hand side is a TypeExpr, not on every enumeration. 
29346
29347         (Binary.Resolve): If types are reference types, then do a cast to
29348         object on operators != and == of both arguments.
29349
29350         * typemanager.cs (FindMembers): Extract instance and static
29351         members if requested.
29352
29353         * interface.cs (PopulateProperty): Use void_type instead of null
29354         as the return type for the setter method.
29355
29356         (PopulateIndexer): ditto.
29357
29358 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29359
29360         * support.cs (ReflectionParameters): Fix minor bug where we
29361         were examining the wrong parameter for the ParamArray attribute.
29362
29363         Cope with requests for the type of the parameter at position
29364         greater than the params parameter's. We now return the element
29365         type of the params array as that makes more sense.
29366
29367         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29368         accordingly as we no longer have to extract the element type
29369         ourselves.
29370
29371         (Invocation.OverloadResolve): Update.
29372
29373 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29374
29375         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29376         against IEnumerator, test whether the return value is a descendant
29377         of the IEnumerator interface.
29378
29379         * class.cs (Indexer.Define): Use an auxiliary method to implement
29380         the other bits of the method definition.  Begin support for
29381         explicit interface implementation.
29382
29383         (Property.DefineMethod): Use TypeManager.void_type instead of null
29384         for an empty return value.
29385
29386 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29387
29388         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29389         dealing with a FieldExpr which is composed of a FieldBuilder, in
29390         the code path we did extract the constant, but we should have
29391         obtained the underlying value to be able to cast it (otherwise we
29392         end up in an infinite loop, this is what Ravi was running into).
29393
29394         (ArrayCreation.UpdateIndices): Arrays might be empty.
29395
29396         (MemberAccess.ResolveMemberAccess): Add support for section
29397         14.5.4.1 that deals with the special case of E.I when E is a type
29398         and something else, that I can be a reference to a static member.
29399
29400         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29401         handle a particular array type to create byte blobs, it is just
29402         something we dont generate byteblobs for.
29403
29404         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29405         arguments. 
29406
29407         * location.cs (Push): remove the key from the hashtable that we
29408         are about to add.   This happens for empty files.
29409
29410         * driver.cs: Dispose files after we have parsed them.
29411
29412         (tokenize): new function that only runs the tokenizer on its
29413         input, for speed testing.
29414
29415 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29416
29417         * class.cs (Event.Define): Define the private field only if there
29418         are no accessors defined.
29419
29420         * expression.cs (ResolveMemberAccess): If there is no associated
29421         field with the event, that means we have an event defined with its
29422         own accessors and we should flag error cs0070 since transforming
29423         ourselves into a field is not valid in that case.
29424
29425         * ecore.cs (SimpleName.DoResolve): Same as above.
29426
29427         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29428         and charset to sane values.
29429
29430 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29431
29432         * assign.cs (DoResolve): Perform check on events only if they 
29433         are being accessed outside the declaring type.
29434
29435         * cs-parser.jay (event_declarations): Update rules to correctly
29436         set the type of the implicit parameter etc.
29437
29438         (add_accessor, remove_accessor): Set current local parameters.
29439
29440         * expression.cs (Binary): For delegate addition and subtraction,
29441         cast the return value from the method into the appropriate delegate
29442         type.
29443
29444 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29445
29446         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29447         of these as the workaround is unnecessary.
29448
29449         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29450         delegate data - none of that is needed at all.
29451
29452         Re-write bits to extract the instance expression and the delegate method
29453         correctly.
29454
29455         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29456         on delegates too.
29457
29458         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29459         of attaching attributes instead of duplicating code everywhere.
29460
29461         * everywhere : Update code to do attribute emission using the above method.
29462
29463 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29464
29465         * expression.cs (IsParamsMethodApplicable): if there are not
29466         parameters, return immediately.
29467
29468         * ecore.cs: The 0 literal can be implicity converted to an enum
29469         type. 
29470
29471         (SimpleName.DoResolve): First lookup the type, then lookup the
29472         members. 
29473
29474         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29475         want to get its address.  If the InstanceExpression is not
29476         addressable, store the result in a temporary variable, then get
29477         the address of it.
29478
29479         * codegen.cs: Only display 219 errors on warning level or above. 
29480
29481         * expression.cs (ArrayAccess): Make it implement the
29482         IMemoryLocation interface.
29483
29484         (Binary.DoResolve): handle the operator == (object a, object b)
29485         and operator != (object a, object b) without incurring into a
29486         BoxedCast (because 5 != o should never be performed).
29487
29488         Handle binary enumerator operators.
29489
29490         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29491         value type, otherwise use Ldelem_ref.
29492
29493         Use precomputed names;
29494
29495         (AddressOf): Implement address of
29496
29497         * cs-parser.jay (labeled_statement): Fix recursive block
29498         addition by reworking the production.
29499
29500         * expression.cs (New.DoEmit): New has a special case:
29501                 
29502                  If we are dealing with a ValueType, we have a few
29503                  situations to deal with:
29504                 
29505                     * The target of New is a ValueType variable, that is
29506                       easy, we just pass this as the variable reference
29507                 
29508                     * The target of New is being passed as an argument,
29509                       to a boxing operation or a function that takes a
29510                       ValueType.
29511                 
29512                       In this case, we need to create a temporary variable
29513                       that is the argument of New.
29514
29515
29516 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29517
29518         * rootcontext.cs (LookupType): Check that current_type is not null before
29519         going about looking at nested types.
29520
29521         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29522         not implement the IAssignMethod interface any more.
29523
29524         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29525         where we tranform them into FieldExprs if they are being resolved from within
29526         the declaring type.
29527
29528         * ecore.cs (SimpleName.DoResolve): Do the same here.
29529
29530         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29531
29532         * ../errors/bug10.cs : Add.
29533
29534         * ../errors/cs0070.cs : Add.
29535
29536         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29537
29538         * assign.cs : Get rid of EventIsLocal everywhere.
29539
29540 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29541
29542         * ecore.cs (ConvertIntLiteral): finished the implementation.
29543
29544         * statement.cs (SwitchLabel): Convert the value we are using as a
29545         key before looking up the table.
29546
29547 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29548
29549         * codegen.cs (EmitTopBlock): Require a Location argument now.
29550
29551         * cs-parser.jay (constructor_declarator): We need to setup
29552         current_local_parameters before we parse the
29553         opt_constructor_initializer, to allow the variables to be bound
29554         to the constructor arguments.
29555
29556         * rootcontext.cs (LookupType): First lookup nested classes in our
29557         class and our parents before we go looking outside our class.
29558
29559         * expression.cs (ConstantFold): Extract/debox the values at the
29560         beginnning. 
29561
29562         * rootcontext.cs (EmitCode): Resolve the constants first before we
29563         resolve the types.  This is not really needed, but it helps debugging.
29564
29565         * statement.cs: report location.
29566
29567         * cs-parser.jay: pass location to throw statement.
29568
29569         * driver.cs: Small bug fix.
29570
29571         * report.cs: Updated format to be 4-zero filled digits.
29572
29573 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29574
29575         * expression.cs (CheckIndices): Fix minor bug where the wrong
29576         variable was being referred to ;-)
29577
29578         (DoEmit): Do not call EmitStaticInitializers when the 
29579         underlying type is System.Object.
29580
29581 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29582
29583         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29584         and do the usual workaround for SRE.
29585
29586         * class.cs (MyEventBuilder.EventType): New member to get at the type
29587         of the event, quickly.
29588
29589         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29590
29591         * assign.cs (Assign.DoResolve): Handle the case when the target
29592         is an EventExpr and perform the necessary checks.
29593
29594         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29595         interface.
29596
29597         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29598
29599         (EventExpr): Set the type in the constructor itself since we 
29600         are meant to be born fully resolved.
29601
29602         (EventExpr.Define): Revert code I wrote earlier.
29603                 
29604         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29605         instance expression is null. The instance expression is a This in that case
29606         or a null, depending on whether it is a static method or not.
29607
29608         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29609         refers to more than one method.
29610
29611         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29612         and accordingly flag errors.
29613
29614 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29615
29616         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29617
29618 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29619
29620         * location.cs (ToString): Provide useful rutine.
29621
29622 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29623
29624         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29625         objects, return the actual integral boxed.
29626
29627         * statement.cs (SwitchLabel): define an ILLabel for each
29628         SwitchLabel. 
29629
29630         (Switch.CheckSwitch): If the value is a Literal, extract
29631         the underlying literal.
29632
29633         Also in the unused hashtable we had, add the SwitchLabel so we can
29634         quickly look this value up.
29635
29636         * constant.cs: Implement a bunch of new constants.  Rewrite
29637         Literal based on this.  Made changes everywhere to adapt to this.
29638
29639         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29640         dereferencing array only once, and also copes with enumrations.
29641
29642         bytes are two bytes wide, not one.
29643
29644         (Cast): Perform constant conversions.
29645
29646         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29647         wrappers to the literals here.
29648
29649         * expression.cs (DoNumericPromotions): long literals can converted
29650         to ulong implicity (this is taken care of elsewhere, but I was
29651         missing this spot).
29652
29653         * ecore.cs (Expression.Literalize): Make the return type Literal,
29654         to improve type checking.
29655
29656         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29657
29658 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29659
29660         * literal.cs: Revert code from ravi that checked the bounds.  The
29661         bounds are sane by the definition of the type itself. 
29662
29663         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29664         need to actually look up in our parent hierarchy for interfaces
29665         implemented. 
29666
29667         * const.cs: Use the underlying type for enumerations
29668
29669         * delegate.cs: Compute the basename for the delegate creation,
29670         that should fix the delegate test case, and restore the correct
29671         Type Lookup semantics in rootcontext
29672
29673         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29674         referencing a nested type with the Reflection API is using the "+"
29675         sign. 
29676
29677         * cs-parser.jay: Do not require EOF token at the end.
29678
29679 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29680
29681         * rootcontext.cs (LookupType): Concatenate type names with
29682         a '.' instead of a '+' The test suite passes again.
29683
29684         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29685         field of the enumeration.
29686
29687         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29688         the case when the member is an EventExpr.
29689
29690         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29691         static has an associated instance expression.
29692
29693         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29694
29695         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29696
29697         * class.cs (Event.Define): Register event and perform appropriate checks
29698         for error #111.
29699
29700         We define the Add and Remove methods even if the use provides none because
29701         in that case, we provide default implementations ourselves.
29702
29703         Define a private field of the type of the event. This is done by the CSC compiler
29704         and we should be doing it too ;-)
29705
29706         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29707         More methods we use in code we generate.
29708
29709         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29710         is important.
29711
29712         (InitCoreTypes): Update accordingly for the above.
29713
29714         * class.cs (Event.Emit): Generate code for default accessors that we provide
29715
29716         (EmitDefaultMethod): Do the job in the above.
29717
29718         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29719         appropriate place.
29720
29721 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29722
29723         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29724         builders even if we were missing one.
29725
29726         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29727         pass the Basename as our class name instead of the Name.  The
29728         basename will be correctly composed for us.
29729
29730         * parameter.cs (Paramters): Now takes a Location argument.
29731
29732         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29733         make all the code call directly LookupType in RootContext and take
29734         this chance to pass the Location information everywhere.
29735
29736         * Everywhere: pass Location information.
29737
29738 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29739
29740         * class.cs (Constructor.Define): Updated way of detecting the
29741         length of the parameters.
29742
29743         (TypeContainer.DefineType): Use basename as the type name for
29744         nested types.
29745
29746         (TypeContainer.Define): Do not recursively define types here, as
29747         definition is taken care in order by the RootContext.
29748
29749         * tree.cs: Keep track of namespaces in a per-file basis.
29750
29751         * parameter.cs (Parameter.ComputeSignature): Update to use
29752         DeclSpace. 
29753
29754         (Parameters.GetSignature): ditto.
29755
29756         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29757         instead of a TypeContainer.
29758
29759         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29760         resolve names.  Because we need to be resolve in our context, not
29761         our parents.
29762
29763         * driver.cs: Implement response files.
29764
29765         * class.cs (TypeContainer.DefineType): If we are defined, do not
29766         redefine ourselves.
29767
29768         (Event.Emit): Emit the code for add/remove handlers.
29769         (Event.Define): Save the MethodBuilders for add/remove.
29770
29771         * typemanager.cs: Use pair here too.
29772
29773         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29774         DictionaryEntry requires the first argument to be non-null.  
29775
29776         (enum_declaration): Compute full name for registering the
29777         enumeration.
29778
29779         (delegate_declaration): Instead of using
29780         formal_parameter_list, use opt_formal_parameter_list as the list
29781         can be empty.
29782
29783         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29784         (EventParsing): New property that controls whether `add' and
29785         `remove' are returned as tokens or identifiers (for events);
29786
29787 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29788
29789         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29790         use MyEventBuilder only and let it wrap the real builder for us.
29791
29792         (MyEventBuilder): Revamp constructor etc.
29793
29794         Implement all operations that we perform on EventBuilder in precisely the same
29795         way here too.
29796
29797         (FindMembers): Update to use the EventBuilder member.
29798
29799         (Event.Emit): Update accordingly.
29800
29801 2001-12-18  Ravi Pratap  <ravi@ximian.com>
29802
29803         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
29804         by calling the appropriate methods.
29805
29806         (GetCustomAttributes): Make stubs as they cannot possibly do anything
29807         useful.
29808
29809         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
29810
29811 2001-12-17  Ravi Pratap  <ravi@ximian.com>
29812
29813         * delegate.cs (Delegate.Populate): Check that the return type
29814         and various parameters types are indeed accessible.
29815
29816         * class.cs (Constructor.Define): Same here.
29817
29818         (Field.Define): Ditto.
29819
29820         (Event.Define): Ditto.
29821
29822         (Operator.Define): Check that the underlying Method defined itself
29823         correctly - so it's MethodBuilder should not be null.
29824
29825         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
29826         expression happens to be null.
29827
29828         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
29829         members but as of now we don't seem to be able to do anything really useful with it.
29830
29831         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
29832         not the EventBuilder.
29833
29834 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
29835
29836         * cs-tokenizer.cs: Add support for defines.
29837         Add support for #if, #elif, #else, #endif
29838
29839         (eval_var): evaluates a variable.
29840         (eval): stubbed for evaluating functions.
29841
29842         * cs-parser.jay: Pass the defines information
29843
29844         * driver.cs: Add --define command line option.
29845
29846         * decl.cs: Move MemberCore here.
29847
29848         Make it the base class for DeclSpace.  This allows us to catch and
29849         report 108 and 109 for everything now.
29850
29851         * class.cs (TypeContainer.Define): Extract all the members
29852         before populating and emit the warning 108 (new keyword required
29853         to override) instead of having each member implement this.
29854
29855         (MemberCore.Define): New abstract method, we will be using this in
29856         the warning reporting engine in Populate.
29857
29858         (Operator.Define): Adjust to new MemberCore protocol. 
29859
29860         * const.cs (Const): This does not derive from Expression, it is a
29861         temporary object we use to create fields, it is a MemberCore. 
29862
29863         * class.cs (Method.Define): Allow the entry point to be in a
29864         specific class.
29865
29866         * driver.cs: Rewrite the argument handler to clean it up a bit.
29867
29868         * rootcontext.cs: Made it just an auxiliary namespace feature by
29869         making everything static.
29870
29871         * driver.cs: Adapt code to use RootContext type name instead of
29872         instance variable.
29873
29874         * delegate.cs: Remove RootContext argument.
29875
29876         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
29877         argument. 
29878
29879         * class.cs (Event.Define): The lookup can fail.
29880
29881         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
29882
29883         * expression.cs: Resolve the this instance before invoking the code.
29884
29885 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
29886
29887         * cs-parser.jay: Add a production in element_access that allows
29888         the thing to become a "type" reference.  This way we can parse
29889         things like "(string [])" as a type.
29890
29891         Note that this still does not handle the more complex rules of
29892         casts. 
29893
29894
29895         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
29896
29897         * ecore.cs: (CopyNewMethods): new utility function used to
29898         assemble the list of methods from running FindMembers.
29899
29900         (MemberLookup): Rework FindMembers so that 
29901
29902 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
29903
29904         * class.cs (TypeContainer): Remove Delegates who fail to be
29905         defined.
29906
29907         * delegate.cs (Populate): Verify that we dont get null return
29908         values.   TODO: Check for AsAccessible.
29909
29910         * cs-parser.jay: Use basename to emit error 574 (destructor should
29911         have the same name as container class), not the full name.
29912
29913         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
29914         possible representation.  
29915
29916         Also implements integer type suffixes U and L.
29917
29918 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
29919
29920         * expression.cs (ArrayCreation.DoResolve): We need to do the
29921         argument resolution *always*.
29922
29923         * decl.cs: Make this hold the namespace.  Hold the root context as
29924         well.
29925         (LookupType): Move here.
29926
29927         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
29928
29929         * location.cs (Row, Name): Fixed the code, it was always returning
29930         references to the first file.
29931
29932         * interface.cs: Register properties defined through interfaces.
29933
29934         * driver.cs: Add support for globbing on the command line
29935
29936         * class.cs (Field): Make it derive from MemberCore as well.
29937         (Event): ditto.
29938
29939 2001-12-15  Ravi Pratap  <ravi@ximian.com>
29940
29941         * class.cs (Event::Define): Check that the type of the event is a delegate
29942         type else flag error #66.
29943
29944         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
29945         same.
29946
29947         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
29948         values of EntryPoint, CharSet etc etc.
29949
29950         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
29951
29952         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
29953         be null and we should ignore this. I am not sure if this is really clean. Apparently,
29954         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
29955         which needs this to do its work.
29956
29957         * ../errors/cs0066.cs : Add.
29958
29959 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
29960
29961         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
29962         helper functions.
29963
29964         * class.cs: (MethodSignature.MethodSignature): Removed hack that
29965         clears out the parameters field.
29966         (MemberSignatureCompare): Cleanup
29967
29968         (MemberCore): New base class used to share code between MethodCore
29969         and Property.
29970
29971         (RegisterRequiredImplementations) BindingFlags.Public requires
29972         either BindingFlags.Instace or Static.  Use instance here.
29973
29974         (Property): Refactored code to cope better with the full spec.
29975
29976         * parameter.cs (GetParameterInfo): Return an empty array instead
29977         of null on error.
29978
29979         * class.cs (Property): Abstract or extern properties have no bodies.
29980
29981         * parameter.cs (GetParameterInfo): return a zero-sized array.
29982
29983         * class.cs (TypeContainer.MethodModifiersValid): Move all the
29984         method modifier validation to the typecontainer so we can reuse
29985         this on properties.
29986
29987         (MethodCore.ParameterTypes): return an empty sized array of types.
29988
29989         (Property.Define): Test property modifier validity.
29990
29991         Add tests for sealed/override too.
29992
29993         (Method.Emit): abstract or extern methods have no bodies.
29994
29995 2001-12-14  Ravi Pratap  <ravi@ximian.com>
29996
29997         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
29998         thing.
29999
30000         (Method::Define, ::Emit): Modify accordingly.
30001
30002         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
30003
30004         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
30005
30006         * makefile: Pass in /unsafe.
30007
30008 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
30009
30010         * class.cs (MakeKey): Kill routine.
30011
30012         * class.cs (TypeContainer.Define): Correctly define explicit
30013         method implementations (they require the full interface name plus
30014         the method name).
30015
30016         * typemanager.cs: Deply the PtrHashtable here and stop using the
30017         lame keys.  Things work so much better.
30018
30019         This of course broke everyone who depended on `RegisterMethod' to
30020         do the `test for existance' test.  This has to be done elsewhere.
30021
30022         * support.cs (PtrHashtable): A hashtable that avoid comparing with
30023         the object stupid Equals method (because, that like fails all over
30024         the place).  We still do not use it.
30025
30026         * class.cs (TypeContainer.SetRequiredInterface,
30027         TypeContainer.RequireMethods): Killed these two routines and moved
30028         all the functionality to RegisterRequiredImplementations.
30029
30030         (TypeContainer.RegisterRequiredImplementations): This routine now
30031         registers all the implementations required in an array for the
30032         interfaces and abstract methods.  We use an array of structures
30033         which can be computed ahead of time to reduce memory usage and we
30034         also assume that lookups are cheap as most classes will not
30035         implement too many interfaces.
30036
30037         We also avoid creating too many MethodSignatures.
30038
30039         (TypeContainer.IsInterfaceMethod): Update and optionally does not
30040         clear the "pending" bit if we find that there are problems with
30041         the declaration.
30042
30043         (TypeContainer.VerifyPendingMethods): Update to report errors of
30044         methods that look like implementations but are not.
30045
30046         (TypeContainer.Define): Add support for explicit interface method
30047         implementation. 
30048
30049 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
30050
30051         * typemanager.cs: Keep track of the parameters here instead of
30052         being a feature of the TypeContainer.
30053
30054         * class.cs: Drop the registration of parameters here, as
30055         InterfaceMethods are also interface declarations.
30056
30057         * delegate.cs: Register methods with the TypeManager not only with
30058         the TypeContainer.  This code was buggy.
30059
30060         * interface.cs: Full registation here.
30061
30062 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
30063
30064         * expression.cs: Remove reducer for binary expressions, it can not
30065         be done this way.
30066
30067         * const.cs: Put here the code that used to go into constant.cs
30068
30069         * constant.cs: Put here the code for constants, this is a new base
30070         class for Literals.
30071
30072         * literal.cs: Make Literal derive from Constant.
30073
30074 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
30075
30076         * statement.cs (Return.Emit): Report error 157 if the user
30077         attempts to return from a finally block.
30078
30079         (Return.Emit): Instead of emitting a return, jump to the end of
30080         the function.
30081
30082         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
30083         LocalBuilder to store the result of the function.  ReturnLabel is
30084         the target where we jump.
30085
30086
30087 2001-12-09  Radek Doulik  <rodo@ximian.com>
30088
30089         * cs-parser.jay: remember alias in current namespace
30090
30091         * ecore.cs (SimpleName::DoResolve): use aliases for types or
30092         namespaces
30093
30094         * class.cs (LookupAlias): lookup alias in my_namespace
30095
30096         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
30097         aliases hashtable
30098         (LookupAlias): lookup alias in this and if needed in parent
30099         namespaces
30100
30101 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
30102
30103         * support.cs: 
30104
30105         * rootcontext.cs: (ModuleBuilder) Made static, first step into
30106         making things static.  I need this to avoid passing the
30107         TypeContainer when calling ParameterType.
30108
30109         * support.cs (InternalParameters.ParameterType): Remove ugly hack
30110         that did string manipulation to compute the type and then call
30111         GetType.  Use Parameter.ParameterType instead.
30112
30113         * cs-tokenizer.cs: Consume the suffix for floating values.
30114
30115         * expression.cs (ParameterReference): figure out whether this is a
30116         reference parameter or not.  Kill an extra variable by computing
30117         the arg_idx during emission.
30118
30119         * parameter.cs (Parameters.GetParameterInfo): New overloaded
30120         function that returns whether a parameter is an out/ref value or not.
30121
30122         (Parameter.ParameterType): The type of the parameter (base,
30123         without ref/out applied).
30124
30125         (Parameter.Resolve): Perform resolution here.
30126         (Parameter.ExternalType): The full type (with ref/out applied).
30127
30128         * statement.cs (Using.Emit, Using.EmitExpression): Implement
30129         support for expressions on the using statement.
30130
30131 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
30132
30133         * statement.cs (Using.EmitLocalVariableDecls): Split the
30134         localvariable handling of the using statement.
30135
30136         (Block.EmitMeta): Keep track of variable count across blocks.  We
30137         were reusing slots on separate branches of blocks.
30138
30139         (Try.Emit): Emit the general code block, we were not emitting it. 
30140
30141         Check the type of the declaration to be an IDisposable or
30142         something that can be implicity converted to it. 
30143
30144         Emit conversions if required.
30145
30146         * ecore.cs (EmptyExpression): New utility class.
30147         (Expression.ImplicitConversionExists): New utility function.
30148
30149 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
30150
30151         * statement.cs (Using): Implement.
30152
30153         * expression.cs (LocalVariableReference): Support read only variables.
30154
30155         * statement.cs: Remove the explicit emit for the Leave opcode.
30156         (VariableInfo): Add a readonly field.
30157
30158 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
30159
30160         * ecore.cs (ConvCast): new class used to encapsulate the various
30161         explicit integer conversions that works in both checked and
30162         unchecked contexts.
30163
30164         (Expression.ConvertNumericExplicit): Use new ConvCast class to
30165         properly generate the overflow opcodes.
30166
30167 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30168
30169         * statement.cs: The correct type for the EmptyExpression is the
30170         element_type, not the variable type.  Ravi pointed this out.
30171
30172 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30173
30174         * class.cs (Method::Define): Handle PInvoke methods specially
30175         by using DefinePInvokeMethod instead of the usual one.
30176
30177         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
30178         above to do the task of extracting information and defining the method.
30179
30180 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30181
30182         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
30183         of the condition for string type.
30184
30185         (Emit): Move that here. 
30186
30187         (ArrayCreation::CheckIndices): Keep string literals in their expression
30188         form.
30189
30190         (EmitDynamicInitializers): Handle strings appropriately.
30191
30192 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30193
30194         * codegen.cs (EmitContext): Replace multiple variables with a
30195         single pointer to the current Switch statement.
30196
30197         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
30198         EmitContext.
30199
30200 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30201
30202         * statement.cs 
30203
30204         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30205         default'.
30206
30207         (Foreach.Emit): Foreach on arrays was not setting
30208         up the loop variables (for break/continue).
30209
30210         (GotoCase): Semi-implented.
30211
30212 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30213
30214         * attribute.cs (CheckAttribute): Handle system attributes by using
30215         Attribute.GetAttributes to examine information we need.
30216
30217         (GetValidPlaces): Same here.
30218
30219         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30220
30221         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30222
30223         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30224
30225         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30226
30227         (Method::Emit): Handle the case when we are a PInvoke method.
30228
30229 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30230
30231         * expression.cs: Use ResolveWithSimpleName on compound names.
30232
30233 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30234
30235         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30236         before trying to reduce it.
30237
30238         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30239
30240         * constant.cs (LookupConstantValue): Implement.
30241
30242         (EmitConstant): Use the above in emitting the constant.
30243
30244         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30245         that are user-defined by doing a LookupConstantValue on them.
30246
30247         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30248         too, like above.
30249
30250 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30251
30252         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30253
30254         (BaseAccess.DoResolve): Implement.
30255
30256         (MemberAccess.DoResolve): Split this routine into a
30257         ResolveMemberAccess routine that can be used independently
30258
30259 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30260
30261         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30262         As that share bits of the implementation.  Is returns a boolean,
30263         while As returns the Type that is being probed.
30264
30265 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30266
30267         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30268         instead of a Literal - much easier.
30269
30270         (EnumInTransit): Remove - utterly useless :-)
30271
30272         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30273
30274         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30275
30276         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30277         chain when we have no associated expression.
30278
30279 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30280
30281         * constant.cs (Define): Use Location while reporting the errror.
30282
30283         Also emit a warning when 'new' is used and there is no inherited
30284         member to hide.
30285
30286         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30287         populated.
30288
30289         (LookupEnumValue): Implement to lookup an enum member's value and define it
30290         if necessary.
30291
30292         (Populate): Re-write accordingly to use the above routine.
30293
30294 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30295
30296         * expression.cs (This): Fix prototype for DoResolveLValue to
30297         override the base class DoResolveLValue.
30298
30299         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30300         declarations) 
30301
30302         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30303         (we need to load the address of the field here).  This fixes
30304         test-22. 
30305
30306         (FieldExpr.DoResolveLValue): Call the DoResolve
30307         function to initialize the Instance expression.
30308
30309         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30310         correctly the GetEnumerator operation on a value type.
30311
30312         * cs-parser.jay: Add more simple parsing error catches.
30313
30314         * statement.cs (Switch): Add support for string switches.
30315         Handle null specially.
30316
30317         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30318
30319 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30320
30321         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30322
30323         (declare_local_constant): New helper function.
30324
30325         * statement.cs (AddConstant): Keep a separate record of constants
30326
30327         (IsConstant): Implement to determine if a variable is a constant.
30328
30329         (GetConstantExpression): Implement.
30330
30331         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30332
30333         * statement.cs (IsVariableDefined): Re-write.
30334
30335 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30336
30337         * class.cs (TypeContainer::FindMembers): Look for constants
30338         in the case when we are looking for MemberTypes.Field
30339
30340         * expression.cs (MemberAccess::DoResolve): Check that in the
30341         case we are a FieldExpr and a Literal, we are not being accessed
30342         by an instance reference.
30343
30344         * cs-parser.jay (local_constant_declaration): Implement.
30345
30346         (declaration_statement): Implement for constant declarations.
30347
30348 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30349
30350         * statement.cs (Switch): Catch double defaults.
30351
30352         (Switch): More work on the switch() statement
30353         implementation.  It works for integral values now, need to finish
30354         string support.
30355
30356
30357 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30358
30359         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30360         integer literals into other integer literals.  To be used by
30361         switch. 
30362
30363 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30364
30365         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30366         some memory.
30367
30368         (EmitDynamicInitializers): Cope with the above since we extract data
30369         directly from ArrayData now.
30370
30371         (ExpectInitializers): Keep track of whether initializers are mandatory
30372         or not.
30373
30374         (Bounds): Make it a hashtable to prevent the same dimension being 
30375         recorded for every element in that dimension.
30376
30377         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30378         from being found.
30379
30380         Also fix bug which was causing the indices to be emitted in the reverse
30381         order.
30382
30383 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30384
30385         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30386         unfinished.  They do not work, because the underlying code is
30387         sloppy.
30388
30389 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30390
30391         * cs-parser.jay: Remove bogus fixme.
30392
30393         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30394         on Switch statement.
30395
30396 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30397
30398         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30399         the same. 
30400
30401         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30402         parameter. Apparently, any expression is allowed. 
30403
30404         (ValidateInitializers): Update accordingly.
30405
30406         (CheckIndices): Fix some tricky bugs thanks to recursion.
30407
30408         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30409         I was being completely brain-dead.
30410
30411         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30412         and re-write acordingly.
30413
30414         (DelegateInvocation): Re-write accordingly.
30415
30416         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30417
30418         (MakeByteBlob): Handle types more correctly.
30419
30420         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30421         initialization from expressions but it is incomplete because I am a complete
30422         Dodo :-|
30423
30424 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30425
30426         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30427         on If.  Basically, we have to return `true' (ie, we do return to
30428         our caller) only if both branches of the if return.
30429
30430         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30431         short-circuit operators, handle them as short circuit operators. 
30432
30433         (Cast.DoResolve): Resolve type.
30434         (Cast.Cast): Take an expression as the target type.
30435
30436         * cs-parser.jay (cast_expression): Remove old hack that only
30437         allowed a limited set of types to be handled.  Now we take a
30438         unary_expression and we resolve to a type during semantic
30439         analysis.
30440
30441         Use the grammar productions from Rhys to handle casts (this is
30442         not complete like Rhys syntax yet, we fail to handle that corner
30443         case that C# has regarding (-x), but we will get there.
30444
30445 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30446
30447         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30448         field which is an array type.
30449
30450         * cs-parser.jay (declare_local_variables): Support array initialization too.
30451
30452         * typemanager.cs (MakeKey): Implement.
30453
30454         (everywhere): Use the above appropriately.
30455
30456         * cs-parser.jay (for_statement): Update for array initialization while
30457         declaring variables.
30458
30459         * ecore.cs : The error message was correct, it's the variable's names that
30460         were misleading ;-) Make the code more readable.
30461
30462         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30463         the correct type etc.
30464
30465         (ConvertExplicit): Handle Enum types by examining the underlying type.
30466
30467 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30468
30469         * parameter.cs (GetCallingConvention): Always return
30470         CallingConventions.Standard for now.
30471
30472 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30473
30474         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30475         and `r' after calling DoNumericPromotions.
30476
30477         * ecore.cs: Fix error message (the types were in the wrong order).
30478
30479         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30480         BindingFlags.Instance as well 
30481
30482         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30483         implicit int literal conversion in an empty cast so that we
30484         propagate the right type upstream.
30485
30486         (UnboxCast): new class used to unbox value types.
30487         (Expression.ConvertExplicit): Add explicit type conversions done
30488         by unboxing.
30489
30490         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30491         the target type before applying the implicit LongLiterals to ULong
30492         literal cast.
30493
30494 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30495
30496         * cs-parser.jay (for_statement): Reworked the way For works: now
30497         we declare manually any variables that are introduced in
30498         for_initializer to solve the problem of having out-of-band code
30499         emition (that is what got for broken).
30500
30501         (declaration_statement): Perform the actual variable declaration
30502         that used to be done in local_variable_declaration here.
30503
30504         (local_variable_declaration): Do not declare anything, just pass
30505         the information on a DictionaryEntry
30506
30507 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30508
30509         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30510         re-write of the logic to now make it recursive.
30511
30512         (UpdateIndices): Re-write accordingly.
30513
30514         Store element data in a separate ArrayData list in the above methods.
30515
30516         (MakeByteBlob): Implement to dump the array data into a byte array.
30517
30518 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30519
30520         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30521         into CheckIndices.
30522
30523         * constant.cs (Define): Implement.
30524
30525         (EmitConstant): Re-write fully.
30526
30527         Pass in location info.
30528
30529         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30530         respectively.
30531
30532         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30533         DictionaryEntry since we need location info too.
30534
30535         (constant_declaration): Update accordingly.
30536
30537         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30538         code into another method : UpdateIndices.
30539
30540 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30541
30542         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30543         some type checking etc.
30544
30545 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30546
30547         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30548         bits to provide dimension info if the user skips doing that.
30549
30550         Update second constructor to store the rank correctly.
30551
30552 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30553
30554         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30555         and try to implement.
30556
30557         * ../errors/cs0150.cs : Add.
30558
30559         * ../errors/cs0178.cs : Add.
30560
30561 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30562
30563         * statement.cs: Implement foreach on multi-dimensional arrays. 
30564
30565         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30566         name of the params argument.
30567
30568         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30569         initializing the array.
30570
30571         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30572         we can use this elsewhere.
30573
30574         * statement.cs: Finish implementation of foreach for single
30575         dimension arrays.
30576
30577         * cs-parser.jay: Use an out-of-band stack to pass information
30578         around, I wonder why I need this.
30579
30580         foreach_block: Make the new foreach_block the current_block.
30581
30582         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30583         function used to return a static Parameters structure.  Used for
30584         empty parameters, as those are created very frequently.
30585
30586         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30587
30588 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30589
30590         * interface.cs : Default modifier is private, not public. The
30591         make verify test passes again.
30592
30593 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30594
30595         * support.cs (ReflectionParameters): Fix logic to determine
30596         whether the last parameter is a params one. Test 9 passes again.
30597
30598         * delegate.cs (Populate): Register the builders we define with
30599         RegisterParameterForBuilder. Test 19 passes again.
30600
30601         * cs-parser.jay (property_declaration): Reference $6 instead
30602         of $$ to get at the location.
30603
30604         (indexer_declaration): Similar stuff.
30605
30606         (attribute): Ditto.
30607
30608         * class.cs (Property): Register parameters for the Get and Set methods
30609         if they exist. Test 23 passes again.
30610
30611         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30612         call to EmitArguments as we are sure there aren't any params arguments. 
30613         Test 32 passes again.
30614
30615         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30616         IndexOutOfRangeException. 
30617
30618         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30619         Test 33 now passes again.
30620
30621 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30622
30623         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30624         broke a bunch of things.  Will have to come up with a better way
30625         of tracking locations.
30626
30627         * statement.cs: Implemented foreach for single dimension arrays.
30628
30629 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30630
30631         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30632         an error.  This removes the lookup from the critical path.
30633
30634         * cs-parser.jay: Removed use of temporary_loc, which is completely
30635         broken. 
30636
30637 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30638
30639         * support.cs (ReflectionParameters.ParameterModifier): Report
30640         whether the argument is a PARAMS argument or not.
30641
30642         * class.cs: Set the attribute `ParamArrayAttribute' on the
30643         parameter argument.
30644
30645         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30646         and cons_param_array_attribute (ConstructorInfo for
30647         ParamArrayAttribute)., 
30648
30649         * codegen.cs: Emit the return using the `Return' statement, that
30650         way we can report the error correctly for missing return values. 
30651
30652         * class.cs (Method.Emit): Clean up.
30653
30654         * expression.cs (Argument.Resolve): Take another argument: the
30655         location where this argument is used.  Notice that this is not
30656         part of the "Argument" class as to reduce the size of the
30657         structure (we know the approximate location anyways).
30658
30659         Test if the argument is a variable-reference, if not, then
30660         complain with a 206.
30661
30662         (Argument.Emit): Emit addresses of variables.
30663
30664         (Argument.FullDesc): Simplify.
30665
30666         (Invocation.DoResolve): Update for Argument.Resolve.
30667
30668         (ElementAccess.DoResolve): ditto.
30669
30670         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30671         method should be virtual, as this method is always virtual.
30672
30673         (NewDelegate.DoResolve): Update for Argument.Resolve.
30674
30675         * class.cs (ConstructorInitializer.DoResolve): ditto.
30676
30677         * attribute.cs (Attribute.Resolve): ditto.
30678
30679 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30680
30681         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30682
30683         * expression.cs (ParameterReference): Drop IStackStorage and implement
30684         IAssignMethod instead. 
30685
30686         (LocalVariableReference): ditto.
30687
30688         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30689         IAssignMethod instead. 
30690
30691 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30692
30693         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30694         enumerations that are used in heavily used structures derive from
30695         byte in a laughable and pathetic attempt to reduce memory usage.
30696         This is the kind of pre-optimzations that you should not do at
30697         home without adult supervision.
30698
30699         * expression.cs (UnaryMutator): New class, used to handle ++ and
30700         -- separatedly from the other unary operators.  Cleans up the
30701         code, and kills the ExpressionStatement dependency in Unary.
30702
30703         (Unary): Removed `method' and `Arguments' from this class, making
30704         it smaller, and moving it all to SimpleCall, so I can reuse this
30705         code in other locations and avoid creating a lot of transient data
30706         strucutres when not required.
30707
30708         * cs-parser.jay: Adjust for new changes.
30709
30710 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30711
30712         * enum.cs (Enum.Populate): If there is a failure during
30713         definition, return
30714
30715         * cs-parser.jay (opt_enum_base): we used to catch type errors
30716         here, but this is really incorrect.  The type error should be
30717         catched during semantic analysis.
30718
30719 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30720
30721         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30722         current_local_parameters as expected since I, in my stupidity, had forgotten
30723         to do this :-)
30724
30725         * attribute.cs (GetValidPlaces): Fix stupid bug.
30726
30727         * class.cs (Method::Emit): Perform check on applicability of attributes.
30728
30729         (Constructor::Emit): Ditto.
30730
30731         (Field::Emit): Ditto.
30732
30733         (Field.Location): Store location information.
30734
30735         (Property, Event, Indexer, Operator): Ditto.
30736
30737         * cs-parser.jay (field_declaration): Pass in location for each field.
30738
30739         * ../errors/cs0592.cs : Add.
30740
30741 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30742
30743         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30744
30745         (InitCoreTypes): Update accordingly.
30746
30747         (RegisterAttrType, LookupAttr): Implement.
30748
30749         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30750         info about the same.
30751
30752         (Resolve): Update to populate the above as necessary.
30753
30754         (Error592): Helper.
30755
30756         (GetValidPlaces): Helper to the above.
30757
30758         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30759
30760         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30761
30762 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30763
30764         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30765
30766         * ../errors/cs0617.cs : Add.
30767
30768 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30769
30770         * enum.cs (Emit): Rename to Populate to be more consistent with what
30771         we expect it to do and when exactly it is called.
30772
30773         * class.cs, rootcontext.cs : Update accordingly.
30774
30775         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30776         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30777
30778         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30779
30780         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30781         of a fieldinfo using the above, when dealing with a FieldBuilder.
30782
30783 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30784
30785         * ../errors/cs0031.cs : Add.
30786
30787         * ../errors/cs1008.cs : Add.
30788
30789         * ../errrors/cs0543.cs : Add.
30790
30791         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30792         enum type.
30793
30794         (FindMembers): Implement.
30795
30796         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
30797         enums and delegates too.
30798
30799         (enum_types): Rename to builder_to_enum.
30800
30801         (delegate_types): Rename to builder_to_delegate.
30802
30803         * delegate.cs (FindMembers): Implement.
30804
30805 2001-11-09  Ravi Pratap  <ravi@ximian.com>
30806
30807         * typemanager.cs (IsEnumType): Implement.
30808
30809         * enum.cs (Emit): Re-write parts to account for the underlying type
30810         better and perform checking etc.
30811
30812         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
30813         of the underlying type.
30814
30815         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
30816         value
30817
30818         * enum.cs (error31): Helper to report error #31.
30819
30820         * cs-parser.jay (enum_declaration): Store location of each member too.
30821
30822         * enum.cs (member_to_location): New hashtable. 
30823
30824         (AddEnumMember): Update location hashtable.
30825
30826         (Emit): Use the location of each member while reporting errors.
30827
30828 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30829
30830         * cs-parser.jay: A for_initializer if is a
30831         local_variable_declaration really ammount to have an implicit
30832         block with the variable declaration and no initializer for for.
30833
30834         * statement.cs (For.Emit): Cope with null initializers.
30835
30836         This fixes the infinite loop on for initializers.
30837
30838 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
30839
30840         * enum.cs: More cleanup.
30841
30842         * ecore.cs: Remove dead code.
30843
30844         * class.cs (Property.Emit): More simplification.
30845         (Event.Emit): ditto.
30846
30847         Reworked to have less levels of indentation.
30848
30849 2001-11-08  Ravi Pratap  <ravi@ximian.com>
30850
30851         * class.cs (Property): Emit attributes.
30852
30853         (Field): Ditto.
30854
30855         (Event): Ditto.
30856
30857         (Indexer): Ditto.
30858
30859         (Operator): Ditto.
30860
30861         * enum.cs (Emit): Ditto.
30862
30863         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
30864         Enums too.
30865
30866         * class.cs (Field, Event, etc.): Move attribute generation into the
30867         Emit method everywhere.
30868
30869         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
30870         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
30871         as we had no way of defining nested enums !
30872
30873         * rootcontext.cs : Adjust code accordingly.
30874
30875         * typemanager.cs (AddEnumType): To keep track of enum types separately.
30876
30877 2001-11-07  Ravi Pratap  <ravi@ximian.com>
30878
30879         * expression.cs (EvalConstantExpression): Move into ecore.cs
30880
30881         * enum.cs (Enum): Rename some members and make them public and readonly
30882         according to our convention.
30883
30884         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
30885         nothing else.
30886
30887         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
30888
30889         (Enum::Emit): Write a simple version for now which doesn't try to compute
30890         expressions. I shall modify this to be more robust in just a while.
30891
30892         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
30893
30894         (TypeContainer::CloseType): Create the Enum types too.
30895
30896         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
30897
30898         * expression.cs (EvalConstantExpression): Get rid of completely.
30899
30900         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
30901         user-defined values and other cases.
30902
30903         (IsValidEnumLiteral): Helper function.
30904
30905         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
30906         out there in the case we had a literal FieldExpr.
30907
30908         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
30909
30910         (Literalize): Revamp a bit to take two arguments.
30911
30912         (EnumLiteral): New class which derives from Literal to wrap enum literals.
30913
30914 2001-11-06  Ravi Pratap  <ravi@ximian.com>
30915
30916         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
30917
30918         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
30919
30920         (Resolve): Use the above to ensure we have proper initializers.
30921
30922 2001-11-05  Ravi Pratap  <ravi@ximian.com>
30923
30924         * expression.cs (Expression::EvalConstantExpression): New method to 
30925         evaluate constant expressions.
30926
30927         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
30928
30929 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30930
30931         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
30932         in an array.
30933
30934         (Binary.ResolveOperator): Handle operator != (object a, object b)
30935         and operator == (object a, object b);
30936
30937         (Binary.DoNumericPromotions): Indicate whether the numeric
30938         promotion was possible.
30939
30940         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
30941         Implement.  
30942
30943         Made the ArrayAccess implement interface IAssignMethod instead of
30944         IStackStore as the order in which arguments are passed reflects
30945         this.
30946
30947         * assign.cs: Instead of using expr.ExprClass to select the way of
30948         assinging, probe for the IStackStore/IAssignMethod interfaces.
30949
30950         * typemanager.cs: Load InitializeArray definition.
30951
30952         * rootcontext.cs (RootContext.MakeStaticData): Used to define
30953         static data that can be used to initialize arrays. 
30954
30955 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
30956
30957         * expression.cs: Handle operator== and operator!= for booleans.
30958
30959         (Conditioal.Reduce): Implement reducer for the ?: operator.
30960
30961         (Conditional.Resolve): Implement dead code elimination.
30962
30963         (Binary.Resolve): Catch string literals and return a new
30964         concatenated string.
30965
30966         (Unary.Reduce): Implement reduction of unary expressions.
30967
30968         * ecore.cs: Split out the expression core handling here.
30969
30970         (Expression.Reduce): New method used to perform constant folding
30971         and CSE.  This is needed to support constant-expressions. 
30972
30973         * statement.cs (Statement.EmitBoolExpression): Pass true and false
30974         targets, and optimize for !x.
30975
30976 2001-11-04  Ravi Pratap  <ravi@ximian.com>
30977
30978         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
30979         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
30980         set custom atttributes.
30981
30982         * literal.cs (Literal::GetValue): New abstract method to return the actual
30983         value of the literal, cast as an object.
30984
30985         (*Literal): Implement GetValue method.
30986
30987         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
30988         expressions to the arraylist but objects of type Argument.
30989
30990         * class.cs (TypeContainer::Emit): Emit our attributes too.
30991
30992         (Method::Emit, Constructor::Emit): Ditto.
30993
30994         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
30995         to be ignoring earlier.
30996
30997 2001-11-03  Ravi Pratap  <ravi@ximian.com>
30998
30999         * attribute.cs (AttributeSection::Define): Implement to do the business
31000         of constructing a CustomAttributeBuilder.
31001
31002         (Attribute): New trivial class. Increases readability of code.  
31003
31004         * cs-parser.jay : Update accordingly.
31005
31006         (positional_argument_list, named_argument_list, named_argument): New rules
31007
31008         (attribute_arguments): Use the above so that we are more correct.
31009
31010 2001-11-02  Ravi Pratap  <ravi@ximian.com>
31011
31012         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
31013         to perform all checks for a method with a params parameter.
31014
31015         (Invocation::OverloadResolve): Update to use the above method and therefore
31016         cope correctly with params method invocations.
31017
31018         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
31019         params too.
31020
31021         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
31022         constructors in our parent too because we can't afford to miss out on 
31023         protected ones ;-)
31024
31025         * attribute.cs (AttributeSection): New name for the class Attribute
31026
31027         Other trivial changes to improve readability.
31028
31029         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
31030         use the new class names.
31031
31032 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31033
31034         * class.cs (Method::Define): Complete definition for params types too
31035
31036         (Indexer::Define): Ditto.
31037
31038         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
31039         Cope everywhere with a request for info about the array parameter.
31040
31041 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31042
31043         * tree.cs (RecordNamespace): Fix up to check for the correct key.
31044
31045         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
31046         local_variable_type to extract the string corresponding to the type.
31047
31048         (local_variable_type): Fixup the action to use the new helper method.
31049
31050         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
31051         go.
31052
31053         * expression.cs : Clean out code which uses the above.
31054
31055 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31056
31057         * typemanager.cs (RegisterMethod): Check if we already have an existing key
31058         and bale out if necessary by returning a false.
31059
31060         (RegisterProperty): Ditto.
31061
31062         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
31063         and print out appropriate error messages.
31064
31065         * interface.cs (everywhere): Ditto.
31066
31067         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
31068         location to constructor.
31069
31070         * class.cs (Property, Event, Indexer): Update accordingly.
31071
31072         * ../errors/cs111.cs : Added.
31073
31074         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
31075         of a method, as laid down by the spec.
31076
31077         (Invocation::OverloadResolve): Use the above method.
31078
31079 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31080
31081         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
31082         now take a TypeContainer and a Parameters object.
31083
31084         (ParameterData): Modify return type of ParameterModifier method to be 
31085         Parameter.Modifier and not a string.
31086
31087         (ReflectionParameters, InternalParameters): Update accordingly.
31088
31089         * expression.cs (Argument::GetParameterModifier): Same here.
31090
31091         * support.cs (InternalParameters::ParameterType): Find a better way of determining
31092         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
31093         symbol in it at all so maybe this is only for now.
31094
31095 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31096
31097         * support.cs (InternalParameters): Constructor now takes an extra argument 
31098         which is the actual Parameters class.
31099
31100         (ParameterDesc): Update to provide info on ref/out modifiers.
31101
31102         * class.cs (everywhere): Update call to InternalParameters to pass in
31103         the second argument too.
31104
31105         * support.cs (ParameterData): Add ParameterModifier, which is a method 
31106         to return the modifier info [ref/out etc]
31107
31108         (InternalParameters, ReflectionParameters): Implement the above.
31109
31110         * expression.cs (Argument::ParameterModifier): Similar function to return
31111         info about the argument's modifiers.
31112
31113         (Invocation::OverloadResolve): Update to take into account matching modifiers 
31114         too.
31115
31116         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
31117         a new SetFormalParameters object which we pass to InternalParameters.
31118
31119 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31120
31121         * expression.cs (NewArray): Merge into the ArrayCreation class.
31122
31123 2001-10-29  Ravi Pratap  <ravi@ximian.com>
31124
31125         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
31126         NewUserdefinedArray into one as there wasn't much of a use in having
31127         two separate ones.
31128
31129         * expression.cs (Argument): Change field's name to ArgType from Type.
31130
31131         (Type): New readonly property which returns the proper type, taking into 
31132         account ref/out modifiers.
31133
31134         (everywhere): Adjust code accordingly for the above.
31135
31136         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
31137         whether we are emitting for a ref or out parameter.
31138
31139         * expression.cs (Argument::Emit): Use the above field to set the state.
31140
31141         (LocalVariableReference::Emit): Update to honour the flag and emit the
31142         right stuff.
31143
31144         * parameter.cs (Attributes): Set the correct flags for ref parameters.
31145
31146         * expression.cs (Argument::FullDesc): New function to provide a full desc.
31147
31148         * support.cs (ParameterData): Add method ParameterDesc to the interface.
31149
31150         (ReflectionParameters, InternalParameters): Implement the above method.
31151
31152         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
31153         reporting errors.
31154
31155         (Invocation::FullMethodDesc): Ditto. 
31156
31157 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
31158
31159         * cs-parser.jay: Add extra production for the second form of array
31160         creation. 
31161
31162         * expression.cs (ArrayCreation): Update to reflect the above
31163         change. 
31164
31165         * Small changes to prepare for Array initialization.
31166
31167 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
31168
31169         * typemanager.cs (ImplementsInterface): interface might be null;
31170         Deal with this problem;
31171
31172         Also, we do store negative hits on the cache (null values), so use
31173         this instead of calling t.GetInterfaces on the type everytime.
31174
31175 2001-10-28  Ravi Pratap  <ravi@ximian.com>
31176
31177         * typemanager.cs (IsBuiltinType): New method to help determine the same.
31178
31179         * expression.cs (New::DoResolve): Get rid of array creation code and instead
31180         split functionality out into different classes.
31181
31182         (New::FormArrayType): Move into NewBuiltinArray.
31183
31184         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
31185         quite useless.
31186
31187         (NewBuiltinArray): New class to handle creation of built-in arrays.
31188
31189         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
31190         account creation of one-dimensional arrays.
31191
31192         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
31193
31194         (NewUserdefinedArray::DoResolve): Implement.
31195
31196         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
31197
31198         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
31199         we maintain inside the TypeManager. This is necessary to perform lookups on the
31200         module builder.
31201
31202         (LookupType): Update to perform GetType on the module builders too.     
31203
31204         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31205
31206         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31207
31208 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31209
31210         * expression.cs (New::DoResolve): Implement guts of array creation.
31211
31212         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31213
31214 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31215
31216         * expression.cs: Fix bug I introduced lsat night that broke
31217         Delegates. 
31218
31219         (Expression.Resolve): Report a 246 error (can not resolve name)
31220         if we find a SimpleName in the stream.
31221
31222         (Expression.ResolveLValue): Ditto.
31223
31224         (Expression.ResolveWithSimpleName): This function is a variant of
31225         ResolveName, this one allows SimpleNames to be returned without a
31226         warning.  The only consumer of SimpleNames is MemberAccess
31227
31228 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31229
31230         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31231         might arrive here.  I have my doubts that this is correct.
31232
31233         * statement.cs (Lock): Implement lock statement.
31234
31235         * cs-parser.jay: Small fixes to support `lock' and `using'
31236
31237         * cs-tokenizer.cs: Remove extra space
31238
31239         * driver.cs: New flag --checked, allows to turn on integer math
31240         checking. 
31241
31242         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31243         Threading.Monitor.Exit 
31244
31245 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31246
31247         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31248         Expression Class to be IndexerAccess.
31249
31250         Notice that Indexer::DoResolve sets the eclass to Value.
31251
31252 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31253
31254         * class.cs (TypeContainer::Emit): Emit code for indexers.
31255
31256         * assign.cs (IAssignMethod): New interface implemented by Indexers
31257         and Properties for handling assignment.
31258
31259         (Assign::Emit): Simplify and reuse code. 
31260
31261         * expression.cs (IndexerAccess, PropertyExpr): Implement
31262         IAssignMethod, clean up old code. 
31263
31264 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31265
31266         * typemanager.cs (ImplementsInterface): New method to determine if a type
31267         implements a given interface. Provides a nice cache too.
31268
31269         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31270         method.
31271
31272         (ConvertReferenceExplicit): Ditto.
31273
31274         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31275         various methods, with correct names etc.
31276
31277         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31278         Operator.UnaryNegation.
31279
31280         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31281         we have a unary plus or minus operator.
31282
31283         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31284         UnaryMinus.
31285
31286         * everywhere : update accordingly.
31287
31288         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31289         respectively.
31290
31291         * class.cs (Method::Define): For the case where we are implementing a method
31292         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31293         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31294
31295 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31296
31297         * interface.cs (FindMembers): Implement to work around S.R.E
31298         lameness.
31299
31300         * typemanager.cs (IsInterfaceType): Implement.
31301
31302         (FindMembers): Update to handle interface types too.
31303
31304         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31305         use IsAssignableFrom as that is not correct - it doesn't work.
31306
31307         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31308         and accordingly override EmitStatement.
31309
31310         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31311         using the correct logic :-)
31312
31313 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31314
31315         * ../errors/cs-11.cs : Add to demonstrate error -11 
31316
31317 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31318
31319         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31320         then pass this as a hint to ResolveLValue.
31321
31322         * expression.cs (FieldExpr): Add Location information
31323
31324         (FieldExpr::LValueResolve): Report assignment to readonly
31325         variable. 
31326
31327         (Expression::ExprClassFromMemberInfo): Pass location information.
31328
31329         (Expression::ResolveLValue): Add new method that resolves an
31330         LValue. 
31331
31332         (Expression::DoResolveLValue): Default invocation calls
31333         DoResolve. 
31334
31335         (Indexers): New class used to keep track of indexers in a given
31336         Type. 
31337
31338         (IStackStore): Renamed from LValue, as it did not really describe
31339         what this did.  Also ResolveLValue is gone from this interface and
31340         now is part of Expression.
31341
31342         (ElementAccess): Depending on the element access type
31343
31344         * typemanager.cs: Add `indexer_name_type' as a Core type
31345         (System.Runtime.CompilerServices.IndexerNameAttribute)
31346
31347         * statement.cs (Goto): Take a location.
31348
31349 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31350
31351         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31352         if two delegates are compatible.
31353
31354         (NewDelegate::DoResolve): Update to take care of the case when
31355         we instantiate a delegate from another delegate.
31356
31357         * typemanager.cs (FindMembers): Don't even try to look up members
31358         of Delegate types for now.
31359
31360 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31361
31362         * delegate.cs (NewDelegate): New class to take care of delegate
31363         instantiation.
31364
31365         * expression.cs (New): Split the delegate related code out into 
31366         the NewDelegate class.
31367
31368         * delegate.cs (DelegateInvocation): New class to handle delegate 
31369         invocation.
31370
31371         * expression.cs (Invocation): Split out delegate related code into
31372         the DelegateInvocation class.
31373
31374 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31375
31376         * expression.cs (New::DoResolve): Implement delegate creation fully
31377         and according to the spec.
31378
31379         (New::DoEmit): Update to handle delegates differently.
31380
31381         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31382         because of which we were printing out arguments in reverse order !
31383
31384         * delegate.cs (VerifyMethod): Implement to check if the given method
31385         matches the delegate.
31386
31387         (FullDelegateDesc): Implement.
31388
31389         (VerifyApplicability): Implement.
31390
31391         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31392         delegate invocations too.
31393
31394         (Invocation::Emit): Ditto.
31395
31396         * ../errors/cs1593.cs : Added.
31397
31398         * ../errors/cs1594.cs : Added.
31399
31400         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31401
31402 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31403
31404         * typemanager.cs (intptr_type): Core type for System.IntPtr
31405
31406         (InitCoreTypes): Update for the same.
31407
31408         (iasyncresult_type, asynccallback_type): Ditto.
31409
31410         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31411         correct.
31412
31413         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31414         too.
31415
31416         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31417         the builders for the 4 members of a delegate type :-)
31418
31419         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31420         type.
31421
31422         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31423
31424         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31425
31426 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31427
31428         * statement.cs (Break::Emit): Implement.   
31429         (Continue::Emit): Implement.
31430
31431         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31432         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31433         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31434         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31435         end loop
31436
31437         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31438         properties that track the label for the current loop (begin of the
31439         loop and end of the loop).
31440
31441 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31442
31443         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31444         use of emitting anything at all.
31445
31446         * class.cs, rootcontext.cs : Get rid of calls to the same.
31447
31448         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31449
31450         (Populate): Define the constructor correctly and set the implementation
31451         attributes.
31452
31453         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31454         have been defined.
31455
31456         (AddDelegateType): Implement.
31457
31458         (IsDelegateType): Implement helper method.
31459
31460         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31461
31462         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31463         and accordingly handle it.
31464
31465         * delegate.cs (Populate): Take TypeContainer argument.
31466         Implement bits to define the Invoke method. However, I still haven't figured out
31467         how to take care of the native int bit :-(
31468
31469         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31470         Qualify the name of the delegate, not its return type !
31471
31472         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31473         conversion.
31474
31475         (StandardConversionExists): Checking for array types turns out to be recursive.
31476
31477         (ConvertReferenceExplicit): Implement array conversion.
31478
31479         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31480
31481 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31482
31483         * cs-parser.jay (delegate_declaration): Store the fully qualified
31484         name as it is a type declaration.
31485
31486         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31487         readonly.
31488
31489         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31490         as TypeContainer::DefineType.
31491
31492         (Populate): Method in which all the definition of the various methods (Invoke)
31493         etc is done.
31494
31495         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31496         see.
31497
31498         (CloseDelegate): Finally creates the delegate.
31499
31500         * class.cs (TypeContainer::DefineType): Update to define delegates.
31501         (Populate, Emit and CloseType): Do the same thing here too.
31502
31503         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31504         delegates in all these operations.
31505
31506 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31507
31508         * expression.cs: LocalTemporary: a new expression used to
31509         reference a temporary that has been created.
31510
31511         * assign.cs: Handle PropertyAccess back here, so that we can
31512         provide the proper semantic access to properties.
31513
31514         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31515         a few more explicit conversions. 
31516
31517         * modifiers.cs: `NEW' modifier maps to HideBySig.
31518
31519         * expression.cs (PropertyExpr): Make this into an
31520         ExpressionStatement, and support the EmitStatement code path. 
31521
31522         Perform get/set error checking, clean up the interface.
31523
31524         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31525         them into toplevel access objects.
31526
31527 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31528
31529         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31530         SRE.
31531
31532         * typemanager.cs: Keep track here of our PropertyBuilders again to
31533         work around lameness in SRE.
31534
31535 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31536
31537         * expression.cs (LValue::LValueResolve): New method in the
31538         interface, used to perform a second resolution pass for LValues. 
31539
31540         (This::DoResolve): Catch the use of this in static methods.
31541
31542         (This::LValueResolve): Implement.
31543
31544         (This::Store): Remove warning, assigning to `this' in structures
31545         is 
31546
31547         (Invocation::Emit): Deal with invocation of
31548         methods on value types.  We need to pass the address to structure
31549         methods rather than the object itself.  (The equivalent code to
31550         emit "this" for structures leaves the entire structure on the
31551         stack instead of a pointer to it). 
31552
31553         (ParameterReference::DoResolve): Compute the real index for the
31554         argument based on whether the method takes or not a `this' pointer
31555         (ie, the method is static).
31556
31557         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31558         value types returned from functions when we need to invoke a
31559         method on the sturcture.
31560
31561
31562 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31563
31564         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31565         defining the type in the Modulebuilder or Typebuilder. This is to take
31566         care of nested types which need to be defined on the TypeBuilder using
31567         DefineNestedMethod.
31568
31569         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31570         methods in RootContext, only ported to be part of TypeContainer.
31571
31572         (TypeContainer::GetInterfaceOrClass): Ditto.
31573
31574         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31575
31576         * interface.cs (Interface::DefineInterface): New method. Does exactly
31577         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31578         too.
31579
31580         (Interface::GetInterfaces): Move from RootContext here and port.
31581
31582         (Interface::GetInterfaceByName): Same here.
31583
31584         * rootcontext.cs (ResolveTree): Re-write.
31585
31586         (PopulateTypes): Re-write.
31587
31588         * class.cs (TypeContainer::Populate): Populate nested types too.
31589         (TypeContainer::Emit): Emit nested members too.
31590
31591         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31592         instead just use the name argument passed in as it is already fully
31593         qualified.
31594
31595         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31596         to TypeContainer mapping to see if a type is user-defined.
31597
31598         * class.cs (TypeContainer::CloseType): Implement. 
31599
31600         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31601         the default constructor.
31602
31603         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31604         twice.
31605
31606         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31607
31608         * interface.cs (CloseType): Create the type here.
31609
31610         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31611         the hierarchy.
31612
31613         Remove all the methods which are now in TypeContainer.
31614
31615 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31616
31617         * delegate.cs (Define): Re-write bits to define the delegate
31618         correctly.
31619
31620 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31621
31622         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31623
31624         * expression.cs (ImplicitReferenceConversion): handle null as well
31625         as a source to convert to any reference type.
31626
31627         * statement.cs (Return): Perform any implicit conversions to
31628         expected return type.  
31629
31630         Validate use of return statement.  
31631
31632         * codegen.cs (EmitContext): Pass the expected return type here.
31633
31634         * class.cs (Method, Constructor, Property): Pass expected return
31635         type to EmitContext.
31636
31637 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31638
31639         * expression.cs: Make DoResolve take an EmitContext instead of a
31640         TypeContainer.
31641
31642         Replaced `l' and `location' for `loc', for consistency.
31643
31644         (Error, Warning): Remove unneeded Tc argument.
31645
31646         * assign.cs, literal.cs, constant.cs: Update to new calling
31647         convention. 
31648
31649         * codegen.cs: EmitContext now contains a flag indicating whether
31650         code is being generated in a static method or not.
31651
31652         * cs-parser.jay: DecomposeQI, new function that replaces the old
31653         QualifiedIdentifier.  Now we always decompose the assembled
31654         strings from qualified_identifier productions into a group of
31655         memberaccesses.
31656
31657 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31658
31659         * rootcontext.cs: Deal with field-less struct types correctly now
31660         by passing the size option to Define Type.
31661
31662         * class.cs: Removed hack that created one static field. 
31663
31664 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31665
31666         * statement.cs: Moved most of the code generation here. 
31667
31668 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31669
31670         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31671         seem very right.
31672
31673         (ElementAccess): Remove useless bits for now - keep checks as the spec
31674         says.
31675
31676 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31677
31678         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31679         and start performing checks according to the spec.
31680
31681 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31682
31683         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31684         rank_specifiers instead.
31685
31686         (rank_specifiers): Change the order in which the rank specifiers are stored
31687
31688         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31689
31690         * expression.cs (ElementAccess): Implement the LValue interface too.
31691
31692 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31693
31694         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31695         except that user defined conversions are not included.
31696
31697         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31698         perform the conversion of the return type, if necessary.
31699
31700         (New::DoResolve): Check whether we are creating an array or an object
31701         and accordingly do the needful.
31702
31703         (New::Emit): Same here.
31704
31705         (New::DoResolve): Implement guts of array creation.
31706
31707         (New::FormLookupType): Helper function.
31708
31709 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31710
31711         * codegen.cs: Removed most of the code generation here, and move the
31712         corresponding code generation bits to the statement classes. 
31713
31714         Added support for try/catch/finalize and throw.
31715
31716         * cs-parser.jay: Added support for try/catch/finalize.
31717
31718         * class.cs: Catch static methods having the flags override,
31719         virtual or abstract.
31720
31721         * expression.cs (UserCast): This user cast was not really doing
31722         what it was supposed to do.  Which is to be born in fully resolved
31723         state.  Parts of the resolution were being performed at Emit time! 
31724
31725         Fixed this code.
31726
31727 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31728
31729         * expression.cs: Implicity convert the result from UserCast.
31730
31731 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31732
31733         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31734         prevented it from working correctly. 
31735
31736         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31737         merely ConvertImplicit.
31738
31739 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31740
31741         * typemanager.cs: Make the LookupTypeContainer function static,
31742         and not per-instance.  
31743
31744         * class.cs: Make static FindMembers (the one that takes a Type
31745         argument). 
31746
31747         * codegen.cs: Add EmitForeach here.
31748
31749         * cs-parser.jay: Make foreach a toplevel object instead of the
31750         inline expansion, as we need to perform semantic analysis on it. 
31751
31752 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31753
31754         * expression.cs (Expression::ImplicitUserConversion): Rename to
31755         UserDefinedConversion.
31756
31757         (Expression::UserDefinedConversion): Take an extra argument specifying 
31758         whether we look for explicit user conversions too.
31759
31760         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31761
31762         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31763
31764         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31765         with the appropriate arguments.
31766
31767         * cs-parser.jay (cast_expression): Record location too.
31768
31769         * expression.cs (Cast): Record location info.
31770
31771         (Expression::ConvertExplicit): Take location argument.
31772
31773         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31774         to determine if we are doing explicit conversions.
31775
31776         (UserCast::Emit): Update accordingly.
31777
31778         (Expression::ConvertExplicit): Report an error if everything fails.
31779
31780         * ../errors/cs0030.cs : Add.
31781
31782 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31783
31784         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31785         virtual and newslot bits. 
31786
31787         * class.cs (TypeContainer::RegisterRequiredImplementations):
31788         Record methods we need.
31789
31790         (TypeContainer::MakeKey): Helper function to make keys for
31791         MethodBases, since the Methodbase key is useless.
31792
31793         (TypeContainer::Populate): Call RegisterRequiredImplementations
31794         before defining the methods.   
31795
31796         Create a mapping for method_builders_to_methods ahead of time
31797         instead of inside a tight loop.
31798
31799         (::RequireMethods):  Accept an object as the data to set into the
31800         hashtable so we can report interface vs abstract method mismatch.
31801
31802 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31803
31804         * report.cs: Make all of it static.
31805
31806         * rootcontext.cs: Drop object_type and value_type computations, as
31807         we have those in the TypeManager anyways.
31808
31809         Drop report instance variable too, now it is a global.
31810
31811         * driver.cs: Use try/catch on command line handling.
31812
31813         Add --probe option to debug the error reporting system with a test
31814         suite. 
31815
31816         * report.cs: Add support for exiting program when a probe
31817         condition is reached.
31818
31819 2001-10-03  Ravi Pratap  <ravi@ximian.com>
31820
31821         * expression.cs (Binary::DoNumericPromotions): Fix the case when
31822         we do a forcible conversion regardless of type, to check if 
31823         ForceConversion returns a null.
31824
31825         (Binary::error19): Use location to report error.
31826
31827         (Unary::error23): Use location here too.
31828
31829         * ../errors/cs0019.cs : Check in.
31830
31831         * ../errors/cs0023.cs : Check in.
31832
31833         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
31834         case of a non-null MethodInfo object with a length of 0 !
31835
31836         (Binary::ResolveOperator): Flag error if overload resolution fails to find
31837         an applicable member - according to the spec :-)
31838         Also fix logic to find members in base types.
31839
31840         (Unary::ResolveOperator): Same here.
31841
31842         (Unary::report23): Change name to error23 and make first argument a TypeContainer
31843         as I was getting thoroughly confused between this and error19 :-)
31844
31845         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
31846         (::FindMostEncompassedType): Implement.
31847         (::FindMostEncompassingType): Implement.
31848         (::StandardConversionExists): Implement.
31849
31850         (UserImplicitCast): Re-vamp. We now need info about most specific
31851         source and target types so that we can do the necessary conversions.
31852
31853         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
31854         mathematical union with no duplicates.
31855
31856 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31857
31858         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
31859         in order from base classes to child classes, so that we can in
31860         child classes look up in our parent for method names and
31861         attributes (required for handling abstract, virtual, new, override
31862         constructs: we need to instrospect our base class, and if we dont
31863         populate the classes in order, the introspection might be
31864         incorrect.  For example, a method could query its parent before
31865         the parent has any methods and would determine that the parent has
31866         no abstract methods (while it could have had them)).
31867
31868         (RootContext::CreateType): Record the order in which we define the
31869         classes.
31870
31871 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
31872
31873         * class.cs (TypeContainer::Populate): Also method definitions can
31874         fail now, keep track of this.
31875
31876         (TypeContainer::FindMembers): Implement support for
31877         DeclaredOnly/noDeclaredOnly flag.
31878
31879         (Constructor::Emit) Return the ConstructorBuilder.
31880
31881         (Method::Emit) Return the MethodBuilder. 
31882         Check for abstract or virtual methods to be public.
31883
31884         * rootcontext.cs (RootContext::CreateType): Register all the
31885         abstract methods required for the class to be complete and the
31886         interface methods that must be implemented. 
31887
31888         * cs-parser.jay: Report error 501 (method requires body if it is
31889         not marked abstract or extern).
31890
31891         * expression.cs (TypeOf::Emit): Implement.
31892
31893         * typemanager.cs: runtime_handle_type, new global type.
31894
31895         * class.cs (Property::Emit): Generate code for properties.
31896
31897 2001-10-02  Ravi Pratap  <ravi@ximian.com>
31898
31899         * expression.cs (Unary::ResolveOperator): Find operators on base type
31900         too - we now conform exactly to the spec.
31901
31902         (Binary::ResolveOperator): Same here.
31903
31904         * class.cs (Operator::Define): Fix minor quirk in the tests.
31905
31906         * ../errors/cs0215.cs : Added.
31907
31908         * ../errors/cs0556.cs : Added.
31909
31910         * ../errors/cs0555.cs : Added.
31911
31912 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31913
31914         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
31915         single integer which is really efficient
31916
31917 2001-10-01  Ravi Pratap  <ravi@ximian.com>
31918
31919         *  expression.cs (Expression::ImplicitUserConversion): Use location
31920         even in the case when we are examining True operators.
31921  
31922         * class.cs (Operator::Define): Perform extensive checks to conform
31923         with the rules for operator overloading in the spec.
31924
31925         * expression.cs (Expression::ImplicitReferenceConversion): Implement
31926         some of the other conversions mentioned in the spec.
31927
31928         * typemanager.cs (array_type): New static member for the System.Array built-in
31929         type.
31930
31931         (cloneable_interface): For System.ICloneable interface.
31932
31933         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
31934         we start resolving the tree and populating types.
31935
31936         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
31937  
31938 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31939
31940         * expression.cs (Expression::ExprClassFromMemberInfo,
31941         Expression::Literalize): Create literal expressions from
31942         FieldInfos which are literals.
31943
31944         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
31945         type casts, because they were wrong.  The test suite in tests
31946         caught these ones.
31947
31948         (ImplicitNumericConversion): ushort to ulong requires a widening
31949         cast. 
31950
31951         Int32 constant to long requires widening cast as well.
31952
31953         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
31954         for integers because the type on the stack is not i4.
31955
31956 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
31957
31958         * expression.cs (report118): require location argument. 
31959
31960         * parameter.cs: Do not dereference potential null value.
31961
31962         * class.cs: Catch methods that lack the `new' keyword when
31963         overriding a name.  Report warnings when `new' is used without
31964         anything being there to override.
31965
31966         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
31967
31968         * class.cs: Only add constructor to hashtable if it is non-null
31969         (as now constructors can fail on define).
31970
31971         (TypeManager, Class, Struct): Take location arguments.
31972
31973         Catch field instance initialization in structs as errors.
31974
31975         accepting_filter: a new filter for FindMembers that is static so
31976         that we dont create an instance per invocation.
31977
31978         (Constructor::Define): Catch errors where a struct constructor is
31979         parameterless 
31980
31981         * cs-parser.jay: Pass location information for various new
31982         constructs. 
31983
31984         * delegate.cs (Delegate): take a location argument.
31985
31986         * driver.cs: Do not call EmitCode if there were problesm in the
31987         Definition of the types, as many Builders wont be there. 
31988
31989         * decl.cs (Decl::Decl): Require a location argument.
31990
31991         * cs-tokenizer.cs: Handle properly hex constants that can not fit
31992         into integers, and find the most appropiate integer for it.
31993
31994         * literal.cs: Implement ULongLiteral.
31995
31996         * rootcontext.cs: Provide better information about the location of
31997         failure when CreateType fails.
31998
31999 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
32000
32001         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
32002         as well.
32003
32004         * expression.cs (Binary::CheckShiftArguments): Add missing type
32005         computation.
32006         (Binary::ResolveOperator): Add type to the logical and and logical
32007         or, Bitwise And/Or and Exclusive Or code paths, it was missing
32008         before.
32009
32010         (Binary::DoNumericPromotions): In the case where either argument
32011         is ulong (and most signed types combined with ulong cause an
32012         error) perform implicit integer constant conversions as well.
32013
32014 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32015
32016         * expression.cs (UserImplicitCast): Method should always be
32017         non-null. 
32018         (Invocation::BetterConversion): Simplified test for IntLiteral.
32019
32020         (Expression::ImplicitNumericConversion): Split this routine out.
32021         Put the code that performs implicit constant integer conversions
32022         here. 
32023
32024         (Expression::Resolve): Become a wrapper around DoResolve so we can
32025         check eclass and type being set after resolve.
32026
32027         (Invocation::Badness): Remove this dead function
32028
32029         (Binary::ResolveOperator): Do not compute the expensive argumnets
32030         unless we have a union for it.
32031
32032         (Probe::Emit): Is needs to do an isinst and then
32033         compare against null.
32034
32035         (::CanConvert): Added Location argument.  If the Location argument
32036         is null (Location.Null), then we do not report errors.  This is
32037         used by the `probe' mechanism of the Explicit conversion.  We do
32038         not want to generate an error for something that the user
32039         explicitly requested to be casted.  But the pipeline for an
32040         explicit cast first tests for potential implicit casts.
32041
32042         So for now, if the Location is null, it means `Probe only' to
32043         avoid adding another argument.   Might have to revise this
32044         strategy later.
32045
32046         (ClassCast): New class used to type cast objects into arbitrary
32047         classes (used in Explicit Reference Conversions).
32048
32049         Implement `as' as well.
32050
32051         Reverted all the patches from Ravi below: they were broken:
32052
32053                 * The use of `level' as a mechanism to stop recursive
32054                   invocations is wrong.  That was there just to catch the
32055                   bug with a strack trace but not as a way of addressing
32056                   the problem.
32057
32058                   To fix the problem we have to *understand* what is going
32059                   on and the interactions and come up with a plan, not
32060                   just get things going.
32061
32062                 * The use of the type conversion cache that I proposed
32063                   last night had an open topic: How does this work across
32064                   protection domains.  A user defined conversion might not
32065                   be public in the location where we are applying the
32066                   conversion, a different conversion might be selected
32067                   (ie, private A->B (better) but public B->A (worse),
32068                   inside A, A->B applies, but outside it, B->A will
32069                   apply).
32070
32071                 * On top of that (ie, even if the above is solved),
32072                   conversions in a cache need to be abstract.  Ie, `To
32073                   convert from an Int to a Short use an OpcodeCast', not
32074                   `To convert from an Int to a Short use the OpcodeCast on
32075                   the variable 5' (which is what this patch was doing).
32076
32077 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32078
32079         * expression.cs (Invocation::ConversionExists): Re-write to use
32080         the conversion cache
32081
32082         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
32083         cache all conversions done, not just user-defined ones.
32084
32085         (Invocation::BetterConversion): The real culprit. Use ConversionExists
32086         to determine if a conversion exists instead of acutually trying to 
32087         perform the conversion. It's faster too.
32088
32089         (Expression::ConvertExplicit): Modify to use ConversionExists to check
32090         and only then attempt the implicit conversion.
32091
32092 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32093
32094         * expression.cs (ConvertImplicit): Use a cache for conversions
32095         already found. Check level of recursion and bail out if necessary.
32096
32097 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32098
32099         * typemanager.cs (string_concat_string_string, string_concat_object_object):
32100         Export standard methods that we expect for string operations.
32101
32102         * statement.cs (Block::UsageWarning): Track usage of variables and
32103         report the errors for not used variables.
32104
32105         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
32106         operator. 
32107
32108 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32109
32110         * codegen.cs: remove unnneded code 
32111
32112         * expression.cs: Removed BuiltinTypeAccess class
32113
32114         Fix the order in which implicit conversions are
32115         done.  
32116
32117         The previous fixed dropped support for boxed conversions (adding a
32118         test to the test suite now)
32119
32120         (UserImplicitCast::CanConvert): Remove test for source being null,
32121         that code is broken.  We should not feed a null to begin with, if
32122         we do, then we should track the bug where the problem originates
32123         and not try to cover it up here.
32124
32125         Return a resolved expression of type UserImplicitCast on success
32126         rather than true/false.  Ravi: this is what I was talking about,
32127         the pattern is to use a static method as a "constructor" for
32128         objects. 
32129
32130         Also, do not create arguments until the very last minute,
32131         otherwise we always create the arguments even for lookups that
32132         will never be performed. 
32133
32134         (UserImplicitCast::Resolve): Eliminate, objects of type
32135         UserImplicitCast are born in a fully resolved state. 
32136
32137         * typemanager.cs (InitCoreTypes): Init also value_type
32138         (System.ValueType). 
32139
32140         * expression.cs (Cast::Resolve): First resolve the child expression.
32141
32142         (LValue): Add new method AddressOf to be used by
32143         the `&' operator.  
32144
32145         Change the argument of Store to take an EmitContext instead of an
32146         ILGenerator, because things like FieldExpr need to be able to call
32147         their children expression to generate the instance code. 
32148
32149         (Expression::Error, Expression::Warning): Sugar functions for
32150         reporting errors.
32151
32152         (Expression::MemberLookup): Accept a TypeContainer instead of a
32153         Report as the first argument.
32154
32155         (Expression::ResolvePrimary): Killed.  I still want to improve
32156         this as currently the code is just not right.
32157
32158         (Expression::ResolveMemberAccess): Simplify, but it is still
32159         wrong. 
32160
32161         (Unary::Resolve): Catch errors in AddressOf operators.
32162
32163         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
32164         index to a byte for the short-version, or the compiler will choose
32165         the wrong Emit call, which generates the wrong data.
32166
32167         (ParameterReference::Emit, ::Store): same.
32168
32169         (FieldExpr::AddressOf): Implement.
32170
32171         * typemanager.cs: TypeManager: made public variable instead of
32172         property.
32173
32174         * driver.cs: document --fatal.
32175
32176         * report.cs (ErrorMessage, WarningMessage): new names for the old
32177         Error and Warning classes.
32178
32179         * cs-parser.jay (member_access): Turn built-in access to types
32180         into a normal simplename
32181
32182 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32183
32184         * expression.cs (Invocation::BetterConversion): Fix to cope
32185         with q being null, since this was introducing a bug.
32186
32187         * expression.cs (ConvertImplicit): Do built-in conversions first.
32188
32189 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32190
32191         * expression.cs (UserImplicitCast::Resolve): Fix bug.
32192
32193 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32194
32195         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
32196         I had introduced long ago (what's new ?).
32197
32198         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
32199         the work of all the checking. 
32200         (ConvertImplicit): Call CanConvert and only then create object if necessary.
32201         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
32202
32203         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32204         that is the right way. 
32205
32206         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32207         overloading resolution. Use everywhere instead of cutting and pasting code.
32208
32209         (Binary::ResolveOperator): Use MakeUnionSet.
32210
32211         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32212         we have to convert to bool types. Not complete yet.
32213
32214 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32215
32216         * typemanager.cs (TypeManager::CSharpName): support ushort.
32217
32218         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32219         to provide an expression that performsn an implicit constant int
32220         conversion (section 6.1.6).
32221         (Expression::ConvertImplicitRequired): Reworked to include
32222         implicit constant expression conversions.
32223
32224         (Expression::ConvertNumericExplicit): Finished.
32225
32226         (Invocation::Emit): If InstanceExpression is null, then it means
32227         that we perform a call on this.
32228
32229 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32230
32231         * expression.cs (Unary::Emit): Remove some dead code.
32232         (Probe): Implement Resolve and Emit for `is'.
32233         (Expression::ConvertImplicitRequired): Attempt to do constant
32234         expression conversions here.  Maybe should be moved to
32235         ConvertImplicit, but I am not sure.
32236         (Expression::ImplicitLongConstantConversionPossible,
32237         Expression::ImplicitIntConstantConversionPossible): New functions
32238         that tell whether is it possible to apply an implicit constant
32239         expression conversion.
32240
32241         (ConvertNumericExplicit): Started work on explicit numeric
32242         conversions.
32243
32244         * cs-parser.jay: Update operator constants.
32245
32246         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32247         (Parameters::GetSignature): Hook up VerifyArgs here.
32248         (Parameters::VerifyArgs): Verifies that no two arguments have the
32249         same name. 
32250
32251         * class.cs (Operator): Update the operator names to reflect the
32252         ones that the spec expects (as we are just stringizing the
32253         operator names).
32254
32255         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32256         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32257         previous usage did only work for our methods.
32258         (Expression::ConvertImplicit): Handle decimal implicit numeric
32259         conversions as well.
32260         (Expression::InternalTypeConstructor): Used to invoke constructors
32261         on internal types for default promotions.
32262
32263         (Unary::Emit): Implement special handling for the pre/post
32264         increment/decrement for overloaded operators, as they need to have
32265         the same semantics as the other operators.
32266
32267         (Binary::ResolveOperator): ditto.
32268         (Invocation::ConversionExists): ditto.
32269         (UserImplicitCast::Resolve): ditto.
32270
32271 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32272
32273         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32274         operator, return after emitting body. Regression tests pass again !
32275
32276         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32277         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32278         (Invocation::OverloadResolve): Ditto.
32279         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32280
32281         * everywhere : update calls to the above methods accordingly.
32282
32283 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32284
32285         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32286
32287         * expression.cs (ExpressionStatement): New base class used for
32288         expressions that can appear in statements, so that we can provide
32289         an alternate path to generate expression that do not leave a value
32290         on the stack.
32291
32292         (Expression::Emit, and all the derivatives): We no longer return
32293         whether a value is left on the stack or not.  Every expression
32294         after being emitted leaves a single value on the stack.
32295
32296         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32297         facilties of ExpressionStatement if possible.
32298
32299         * cs-parser.jay: Update statement_expression.
32300
32301 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32302
32303         * driver.cs: Change the wording of message
32304
32305 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32306
32307         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32308         the type of the expression to the return type of the method if
32309         we have an overloaded operator match ! The regression tests pass again !
32310         (Unary::ResolveOperator): Ditto.
32311
32312         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32313         to find "op_Implicit", not "implicit" ;-)
32314         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32315         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32316
32317         * everywhere : Correct calls to the above accordingly.
32318
32319         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32320         (ConvertImplicit): Do user-defined conversion if it exists.
32321
32322 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32323
32324         * assign.cs: track location.
32325         (Resolve): Use implicit conversions on assignment.
32326
32327         * literal.cs: Oops.  Not good, Emit of short access values should
32328         pass (Bytes) or the wrong argument will be selected.
32329
32330         * expression.cs (Unary::Emit): Emit code for -expr.
32331
32332         (Unary::ResolveOperator): Handle `Substract' for non-constants
32333         (substract from zero from the non-constants).
32334         Deal with Doubles as well. 
32335
32336         (Expression::ConvertImplicitRequired): New routine that reports an
32337         error if no implicit conversion exists. 
32338
32339         (Invocation::OverloadResolve): Store the converted implicit
32340         expressions if we make them
32341
32342 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32343
32344         * class.cs (ConstructorInitializer): Take a Location argument.
32345         (ConstructorBaseInitializer): Same here.
32346         (ConstructorThisInitializer): Same here.
32347
32348         * cs-parser.jay : Update all calls accordingly.
32349
32350         * expression.cs (Unary, Binary, New): Take location argument.
32351         Update accordingly everywhere.
32352
32353         * cs-parser.jay : Update all calls to the above to take a location
32354         argument.
32355
32356         * class.cs : Ditto.
32357
32358 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32359
32360         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32361         (Invocation::BetterConversion): Same here
32362         (Invocation::ConversionExists): Ditto.
32363
32364         (Invocation::ConversionExists): Implement.
32365
32366 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32367
32368         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32369         Also take an additional TypeContainer argument.
32370
32371         * All over : Pass in TypeContainer as argument to OverloadResolve.
32372
32373         * typemanager.cs (CSharpName): Update to check for the string type and return
32374         that too.
32375
32376         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32377         a given method.
32378
32379 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32380
32381         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32382         (Invocation::BetterFunction): Implement.
32383         (Invocation::BetterConversion): Implement.
32384         (Invocation::ConversionExists): Skeleton, no implementation yet.
32385
32386         Okay, things work fine !
32387
32388 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32389
32390         * typemanager.cs: declare and load enum_type, delegate_type and
32391         void_type. 
32392
32393         * expression.cs (Expression::Emit): Now emit returns a value that
32394         tells whether a value is left on the stack or not.  This strategy
32395         might be reveted tomorrow with a mechanism that would address
32396         multiple assignments.
32397         (Expression::report118): Utility routine to report mismatches on
32398         the ExprClass.
32399
32400         (Unary::Report23): Report impossible type/operator combination
32401         utility function.
32402
32403         (Unary::IsIncrementableNumber): Whether the type can be
32404         incremented or decremented with add.
32405         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32406         complemented. 
32407         (Unary::ResolveOperator): Implement ++, !, ~,
32408
32409         (Invocation::Emit): Deal with new Emit convetion.
32410
32411         * All Expression derivatives: Updated their Emit method to return
32412         whether they leave values on the stack or not.
32413
32414         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32415         stack for expressions that are statements. 
32416
32417 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32418
32419         * expression.cs (LValue): New interface.  Must be implemented by
32420         LValue objects.
32421         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32422         LValue interface.
32423
32424         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32425         interface for generating code, simplifies the code.
32426
32427 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32428
32429         * expression.cs (everywhere): Comment out return statements in ::Resolve
32430         methods to avoid the warnings.
32431
32432 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32433
32434         * driver.cs (parse): Report error 2001 if we can not open the
32435         source file.
32436
32437         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32438         not resolve it.
32439
32440         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32441         object. 
32442
32443         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32444         otherwise nested blocks end up with the same index.
32445
32446         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32447
32448         * expression.cs:  Instead of having FIXMEs in the Resolve
32449         functions, throw exceptions so it is obvious that we are facing a
32450         bug. 
32451
32452         * cs-parser.jay (invocation_expression): Pass Location information.
32453
32454         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32455         Use a basename for those routines because .NET does not like paths
32456         on them. 
32457
32458         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32459         already defined.
32460
32461 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32462
32463         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32464         are loading the correct data types (throws an exception if not).
32465         (TypeManager::InitCoreTypes): Use CoreLookupType
32466
32467         * expression.cs (Unary::ResolveOperator): return the child
32468         expression for expressions which are just +expr.
32469         (Unary::ResolveOperator): Return negative literals for -LITERAL
32470         expressions (otherwise they are Unary {Literal}).
32471         (Invocation::Badness): Take into account `Implicit constant
32472         expression conversions'.
32473
32474         * literal.cs (LongLiteral): Implement long literal class.
32475         (IntLiteral): export the `Value' of the intliteral. 
32476
32477 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32478
32479         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32480
32481         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32482         instead of 'Operator'
32483
32484         * expression.cs (Binary::ResolveOperator): Update accordingly.
32485         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32486         and 'Minus'
32487
32488         * cs-parser.jay (unary_expression): Update to use the new names.
32489
32490         * gen-treedump.cs (GetUnary): Same here.
32491
32492         * expression.cs (Unary::Resolve): Implement.
32493         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32494         operators are found instead of making noise ;-)
32495         (Unary::ResolveOperator): New method to do precisely the same thing which
32496         Binary::ResolveOperator does for Binary expressions.
32497         (Unary.method, .Arguments): Add.
32498         (Unary::OperName): Implement.   
32499         (Unary::ForceConversion): Copy and Paste !
32500
32501         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32502         a unary operator.
32503
32504         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32505         for the inbuilt operators. Only overloading works for now ;-)
32506
32507 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32508
32509         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32510         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32511
32512         * expression.cs (This::Emit): Implement. 
32513         (This::Resolve): Implement.
32514         (TypeOf:Resolve): Implement.
32515         (Expression::ResolveSimpleName): Add an implicit this to instance
32516         field references. 
32517         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32518         Bind instance variable to Field expressions.
32519         (FieldExpr::Instance): New field used to track the expression that
32520         represents the object instance.
32521         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32522         binding 
32523         (FieldExpr::Emit): Implement.
32524
32525         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32526         the last instruction contains a return opcode to avoid generating
32527         the last `ret' instruction (this generates correct code, and it is
32528         nice to pass the peverify output).
32529
32530         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32531         initializer for static and instance variables.
32532         (Constructor::Emit): Allow initializer to be null in the case of
32533         static constructors.  Only emit initializer for instance
32534         constructors. 
32535
32536         (TypeContainer::FindMembers): Return a null array if there are no
32537         matches.
32538
32539         Also fix the code for the MemberTypes.Method branch, as it was not
32540         scanning that for operators (or tried to access null variables before).
32541
32542         * assign.cs (Assign::Emit): Handle instance and static fields. 
32543
32544         * TODO: Updated.
32545
32546         * driver.cs: Stop compilation if there are parse errors.
32547
32548         * cs-parser.jay (constructor_declaration): Provide default base
32549         initializer for non-static constructors.
32550         (constructor_declarator): Do not provide a default base
32551         initializers if none was specified.
32552         Catch the fact that constructors should not have parameters.
32553
32554         * class.cs: Do not emit parent class initializers for static
32555         constructors, that should be flagged as an error.
32556
32557 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32558
32559         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32560         Move back code into TypeContainer::Populate.
32561
32562 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32563
32564         * class.cs (TypeContainer::AddConstructor): Fix the check to
32565         compare against Name, not Basename. 
32566         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32567
32568         * cs-parser.jay : Update accordingly.
32569
32570         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32571         for methods, don't forget to look into the operators too.
32572         (RegisterMethodBuilder): Helper method to take care of this for
32573         methods, constructors and operators.
32574         (Operator::Define): Completely revamp.
32575         (Operator.OperatorMethod, MethodName): New fields.
32576         (TypeContainer::Populate): Move the registering of builders into
32577         RegisterMethodBuilder.
32578         (Operator::Emit): Re-write.
32579
32580         * expression.cs (Binary::Emit): Comment out code path to emit method
32581         invocation stuff for the case when we have a user defined operator. I am
32582         just not able to get it right !
32583
32584 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32585
32586         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32587         argument. 
32588
32589         (Expression::MemberLookup): Provide a version that allows to
32590         specify the MemberTypes and BindingFlags. 
32591
32592         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32593         so it was not fetching variable information from outer blocks.
32594
32595         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32596         Beforefieldinit as it was buggy.
32597
32598         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32599         that Ravi put here.  
32600
32601         * class.cs (Constructor::Emit): Only emit if block is not null.
32602         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32603         deal with this by semantically definining it as if the user had
32604         done it.
32605
32606         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32607         constructors as we now "emit" them at a higher level.
32608
32609         (TypeContainer::DefineDefaultConstructor): Used to define the
32610         default constructors if none was provided.
32611
32612         (ConstructorInitializer): Add methods Resolve and Emit. 
32613
32614         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32615
32616 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32617
32618         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32619         the default constructor builder with our hashtable for methodbuilders
32620         to methodcores.
32621
32622         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32623         and argument_count is 0 in which case we have a match.
32624         (Binary::ResolveOperator): More null checking and miscellaneous coding
32625         style cleanup.
32626
32627 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32628
32629         * rootcontext.cs (IsNameSpace): Compare against null.
32630
32631         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32632
32633         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32634         and Unary::Operator.
32635
32636         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32637         accordingly.
32638
32639         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32640         we have overloaded operators.
32641         (Binary::ResolveOperator): Implement the part which does the operator overload
32642         resolution.
32643
32644         * class.cs (Operator::Emit): Implement.
32645         (TypeContainer::Emit): Emit the operators we have too.
32646
32647         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32648         the case when we have a user-defined operator.
32649
32650 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32651
32652         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32653
32654 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32655
32656         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32657         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32658         (Constructor::Emit): Implement.
32659         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32660         if we have no work to do. 
32661         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32662         Emit method.
32663
32664         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32665         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32666
32667         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32668         of parent.parent.
32669
32670 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32671
32672         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32673         in the source.
32674         (Tree::RecordNamespace): Method to do what the name says ;-)
32675         (Tree::Namespaces): Property to get at the namespaces hashtable.
32676
32677         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32678         keep track.
32679
32680         * rootcontext.cs (IsNamespace): Fixed it :-)
32681
32682 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32683
32684         * class.cs (TypeContainer::FindMembers): Add support for
32685         constructors. 
32686         (MethodCore): New class that encapsulates both the shared aspects
32687         of a Constructor and a Method.  
32688         (Method, Constructor): Factored pieces into MethodCore.
32689
32690         * driver.cs: Added --fatal which makes errors throw exceptions.
32691         Load System assembly as well as part of the standard library.
32692
32693         * report.cs: Allow throwing exceptions on errors for debugging.
32694
32695         * modifiers.cs: Do not use `parent', instead use the real type
32696         container to evaluate permission settings.
32697
32698         * class.cs: Put Ravi's patch back in.  He is right, and we will
32699         have to cope with the
32700
32701 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32702
32703         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32704         FamORAssem, not FamANDAssem.
32705
32706 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32707
32708         * driver.cs: Added --parse option that only parses its input files
32709         and terminates.
32710
32711         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32712         incorrect.  IsTopLevel is not used to tell whether an object is
32713         root_types or not (that can be achieved by testing this ==
32714         root_types).  But to see if this is a top-level *class* (not
32715         necessarly our "toplevel" container). 
32716
32717 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32718
32719         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32720         parent instead of a direct call to GetType.
32721
32722 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32723
32724         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32725         Modifiers.TypeAttr. This should just be a call to that method.
32726
32727         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32728         object so that we can determine if we are top-level or not.
32729
32730         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32731         TypeContainer too.
32732
32733         * enum.cs (Enum::Define): Ditto.
32734
32735         * modifiers.cs (FieldAttr): Re-write.
32736
32737         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32738         (TypeContainer::HaveStaticConstructor): New property to provide access
32739         to precisely that info.
32740
32741         * modifiers.cs (MethodAttr): Re-write.
32742         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32743
32744         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32745         of top-level types as claimed.
32746
32747 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32748
32749         * expression.cs (MemberLookup): Fruitless attempt to lookup
32750         constructors.  Maybe I need to emit default constructors?  That
32751         might be it (currently .NET emits this for me automatically).
32752         (Invocation::OverloadResolve): Cope with Arguments == null.
32753         (Invocation::EmitArguments): new function, shared by the new
32754         constructor and us.
32755         (Invocation::Emit): Handle static and instance methods.  Emit
32756         proper call instruction for virtual or non-virtual invocations.
32757         (New::Emit): Implement.
32758         (New::Resolve): Implement.
32759         (MemberAccess:Resolve): Implement.
32760         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32761         to track instances.
32762         (FieldExpr::Resolve): Set type.
32763
32764         * support.cs: Handle empty arguments.
32765                 
32766         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32767         SimpleLookup): Auxiliary routines to help parse a qualifier
32768         identifier.  
32769
32770         Update qualifier_identifier rule.
32771
32772         * codegen.cs: Removed debugging messages.
32773
32774         * class.cs: Make this a global thing, this acts just as a "key" to
32775         objects that we might have around.
32776
32777         (Populate): Only initialize method_builders_to_methods once.
32778
32779         * expression.cs (PropertyExpr): Initialize type from the
32780         PropertyType. 
32781
32782         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32783         Resolve pattern.  Attempt to implicitly convert value to boolean.
32784         Emit code.
32785
32786         * expression.cs: Set the type for the int32/int32 argument case.
32787         (Binary::ResolveOperator): Set the return type to boolean for
32788         comparission operators
32789
32790         * typemanager.cs: Remove debugging print code.
32791
32792         (Invocation::Resolve): resolve type.
32793
32794         * class.cs: Allocate a MemberInfo of the correct size, as the code
32795         elsewhere depends on the test to reflect the correct contents.
32796
32797         (Method::) Keep track of parameters, due to System.Reflection holes
32798
32799         (TypeContainer::Populate): Keep track of MethodBuilders to Method
32800         mapping here.
32801
32802         (TypeContainer::FindMembers): Use ArrayList and then copy an array
32803         of the exact size and return that.
32804
32805         (Class::LookupMethodByBuilder): New function that maps
32806         MethodBuilders to its methods.  Required to locate the information
32807         on methods because System.Reflection bit us again.
32808
32809         * support.cs: New file, contains an interface ParameterData and
32810         two implementations: ReflectionParameters and InternalParameters
32811         used to access Parameter information.  We will need to grow this
32812         as required.
32813
32814         * expression.cs (Invocation::GetParameterData): implement a cache
32815         and a wrapper around the ParameterData creation for methods. 
32816         (Invocation::OverloadResolve): Use new code.
32817
32818 2001-09-13  Ravi Pratap  <ravi@ximian.com>
32819
32820         * class.cs (TypeContainer::EmitField): Remove and move into 
32821         (Field::Define): here and modify accordingly.
32822         (Field.FieldBuilder): New member.
32823         (TypeContainer::Populate): Update accordingly.
32824         (TypeContainer::FindMembers): Implement.
32825
32826 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32827
32828         * statement.cs: (VariableInfo::VariableType): New field to be
32829         initialized with the full type once it is resolved. 
32830
32831 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
32832
32833         * parameter.cs (GetParameterInfo): Use a type cache to compute
32834         things only once, and to reuse this information
32835
32836         * expression.cs (LocalVariableReference::Emit): Implement.
32837         (OpcodeCast::Emit): fix.
32838
32839         (ParameterReference::Resolve): Implement.
32840         (ParameterReference::Emit): Implement.
32841
32842         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
32843         that are expressions need to stay as Expressions.
32844
32845         * typemanager.cs (CSharpName): Returns the C# name of a type if
32846         possible. 
32847
32848         * expression.cs (Expression::ConvertImplicit): New function that
32849         implements implicit type conversions.
32850
32851         (Expression::ImplicitReferenceConversion): Implements implicit
32852         reference conversions.
32853
32854         (EmptyCast): New type for transparent casts.
32855
32856         (OpcodeCast): New type for casts of types that are performed with
32857         a sequence of bytecodes.
32858
32859         (BoxedCast): New type used for casting value types into reference
32860         types.  Emits a box opcode.
32861
32862         (Binary::DoNumericPromotions): Implements numeric promotions of
32863         and computation of the Binary::Type.
32864
32865         (Binary::EmitBranchable): Optimization.
32866
32867         (Binary::Emit): Implement code emission for expressions.
32868
32869         * typemanager.cs (TypeManager): Added two new core types: sbyte
32870         and byte.
32871
32872 2001-09-12  Ravi Pratap  <ravi@ximian.com>
32873
32874         * class.cs (TypeContainer::FindMembers): Method which does exactly
32875         what Type.FindMembers does, only we don't have to use reflection. No
32876         implementation yet.
32877
32878         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
32879         typecontainer objects as we need to get at them.
32880         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
32881
32882         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
32883         typecontainer object.
32884
32885         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
32886         of just a Report object.
32887
32888 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32889
32890         * class.cs (Event::Define): Go back to using the prefixes "add_" and
32891         "remove_"
32892         (TypeContainer::Populate): Now define the delegates of the type too.
32893         (TypeContainer.Delegates): Property to access the list of delegates defined
32894         in the type.
32895
32896         * delegates.cs (Delegate::Define): Implement partially.
32897
32898         * modifiers.cs (TypeAttr): Handle more flags.
32899
32900 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32901
32902         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
32903         and not <=
32904         (Operator::Define): Re-write logic to get types by using the LookupType method
32905         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
32906         (Indexer::Define): Ditto.
32907         (Event::Define): Ditto.
32908         (Property::Define): Ditto.
32909
32910 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32911
32912         * class.cs (TypeContainer::Populate): Now define operators too. 
32913         (TypeContainer.Operators): New property to access the list of operators
32914         in a type.
32915         (Operator.OperatorMethodBuilder): New member to hold the method builder
32916         for the operator we are defining.
32917         (Operator::Define): Implement.
32918
32919 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32920
32921         * class.cs (Event::Define): Make the prefixes of the accessor methods
32922         addOn_ and removeOn_ 
32923
32924         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
32925         of the location being passed in too. Ideally, this should go later since all
32926         error reporting should be done through the Report object.
32927
32928         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
32929         (Populate): Iterate thru the indexers we have and define them too.
32930         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
32931         for the get and set accessors.
32932         (Indexer::Define): Implement.
32933
32934 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
32935
32936         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
32937         my previous implementation, did not work.
32938
32939         * typemanager.cs: Add a couple of missing types (the longs).
32940
32941         * literal.cs: Use TypeManager.bool_type instead of getting it.
32942
32943         * expression.cs (EventExpr): New kind of expressions.
32944         (Expressio::ExprClassFromMemberInfo): finish
32945
32946 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
32947
32948         * assign.cs: Emit stores to static fields differently.
32949
32950 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32951
32952         * Merge in changes and adjust code to tackle conflicts. Backed out my
32953         code in Assign::Resolve ;-) 
32954
32955 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32956
32957         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
32958         instead Report.Error and also pass in the location.
32959         (CSharpParser::Lexer): New readonly property to return the reference
32960         to the Tokenizer object.
32961         (declare_local_variables): Use Report.Error with location instead of plain 
32962         old error.
32963         (CheckDef): Ditto.
32964
32965         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
32966         (Operator.CheckBinaryOperator): Ditto.
32967
32968         * cs-parser.jay (operator_declarator): Update accordingly.
32969
32970         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
32971         (CheckBinaryOperator): Same here.
32972
32973         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
32974         on the name without any prefixes of namespace names etc. This is because we
32975         already might have something already fully qualified like 
32976         'System.Console.WriteLine'
32977
32978         * assign.cs (Resolve): Begin implementation. Stuck ;-)
32979
32980 2001-09-07  Ravi Pratap  <ravi@ximian.com>
32981
32982         * cs-tokenizer.cs (location): Return a string which also contains
32983         the file name.
32984
32985         * expression.cs (ElementAccess): New class for expressions of the
32986         type 'element access.'
32987         (BaseAccess): New class for expressions of the type 'base access.'
32988         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
32989         respectively.
32990
32991         * cs-parser.jay (element_access): Implement action.
32992         (base_access): Implement actions.
32993         (checked_expression, unchecked_expression): Implement.
32994
32995         * cs-parser.jay (local_variable_type): Correct and implement.
32996         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
32997
32998         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
32999
33000         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
33001         name and the specifiers.
33002
33003         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
33004
33005         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
33006         making them all public ;-)
33007
33008         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
33009         class anyways.
33010
33011 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
33012
33013         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
33014         PropertyExprs.
33015         (FieldExpr, PropertyExprs): New resolved expressions.
33016         (SimpleName::MemberStaticCheck): Perform static checks for access
33017         to non-static fields on static methods. Maybe this should be
33018         generalized for MemberAccesses. 
33019         (SimpleName::ResolveSimpleName): More work on simple name
33020         resolution. 
33021
33022         * cs-parser.jay (primary_expression/qualified_identifier): track
33023         the parameter index.
33024
33025         * codegen.cs (CodeGen::Save): Catch save exception, report error.
33026         (EmitContext::EmitBoolExpression): Chain to expression generation
33027         instead of temporary hack.
33028         (::EmitStatementExpression): Put generic expression code generation.
33029
33030         * assign.cs (Assign::Emit): Implement variable assignments to
33031         local variables, parameters and fields.
33032
33033 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
33034
33035         * statement.cs (Block::GetVariableInfo): New method, returns the
33036         VariableInfo for a variable name in a block.
33037         (Block::GetVariableType): Implement in terms of GetVariableInfo
33038
33039         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
33040         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
33041
33042 2001-09-06  Ravi Pratap  <ravi@ximian.com>
33043
33044         * cs-parser.jay (operator_declaration): Continue on my quest : update
33045         to take attributes argument.
33046         (event_declaration): Ditto.
33047         (enum_declaration): Ditto.
33048         (indexer_declaration): Ditto.
33049
33050         * class.cs (Operator::Operator): Update constructor accordingly.
33051         (Event::Event): Ditto.
33052
33053         * delegate.cs (Delegate::Delegate): Same here.
33054
33055         * enum.cs (Enum::Enum): Same here.
33056
33057 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33058
33059         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
33060
33061         * ../tests/cs0658.cs : New file to demonstrate error 0658.
33062
33063         * attribute.cs (Attributes): New class to encapsulate all attributes which were
33064         being passed around as an arraylist.
33065         (Attributes::AddAttribute): Method to add attribute sections.
33066
33067         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
33068         (struct_declaration): Update accordingly.
33069         (constant_declaration): Update.
33070         (field_declaration): Update.
33071         (method_header): Update.
33072         (fixed_parameter): Update.
33073         (parameter_array): Ditto.
33074         (property_declaration): Ditto.
33075         (destructor_declaration): Ditto.
33076
33077         * class.cs (Struct::Struct): Update constructors accordingly.
33078         (Class::Class): Ditto.
33079         (Field::Field): Ditto.
33080         (Method::Method): Ditto.
33081         (Property::Property): Ditto.
33082         (TypeContainer::OptAttribute): update property's return type.
33083
33084         * interface.cs (Interface.opt_attributes): New member.
33085         (Interface::Interface): Update to take the extra Attributes argument.
33086
33087         * parameter.cs (Parameter::Parameter): Ditto.
33088
33089         * constant.cs (Constant::Constant): Ditto.
33090
33091         * interface.cs (InterfaceMemberBase): New OptAttributes field.
33092         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
33093         the attributes as a parameter.
33094         (InterfaceProperty): Update constructor call.
33095         (InterfaceEvent): Ditto.
33096         (InterfaceMethod): Ditto.
33097         (InterfaceIndexer): Ditto.
33098
33099         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
33100         pass the attributes too.
33101         (interface_event_declaration): Ditto.
33102         (interface_property_declaration): Ditto.
33103         (interface_method_declaration): Ditto.
33104         (interface_declaration): Ditto.
33105
33106 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
33107
33108         * class.cs (Method::Define): Track the "static Main" definition to
33109         create an entry point. 
33110
33111         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
33112         EntryPoint if we find it. 
33113
33114         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
33115         (EmitContext::ig): Make this variable public.
33116
33117         * driver.cs: Make the default output file be the first file name
33118         with the .exe extension.  
33119
33120         Detect empty compilations
33121
33122         Handle various kinds of output targets.  Handle --target and
33123         rename -t to --dumper.
33124
33125         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
33126         methods inherited from Expression return now an Expression.  This
33127         will is used during the tree rewriting as we resolve them during
33128         semantic analysis.
33129
33130         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
33131         the spec.  Missing entirely is the information about
33132         accessability of elements of it.
33133
33134         (Expression::ExprClassFromMemberInfo): New constructor for
33135         Expressions that creates a fully initialized Expression based on
33136         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
33137         a Type.
33138
33139         (Invocation::Resolve): Begin implementing resolution of invocations.
33140
33141         * literal.cs (StringLiteral):  Implement Emit.
33142
33143 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33144
33145         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
33146         member.
33147
33148 2001-09-04  Ravi Pratap  <ravi@ximian.com>
33149
33150         * cs-parser.jay (attribute_arguments): Implement actions.
33151         (attribute): Fix bug in production. Implement action.
33152         (attribute_list): Implement.
33153         (attribute_target): Implement.
33154         (attribute_target_specifier, opt_target_specifier): Implement
33155         (CheckAttributeTarget): New method to check if the attribute target
33156         is valid.
33157         (attribute_section): Implement.
33158         (opt_attributes): Implement.
33159
33160         * attribute.cs : New file to handle attributes.
33161         (Attribute): Class to hold attribute info.
33162
33163         * cs-parser.jay (opt_attribute_target_specifier): Remove production
33164         (attribute_section): Modify production to use 2 different rules to 
33165         achieve the same thing. 1 s/r conflict down !
33166         Clean out commented, useless, non-reducing dimension_separator rules.
33167
33168         * class.cs (TypeContainer.attributes): New member to hold list
33169         of attributes for a type.
33170         (Struct::Struct): Modify to take one more argument, the attribute list.
33171         (Class::Class): Ditto.
33172         (Field::Field): Ditto.
33173         (Method::Method): Ditto.
33174         (Property::Property): Ditto.
33175
33176         * cs-parser.jay (struct_declaration): Update constructor call to
33177         pass in the attributes too.
33178         (class_declaration): Ditto.
33179         (constant_declaration): Ditto.
33180         (field_declaration): Ditto.
33181         (method_header): Ditto.
33182         (fixed_parameter): Ditto.
33183         (parameter_array): Ditto.
33184         (property_declaration): Ditto.
33185
33186         * constant.cs (Constant::Constant): Update constructor similarly.
33187         Use System.Collections.
33188
33189         * parameter.cs (Parameter::Parameter): Update as above.
33190
33191 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33192
33193         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
33194         (TypeContainer.delegates): New member to hold list of delegates.
33195
33196         * cs-parser.jay (delegate_declaration): Implement the action correctly 
33197         this time as I seem to be on crack ;-)
33198
33199 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
33200
33201         * rootcontext.cs (RootContext::IsNamespace): new function, used to
33202         tell whether an identifier represents a namespace.
33203
33204         * expression.cs (NamespaceExpr): A namespace expression, used only
33205         temporarly during expression resolution.
33206         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33207         utility functions to resolve names on expressions.
33208
33209 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33210
33211         * codegen.cs: Add hook for StatementExpressions. 
33212
33213         * class.cs: Fix inverted test for static flag in methods.
33214
33215 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33216
33217         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33218         to make it coincide with MS' number.
33219         (Operator::CheckBinaryOperator): Ditto.
33220
33221         * ../errors/errors.txt : Remove error numbers added earlier.
33222
33223         * ../errors/cs1019.cs : Test case for error # 1019
33224
33225         * ../errros/cs1020.cs : Test case for error # 1020
33226
33227         * cs-parser.jay : Clean out commented cruft.
33228         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33229         used anywhere - non-reducing rule.
33230         (namespace_declarations): Non-reducing rule - comment out.
33231
33232         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33233         with TypeContainer::AddEnum.
33234
33235         * delegate.cs : New file for delegate handling classes.
33236         (Delegate): Class for declaring delegates.
33237
33238         * makefile : Update.
33239
33240         * cs-parser.jay (delegate_declaration): Implement.
33241
33242 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33243
33244         * class.cs (Event::Define): Implement.
33245         (Event.EventBuilder): New member.
33246
33247         * class.cs (TypeContainer::Populate): Update to define all enums and events
33248         we have.
33249         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33250         readonly fields for all these cases ?
33251
33252 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33253
33254         * class.cs (Property): Revamp to use the convention of making fields readonly.
33255         Accordingly modify code elsewhere.
33256
33257         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33258         the Define method of the Property class.
33259
33260         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33261         trivial bug.
33262         (TypeContainer::Populate): Update to define all the properties we have. Also
33263         define all enumerations.
33264
33265         * enum.cs (Define): Implement.
33266
33267 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33268
33269         * cs-parser.jay (overloadable_operator): The semantic value is an
33270         enum of the Operator class.
33271         (operator_declarator): Implement actions.
33272         (operator_declaration): Implement.
33273
33274         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33275         validity of definitions.
33276         (Operator::CheckBinaryOperator): Static method to check for binary operators
33277         (TypeContainer::AddOperator): New method to add an operator to a type.
33278
33279         * cs-parser.jay (indexer_declaration): Added line to actually call the
33280         AddIndexer method so it gets added ;-)
33281
33282         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33283         already taken care of by the MS compiler ?  
33284
33285 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33286
33287         * class.cs (Operator): New class for operator declarations.
33288         (Operator::OpType): Enum for the various operators.
33289
33290 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33291
33292         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33293         ostensibly handle this in semantic analysis.
33294
33295         * cs-parser.jay (general_catch_clause): Comment out
33296         (specific_catch_clauses, specific_catch_clause): Ditto.
33297         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33298         (catch_args, opt_catch_args): New productions.
33299         (catch_clause): Rewrite to use the new productions above
33300         (catch_clauses): Modify accordingly.
33301         (opt_catch_clauses): New production to use in try_statement
33302         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33303         and re-write the code in the actions to extract the specific and
33304         general catch clauses by being a little smart ;-)
33305
33306         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33307         Hooray, try and catch statements parse fine !
33308
33309 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33310
33311         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33312         string from the hashtable of variables.
33313
33314         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33315         I end up making that mistake ;-)
33316         (catch_clauses): Fixed gross error which made Key and Value of the 
33317         DictionaryEntry the same : $1 !!
33318
33319 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33320
33321         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33322
33323         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33324         when the add and remove accessors are specified. 
33325
33326 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33327
33328         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33329         information about indexer_declarator.
33330         (indexer_declarator): Implement actions.
33331         (parsing_indexer): New local boolean used to keep track of whether
33332         we are parsing indexers or properties. This is necessary because 
33333         implicit_parameters come into picture even for the get accessor in the 
33334         case of an indexer.
33335         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33336
33337         * class.cs (Indexer): New class for indexer declarations.
33338         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33339         (TypeContainer::indexers): New member to hold list of indexers for the
33340         type.
33341
33342 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33343
33344         * cs-parser.jay (add_accessor_declaration): Implement action.
33345         (remove_accessor_declaration): Implement action.
33346         (event_accessors_declaration): Implement
33347         (variable_declarators): swap statements for first rule - trivial.
33348
33349         * class.cs (Event): New class to hold information about event
33350         declarations.
33351         (TypeContainer::AddEvent): New method to add an event to a type
33352         (TypeContainer::events): New member to hold list of events.
33353
33354         * cs-parser.jay (event_declaration): Implement actions.
33355
33356 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33357
33358         * cs-parser.jay (dim_separators): Implement. Make it a string
33359         concatenating all the commas together, just as they appear.
33360         (opt_dim_separators): Modify accordingly
33361         (rank_specifiers): Update accordingly. Basically do the same
33362         thing - instead, collect the brackets here.
33363         (opt_rank_sepcifiers): Modify accordingly.
33364         (array_type): Modify to actually return the complete type string
33365         instead of ignoring the rank_specifiers.
33366         (expression_list): Implement to collect the expressions
33367         (variable_initializer): Implement. We make it a list of expressions
33368         essentially so that we can handle the array_initializer case neatly too.
33369         (variable_initializer_list): Implement.
33370         (array_initializer): Make it a list of variable_initializers
33371         (opt_array_initializer): Modify accordingly.
33372
33373         * expression.cs (New::NType): Add enumeration to help us
33374         keep track of whether we have an object/delegate creation
33375         or an array creation.
33376         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33377         members to hold data about array creation.
33378         (New:New): Modify to update NewType
33379         (New:New): New Overloaded contructor for the array creation
33380         case.
33381
33382         * cs-parser.jay (array_creation_expression): Implement to call
33383         the overloaded New constructor.
33384
33385 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33386
33387         * class.cs (TypeContainer::Constructors): Return member
33388         constructors instead of returning null.
33389
33390 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33391
33392         * typemanager.cs (InitCoreTypes): Initialize the various core
33393         types after we have populated the type manager with the user
33394         defined types (this distinction will be important later while
33395         compiling corlib.dll)
33396
33397         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33398         on Expression Classification.  Now all expressions have a method
33399         `Resolve' and a method `Emit'.
33400
33401         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33402         generation from working.     Also add some temporary debugging
33403         code. 
33404
33405 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33406
33407         * codegen.cs: Lots of code generation pieces.  This is only the
33408         beginning, will continue tomorrow with more touches of polish.  We
33409         handle the fundamentals of if, while, do, for, return.  Others are
33410         trickier and I need to start working on invocations soon.
33411
33412         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33413         s.InitStatement. 
33414
33415         * codegen.cs (EmitContext): New struct, used during code
33416         emission to keep a context.   Most of the code generation will be
33417         here. 
33418
33419         * cs-parser.jay: Add embedded blocks to the list of statements of
33420         this block.  So code generation proceeds in a top down fashion.
33421
33422 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33423
33424         * statement.cs: Add support for multiple child blocks.
33425
33426 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33427
33428         * codegen.cs (EmitCode): New function, will emit the code for a
33429         Block of code given a TypeContainer and its ILGenerator. 
33430
33431         * statement.cs (Block): Standard public readonly optimization.
33432         (Block::Block constructors): Link children. 
33433         (Block::Child): Child Linker.
33434         (Block::EmitVariables): Emits IL variable declarations.
33435
33436         * class.cs: Drop support for MethodGroups here, delay until
33437         Semantic Analysis.
33438         (Method::): Applied the same simplification that I did before, and
33439         move from Properties to public readonly fields.
33440         (Method::ParameterTypes): Returns the parameter types for the
33441         function, and implements a cache that will be useful later when I
33442         do error checking and the semantic analysis on the methods is
33443         performed.
33444         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33445         and made a method, optional argument tells whether this is a class
33446         or a structure to apply the `has-this' bit.
33447         (Method::GetCallingConvention): Implement, returns the calling
33448         convention. 
33449         (Method::Define): Defines the type, a second pass is performed
33450         later to populate the methods.
33451
33452         (Constructor::ParameterTypes): implement a cache similar to the
33453         one on Method::ParameterTypes, useful later when we do semantic
33454         analysis. 
33455
33456         (TypeContainer::EmitMethod):  New method.  Emits methods.
33457
33458         * expression.cs: Removed MethodGroup class from here.
33459
33460         * parameter.cs (Parameters::GetCallingConvention): new method.
33461
33462 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33463
33464         * class.cs (TypeContainer::Populate): Drop RootContext from the
33465         argument. 
33466
33467         (Constructor::CallingConvention): Returns the calling convention.
33468         (Constructor::ParameterTypes): Returns the constructor parameter
33469         types. 
33470
33471         (TypeContainer::AddConstructor): Keep track of default constructor
33472         and the default static constructor.
33473
33474         (Constructor::) Another class that starts using `public readonly'
33475         instead of properties. 
33476
33477         (Constructor::IsDefault): Whether this is a default constructor. 
33478
33479         (Field::) use readonly public fields instead of properties also.
33480
33481         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33482         track of static constructors;  If none is used, turn on
33483         BeforeFieldInit in the TypeAttributes. 
33484
33485         * cs-parser.jay (opt_argument_list): now the return can be null
33486         for the cases where there are no arguments. 
33487
33488         (constructor_declarator): If there is no implicit `base' or
33489         `this', then invoke the default parent constructor. 
33490
33491         * modifiers.cs (MethodAttr): New static function maps a set of
33492         modifiers flags into a MethodAttributes enum
33493         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33494         MethodAttr, TypeAttr to represent the various mappings where the
33495         modifiers are used.
33496         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33497
33498 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33499
33500         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33501         method arguments.
33502
33503         * interface.cs (PopulateIndexer): Implemented the code generator
33504         for interface indexers.
33505
33506 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33507
33508         * interface.cs (InterfaceMemberBase): Now we track the new status
33509         here.  
33510
33511         (PopulateProperty): Implement property population.  Woohoo!  Got
33512         Methods and Properties going today. 
33513
33514         Removed all the properties for interfaces, and replaced them with
33515         `public readonly' fields. 
33516
33517 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33518
33519         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33520         initialize their hashtables/arraylists only when they are needed
33521         instead of doing this always.
33522
33523         * parameter.cs: Handle refs and out parameters.
33524
33525         * cs-parser.jay: Use an ArrayList to construct the arguments
33526         instead of the ParameterCollection, and then cast that to a
33527         Parameter[] array.
33528
33529         * parameter.cs: Drop the use of ParameterCollection and use
33530         instead arrays of Parameters.
33531
33532         (GetParameterInfo): Use the Type, not the Name when resolving
33533         types. 
33534
33535 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33536
33537         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33538         and instead use public readonly fields.
33539
33540         * class.cs: Put back walking code for type containers.
33541
33542 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33543
33544         * class.cs (MakeConstant): Code to define constants.
33545
33546         * rootcontext.cs (LookupType): New function.  Used to locate types 
33547
33548
33549 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33550
33551         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33552         this System.Reflection code is.  Kudos to Microsoft
33553
33554         * typemanager.cs: Implement a type cache and avoid loading all
33555         types at boot time.  Wrap in LookupType the internals.  This made
33556         the compiler so much faster.  Wow.  I rule!
33557
33558         * driver.cs: Make sure we always load mscorlib first (for
33559         debugging purposes, nothing really important).
33560
33561         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33562         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33563
33564         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33565         on namespaces that have been imported using the `using' keyword.
33566
33567         * class.cs (TypeContainer::TypeAttr): Virtualize.
33568         (Class::TypeAttr): Return attributes suitable for this bad boy.
33569         (Struct::TypeAttr): ditto.
33570         Handle nested classes.
33571         (TypeContainer::) Remove all the type visiting code, it is now
33572         replaced with the rootcontext.cs code
33573
33574         * rootcontext.cs (GetClassBases): Added support for structs. 
33575
33576 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33577
33578         * interface.cs, statement.cs, class.cs, parameter.cs,
33579         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33580         Drop use of TypeRefs, and use strings instead.
33581
33582 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33583
33584         * rootcontext.cs: 
33585
33586         * class.cs (Struct::Struct): set the SEALED flags after
33587         checking the modifiers.
33588         (TypeContainer::TypeAttr): new property, returns the
33589         TypeAttributes for a class.  
33590
33591         * cs-parser.jay (type_list): Oops, list production was creating a
33592         new list of base types.
33593
33594         * rootcontext.cs (StdLib): New property.
33595         (GetInterfaceTypeByName): returns an interface by type name, and
33596         encapsulates error handling here.
33597         (GetInterfaces): simplified.
33598         (ResolveTree): Encapsulated all the tree resolution here.
33599         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33600         types. 
33601
33602         * driver.cs: Add support for --nostdlib, to avoid loading the
33603         default assemblies.
33604         (Main): Do not put tree resolution here. 
33605
33606         * rootcontext.cs: Beginning of the class resolution.
33607
33608 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33609
33610         * rootcontext.cs: Provide better error reporting. 
33611
33612         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33613
33614         * rootcontext.cs (CreateInterface): Handle the case where there
33615         are no parent interfaces.
33616
33617         (CloseTypes): Routine to flush types at the end.
33618         (CreateInterface): Track types.
33619         (GetInterfaces): Returns an array of Types from the list of
33620         defined interfaces.
33621
33622         * typemanager.c (AddUserType): Mechanism to track user types (puts
33623         the type on the global type hash, and allows us to close it at the
33624         end). 
33625
33626 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33627
33628         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33629         RecordInterface instead.
33630
33631         * cs-parser.jay: Updated to reflect changes above.
33632
33633         * decl.cs (Definition): Keep track of the TypeBuilder type that
33634         represents this type here.  Not sure we will use it in the long
33635         run, but wont hurt for now.
33636
33637         * driver.cs: Smaller changes to accomodate the new code.
33638
33639         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33640         when done. 
33641
33642         * rootcontext.cs (CreateInterface):  New method, used to create
33643         the System.TypeBuilder type for interfaces.
33644         (ResolveInterfaces): new entry point to resolve the interface
33645         hierarchy. 
33646         (CodeGen): Property, used to keep track of the code generator.
33647
33648 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33649
33650         * cs-parser.jay: Add a second production for delegate_declaration
33651         with `VOID'.
33652
33653         (enum_body): Put an opt_comma here instead of putting it on
33654         enum_body or enum_member_declarations so we can handle trailing
33655         commas on enumeration members.  Gets rid of a shift/reduce.
33656
33657         (type_list): Need a COMMA in the middle.
33658
33659         (indexer_declaration): Tell tokenizer to recognize get/set
33660
33661         * Remove old targets.
33662
33663         * Re-add the parser target.
33664
33665 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33666
33667         * cs-parser.jay: Add precendence rules for a number of operators
33668         ot reduce the number of shift/reduce conflicts in the grammar.
33669
33670 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33671
33672         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33673         and put it here.
33674
33675         Get rid of old crufty code.
33676
33677         * rootcontext.cs: Use this to keep track of the parsed
33678         representation and the defined types available to the program. 
33679
33680         * gen-treedump.cs: adjust for new convention.
33681
33682         * type.cs: Split out the type manager, and the assembly builder
33683         from here. 
33684
33685         * typemanager.cs: the type manager will live here now.
33686
33687         * cil-codegen.cs: And the code generator here. 
33688
33689 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33690
33691         * makefile: Fixed up for easy making.
33692
33693 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33694
33695         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33696         the 
33697
33698         (unary_expression): Expand pre_increment_expression and
33699         post_decrement_expression to reduce a shift/reduce.
33700
33701 2001-07-11  Simon Cozens
33702
33703         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33704
33705         Improve allow_keyword_as_indent name.
33706
33707 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33708
33709         * Adjustments for Beta2. 
33710
33711 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33712
33713         * decl.cs: Added `Define' abstract method.
33714         (InTransit): new property, used to catch recursive definitions. 
33715
33716         * interface.cs: Implement `Define'. 
33717
33718         * modifiers.cs: Map Modifiers.constants to
33719         System.Reflection.TypeAttribute flags.
33720
33721         * class.cs: Keep track of types and user-defined types.
33722         (BuilderInit): New method for creating an assembly
33723         (ResolveType): New function to launch the resolution process, only
33724         used by interfaces for now.
33725
33726         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33727         that are inserted into the name space. 
33728
33729 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33730
33731         * ARGH.  I have screwed up my tree so many times due to the use of
33732         rsync rather than using CVS.  Going to fix this at once. 
33733
33734         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33735         load types.
33736
33737 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33738
33739         * Experiment successful: Use System.Type rather that our own
33740         version of Type.  
33741
33742 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33743
33744         * cs-parser.jay: Removed nsAliases from here.
33745
33746         Use new namespaces, handle `using XXX;' 
33747
33748         * namespace.cs: Reimplemented namespace handling, use a recursive
33749         definition of the class.  Now we can keep track of using clauses
33750         and catch invalid using clauses.
33751
33752 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33753
33754         * gen-treedump.cs: Adapted for all the renaming.
33755
33756         * expression.cs (Expression): this class now has a Type property
33757         which returns an expression Type.
33758
33759         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33760         `Type', as this has a different meaning now in the base
33761
33762 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33763
33764         * interface.cs, class.cs: Removed from all the sources the
33765         references to signature computation, as we can not do method
33766         signature computation during the parsing time, as we are not
33767         trying to solve at that point distinguishing:
33768
33769         class X {
33770                 void a (Blah x) {}
33771                 void a (NS.Blah x) {}
33772         }
33773
33774         Which depending on the context might be valid or not, as we do not
33775         know if Blah is the same thing as NS.Blah at that point.
33776
33777         * Redid everything so the code uses TypeRefs now instead of
33778         Types.  TypeRefs are just temporary type placeholders, that need
33779         to be resolved.  They initially have a pointer to a string and the
33780         current scope in which they are used.  This is used later by the
33781         compiler to resolve the reference to an actual Type. 
33782
33783         * DeclSpace is no longer a CIR.Type, and neither are
33784         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33785         are all DeclSpaces, but no Types. 
33786
33787         * type.cs (TypeRefManager): This implements the TypeRef manager,
33788         which keeps track of all the types that need to be resolved after
33789         the parsing has finished. 
33790
33791 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33792
33793         * ARGH.  We are going to have to store `foreach' as a class rather
33794         than resolving it, as we need to verify error 1579 after name
33795         resolution.   *OR* we could keep a flag that says `This request to
33796         IEnumerator comes from a foreach statement' which we can then use
33797         to generate the error.
33798
33799 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
33800
33801         * class.cs (TypeContainer.AddMethod): we now add methods to the
33802         MethodGroup instead of the method hashtable.  
33803
33804         * expression.cs: Add MethodGroup abstraction, which gets us one
33805         step closer to the specification in the way we handle method
33806         declarations.  
33807
33808         * cs-parser.jay (primary_expression): qualified_identifier now
33809         tried to match up an identifier to a local variable reference or
33810         to a parameter reference.
33811
33812         current_local_parameters is now a parser global variable that
33813         points to the current parameters for the block, used during name
33814         lookup.
33815
33816         (property_declaration): Now creates an implicit `value' argument to
33817         the set accessor.
33818
33819 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
33820
33821         * parameter.cs: Do not use `param' arguments as part of the
33822         signature, per the spec.
33823
33824 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
33825
33826         * decl.cs: Base class for classes, structs and interfaces.  This
33827         is the "Declaration Space" 
33828
33829         * cs-parser.jay: Use CheckDef for checking declaration errors
33830         instead of having one on each function.
33831
33832         * class.cs: Factor out some code for handling error handling in
33833         accordance to the "Declarations" section in the "Basic Concepts"
33834         chapter in the ECMA C# spec.
33835
33836         * interface.cs: Make all interface member classes derive from
33837         InterfaceMemberBase.
33838
33839 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
33840
33841         * Many things: all interfaces are parsed and generated in
33842         gen-treedump.  Support for member variables, constructors,
33843         destructors, properties, constants is there.
33844
33845         Beginning of the IL backend, but very little done, just there for
33846         testing purposes. 
33847
33848 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
33849
33850         * cs-parser.jay: Fix labeled statement.
33851
33852         * cs-tokenizer.cs (escape): Escape " and ' always.
33853         ref_line, ref_name: keep track of the line/filename as instructed
33854         by #line by the compiler.
33855         Parse #line.
33856
33857 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
33858
33859         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
33860         to match the values in System.CodeDOM.
33861
33862         Divid renamed to Divide.
33863
33864         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
33865         statements. 
33866         (Statements.set): remove.
33867
33868         * System.CodeDOM/CodeCatchClause.cs: always have a valid
33869         statements. 
33870
33871         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
33872         falseStatements always have valid values. 
33873
33874         * cs-parser.jay: Use System.CodeDOM now.
33875