Implement several ToString() methods.
[mono.git] / mcs / mcs / ChangeLog
1 2010-07-14  Marek Safar  <marek.safar@gmail.com>
2
3         * namespace.cs, import.cs: When importing nested type via type
4         arguments set their parent type correctly (Fixes #622051).
5
6 2010-07-14  Marek Safar  <marek.safar@gmail.com>
7
8         A fix for bug #622104
9         * attribute.cs: Add default lookup flags.
10         
11 2010-07-12  Marek Safar  <marek.safar@gmail.com>
12
13         * generic.cs: Don't use Report directly.
14         
15         * expression.cs, ecore.cs: UserOperatorCall uses MethodSpec without
16         MethodGroupExpr, will be simplified later.
17
18 2010-07-09  Marek Safar  <marek.safar@gmail.com>
19
20         * property.cs, parameters.cs: Inflated IndexerSpec parameters.
21         
22         * import.cs: Don't build unused parameters.
23
24 2010-07-08  Marek Safar  <marek.safar@gmail.com>
25
26         * expression.cs (Invocation): Don't recreate simple-name expression.
27
28 2010-07-07  Marek Safar  <marek.safar@gmail.com>
29
30         * ecore.cs: Don't report NRE warning for lifted null.
31
32 2010-07-07  Marek Safar  <marek.safar@gmail.com>
33
34         * typemanager.cs, convert.cs, expression.cs: Another reference
35         equality implementation attack (Fixes #620025, #579058).
36
37 2010-07-05  Marek Safar  <marek.safar@gmail.com>
38
39         * context.cs, expression.cs, ecore.cs: BaseThis is fully based on
40         this expression (Fixes #619904).
41
42 2010-07-05  Marek Safar  <marek.safar@gmail.com>
43
44         * membercache.cs, class.cs: Don't use base member to check for
45         property or indexer base implementation.
46
47 2010-07-03  Marek Safar  <marek.safar@gmail.com>
48
49         * membercache.cs: Copy Membercache member state flags for 2 stage
50         inflate (Fixes #619555).
51         
52         * ecore.cs: Use resolved accessors everywhere.
53         
54 2010-07-02  Marek Safar  <marek.safar@gmail.com>
55
56         A fix for bug #360820
57         * membercache.cs, property.cs: Check accessors of base property and
58         not the closest one.
59
60 2010-07-02  Marek Safar  <marek.safar@gmail.com>
61
62         * modifiers.cs, membercache.cs, import.cs, class.cs: Moved imported
63         override method checks into import.
64
65         * expression.cs: Removed redundant check.
66
67 2010-06-30  Marek Safar  <marek.safar@gmail.com>
68
69         * nullable.cs, expression.cs, statement.cs, method.cs, ecore.cs,
70         delegate.cs, cs-parser.jay, visit.cs: Use MemberAccess to resolve
71         base access expression, it has all bits done correctly.
72
73 2010-06-30  Marek Safar  <marek.safar@gmail.com>
74
75         * support.cs: Removed unused code.
76         
77         * ecore.cs: Don't use memberlookup for operators.
78
79 2010-06-30  Marek Safar  <marek.safar@gmail.com>
80
81         * typemanager.cs, membercache.cs, convert.cs, expression.cs,
82         ecore.cs: Replace remaining MethodLookup with correct user operator
83         lookup (to do correct deep lookup). Clean up most of outstanding
84         quirks in binary operator overload resolution.
85
86 2010-06-29  Marek Safar  <marek.safar@gmail.com>
87
88         * import.cs: Operators must have between 1 and 2 parameters.
89         
90         * method.cs: Switch destructor to direct membercache lookup
91
92 2010-06-29  Marek Safar  <marek.safar@gmail.com>
93
94         * driver.cs, expression.cs: Use Membercache for StringConcat when
95         it got all what is needed.
96
97 2010-06-29  Marek Safar  <marek.safar@gmail.com>
98
99         * membercache.cs, expression.cs, statement.cs, doc.cs, ecore.cs:
100         Changed FindMembers to allocate a new list only when a filter is
101         used. Saves decent chunk of memory and should save even more in the
102         future when the filter is not used that often.
103
104 2010-06-28  Marek Safar  <marek.safar@gmail.com>
105
106         * field.cs, property.cs, assign.cs, const.cs, expression.cs,
107         ecore.cs, class.cs, cs-parser.jay, enum.cs: Don't use intermediate
108         structure for simple type fields (saves memory and makes few things
109         simpler). Clean up some hacks mostly for events.
110
111 2010-06-25  Marek Safar  <marek.safar@gmail.com>
112
113         * statement.cs, cs-parser.jay: Don't create expensive block for
114         simple statements.
115
116 2010-06-24  Marek Safar  <marek.safar@gmail.com>
117
118         * statement.cs, report.cs: Rethrow internal error when reporting is
119         disabled.
120         
121         * ecore.cs: Check for identical name only when simple name is set.
122         Fixes #616667
123
124 2010-06-24  Marek Safar  <marek.safar@gmail.com>
125
126         A fix for bug #616809
127         * generic.cs, expression.cs, ecore.cs: Added a new type expression
128         for open generic type to pass unbound type arguments to typeof
129         expression.
130
131 2010-06-24  Marek Safar  <marek.safar@gmail.com>
132
133         * statement.cs: Foreach collection implementation refactoring to
134         search for GetEnumerator more preciselly. Fixes #431453 and more
135         unreported bugs.
136
137         * linq.cs, decl.cs, ecore.cs, delegate.cs: Update methodgroup api.
138
139 2010-06-23  Marek Safar  <marek.safar@gmail.com>
140
141         * cs-parser.jay: Track more locations.
142
143 2010-06-22  Marek Safar  <marek.safar@gmail.com>
144
145         * cs-tokenizer.cs, location.cs, cs-parser.jay: Track more locations.
146
147 2010-06-18  Marek Safar  <marek.safar@gmail.com>
148
149         * cs-tokenizer.cs, anonymous.cs, expression.cs, statement.cs,
150         support.cs, location.cs, cs-parser.jay: Some work on full ast mode.
151
152 2010-06-18  Marek Safar  <marek.safar@gmail.com>
153
154         * convert.cs, typespec.cs, method.cs: Fixed few more dynamic
155         conversion.
156
157 2010-06-18  Marek Safar  <marek.safar@gmail.com>
158
159         * typemanager.cs, namespace.cs: Report more predefined types and
160         imported types collision types as a warning.
161         Fixes #537414, #601157
162
163 2010-06-18  Marek Safar  <marek.safar@gmail.com>
164
165         * generic.cs: Overrides base method constraint can use method type
166         parameter.
167
168         * import.cs: Removed redundant cache.
169         
170 2010-06-17  Marek Safar  <marek.safar@gmail.com>
171
172         * generic.cs: Propagate type only inflate downwards.
173
174 2010-06-17  Marek Safar  <marek.safar@gmail.com>
175
176         A fix for bug #614955
177         * method.cs: Do not reject binary dynamic operators.
178
179 2010-06-17  Marek Safar  <marek.safar@gmail.com>
180
181         * typespec.cs: Internal types have no generic parameters.
182         Fixes #615022.
183
184 2010-06-17  Marek Safar  <marek.safar@gmail.com>
185
186         A fix for bug #614955
187         * cs-parser.jay: Correctly set expression mode for default parameter
188         values.
189
190 2010-06-17  Marek Safar  <marek.safar@gmail.com>
191
192         A fix for bug #615023
193         * ecore.cs: Resolve dynamic namespace and keyword collision in the
194         favour of the keyword.
195
196 2010-06-17  Marek Safar  <marek.safar@gmail.com>
197
198         A fix for bug #614917
199         * convert.cs: Allow more undocumented 0 like values to enum type 
200         conversions.
201
202 2010-06-17  Marek Safar  <marek.safar@gmail.com>
203
204         * generic.cs, method.cs: Inflate copied type parameters from base
205         class or explicit interfaces.
206         
207         * convert.cs: Fixed conversion between two type parameters.
208         Fixes #614471
209
210 2010-06-16  Marek Safar  <marek.safar@gmail.com>
211
212         * membercache.cs, convert.cs: Correctly resize an array used by
213         GetUserOperator.
214
215 2010-06-15  Marek Safar  <marek.safar@gmail.com>
216
217         A fix for bug #599601
218         * dynamic.cs, ecore.cs: A new flag for dynamic resolver to ignore
219         generated member access left expression.
220         
221 2010-06-16  Marek Safar  <marek.safar@gmail.com>
222
223         * expression.cs: Dispatch dynamic invocation solely on left
224         expression type.
225
226 2010-06-16  Marek Safar  <marek.safar@gmail.com>
227
228         * expression.cs, statement.cs: Always persist explicit cast
229         semantic at expression level.
230         
231 2010-06-15  Marek Safar  <marek.safar@gmail.com>
232
233         * expression.cs, attribute.cs: Enable generic type parameters
234         attribute check.
235         
236 2010-06-15  Marek Safar  <marek.safar@gmail.com>
237
238         A fix for bug #612146
239         * generic.cs: Don't use fixed array for inflated type parameter
240         interface constraints.
241         
242 2010-06-15  Marek Safar  <marek.safar@gmail.com>
243
244         * typespec.cs: ElementTypeSpec has to use its own ITypeDefinition.
245         
246         * report.cs: Unwrap elements for related symbols reporting.
247
248 2010-06-15  Marek Safar  <marek.safar@gmail.com>
249
250         A fix for bug #612796
251         * cs-tokenizer.cs: Offset correctly keywords the first character
252         comparison.
253         
254 2010-06-15  Marek Safar  <marek.safar@gmail.com>
255
256         A fix for bug #613397
257         * expression.cs: Removed too aggressive object initializers
258         optimization.
259         
260 2010-06-15  Marek Safar  <marek.safar@gmail.com>
261         
262         * parameter.cs, property.cs, membercache.cs, decl.cs, iterators.cs,
263         anonymous.cs, expression.cs, support.cs, method.cs, pending.cs,
264         class.cs, cs-parser.jay: Simplify parsing of accessors by removing
265         any intermediate steps and fake nodes, also saves few MBs of memory.
266
267 2010-06-11  Marek Safar  <marek.safar@gmail.com>
268         
269         * modifiers.cs, rootcontext.cs, location.cs, cs-parser.jay: More
270         precise modifiers parsing.
271
272 2010-06-09  Marek Safar  <marek.safar@gmail.com>
273
274         * cs-tokenizer.cs, anonymous.cs, expression.cs, cs-parser.jay:
275         Fixed few shift/reduce conflicts.
276
277 2010-06-09  Marek Safar  <marek.safar@gmail.com>
278
279         * typemanager.cs, parameter.cs, dynamic.cs, typespec.cs,
280         expression.cs, ecore.cs, cs-parser.jay: Fully parse composed type
281         specifiers and stop using string in AST.
282
283 2010-06-07  Marek Safar  <marek.safar@gmail.com>
284
285         * typemanager.cs, eval.cs, iterators.cs, anonymous.cs, expression.cs
286         method.cs, class.cs, delegate.cs, cs-parser.jay, driver.cs, visit.cs
287         enum.cs: Hold location of predefined types.
288
289 2010-06-07  Marek Safar  <marek.safar@gmail.com>
290
291         A fix for bug #610878
292         * pending.cs: Clone cached list before modifying.
293
294 2010-06-04  Marek Safar  <marek.safar@gmail.com>
295
296         * convert.cs, typespec.cs, expression.cs: Start using array member
297         kind for better conversion checks.
298         
299         * import.cs, report.cs: Report better error message for runtime
300         reflection bugs.
301
302 2010-06-04  Marek Safar  <marek.safar@gmail.com>
303
304         * membercache.cs, convert.cs, nullable.cs, expression.cs: Optimize
305         user defined conversion probing and simplify user conversion for
306         nullabe types. Fixes #610940.
307
308 2010-06-03  Marek Safar  <marek.safar@gmail.com>
309
310         A fix for bug #610919
311         * parameter.cs, property.cs, cs-parser.jay: Use independent implicit
312         parameters for explicit event accessors. Anonymous method capturing
313         won't otherwise work for event implicit parameter.
314
315 2010-06-02  Marek Safar  <marek.safar@gmail.com>
316
317         A fix for bug #610088
318         * nullable.cs, expression.cs, statement.cs, method.cs, ecore.cs:
319         Ignore overrides for base overload resolution as for non-base
320         expressions and convert the best candidate to closest override
321         afterwards.
322
323 2010-06-01  Marek Safar  <marek.safar@gmail.com>
324
325         A fix for bug #610139
326         * generic.cs, convert.cs: Recursively check effective base interface
327
328 2010-06-01  Marek Safar  <marek.safar@gmail.com>
329
330         * statement.cs: Handle nullable types and type parameters in using
331         statement, avoid boxing value types. Also fixes #571010
332
333 2010-06-01  Marek Safar  <marek.safar@gmail.com>
334
335         * convert.cs, expression.cs: Emit unbox for underlying nullable
336         type boxing cast.
337
338 2010-05-29  Marek Safar  <marek.safar@gmail.com>
339
340         A fix for bug #610126
341         * expression.cs: Don't use branch optimization for types bigger than
342         int.
343
344 2010-05-28  Marek Safar  <marek.safar@gmail.com>
345
346         A fix for bug #609088
347         * import.cs: Check private modifier correctly.
348
349 2010-05-28  Marek Safar  <marek.safar@gmail.com>
350
351         A fix for bug #609049
352         * ecore.cs: Don't ignore override methods when looking for base
353         member.
354
355 2010-05-27  Marek Safar  <marek.safar@gmail.com>
356
357         A fix for bugs #608007, #572540, #566130, #476358
358
359         * generic.cs, linq.cs, expression.cs, statement.cs, cs-parser.jay:
360         More tricky refactoring of implicit linq blocks.
361         
362 2010-05-25  Marek Safar  <marek.safar@gmail.com>
363
364         * linq.cs, cs-parser.jay: Keep location for all linq clauses.
365
366 2010-05-25  Marek Safar  <marek.safar@gmail.com>
367
368         * context.cs, expression.cs, cs-parser.jay: Don't store current
369         block in This expression (it's too early for linq blocks).
370
371 2010-05-21  Marek Safar  <marek.safar@gmail.com>
372
373         * expression.cs: Use constrained prefix more broadly to avoid boxing.
374
375 2010-05-20  Marek Safar  <marek.safar@gmail.com>
376
377         A fix for bug #591149
378         * nullable.cs: Don't double wrap same expression.
379         
380 2010-05-20  Marek Safar  <marek.safar@gmail.com>
381
382         A fix for bug #569827
383         * anonymous.cs: Any issued error in probing mode means no match.
384
385 2010-05-20  Marek Safar  <marek.safar@gmail.com>
386
387         * expression.cs: Search for base indexer using the closest match
388         rule.
389
390 2010-05-20  Marek Safar  <marek.safar@gmail.com>
391
392         A fix for bug #572071
393         * method.cs: Set override constraints using unexpanded interface
394         list.
395
396 2010-05-20  Marek Safar  <marek.safar@gmail.com>
397
398         A fix for bug #572071
399         * ecore.cs: Include secondary extension method lookup in probing
400         mode.
401
402 2010-05-19  Marek Safar  <marek.safar@gmail.com>
403
404         A fix for bug #515801
405         * typespec.cs (MayBecomeEqualGenericTypes): Recursively check
406         type arguments.
407
408 2010-05-19  Marek Safar  <marek.safar@gmail.com>
409
410         A fix for bug #515801
411         * pending.cs: Advance counter correctly.
412
413 2010-05-19  Marek Safar  <marek.safar@gmail.com>
414
415         A fix for bug #480139
416         * method.cs, pending.cs: Indexer override uses base name.
417         
418 2010-05-19  Marek Safar  <marek.safar@gmail.com>
419
420         A fix for bug #424064
421         * generic.cs: Replace original with inflated type parameter on
422         failure.
423
424 2010-05-19  Marek Safar  <marek.safar@gmail.com>
425
426         A fix for bug #359733
427         * parameter.cs: Extension attribute can be defined in each assembly.
428
429 2010-05-18  Marek Safar  <marek.safar@gmail.com>
430
431         A fix for bug #446507
432         * method.cs: Only one method can implement an interface.
433
434 2010-05-18  Marek Safar  <marek.safar@gmail.com>
435
436         A fix for bug #594905
437         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
438         Typed null can be used as a source for expression methods.
439
440 2010-05-18  Marek Safar  <marek.safar@gmail.com>
441
442         A fix for bug #606551
443         * namespace.cs: Using directive imports only types and not nested
444         namespaces.
445
446 2010-05-17  Marek Safar  <marek.safar@gmail.com>
447
448         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
449         delegate.cs: Member instance is resolved after member overload
450         definitely resolves static/instance property of member expression.
451         Fixes #545047, #358848, #456605, #460016, #603299
452
453 2010-05-12  Marek Safar  <marek.safar@gmail.com>
454
455         A fix for bug #604981
456         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
457         details for nested anonymous methods stories.
458
459 2010-05-11  Marek Safar  <marek.safar@gmail.com>
460
461         A fix for bug #604735
462         * namespace.cs: Don't report namespace collision.
463
464 2010-05-11  Marek Safar  <marek.safar@gmail.com>
465
466         A fix for bug #604748
467         * class.cs, typespec.cs: Search full imported attribute hierarchy
468         for AttributeUsage.
469
470 2010-05-11  Marek Safar  <marek.safar@gmail.com>
471
472         * namespace.cs: Ignore missing dependencies failure at
473         initialization.
474
475 2010-05-11  Marek Safar  <marek.safar@gmail.com>
476
477         A fix for bug #604640
478         * namespace.cs: Don't resolve using constraints too early.
479
480 2010-05-11  Marek Safar  <marek.safar@gmail.com>
481
482         A fix for bug #604239
483         * generic.cs: Copy partial type constraints to partial container.
484
485 2010-05-10  Marek Safar  <marek.safar@gmail.com>
486
487         A fix for bug #557210
488         * import.cs: Relax underlying enum field rules.
489
490 2010-05-10  Marek Safar  <marek.safar@gmail.com>
491
492         A fix for bug #603476
493         * property.cs: Implement IParametersMember for indexer accessors.
494
495 2010-05-07  Marek Safar  <marek.safar@gmail.com>
496
497         A fix for bug #601141
498         * class.cs: Update all partial modifiers.
499
500 2010-05-06  Marek Safar  <marek.safar@gmail.com>
501
502         A fix for bug #601708
503         * method.cs, membercache.cs: Destructors cannot be hidden.
504
505 2010-05-06  Marek Safar  <marek.safar@gmail.com>
506
507         A fix for bug #602551
508         * class.cs: Resursive reference of type definition is allowed.
509
510 2010-05-06  Marek Safar  <marek.safar@gmail.com>
511
512         * anonymous.cs: Mutate cached storey instance types too.
513
514 2010-05-06  Marek Safar  <marek.safar@gmail.com>
515
516         A fix for bug #602443
517         * convert.cs: Explicit enum conversion cannot involve user operators
518
519 2010-05-05  Miguel de Icaza  <miguel@novell.com>
520
521         * class.cs (TypeContainer.DefineBaseTypes)
522         (TypeContainer.CheckRecursiveDefinition): check for the iface not
523         being null, as we could have failed resolution and crashed;
524         Fixes #442144
525
526         * cs-parser.jay: Productions to catch common mistakes when other
527         punctuation operators are used instead of comma.   Fixes 571702 
528
529 2010-05-05  Marek Safar  <marek.safar@gmail.com>
530
531         * anonymous.cs: Mutate correct set of constraints.
532
533 2010-05-05  Marek Safar  <marek.safar@gmail.com>
534
535         A fix for bug #602842
536         * expression.cs: Resolve all array bound arguments.
537
538 2010-05-05  Marek Safar  <marek.safar@gmail.com>
539
540         * import.cs: Don't import private fields.
541
542 2010-04-30  Marek Safar  <marek.safar@gmail.com>
543
544         Partially based on patch by <sami.lamti@gmail.com>
545
546         * eval.cs, ecore.cs: Fixed eval show methods.
547
548 2010-04-30  Marek Safar  <marek.safar@gmail.com>
549
550         * generic.cs, delegate.cs: Implement output type inference of
551         methodgroup now when the specification was cleared at least little
552         bit.
553
554 2010-04-29  Marek Safar  <marek.safar@gmail.com>
555
556         A fix for bug #575611
557         * class.cs: Fix recursive unmanaged recursice sruct check.
558         
559 2010-04-29  Marek Safar  <marek.safar@gmail.com>
560
561         A fix for bug #479776
562         * expression.cs: Implement typeof unbounded nested generic types.
563
564 2010-04-29  Marek Safar  <marek.safar@gmail.com>
565
566         A fix for bug #474953
567         * class.cs: Fix valid recursive base type definition.
568
569 2010-04-29  Marek Safar  <marek.safar@gmail.com>
570
571         A fix for bug #421737
572         * convert.cs, expression.cs: A boxing conversion exists from a
573         nullable-type to a reference type, if a boxing conversion exists
574         from the underlying non-nullable-value-type to the reference type.
575
576 2010-04-29  Marek Safar  <marek.safar@gmail.com>
577
578         A fix for bug #376875
579         * import.cs: Import volatile modifier.
580
581 2010-04-29  Marek Safar  <marek.safar@gmail.com>
582
583         A fix for bug #372412
584         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
585         generic arrays.
586
587 2010-04-29  Marek Safar  <marek.safar@gmail.com>
588
589         A fix for bug #568955
590         * statements.cs: Handle recursive scope initializers.
591
592 2010-04-28  Marek Safar  <marek.safar@gmail.com>
593
594         A fix for bug #566511
595         * anonymous.cs: Always get inflated version of hoisted variable
596         on generic type definition.
597
598 2010-04-28  Marek Safar  <marek.safar@gmail.com>
599
600         * import.cs, membercache.cs: Relax rules for valid properties.
601
602 2010-04-28  Marek Safar  <marek.safar@gmail.com>
603
604         * import.cs: Intern arrays used in generic arguments.
605
606 2010-04-28  Marek Safar  <marek.safar@gmail.com>
607
608         A fix for bug #600398
609         * convert.cs: Actually use effective base type for the comparison.
610
611 2010-04-28  Marek Safar  <marek.safar@gmail.com>
612
613         A fix for bug #600326
614         * ecore.cs: Pass arity to base member lookup.
615
616 2010-04-28  Marek Safar  <marek.safar@gmail.com>
617
618         A fix for bug #573385
619         * expression.cs: MemberAccess is of generic type based on right
620         arity length only.
621
622 2010-05-28  Marek Safar  <marek.safar@gmail.com>
623
624         * cs-tokenizer.cs: Made tab size configurable.
625
626 2010-05-27  Marek Safar  <marek.safar@gmail.com>
627
628         * attribute.cs: Ensure Obsolete members are defined before doing
629         ctor look-up.
630
631 2010-05-27  Marek Safar  <marek.safar@gmail.com>
632
633         * visit.cs: Add DOM visitor skeleton.
634         
635         * *.cs: Updated.
636
637 2010-05-27  Marek Safar  <marek.safar@gmail.com>
638
639         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
640         
641 2010-05-27  Marek Safar  <marek.safar@gmail.com>
642
643         * *.cs: Major rewrite of compiler internals to better work with
644         unmodified System.Reflection.Emit. Some of the key changes are
645         - TypeSpec replaces reflection specific System.Type.
646         - All Type(TypeSpec) operations are now done in compiler therefore
647         no dependency on SRE to inflate generic members and types or to
648         query unclosed types.
649         - MemberCache is now the only and full hierarchical topology.
650         - Generic constraints are implemented properly.
651         - And as a bonus compilation is on average 30% faster.
652
653 2010-04-15  Jb Evain  <jbevain@novell.com>
654
655         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
656
657 2010-04-12  Marek Safar  <marek.safar@gmail.com>
658
659         * expression.cs, attribute.cs, parameter.cs: More attribute type
660         checks.
661
662 2010-04-12  Marek Safar  <marek.safar@gmail.com>
663
664         A fix for bug #593342
665
666         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
667         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
668         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
669         codegen.cs: Add custom attribute encoder to deal with unfinished
670         types and easier corlib bootstrap from its own types.
671
672 2010-03-26  Marek Safar  <marek.safar@gmail.com>
673
674         * cs-parser.jay: Report invalid constraint types.
675
676 2010-03-16  Jb Evain  <jbevain@novell.com>
677
678         * Makefile: rename the net_2_1 profile to moonlight.
679
680 2010-03-11  Marek Safar  <marek.safar@gmail.com>
681
682         * statement.cs, cs-parser.jay: Use correct location for empty
683         statements.
684
685 2010-03-11  Marek Safar  <marek.safar@gmail.com>
686
687         * cs-parser.jay: Disable Location from expression.
688         
689         * generic.cs: Check constraints for overrides in the parser.
690
691 2010-03-09  Marek Safar  <marek.safar@gmail.com>
692
693         * cs-parser.jay (GetLocation): Use an expression when available.
694
695 2010-03-04  Marek Safar  <marek.safar@gmail.com>
696
697         A fix for bug #582579
698         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
699
700 2010-03-04  Marek Safar  <marek.safar@gmail.com>
701
702         A patch by kornelpal@gmail.com
703         
704         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
705         compiler generated classes sealed by default. Emit and close top
706         level compiler generated classes as well. 
707         
708         * support.cs: Use RuntimeHelpers.GetHashCode.
709
710 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
711
712         * Makefile: We need to use the internal bootstrapping gmcs for
713         net_2_1_bootstrap too now.
714
715 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
716
717         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
718
719 2010-03-02  Marek Safar  <marek.safar@gmail.com>
720
721         * cs-tokenizer.cs: Missed few locations in previous fix.
722
723 2010-03-02  Marek Safar  <marek.safar@gmail.com>
724
725         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
726         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
727         Report correct location for operator errors.
728
729 2010-03-02  Marek Safar  <marek.safar@gmail.com>
730
731         * typemanager.cs (IsDynamicType): Don't check external types when
732         the attribute is not external.
733
734 2010-02-24  Marek Safar  <marek.safar@gmail.com>
735
736         A fix for bug #582579
737         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
738         modifiers.
739
740 2010-02-24  Marek Safar  <marek.safar@gmail.com>
741
742         A fix for bug #581804
743         * ecore.cs: Fixed type comparison.
744
745 2010-02-08  Miguel de Icaza  <miguel@novell.com>
746
747         * namespace.cs (CompletionGetTypesStartingWith): Do not include
748         private types in the completion results.
749
750         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
751         ... let ?"
752
753 2010-02-17  Marek Safar  <marek.safar@gmail.com>
754
755         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
756         constraint parsing.
757
758 2010-02-14  Miguel de Icaza  <miguel@novell.com>
759
760         * eval.cs: Do not do the report printer dance unless the user has
761         set the DescribeTypes feature.
762
763 2010-02-10  Marek Safar  <marek.safar@gmail.com>
764
765         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
766
767 2010-02-08  Marek Safar  <marek.safar@gmail.com>
768
769         A fix for bug #577029
770         * anonymous.cs: Fixed TypeBuilder* check.
771
772 2010-02-06  Miguel de Icaza  <miguel@novell.com>
773
774         * eval.cs (CompileBlock): Also undo if there are problems during
775         semantic analysis, fixes various cases where invalid C# code would
776         be reported, but the internal changes would not be undone.
777
778 2010-02-03  Miguel de Icaza  <miguel@novell.com>
779
780         * driver.cs: Change the --fatal flag to allow a number to be
781         passed, this ignores the first N fatal errors.   Useful to debug
782         errors that do not happen on the first hit.
783
784         * cs-parser.jay (invocation_expression): accept both the
785         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
786         inside an invocation.
787
788         * driver.cs: Expose FatalErrors.
789
790         * eval.cs: Initialize the printer's Fatal property from the
791         Driver's FatalError flag, this allows csharp --fatal to work
792         again. 
793
794         Add support for calling Describe (typeof (TYPE)) if the expression
795         entered is a TYPE.
796         
797 2010-02-02  Marek Safar  <marek.safar@gmail.com>
798
799         A fix for bug #574991
800         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
801         --lint.
802
803 2010-02-02  Marek Safar  <marek.safar@gmail.com>
804
805         A fix for bug #575986
806         * expression.cs: Don't mutate typeof type definitions.
807
808 2010-01-28  Marek Safar  <marek.safar@gmail.com>
809
810         * decl.cs: Use only one set of modifiers.
811
812 2010-01-26  Marek Safar  <marek.safar@gmail.com>
813
814         A fix for bug #573329
815         * eval.cs: Don't disable error reporting completely on silent mode.
816         
817 2010-01-25  Marek Safar  <marek.safar@gmail.com>
818
819         A fix for bug #573312
820         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
821         pointer index of unknown size types greater than 2.
822
823 2010-01-15  Marek Safar  <marek.safar@gmail.com>
824
825         * *.cs: Use only 1 member kind enum.
826
827 2010-01-15  Marek Safar  <marek.safar@gmail.com>
828
829         * *.cs: Add event specification.
830
831 2010-01-14  Marek Safar  <marek.safar@gmail.com>
832
833         * membercache.cs: Extracted from decl.cs.
834         
835         * *.cs: Put more infrastructure in place.
836
837 2010-01-13  Marek Safar  <marek.safar@gmail.com>
838
839         * *.cs: Add property specification, unused yet.
840
841 2010-01-13  Marek Safar  <marek.safar@gmail.com>
842
843         * property.cs: Move all property based declarations into a new file.
844
845 2010-01-13  Marek Safar  <marek.safar at gmail.com>
846
847         * expression.cs (Conditional): Resolve reduced expression.
848
849 2010-01-13  Marek Safar  <marek.safar at gmail.com>
850
851         * *.cs: Introduced non-generic method specification.
852
853 2010-01-07  Marek Safar  <marek.safar@gmail.com>
854
855         * method.cs: Move all method based declarations into a new file.
856
857 2010-01-07  Marek Safar  <marek.safar@gmail.com>
858
859         * *.cs: Extract field specification.
860
861 2009-12-17  Marek Safar  <marek.safar@gmail.com>
862
863         * field.cs: Extracted from class.cs
864
865 2009-12-15  Marek Safar  <marek.safar@gmail.com>
866
867         * attribute.cs (GetFixedBuffer): Work on field definition only.
868
869 2009-12-15  Marek Safar  <marek.safar@gmail.com>
870
871         * *.cs: Clean up NET_4_0 conditional where possible.
872
873 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
874
875         support.cs (DynamicType): Assembly property returns the assembly builder.
876         This is required due to how compiler context works in corlib.
877
878 2009-12-14  Marek Safar  <marek.safar@gmail.com>
879
880         A fix for bug #564376
881         * assign.cs (LocalTemporary): Removed no longer needed special
882         by-ref handling.
883
884 2009-12-11  Marek Safar  <marek.safar@gmail.com>
885
886         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
887         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
888         enum for easier debugging.
889
890 2009-12-10  Marek Safar  <marek.safar@gmail.com>
891
892         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
893         point.
894         
895         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
896         directly.
897
898 2009-12-10  Marek Safar  <marek.safar@gmail.com>
899
900         * cs-parser.jay, statement.cs: Handle parser error in code
901         completition.
902
903 2009-12-10  Marek Safar  <marek.safar@gmail.com>
904
905         * ecore.cs: Ignore base imported methods when they are already
906         in method bag.
907         
908         * eval.cs: Handle non-existent keys.
909         
910         * report.cs, driver.cs: Make fatal work with console printer only.
911
912 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
913
914         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
915
916 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
917
918         * typemanager.cs: Add MakeGenericMethod that checks if the method
919         is really the generic method definition.
920
921         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
922         to inflate generic methods.
923
924 2009-12-08  Marek Safar  <marek.safar@gmail.com>
925
926         A fix for bug #561149
927         * anonymous.cs: Use actual type parameters when checking for generic
928         method host.
929
930 2009-12-08  Marek Safar  <marek.safar@gmail.com>
931
932         A fix for bug #561369
933         * expression.cs (DoNumericPromotion): Fixed typo.
934
935 2009-12-08  Marek Safar  <marek.safar@gmail.com>
936
937         *.cs: Moving to generics world.
938
939         cs-parser.jay: Removed current_array_type.
940
941 2009-12-07  Marek Safar  <marek.safar@gmail.com>
942
943         *.cs: Moving to generics world.
944
945 2009-12-04  Marek Safar  <marek.safar@gmail.com>
946
947         *.cs: Moving to generics world (day 2).
948
949 2009-12-03  Marek Safar  <marek.safar@gmail.com>
950
951         *.cs: Moving to generics world.
952
953 2009-12-02  Marek Safar  <marek.safar@gmail.com>
954
955         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
956         Encode dynamic type attribute for elements where attributes cannot
957         be used.
958
959 2009-12-01  Marek Safar  <marek.safar@gmail.com>
960
961          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
962          arguments by ref.
963
964 2009-12-01  Marek Safar  <marek.safar@gmail.com>
965
966         A fix for bug #360455
967         * class.cs: Never report a unused warning for generic events to
968         workaround wrong expression type.
969
970 2009-11-30  Marek Safar  <marek.safar@gmail.com>
971
972         A fix for bug #558305
973         * decl.cs, class.cs: Check partial method definitions using correct
974         flag.
975
976 2009-11-30  Marek Safar  <marek.safar@gmail.com>
977
978         * argument.cs: Don't cache rarely used dynamic flag.
979
980 2009-11-27  Marek Safar  <marek.safar@gmail.com>
981
982         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
983
984 2009-11-27  Marek Safar  <marek.safar@gmail.com>
985
986         * ecore.cs (SimpleName): Removed no longer needed in_transit as
987         Resolve is now non-reentrant (saves ~0.6MB for corlib).
988
989 2009-11-26  Marek Safar  <marek.safar@gmail.com>
990
991         A fix for bug #545081
992         * decl.cs: Check private nested types of nested types recursively.
993
994 2009-11-26  Marek Safar  <marek.safar@gmail.com>
995
996         A fix for bug #558305
997         * location.cs: Ignore self referencing #line directive
998
999 2009-11-26  Marek Safar  <marek.safar@gmail.com>
1000
1001         A fix for bug #558292
1002         * class.cs: Allow single unsafe fixed buffer fields.
1003
1004 2009-11-26  Marek Safar  <marek.safar@gmail.com>
1005
1006         * expression: Optimize few more zero-based operations.
1007
1008 2009-11-26  Marek Safar  <marek.safar@gmail.com>
1009
1010         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
1011         avoids boxing of literal values.
1012
1013 2009-11-26  Marek Safar  <marek.safar@gmail.com>
1014
1015         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
1016         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
1017         codegen.cs: LocatedToken redesing to avoid excessive allocation and
1018         boxing (saves ~7MB for corlib). Also fixes presise token location.
1019
1020 2009-11-25  Marek Safar  <marek.safar@gmail.com>
1021
1022         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
1023         common data buckers.
1024
1025 2009-11-24  Marek Safar  <marek.safar@gmail.com>
1026
1027         * expression.cs: Lower static array initializer barrier.
1028         
1029         * support.cs, driver.cs: Share reader buffer.
1030
1031 2009-11-23  Marek Safar  <marek.safar@gmail.com>
1032
1033         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
1034
1035 2009-11-23  Marek Safar  <marek.safar@gmail.com>
1036
1037         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
1038         cleanup some obsolete code.
1039
1040 2009-11-20  Marek Safar  <marek.safar@gmail.com>
1041
1042         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
1043         Expression.Resolve.
1044
1045 2009-11-20  Marek Safar  <marek.safar@gmail.com>
1046
1047         * *.cs: Resolved expressions are never resolved again, this helps to
1048         uncover some not easy to find bugs and improve the performance.
1049
1050 2009-11-19  Marek Safar  <marek.safar@gmail.com>
1051
1052         * *.cs: Made constant expressions fully compatible with any other
1053         expression.
1054
1055 2009-11-19  Marek Safar  <marek.safar@gmail.com>
1056
1057         * *.cs: DoResolve is a worker method and has to be protected.
1058
1059 2009-11-18  Marek Safar  <marek.safar@gmail.com>
1060
1061         * *.cs: More context specific handling.
1062
1063 2009-11-17  Marek Safar  <marek.safar@gmail.com>
1064
1065         * *.cs: More context specific handling.
1066
1067 2009-11-16  Marek Safar  <marek.safar@gmail.com>
1068
1069         * dynamic.cs, class.cs: Removed few fixed user types conversions.
1070         
1071         * symbolwriter.cs: Uses public ILOffset.
1072
1073 2009-11-13  Marek Safar  <marek.safar@gmail.com>
1074
1075         A fix for bug #553650
1076         * generic.cs: Another missing TypeToCoreType, still too many to fix.
1077
1078 2009-11-13  Marek Safar  <marek.safar@gmail.com>
1079
1080         A fix for bug #555170
1081
1082         * class.cs, delegate.cs, enum.cs: Constants have to be available
1083         for parameters resolve.
1084
1085 2009-11-12  Marek Safar  <marek.safar@gmail.com>
1086
1087         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
1088         arrays.
1089
1090 2009-11-12  Marek Safar  <marek.safar@gmail.com>
1091
1092         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
1093         with a statically known candidate set.
1094
1095 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
1096
1097         * generic.cs: Made type inflation for generic constraint checks
1098         recursive. This fixes BGO #553655.
1099
1100 2009-11-11  Marek Safar  <marek.safar@gmail.com>
1101
1102         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
1103         checks.
1104
1105 2009-11-10  Marek Safar  <marek.safar@gmail.com>
1106
1107         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
1108         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
1109         attribute.cs: Add some dynamic error checking.
1110
1111 2009-11-07  Marek Safar  <marek.safar@gmail.com>
1112
1113         A fix for bug #553465
1114
1115         * expression.cs: Fixed mixed version of expression tree anonymous
1116         type.
1117
1118 2009-11-06  Marek Safar  <marek.safar@gmail.com>
1119
1120         A fix for bug #553031
1121
1122         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
1123         expression tree version of anonymous type with members declaration.
1124
1125 2009-11-05  Marek Safar  <marek.safar@gmail.com>
1126
1127         * parameter.cs: Handle nullable parameter default expression.
1128         
1129         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
1130         class.cs, attribute.cs: Check for wrong dynamic arguments.
1131
1132 2009-11-05  Marek Safar  <marek.safar@gmail.com>
1133
1134         * statement.cs: Dynamic statements.
1135
1136 2009-11-04  Marek Safar  <marek.safar@gmail.com>
1137
1138         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
1139         Compound assignments over dynamic type.
1140
1141 2009-11-03  Marek Safar  <marek.safar@gmail.com>
1142
1143         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
1144         constructor arguments.
1145
1146 2009-10-30  Marek Safar  <marek.safar@gmail.com>
1147
1148         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
1149         codegen.cs: Unary mutator on dynamic member access expression.
1150
1151 2009-10-29  Marek Safar  <marek.safar@gmail.com>
1152
1153         A fix for bug #550580   
1154         * convert.cs: Don't eliminate explicit precission casts.
1155
1156 2009-10-28  Marek Safar  <marek.safar@gmail.com>
1157
1158         A fix for bug #550404
1159         
1160         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
1161         expression.cs, statement.cs, ecore.cs: Quote any nested expression
1162         tree.
1163
1164 2009-10-27  Marek Safar  <marek.safar@gmail.com>
1165
1166         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
1167         constant.
1168         
1169         * class.cs: Allow nullable binary user operators.
1170
1171 2009-10-26  Marek Safar  <marek.safar@gmail.com>
1172
1173         * expression.cs: Move binary expression optimization at the end of
1174         resolve.
1175
1176 2009-10-23  Marek Safar  <marek.safar@gmail.com>
1177
1178         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
1179         Separate NullConstant from NullLiteral.
1180
1181 2009-10-23  Marek Safar  <marek.safar@gmail.com>
1182
1183         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
1184         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
1185         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
1186         ModuleContainer. Add common unclosed member check routine.
1187
1188 2009-10-22  Marek Safar  <marek.safar@gmail.com>
1189
1190         * argument.cs: Use literal flag for real literals only.
1191
1192         * dynamic.cs: Use correct return type for custom delegates.
1193
1194 2009-10-22  Marek Safar  <marek.safar@gmail.com>
1195
1196         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
1197         resolver.
1198
1199 2009-10-22  Marek Safar  <marek.safar@gmail.com>
1200
1201         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
1202
1203 2009-10-21  Marek Safar  <marek.safar@gmail.com>
1204
1205         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
1206         conversion.
1207
1208 2009-10-21  Marek Safar  <marek.safar@gmail.com>
1209
1210         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
1211         binder flags.
1212
1213 2009-10-20  Marek Safar  <marek.safar@gmail.com>
1214
1215         * argument.cs, dynamic.cs, expression.cs: Latest API update.
1216
1217 2009-10-19  Marek Safar  <marek.safar@gmail.com>
1218
1219         * typemanager.cs, expression.cs: Dynamic array initializer.
1220
1221 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1222
1223         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
1224         is imported.
1225
1226 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1227
1228         A fix for bug #493523, #507067
1229         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
1230         standard nullable conversion using underlying standard conversion
1231         and not full conversion.
1232
1233 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1234
1235         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
1236         type in VerifyArgumentsCompat.
1237
1238 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1239
1240         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1241         Reject variable used with type arguments.
1242
1243 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1244
1245         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
1246         Implement dynamic expressions assignment.
1247
1248 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1249
1250         * expression.cs: Build underlying expression when resolving unary
1251         mutators.
1252
1253 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1254
1255         * expression.cs: Emit enum array initializer using binary blob.
1256
1257 2009-10-08  Marek Safar  <marek.safar@gmail.com>
1258
1259         * typemanager.cs, constant.cs: Optimize decimal constants which fit
1260         to long range.
1261
1262 2009-10-07  Marek Safar  <marek.safar@gmail.com>
1263
1264         * typemanager.cs: Reset object_type.
1265         
1266         * assign: Made SimpleAssign public.
1267
1268 2009-10-06  Marek Safar  <marek.safar@gmail.com>
1269
1270         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
1271         invocation assembly to IsThisOrFriendAssembly.
1272
1273 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1274
1275         * expression.cs: Equality comparison of generic parameter with
1276         class constraint.
1277
1278 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1279
1280         A fix for bug #543570
1281         * generic.cs: Import predefined constraints correctly.
1282
1283 2009-10-02  Marek Safar  <marek.safar@gmail.com>
1284
1285         * ecore.cs: Don't crash on overloads with optional paremeters where
1286         arguments count overflows.
1287         
1288         * parameter.cs: Import optional parameter constants using optional
1289         value type.
1290
1291 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1292
1293         * Makefile: Default is gmcs compiler.
1294
1295 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1296
1297         * cs-parser.jay: Fixed few NRE.
1298
1299 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1300
1301         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
1302
1303 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1304
1305         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
1306         ShimExpression, ImplicitCast.
1307
1308 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1309
1310         A fix for bug #542959
1311         * delegate.cs: Emit correct delegate instance variable when there
1312         are static and non-static overloads.
1313
1314 2009-09-29  Marek Safar  <marek.safar@gmail.com>
1315
1316         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
1317         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
1318
1319 2009-09-28  Marek Safar  <marek.safar@gmail.com>
1320
1321         A fix for bug #542487
1322         * ecore.cs: Resolve extension methods hidden by properties.
1323
1324 2009-09-25  Marek Safar  <marek.safar@gmail.com>
1325
1326         * expression.cs, ecore.cs: More dynamic binary expressions.
1327
1328 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1329
1330         * nullable.cs, expression.cs: Fixed null lifted conversion for
1331         bitwise enum operations.
1332
1333 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1334
1335         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
1336         values in checked context.
1337
1338 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1339
1340         * expression.cs, ecore.cs: Fixed array index constant conversion.
1341
1342 2009-09-20  Miguel de Icaza  <miguel@novell.com>
1343
1344         * expression.cs: Do not crash when MemberLookup returns something
1345         that is not a MemberExpr here.   Report error 582 instead. 
1346
1347         Fixes #499988.
1348
1349 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1350
1351         * decl.cs, class.cs: Check protected property accessors.
1352
1353 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1354
1355         * dynamic.cs, assign.cs: Dynamic compound assignment.
1356
1357 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1358
1359         * expression.cs: Fixed compound assignment explicit conversion.
1360
1361 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1362
1363         * expression.cs, ecore.cs: Cannot infer variables from method group.
1364
1365 2009-09-16  Marek Safar  <marek.safar@gmail.com>
1366
1367         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
1368         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
1369         codegen.cs: Dynamic binary operations scaffolding.
1370
1371 2009-09-15  Marek Safar  <marek.safar@gmail.com>
1372
1373         * expression.cs: Fixes nullable promotion for enum type variables.
1374
1375 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1376
1377         * driver.cs, dynamic.cs: Reset more static variables.
1378
1379 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1380
1381         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
1382         driver.cs: Introduced Expression::MakeExpression.
1383
1384 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1385
1386         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
1387
1388 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1389
1390         * eval.cs, report.cs: Use Console.Out for all eval error or warning
1391         output.
1392
1393 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1394
1395         A fix for bug #518707
1396         * expression.cs (Is): Optimize only generic parameter type
1397         expression probing value type generic parameter.
1398
1399 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1400
1401         A fix for bug #532571
1402         * ecore.cs: Check for simple name type arguments used with
1403         non-generic type.
1404
1405 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1406
1407         A fix for bug #497421
1408         * generic.cs (CheckConstraint): Don't use buildin types to check for
1409         parameterless constructor.
1410
1411 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1412
1413         A fix for bug #537402
1414         * generic.cs (CheckConstraint): Correctly inflate generic type
1415         arguments when checking generic method. 
1416
1417 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1418
1419         A fix for bug #536463
1420         * decl.cs (AddToContainer): Don't report collision between explicit
1421         and parameterless non-explicit members.
1422
1423 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1424
1425         * eval.cs: Reset more static stuff.
1426
1427 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1428
1429         A fix for bug #324625
1430         * expression.cs, ecore.cs: Create nested generic type expression
1431         using declaring and not current type.
1432
1433 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1434
1435         * *.cs: Changed Report class to accept various output printers and
1436         be an instance class. An expression resolver can now use different
1437         message reporter for each call and Report.Error can safely throw
1438         an exception. Part of ongoing work to turn mcs into proper library.
1439
1440 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1441
1442         * statement.cs, ecore.cs: Removed error reporting from emit code.
1443
1444 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1445
1446         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1447
1448 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1449
1450         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1451         parser checks out of constructors.
1452
1453 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1454
1455         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1456
1457 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1458
1459         A fix for bug #535448
1460         * anonymous.cs, class.cs: Copy return label between all contexts.
1461
1462 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1463
1464         A fix for bug #535395
1465         * namespace.cs: Resolve context can be null.
1466
1467 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1468
1469         A fix for bug #533912
1470         * generic.cs: Use correct context for constraints resolving.
1471
1472 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1473
1474         A fix for bug #532630
1475         * driver.cs: Trim conditional symbols.
1476
1477 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1478
1479         * context.cs: New file.
1480         
1481         * *.exe.sources, *.csproj: Updated.
1482
1483 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1484
1485         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1486         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1487         IMembercontext, some small cleanups.
1488
1489 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1490
1491         * *.cs: Split ResolveContext and EmitContext.
1492
1493 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1494
1495         * *.cs: Only ResolveContext implements IMemberContext.
1496
1497 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1498
1499         * *.cs: Renamed IResolveContext to IMemberContext.
1500
1501 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1502
1503         * *.cs: Detached ResolveContext from EmitContext.
1504
1505 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1506
1507         * codegen.cs: Moved flow-analysis to BlockContext.
1508
1509 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1510
1511         * *.cs: Detached BlockContext from EmitContext.
1512
1513 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1514
1515         * statement.cs: avoid nullref when the return value of GetEnumerator()
1516         does not contain any MoveNext() method.
1517
1518 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1519
1520         * *.cs: Removed IResolveContext::GenericDeclContainer.
1521
1522 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1523
1524         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1525
1526 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1527
1528         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1529         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1530
1531 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1532
1533         * *.cs: Removed boolean fields from EmitContext.
1534
1535 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1536
1537         * *.cs: Add IResolveContext::IsStatic.
1538
1539 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1540
1541         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1542
1543 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1544
1545         * *.cs: Removed DeclContainer from EmitContext.
1546
1547 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1548
1549         * *.cs: Add IResolveContext::CurrentTypeParameters.
1550
1551 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1552
1553         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1554
1555 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1556
1557         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1558         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1559
1560 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1561
1562         * decl.cs: Look in PartialContainer for parent type parameters.
1563
1564 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1565
1566         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1567         codegen.cs: Add IResolveContext::LookupTypeParameter.
1568
1569 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1570
1571         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1572         Moved resolved logic from Emit to Resolve.
1573
1574 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1575
1576         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1577         codegen.cs: Reworked atttributes handling of ResolveContext.
1578
1579 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1580
1581         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1582         LookupNamespaceOrType to ResolveContext.
1583
1584 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1585
1586         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1587         class.cs: Removed unused parameters and methods.
1588
1589 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1590
1591         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1592         codegen.cs: Finding the best common type of a set of expressions for
1593         lambda statements.
1594
1595 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1596
1597         * dynamic.cs, expression.cs: More dynamic conversions.
1598
1599 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1600
1601         * generic.cs: This loop was incorrect, it was increment ii, but
1602         checking for `i'.  This was a change introduced to fix #327497,
1603         now we fix #424012.
1604  
1605         * class.cs: Catch another case for cs0533 error, fixes #324782.
1606
1607 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1608
1609         * typemanager.cs (GetGenericArguments): SRE returns null for
1610         generic methods on type builder instances if they are not generic
1611         themselves. For example, for Foo<int>::Bar() it returns null, but
1612         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1613
1614 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1615
1616         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1617         delegate.cs: Work on dynamic binding.
1618
1619 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1620
1621         A second fix for bug #525342
1622         * class.cs: Attach partial method attributes to method
1623         implementation.
1624
1625 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1626
1627         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1628         restrictions.
1629         
1630         * rootcontext.cs: Default to langversion v4.
1631
1632 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1633
1634         * pending.cs: Check return type before member info is set.
1635
1636 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1637
1638         * anonymous.cs: Fully initialize generic hoisted field expression.
1639
1640 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1641
1642         * cs-parser.jay: Flag variables declared on the interactive shell
1643         as used to prevent the 168 warning about local variable not being
1644         used. 
1645
1646 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1647
1648         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1649         attribute.cs: Emit dynamic export attribute.
1650
1651 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1652
1653         * expression.cs: More verifier work.
1654
1655 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1656
1657         * nullable.cs: Fixed SRE crash during corlib compilation.
1658
1659 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1660
1661         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1662         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1663         More TypeManager.TypeToCoreType needed.
1664
1665 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1666
1667         * anonymous.cs: Update after recent SRE fixes.
1668
1669 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1670
1671         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1672         version of GetFieldHandle for fields of generic types.
1673
1674 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1675
1676         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1677         ecore.cs: Add TypeManager.IsDynamicType,
1678         PredefinedAttributes.Dynamic.
1679
1680 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1681
1682         A fix for bug #415375
1683         * expression.cs: Fixed object and reference type parameter
1684         comparison.
1685
1686 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1687
1688         A fix for bug #525342
1689         * class.cs: Attach partial method attributes to method
1690         implementation.
1691
1692 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1693
1694         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1695         Dynamic arguments.
1696
1697 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1698
1699         * anonymous.cs (MutateField): Add imported types handling.
1700
1701 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1702
1703         * expression.cs, delegate.cs: Moved arguments resolve into their
1704         counterparts expressions. Removed argument resolve from
1705         CollectionElementInitializer.
1706
1707 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1708
1709         A fix for bug #523683
1710         * convert.cs, delegate.cs: Use common overload mechanism for method
1711         group conversion check.
1712
1713 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1714
1715         A fix for bug #523899
1716         * generics.cs: Exact type inference with other bound types.
1717
1718 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1719
1720         Don't complain when the same type is implemented by the output
1721         assembly as well as multiple referenced assemblies
1722         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1723         'must_be_unique' flag.
1724         (GlobalRootNamespace): Update to changes.
1725         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1726         already have a type in hand.
1727
1728 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1729
1730         * expression.cs: More verifier instrumentation.
1731         
1732         * statement.cs: Do proper throw expression conversion.
1733
1734 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1735
1736         A fix for bug #522789
1737         * expression.cs: Mutate invocation return type.
1738
1739 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1740
1741         * anonymous.cs: Split assignable and readonly generated variable
1742         references.
1743
1744 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1745
1746         A fix for bug #521671
1747         * statement.cs: Fixed crash when checking missing type.
1748
1749 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1750
1751         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1752         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1753         class.cs, driver.cs: Work on dynamic binding.
1754
1755         * dynamic.cs: New file.
1756
1757         * *.sources, *.proj: Updated.
1758
1759 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1760
1761         * expression.cs (Conditional): Avoid double Resolve.
1762
1763 2009-07-13  Marcus Griep  <marcus@griep.us>
1764
1765         * ecore.cs: Fix obscure bug with resolving members of interfaces
1766         that hide parent interface members. Fixes bug #444388 and corrects
1767         bug #323096
1768
1769 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1770
1771         * expression.cs (LocalVariableReference): Bounce resolve.
1772
1773 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1774
1775         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1776         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1777         types to new class.
1778         
1779         * support.cs: New dynamic type wrapper.
1780
1781 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1782
1783         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1784         typed local variable.
1785
1786 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1787
1788         A fix for bug #519005
1789         * anonymous.cs: Use null_type as no return type placeholder.
1790
1791 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1792
1793         * generic.cs: Handle type inference of identical type parameters
1794         with different bounds.
1795
1796 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1797
1798         * expression.cs, class.cs: Events variance.
1799         
1800         * cs-parser.jay: Interface events error messages.
1801
1802 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1803
1804         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1805
1806 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1807
1808         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1809         parameter expression can be value-type New.
1810
1811         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1812
1813 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1814
1815         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1816         Implemented C# 4.0 named arguments.
1817
1818 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1819
1820         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1821         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1822         parameter modifier. Also fixes bug #515497.
1823
1824 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1825
1826         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1827         arguments expression to be implemented.
1828         
1829         *.sources: Add argument.cs
1830
1831 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1832
1833         * parameter.cs: Moved GetParameterIndexByName to base class.
1834         
1835         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1836         unused AType. Use argument's version of GetExpressionTree.
1837
1838 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1839
1840         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1841         arguments grammar.
1842
1843 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1844
1845         A fix for bug #514096
1846         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1847
1848 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1849
1850         * expression.cs: The first multi-dimensional array nested array
1851         initializers was not checked.
1852         
1853         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1854
1855 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1856
1857         A fix for bug #513400
1858         * nullable.cs (EmitEquality): Operands emit could be simplified for
1859         built-in types when we now emit user operators differently.
1860
1861 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1862
1863         * ecore.cs: Report inaccessible delegate methods correctly.
1864
1865 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1866
1867         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1868         cs-parser.jay: Implemented C# 4.0 optional parameters.
1869
1870 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1871
1872         * driver.cs: Removed broken DefineManifestResource.
1873
1874 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1875
1876         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1877         Use $(BOOTSTRAP_PROFILE) instead.
1878
1879 2009-06-12  Jb Evain  <jbevain@novell.com>
1880
1881         * rootcontext.cs: add a Platform field.
1882         * driver.cs: handle /platform.
1883         * codegen.cs: pass the proper flags according to
1884         the platform when saving the assembly.
1885
1886 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1887
1888         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1889         Add optional parameters grammar.
1890
1891 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1892
1893         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1894         driver.cs: Split lang version and metadata version.
1895
1896 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1897
1898         * decl.cs: Better overload ctor collision error message.
1899
1900 2009-06-05  Jb Evain  <jbevain@novell.com>
1901
1902         * driver.cs (EmbededResource): avoid using an internal method
1903         in gmcs to embed manifest resources.
1904
1905 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1906
1907         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1908         the compiler from older mono versions (like moon's bots)
1909
1910 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1911
1912         * namespace.cs (LookupTypeReflection): Ignore collisions between
1913         forwarded types.
1914
1915 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1916
1917         * codegen.cs: Enabled generic type forwarders.
1918
1919 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1920
1921         * dmcs.*: Add another version of SRE compiler.
1922
1923 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1924
1925         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1926         generic-mcs.cs: Fixed variant type conversions.
1927
1928 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1929
1930         A fix for bug #507863
1931         * codegen.cs: Fixes a crash on invalid string value attribute.
1932
1933 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1934
1935         A fix for bug #508334
1936         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1937         cs-parser.jay: Fully import __arglist modifier.
1938
1939 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1940
1941         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1942         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1943         actually work with closed generic types.
1944
1945 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1946
1947         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1948         Fix the build by replacing the use of 'var' with the actual type.
1949
1950 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1951
1952         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1953     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1954         declarations.
1955           
1956         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1957         filter.
1958
1959 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1960                         Marek Safar  <marek.safar@gmail.com>
1961
1962         A fix for bug #377509
1963         * parameter.cs: Use predefined and not empty name for implicit
1964         setters.
1965
1966 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1967
1968         * class.cs: Don't report wrong warnings for event fields.
1969
1970 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1971
1972         A fix for bug #504667
1973         * class.cs: Check for static class using parent container instead of
1974         parent type.
1975
1976 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1977
1978         A fix for bug #496922
1979         * expression.cs: Always use temporary variable when using object
1980         initializer.
1981
1982 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1983
1984         A fix for bug #495112
1985         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1986         local cache.
1987
1988 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1989
1990         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1991
1992 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1993
1994         * complete.cs: No idea how gonzalo got a null in the list, but
1995         avoid crashing.
1996
1997 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1998
1999         * complete.cs (CompletionElementInitializer): New completion class
2000         to support completing inside a C# 3 element initializer, so this
2001         allows completion for Silverlight situations where it is very
2002         common to do:
2003
2004         new TextBlock () { Fo<TAB>
2005
2006         (CompletionSimpleName): Expose the prefix that was
2007         passed to the simple name.
2008
2009         * cs-parser.jay (object_or_collection_initializer): Add support
2010         for element_initializers.
2011
2012         * expression.cs (CollectionOrObjectInitializers.DoResolve):
2013         special case completion expressions as this method aggressively
2014         collects data before it operates, and errors were being thrown
2015         earlier than we were able to complete.
2016
2017 2009-04-23  Miguel de Icaza  <miguel@novell.com>
2018
2019         * eval.cs: Make getcompletions silent and enable debugging output
2020         if the -v option is passed.
2021
2022         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
2023         Consider looking up the namespace that matches the prefix being
2024         used. 
2025
2026         This is part of the support for allowing completions like:
2027         `System.Co<TAB>' to complete to System.Console.
2028
2029         * complete.cs (CompletionSimpleName.AppendResults): Make this
2030         routine reusable.
2031
2032 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
2033
2034         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
2035         COMPLETE_COMPLETION as internal.
2036
2037 2009-04-17  Miguel de Icaza  <miguel@novell.com>
2038
2039         * complete.cs: Include namespace resolution in simple names as
2040         well as global types and types in the using scope in the
2041         resolution. 
2042
2043         * namespace.cs: Supporting infrastrcture to provide completions
2044         based on the current using scope. 
2045
2046         * eval.cs: Introduce an entry point that allows for initialization
2047         to return a list of the files passed on the command line.
2048
2049 2009-04-14  Marek Safar  <marek.safar@gmail.com>
2050
2051         A fix for bug #494243
2052         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
2053
2054 2009-04-13  Marek Safar  <marek.safar@gmail.com>
2055
2056         A fix for bug #493887
2057         * statement.cs: Don't skip string multi-section with default or
2058         null label when populating string hashtable.
2059
2060 2009-04-06  Marek Safar  <marek.safar@gmail.com>
2061
2062         A fix for bug #492329
2063         * expression.cs (New): Load variable when assigning type parameter
2064         to ref variable.
2065
2066 2009-04-06  Marek Safar  <marek.safar@gmail.com>
2067
2068         A fix for bug #488960
2069         * decl.cs: Compare MVAR types using non-null values.
2070
2071 2009-03-27  Marek Safar  <marek.safar@gmail.com>
2072
2073         * typemanager.cs, expression.cs: Removed unused nullable checks.
2074
2075 2009-03-27  Marek Safar  <marek.safar@gmail.com>
2076
2077         * *.cs: Removed some gmcs conditionals.
2078
2079 2009-03-26  Marek Safar  <marek.safar@gmail.com>
2080
2081         * generic.cs, support.cs: Moved generics stuff out of support.cs
2082
2083 2009-03-24  Marek Safar  <marek.safar@gmail.com>
2084
2085         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
2086         DeclaringType.
2087
2088 2009-03-23  Marek Safar  <marek.safar@gmail.com>
2089
2090         * attribute.cs: Consider all members for error reporting when
2091         checking named arguments.
2092
2093 2009-03-23  Marek Safar  <marek.safar@gmail.com>
2094
2095         A fix for bug #487625
2096         * namespace.cs: Use a warning for all predefined type conflicts.
2097
2098 2009-03-23  Marek Safar  <marek.safar@gmail.com>
2099
2100         A fix for bug #485706
2101         * statement.cs: Explicitly type catch type argument to pass verifier
2102         check.
2103
2104 2009-03-22  Miguel de Icaza  <miguel@novell.com>
2105
2106         Initial support to provide code completion facilities to consumers
2107         of the evaluator API.
2108         
2109         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
2110         support the completion engine.   When we reach the end of the
2111         input stream instead of returning EOF, when this flag is true the
2112         tokenizer instead produces:
2113
2114                 One GENERATE_COMPLETION token: this token then must be
2115                 handled in the grammar at every point where the user
2116                 would likely request a completion.
2117
2118                 As many COMPLETE_COMPLETION tokens as necessary.   These
2119                 tokens are generated to assist the parser in unwinding and
2120                 producing a valid parse tree.    
2121
2122         The parser rules do not have to be perfect, the parser needs to be
2123         augmented with judicious use of GENERATE_COMPLETION tokens to
2124         improve the areas where we can provide completion and the parser
2125         needs to add support for COMPLETE_COMPLETION tokens in productions
2126         to make them work.
2127
2128         It is common to not have enough support for COMPLETE_COMPLETION
2129         under certain rules and that even if we generated the
2130         GENERATE_COMPLETION token that the resulting tree will be invalid
2131         due to the missing rules that support COMPLETE_COMPLETION.
2132
2133         The final EOF token is produced by having the parser notify the
2134         tokenizer when it reaches the root production that the next token
2135         should be EOF.
2136
2137         * support.cs (CompletionResult): New Exception.   This exception
2138         is thrown to return the completion results when one of the special
2139         completion expressions is reached.
2140
2141         This exception is thrown by the completing ExpressionStatements
2142         classes that live in complete.cs
2143
2144         * complete.cs (CompletingExpression): a new base class for
2145         completing expressions.   This derives from the
2146         ExpressionStatement class and not from Expression as it allows
2147         completion to happen not only where expressions are expected in
2148         the grammar, but also where statements are expected.
2149
2150         (CompletionSimpleName): A new class used to provide completions
2151         for SimpleNames.     This currently only resolves to local
2152         variables from the evaluator context (GetVars call).
2153
2154         (CompletionMemberAccess): Implements support for completing member
2155         access patterns. 
2156
2157         * cs-parser.jay: Add support for completion in a few places. 
2158
2159         * eval.cs (GetCompletions): New public API for the evaluator that
2160         returns a list of possible completions given the input.   The
2161         return value is an array of completions 
2162
2163         * anonymous.cs (Compatible): If the exception thrown from the
2164         resolved expression is a CompletionResult exception let that one
2165         through instead of printing a diagnostic error in the try/catch. 
2166 <       
2167 2009-03-22  Miguel de Icaza  <miguel@novell.com>
2168
2169         * 
2170
2171         * driver.cs (Main): Use Environment.Exit to quit quickly and
2172         prevent the compiler from doing the usual wait for helper thread
2173         to terminate.  
2174
2175         This is to prevent a slowdown that was reported by Gonzalo on
2176         ASP.NET 
2177
2178 2009-03-19  Marek Safar  <marek.safar@gmail.com>
2179
2180         * ecore.cs: Load build-in types directly instead of accessing
2181         an internal field.
2182
2183 2009-03-18  Marek Safar  <marek.safar@gmail.com>
2184
2185         * ecore.cs: Always use unbox.any when available.
2186
2187 2009-03-18  Marek Safar  <marek.safar@gmail.com>
2188
2189         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
2190
2191 2009-03-17  Marek Safar  <marek.safar@gmail.com>
2192
2193         * generic.cs: Removed obsolete version of type inference.
2194
2195 2009-03-16  Marek Safar  <marek.safar@gmail.com>
2196
2197         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
2198         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
2199         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
2200         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
2201
2202 2009-03-11  Marek Safar  <marek.safar@gmail.com>
2203
2204         A fix for bug #482996
2205         * anonymous.cs: Make sure we are not infering return type when
2206         checking type compatibility.
2207
2208 2009-03-11  Marek Safar  <marek.safar@gmail.com>
2209
2210         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
2211         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
2212         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
2213         attributes in their own structure. Needed when accessing their
2214         properties before they are resolved.
2215
2216 2009-03-09  Marek Safar  <marek.safar@gmail.com>
2217
2218         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
2219         hashtable (~10x faster).
2220         
2221         * driver.cs: Removed wrong Reset.
2222
2223 2009-03-08  Marek Safar  <marek.safar@gmail.com>
2224
2225         * class.cs: Use correct common base type for unmanaged delayed
2226         check.
2227
2228         * rootcontext.cs: Wrap unhandled exception.
2229
2230 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
2231
2232         Make SeekableStreamReader self-tuning and arbitrarily seekable
2233         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
2234         the buffer.
2235         (SeekableStreamReader.Position.set): Use it.  Simplify logic
2236         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
2237         buffer size when the stream needs to be re-read from the beginning.
2238
2239 2009-03-05  Marek Safar  <marek.safar@gmail.com>
2240
2241         A fix for bug #480100
2242         * parameter.cs: A parameter is not hoisted when used directly as ET.
2243
2244 2009-03-04  Marek Safar  <marek.safar@gmail.com>
2245
2246         * statement.cs: Fixed an issue when using variable is of interface
2247         type.
2248
2249 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2250
2251         A fix for bug #480319
2252         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
2253
2254 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2255
2256         A fix for bug #480867
2257         * typemanager.cs, expression.cs, ecore.cs: Changed method group
2258         expression to have no valid type.
2259
2260 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2261
2262         A fix for bug #481258
2263         * class.cs: Set extension method flag in partial container.
2264
2265 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2266
2267         * statement.cs, typemanager.cs: Use expression for StringEmitter.
2268         
2269         * attribute.cs: Add sanity check.
2270
2271 2009-02-27  Marek Safar  <marek.safar@gmail.com>
2272
2273         * class.cs: Add external constructor error.
2274
2275 2009-02-26  Marek Safar  <marek.safar@gmail.com>
2276
2277         A fix for bug #475354
2278         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
2279         correctly user defined nullable equality operators.
2280
2281 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2282
2283         A fix for bug #479532
2284         * expression.cs: Implement NewInitialize::AddressOf.
2285
2286 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2287
2288         A fix for bug #413633
2289         * expression.cs: Iterate all base class-constraint types.
2290
2291 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2292
2293         A fix for bug #479209
2294         * literal.cs: Mutate null underlying type.
2295
2296 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2297
2298         A fix for bug #476295
2299         * convert.cs: Avoid wrapping implicitly convertible reference type.
2300
2301 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2302
2303         * iterators.cs: Create MemberName correctly.
2304
2305 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2306
2307         A fix for bug #478655
2308         * literal.cs: Check also underlying null type conversion.
2309
2310 2009-02-21  Marek Safar  <marek.safar@gmail.com>
2311
2312         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
2313
2314 2009-02-20  Marek Safar  <marek.safar@gmail.com>
2315
2316         A fix for bug #477447
2317         * statement.cs: Add reference to correct parent storey when this
2318         is accessible from deep children storey (more than 1 level).
2319
2320 2009-02-19  Marek Safar  <marek.safar@gmail.com>
2321
2322         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
2323         * class.cs: Define base type members before setting up member cache.
2324
2325 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2326
2327         A fix for bug #477378
2328         * nullable.cs, expression.cs, statement.cs: More precise null type
2329         sanity checks.
2330
2331 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2332
2333         A fix for bug #472805
2334         * typemanager.cs, namespace.cs: Import only visible extension method
2335         types.
2336
2337 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2338
2339         A fix for bug #476895
2340         * attribute.cs: Use correct resolve context for attribute type.
2341
2342 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2343
2344         A fix for bug #476266
2345         * anonymous.cs: Mutate multi-dimensional arrays.
2346
2347 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2348
2349         A fix for bug #476400
2350         * statement.cs, expression.cs: Removed wrong Dispose optimization.
2351
2352 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2353
2354         A fix for bug #476811
2355         * generics.cs: Fixed null-literal check.
2356
2357 2009-02-17  Marek Safar  <marek.safar@gmail.com>
2358
2359         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
2360         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
2361         messing with static variables.
2362
2363 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2364
2365         A fix for bug #475965
2366         * generics.cs: Check generic parameter type after extracting from
2367         Expression<T>.
2368
2369 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2370
2371         A fix for bug #475823
2372         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
2373         typed-null support.
2374
2375 2009-02-14  Marek Safar  <marek.safar@gmail.com>
2376
2377         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
2378         Simplified event field definition using backing field and not
2379         field builder directly.
2380
2381         * expression.cs (EmitLdArg): Optimize fast paths.
2382
2383 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2384
2385         A fix for bug #475327
2386         * expression.cs (ArrayCreation): Don't mutate values optimized away.
2387
2388 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2389
2390         A fix for bug #475342
2391         * cs-parser.jay: Using 'super' instead of 'base' to call base
2392         constructor crashes compiler.
2393
2394 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2395
2396         A fix for bug #475354
2397         * expression.cs (Constantify): Add nullable types.
2398         
2399         * const.cs (EmitDecimalConstant): Avoid explicit cast.
2400
2401 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2402
2403         A fix for bug #475246
2404         * expression.cs: More broken flowanalysis hacking needed.
2405
2406 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2407
2408         * attribute.cs: Compare only ref/out array modifiers. 
2409
2410 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2411
2412         * statement.cs: Use member cache when looking for foreach members.
2413
2414 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2415
2416         * expression.cs: Don't expose internal initializer types.
2417         
2418         * statement.cs: Check also explicit conversions for goto case.
2419
2420 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2421
2422         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2423
2424 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2425
2426         * *.cs: Replace null-type with NullLiteral where appropriate.
2427
2428 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2429
2430         * expression.cs: Initializer of reference argument use temporary
2431         variable to be verifiable.
2432         
2433         * parameter.cs: Share EmitLdArg.
2434
2435 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2436
2437         A fix for bug #473559
2438         * class.cs: Fixed: Not reporting error about nested class with the
2439         same name.
2440
2441 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2442
2443         Contributed under the MIT/X11 license.
2444
2445         * generic.cs: Added VerifyVariantTypeParameters which performs new
2446         variance verification logic. The old logic, based on the spec, was
2447         wrong because the spec is full of LIES!
2448
2449         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2450
2451         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2452
2453         * class.cs:
2454         * ecore.cs: Added calls to the new variance verification logic.
2455
2456         * parameter.cs:
2457         * delegate.cs: Removed calls to the old variance verification logic.
2458
2459 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2460
2461         * delegate.cs: Use cached Invoke method directly.
2462
2463 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2464
2465         * expression.cs: Emit expression tree for hoisted variable access.
2466
2467 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2468
2469         * namespace.cs: Add better extension class check.
2470
2471 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2472
2473         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2474
2475 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2476
2477         This patch adds initial generic variance support to the compiler.
2478         It is contributed under the MIT/X11 license.
2479
2480         * typemanager.cs: Modified ImplementsInterface to check variance.
2481         Added VerifyVariantTypeParameters which checks the specified type to see
2482         if it uses a variant type parameter as a type argument (which is not
2483         allowed). Added IsVariantOf which determins if the first type is a
2484         variant of the second. NOTE: This only supports reference types at
2485         the moment to conform with the current level of VM support. When the
2486         VM supports value types, this will follow step.
2487
2488         * generic.cs: Added the Variance enum. Added a Variance property to
2489         TypeParameter and added variance support to definition phase. Added a
2490         Variance property to TypeParameterName. Also check to make sure that
2491         no variant types appear in generic method parameters.
2492
2493         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2494         keywords if the langversion supports it.
2495
2496         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2497         that variant types are only used in legal positions. Also added
2498         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2499         parameters.
2500
2501         * decl.cs: Construct TypeParameter with the variance information.
2502
2503         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2504         and ImplicitConversionStandard.
2505
2506         * rootcontext.cs: Added new "Future" language version.
2507
2508         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2509         type parameters are not used as type arguments in interface inheritance.
2510         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2511         parameters are not used as method return types. In MemberBase.
2512         ResolveMemberType, ensure that variant type parameters are not used
2513         as type arguments. Also call VerifyNoVariantTypeParameters on every
2514         set of parameters which are resolved.
2515
2516         * delegate.cs: Modified Delegate.Define to ensure that variant
2517         parameters are not used as type arguments and that a contravariant
2518         parameter is not used as the return type. Also call
2519         VerifyNoVariantTypeParameters on the delegate parameters.
2520
2521         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2522         to specify generic variance.
2523
2524         * driver.cs: Added support for LanguageVersion.Future in the form of
2525         "-langversion:future".
2526
2527         * generic-mcs.cs: Stubbed out new members in generic.cs.
2528
2529 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2530
2531         * class.cs, generic.cs: Emit type parameter constraints for nested
2532         types.
2533
2534 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2535
2536         A fix for bug #471213
2537         * class.cs: Avoid emitting backing field for abstract event fields.
2538
2539 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2540
2541         A fix for bug #359731
2542         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2543         expressions.
2544
2545 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2546
2547         A fix for bug #470767
2548         * statement.cs: Introduced BlockScopeExpression, needed when 
2549         expression tree conversion has to emit scope variables.
2550
2551 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2552
2553         * class.cs: Remove duplicate CallingConvention.
2554
2555 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2556
2557         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2558         when I finally found the right naming convention.
2559
2560 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2561
2562         * cs-tokenizer.cs: Put back different open parens optimization.
2563
2564 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2565
2566         A fix for bug #470227
2567         * cs-tokenizer.cs: Remove too agressive parser optimization.
2568
2569 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2570
2571         A fix for bug #324319
2572         * class.cs: Remove too early base type resolve.
2573
2574 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2575
2576         A fix for bug #324319
2577         * ecore.cs: Explicitly type null when assigning to type argument to
2578         make pass verifier check.
2579
2580 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2581
2582         * anonymous.cs: Fixed recent regression when initializing captured 
2583         this.
2584
2585 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2586
2587         A fix for bug #469019
2588         * anonymous.cs: Use all parent type parameters when instantiating
2589         nested generic storey.
2590
2591 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2592
2593         * expression.cs: Check for null instance methodgroup expression.
2594
2595 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2596
2597         A fix for bug #469244
2598         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2599         instance inside a conditional expression.
2600
2601 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2602
2603         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2604         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2605         GetElementType and HasElementType. IsValueType clean up.
2606
2607 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2608
2609         * nullable.cs: Use common EmitCall.
2610         
2611         * expression.cs: Emit constraint. for virtual calls only.
2612
2613 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2614
2615         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2616         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2617         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2618         checks.
2619
2620 2009-01-22  Jb Evain  <jbevain@novell.com>
2621
2622         * anonymous.cs: make anonymous types' ToString implementation
2623         match what csc outputs.
2624
2625 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2626
2627         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2628         up.
2629
2630 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2631
2632         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2633         verifier checks.
2634
2635 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2636
2637         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2638         expressions.
2639
2640 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2641
2642         A fix for bug #466634
2643         * statement.cs: Add reference for nested storey when only this
2644         is captured.
2645
2646 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2647
2648         A fix for bug #466474
2649         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2650         was specified.
2651
2652 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2653
2654         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2655         Fixed nested stories parent referencing process. Also fixes #463985.
2656
2657 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2658
2659         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2660         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2661         implementation. Also fixes #463108.
2662
2663 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2664
2665         A fix for bug #416109
2666         * decl.cs: Issue correct CLSAttribute warning location.
2667
2668 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2669
2670         A fix for bug #456775
2671         * attribute.cs: Use attribute owner scope when resolving attribute
2672         arguments.
2673
2674 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2675
2676         A fix for bug #457257
2677         * decl.cs: Fixed incorrect member declaring type comparison.
2678
2679 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2680
2681         A fix for bug #460896
2682         * driver.cs: Handle /RES resources as embeddable.
2683
2684 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2685
2686         A fix for bug #462515
2687         * ecore.cs: Report inacessible members upwards.
2688
2689 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2690
2691         A fix for bug #463190, #463192
2692         * decl.cs, namespace.cs: Also import internal extension classes.
2693
2694 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2695
2696         A fix for bug #463415
2697         * generic.cs: Use right index for RemoveDependentTypes.
2698
2699 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2700
2701         A fix for bug #463196
2702         * expression.cs: Fixed enum to null comparison.
2703
2704 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2705
2706         A fix for bug #463121
2707         * nullable.cs: Fixed nullable user equality operator comparison.
2708
2709 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2710
2711         A fix for bug #462950
2712         * class.cs, decl.cs: Use full explicit name when defining automatic
2713         property backing field.
2714
2715 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2716
2717         A fix for bug #462592
2718         * pending.cs: Emit type arguments for generic proxy method.
2719
2720 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2721
2722         * expression.cs (As): Mutate all type arguments.
2723
2724 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2725
2726         A fix for bug #462622
2727         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2728         context.
2729
2730 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2731
2732         A fix for bug #450782
2733         * ecore.cs: Consider more variables of form V.I to be fixed.
2734
2735 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2736
2737         A fix for bug #460712
2738         * typemanager.cs: Core types could be imported.
2739
2740 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2741
2742         A fix for bugs #460847, #460772, #458049, #457339, #447807
2743         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2744         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2745         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2746         user lambdas used inside query clauses.
2747
2748 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2749
2750         A fix for bug #460229
2751         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2752
2753 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2754
2755         A fix for bug #459952
2756         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2757
2758 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2759
2760         A fix for bug #459630
2761         * convert.cs: Enum to valuetype conversion is not allowed.
2762
2763 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2764
2765         A fix for bug #457087
2766         * generic.cs: Don't crash when constraint comes from type
2767         declaration.
2768
2769 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2770
2771         A fix for bug #459221
2772         * anonymous.cs, statement.cs: Delay only captured this
2773         initialization.
2774
2775 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2776
2777         A fix for bug #457489
2778         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2779         and initialization to capture scope initializers correctly.
2780
2781 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2782
2783         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2784         ParameterReference refactoring.
2785
2786 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2787
2788         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2789         to be imported from any assembly.
2790
2791 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2792
2793         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2794         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2795         from anonymous method and lambda expression.
2796
2797 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2798
2799         A fix for bug #448560
2800         * expression.cs (As): Box any generic type arguments to be
2801         verifiable.
2802
2803 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2804
2805         Add tripwire for implicit conversion bugs
2806         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2807         for CS1501 error.
2808         (MethodGroupExpr.OverloadResolve): Add sanity check between
2809         IsApplicable and VerifyArgumentsCompat.
2810         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2811
2812 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2813
2814         Fix build break in System.Data_test
2815         * convert.cs (ImplicitConversionExists): Move NullLiteral
2816         conversions ...
2817         (ImplicitStandardConversionExists): ... here.
2818
2819 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2820
2821         * literal.cs: Emit correctly explicit null to nullable cast.
2822
2823 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2824
2825         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2826         resolve.
2827
2828 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2829
2830         A fix for bug #449005
2831         * convert.cs, nullable.cs: Use only one implicit nullable
2832         conversion.
2833
2834 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2835
2836         * convert.cs, literal.cs: More Convert cleanup is needed.
2837
2838 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2839
2840         * decl.cs, class.cs: Fixed misleading error message.
2841
2842 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2843
2844         A fix for bug #449005
2845         * nullable.cs (EmitEquality): Disable optimization for user operator
2846         operands.
2847
2848 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2849
2850         A fix for bug #447027
2851         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2852         with context variables stored as expression instances.
2853
2854 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2855
2856         A fix for bug #447027
2857         * delegate.cs: Fixed delegate VerifyMethod logic.
2858
2859 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2860
2861         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2862         but not verifiable.
2863
2864 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2865
2866         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2867         member type resolve to follow normal flow, instead of random
2868         property access.
2869
2870 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2871
2872         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2873         type.
2874
2875 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2876
2877         * const.cs: Emit decimal array constant as literal.
2878
2879 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2880
2881         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2882
2883 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2884
2885         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2886         into real property (saves 8 MB for corlib compilation).
2887
2888 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2889
2890         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2891         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2892         generic-mcs.cs: Small cleanup of TypeArguments.
2893
2894 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2895
2896         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2897         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2898         of ConstructedType expression, renamed to GenericTypeExpr.
2899
2900 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2901
2902         A fix for bug #445303
2903         * location.cs (IsConditionalDefined): Handle undefined global
2904         defines.
2905
2906 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2907
2908         A fix for bug #444678
2909         * expression.cs (TryReduceConstant): Always create new constant
2910         instance.
2911
2912 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2913
2914         A fix for bug #444673
2915         * ecore.cs: Ignore open generic types when used as generic type
2916         instance fields.
2917
2918 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2919
2920         A fix for bug #445458
2921         * expression.cs, cs-parser.jay: Don't crash when an expression
2922         statement is null.
2923
2924 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2925
2926         A fix for bug #445464
2927         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2928         inside unbound type.
2929
2930 2008-11-14  Jb Evain  <jbevain@novell.com>
2931
2932         * driver.cs: ignore empty -nowarn argument such as
2933         the one in -nowarn:12,13,,.
2934
2935 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2936
2937         A fix for bug #444271
2938         * anonymous.cs: Rescan parent storeys when best candidate was
2939         undone.
2940
2941 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2942
2943         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2944         useless UnboundTypeExpression.
2945         
2946         * attribute.cs: Do check obsolete attribute on generic types.
2947
2948 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2949
2950         A fix for bugs #425680, #400139
2951         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2952         refactoring.
2953
2954 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2955
2956         A fix for bug #435747
2957         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2958         compound value types assignment. Few micro optimizations added.
2959
2960 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2961
2962         A fix for bug #442610
2963         * anonymous.cs (MutateConstructor): More SRE hacking.
2964
2965 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2966
2967         A fix for bug #442579
2968         * ecore.cs: Also initialize expanded form of a method with 1 params
2969         parameter.
2970
2971 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2972
2973         * expression.cs (UnaryMutator): Do early l-side check.
2974
2975 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2976
2977         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2978         Init, otherwise we would crash later on when checking for friend
2979         assemblies. 
2980
2981         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2982         Otherwise we never get any meaningful information as to what
2983         failed. 
2984
2985 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2986
2987         A fix for bug #436318
2988         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2989
2990 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2991
2992         * namespace.cs: Turns out that it was a really bad idea to hide
2993         the errors for namespaces not found here in eval mode.    
2994
2995         * eval.cs: When we process using clauses, only enter those into
2996         the list of valid using clauses after they have been validated.   
2997
2998         The above change gives the proper semantics: it does not
2999         senselessly report the same errors with broken using statements by
3000         never storing them in the first place when they are invalid.
3001
3002 2008-11-05  Marek Safar  <marek.safar@gmail.com>
3003
3004         A fix for bug #421839
3005         * cs-parser.jay: Remove expression from coalesce rule to force lower
3006         priority than the assignment operator.
3007
3008 2008-11-05  Marek Safar  <marek.safar@gmail.com>
3009
3010         A fix for bug #437875
3011         * nullable.cs: Compile correctly method group operand used with null
3012         coalescing operator.
3013
3014 2008-11-04  Marek Safar  <marek.safar@gmail.com>
3015
3016         A fix for bug #434589
3017         * expression.cs (Binary): Ignore lifted conversions when at least
3018         one operand is of reference type.
3019
3020 2008-11-04  Marek Safar  <marek.safar@gmail.com>
3021
3022         * cs-parser.jay: Better syntax error report.
3023
3024 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3025
3026         A fix for bug #436792
3027         * cs-parser.jay: Use GetLocation to access location.
3028
3029 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3030
3031         A fix for bug #440774
3032         * cs-parser.jay: Also set current_array_type when parsing local
3033         variables types.
3034
3035 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3036
3037         A fix for bug #440785
3038         * expression.cs (As): Don't resolve self modifing expression
3039         multiple times.
3040
3041 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3042
3043         A fix for bug #439447
3044         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
3045
3046 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3047
3048         A fix for bug #437571
3049         * cs-parser.jay: Fixes internal error for invalid expression
3050         statements.
3051
3052 2008-10-17  Marek Safar  <marek.safar@gmail.com>
3053
3054         * ecore.cs: Resolve correctly ambiguous params delegate methods.
3055
3056 2008-10-17  Marek Safar  <marek.safar@gmail.com>
3057
3058         * generic.cs, anonymous.cs: Simplified GetDeclarations.
3059
3060 2008-10-17  Marek Safar  <marek.safar@gmail.com>
3061
3062         * cs-tokenizer.cs: More precise cast parsing.
3063
3064 2008-10-16  Martin Baulig  <martin@ximian.com>
3065
3066         * anonymous.cs (AnonymousMethodStorey): Put back the
3067         `hoisted_locals' hashtable and use it in EmitType().
3068
3069 2008-10-15  Marek Safar  <marek.safar@gmail.com>
3070
3071         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
3072         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
3073         ~5MB for corlib.
3074
3075 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3076
3077         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
3078
3079 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3080
3081         * statement.cs: Mutate scope initializers.
3082
3083 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3084
3085         * expression.cs: Use typeless value for This constant.
3086         
3087         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
3088
3089 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3090
3091         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
3092         tokenizer.
3093
3094 2008-10-13  Marek Safar  <marek.safar@gmail.com>
3095
3096         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
3097         type to type cast.
3098
3099 2008-10-13  Marek Safar  <marek.safar@gmail.com>
3100
3101         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
3102         parser and tokenizer. Fixes many ambiguities including #433258.
3103
3104 2008-10-10  Marek Safar  <marek.safar@gmail.com>
3105
3106         * cs-parser.jay: Fixed missing accessor recovery.
3107
3108 2008-10-10  Marek Safar  <marek.safar@gmail.com>
3109
3110         A fix for bug #433701
3111         * expression.cs: Better error message.
3112
3113 2008-10-10  Marek Safar  <marek.safar@gmail.com>
3114
3115         * cs-parser.jay, expression.cs: Start reporting real parser errors.
3116         
3117         * Makefile: Disabled unused debug symbols.
3118
3119         Also fixes: #320556, #321097, #321656, #321876, #351316
3120
3121 2008-10-09  Miguel de Icaza  <miguel@novell.com>
3122
3123         * eval.cs: rename "<interactive>" to "{interactive}", to work
3124         around a requirement in the compiler that this be a valid
3125         filename, and in Windows it is not (433886).
3126
3127 2008-10-09  Marek Safar  <marek.safar@gmail.com>
3128
3129         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
3130
3131 2008-10-08  Marek Safar  <marek.safar@gmail.com>
3132
3133         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
3134         cs-parser.jay: Generic type declaration and type arguments cleanup.
3135
3136 2008-10-05  Marek Safar  <marek.safar@gmail.com>
3137
3138         * cs-parser.jay: Allow parsing weird array creation construct.
3139
3140 2008-10-05  Marek Safar  <marek.safar@gmail.com>
3141
3142         * cs-parser.jay: Conflicts reduction.
3143
3144 2008-10-04  Marek Safar  <marek.safar@gmail.com>
3145
3146         * cs-parser.jay: Conflicts reduction.
3147
3148 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
3149
3150         Fix #398325
3151         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
3152         property.  Add a 'count' hint about the use of the shared vector.
3153         Ensure that we don't leak out dirty bits.
3154         (UsageVector.MergeChild): Throw away information about variables
3155         in child vectors.
3156         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
3157
3158 2008-10-03  Marek Safar  <marek.safar@gmail.com>
3159
3160         A fix for bug #431746
3161         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
3162         parameters when iterator is created.
3163
3164 2008-10-03  Marek Safar  <marek.safar@gmail.com>
3165
3166         A fix for bug #431827
3167         * expression.cs: Fixed right based pointer arithmetic operations
3168         emit.
3169
3170 2008-10-03  Marek Safar  <marek.safar@gmail.com>
3171
3172         A fix for bug #353779
3173         * assign.cs, expression.cs: Fixed compound assignment conversions.
3174
3175 2008-10-02  Marek Safar  <marek.safar@gmail.com>
3176
3177         A fix for bug #375262
3178         * statement.cs: Refactor ArrayForeach to be usable with string
3179         indexer. Optimized single dimentional arrays foreach.
3180
3181 2008-10-02  Marek Safar  <marek.safar@gmail.com>
3182
3183         A fix for bug #431255
3184         * anonymous.cs, expression.cs: Removed broken optimization.
3185
3186 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3187
3188         * anonymous.cs: Use full type parameters of parent generic
3189         containers. Removed unnecessary AddParentStoreyReference call.
3190
3191 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3192
3193         A fix for bug #324702
3194         * class.cs: Use better shorter names for explicit interface member
3195         implementations.
3196
3197         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
3198
3199 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3200         
3201         * expression.cs: Use new interface to check fixed expression.
3202
3203 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3204
3205         A fix for bug #421101
3206         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
3207         interface to check for fixed fixed-buffers.
3208
3209 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3210
3211         A fix for bug #429264
3212         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
3213         
3214         * delegate.cs: Removed unnecessary casts.
3215
3216 2008-09-30  Marek Safar  <marek.safar@gmail.com>
3217
3218         A fix for bug #352151
3219         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
3220         class.cs: Fixed already defined explicit interface members check.
3221
3222 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3223
3224         cs-tokenizer.cs: Fix typo.
3225
3226 2008-09-28  Miguel de Icaza  <miguel@novell.com>
3227
3228         * eval.cs (InteractiveBase): The quit command now just sets a
3229         flag, instead of calling Environment.Exit(), it is milder on
3230         embedded hosts. 
3231
3232         CompiledMethod is now in Mono.CSharp, not nested inside
3233         the Evaluator, it was inconvenient to use.
3234
3235 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3236
3237         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
3238         code to be invoked without having to reparse.
3239
3240 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3241
3242         * ecore.cs: The recent changes to FieldExpr broke this as well.
3243         Fixes LINQ queries in the interactive shell.
3244
3245         * Multiple files: indentation fixing for the Mono coding
3246         guidelines for the switch statement.
3247
3248         * eval.cs: Make the Evaluator API thread safe.
3249
3250 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3251
3252         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
3253         constructor parsing.
3254
3255 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3256
3257         A fix for bug #325326
3258         * statement.cs: Check possible mistaken empty statement using
3259         explicit blocks only.
3260
3261 2008-09-25  Miguel de Icaza  <miguel@novell.com>
3262
3263         * eval.cs (LoadAssembly, ReferenceAssembly): Call
3264         RootNamespace.ComputeNamespaces to update the internal list of
3265         namespaces, this is no longer done for us.
3266
3267         (InteractiveBase): Use the Evaluator APIs instead of calling into
3268         Driver directly
3269
3270 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3271
3272         A fix for bug #429264
3273         * expression.cs: Missing mutator for access to multidimensional
3274         arrays.
3275
3276 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3277
3278         * class.cs, statement: Emit DebuggerHidden attribute for iterator
3279         entry wrapper.
3280         
3281         * driver.cs: Missing input argument check.
3282
3283 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3284
3285         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
3286         expression.cs, statement.cs, rootcontext.cs, class.cs, 
3287         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
3288         DefineMembers.
3289
3290 2008-09-24  Miguel de Icaza  <miguel@novell.com>
3291
3292         * ecore.cs (FieldExpr): Only initialize eclass when we return a
3293         fully constructed FieldExpr, fixes the regression introduced in
3294         the last commit.
3295         
3296         * ecore.cs, expression.cs: Plug back the eclass initialization as
3297         otherwise it regresses `csharp'. 
3298
3299 2008-09-24  Marek Safar  <marek.safar@gmail.com>
3300
3301         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
3302         ecore.cs, attribute.cs: Moved obsolete method checks from emit
3303         phase to resolve phase. It resolves problems with expression trees
3304         and fixes bugs #323796, #325156.
3305
3306 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3307
3308         * codegen.cs: Report better error when symbol writer is missing.
3309
3310 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3311
3312         * codegen.cs: Set .NET symbol writer.
3313         
3314         * decl.cs: Guard against null generic arguments.
3315         
3316         * report.cs: Don't report exactly same additional details.
3317
3318 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3319
3320         A fix for bug #324917
3321         * cs-parser.jay: Add missing multidimensional non-expression type
3322         ranks.
3323         
3324 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3325
3326         A fix for bug #428191
3327         * anonymous.cs: Create an outer generic fields also for non-storey
3328         anonymous methods.
3329
3330 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3331
3332         A fix for bug #378294
3333         * class.cs: Make fixed size buffers gmcs feature only.
3334
3335 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3336
3337         A fix for bug #355622, #324993
3338         * assign.cs, const.cs, class.cs: Create new EmitContext for each
3339         field initializer.
3340
3341 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3342
3343         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
3344         error reporting.
3345
3346 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3347
3348         A fix for bug #416110
3349         * generic.cs: Struct constraint results in default ctor and
3350         ValueType base type constraint to be set.
3351
3352 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3353
3354         A fix for bug #423791
3355         * generic.cs: Fixed params output type type-inference.
3356
3357 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3358
3359         * cs-parser.jay, expression.cs: Fixed few expression crashes.
3360         
3361 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3362
3363         * cs-tokenizer.cs: Don't break on extra partial modifier.
3364
3365 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3366
3367         A fix for bug #427592
3368         * generic.cs: Use common parameter resolve method.
3369
3370 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3371
3372         A fix for bug #414758
3373         * expression.cs, ecore.cs: Fixed crash when accessing non-static
3374         property.
3375
3376 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3377
3378         * driver.cs, namespace.cs: Read types and namespaces after all
3379         requested assemblies are loaded, fixes issues with System.Core
3380         auto-reference, and #419888.
3381
3382 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3383
3384         A fix for bug #417705
3385         * cs-parser.jay: Fixed as/is operator expression split.
3386
3387 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3388
3389         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
3390         Fixed expression tree representation of empty new expression and
3391         new initializer expression.
3392
3393 2008-09-18  Miguel de Icaza  <miguel@novell.com>
3394
3395         * eval.cs: Remove warning, keep reference to driver around.
3396
3397         * Hide fields that do not need to be public.
3398
3399 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3400
3401         A fix for bug #426385
3402         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
3403         conversion for array elements.
3404
3405 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3406
3407         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
3408         void parsing conflicts.
3409
3410 2008-09-15  Marek Safar  <marek.safar@gmail.com>
3411
3412         A fix for bug #425601
3413         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
3414         System.Core only when there is no custom ExtensionAttribute
3415         implementation.
3416
3417 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3418
3419         * namespace.cs: Do not report CS0246 (name
3420
3421 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3422
3423         A fix for bug #425669
3424         * generic.cs: Don't cache generic static anonymous method 
3425         containers.
3426
3427 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3428
3429         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3430         conflicting constraints.
3431
3432 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3433
3434         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3435         mcs too.
3436
3437 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3438
3439         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3440         to null pointer conversion fixes.
3441
3442 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3443
3444         * cs-parser.jay, expression.cs: An implicitly typed local variable
3445         declarator cannot use an array initializer.
3446
3447 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3448
3449         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3450
3451 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3452
3453         * generic.cs (InflatedConstraints): Don't crash when constraints
3454         are different.
3455         
3456         * cs-parser.jay: const_declarator is a block.
3457
3458         * constant.cs: Check for not allowed NaN conversions.
3459
3460 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3461
3462         * driver.cs: Drop --shell argument, the compiler is no longer a
3463         REPL. 
3464
3465         * eval.cs: Move most of the code that deals with evaluation into
3466         this file and document the public API from repl.cs
3467
3468         * repl.cs: Remove from here.
3469         
3470 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3471
3472         A fix for bug #424684
3473         * generic.cs: Generic class constraints must come first.
3474
3475 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3476
3477         * cs-parser.jay: Improve error reporting for syntax errors in
3478         statements and expressions, we now report the expected tokens
3479         instead of reporting the useless "; expected".
3480
3481         Drop the strings from the token declaration, it turns out that
3482         they did not do what I thought they did.  Instead they were adding
3483         two sets of tokens to the tables.
3484
3485 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3486
3487         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3488         delegate.cs: Share special type check.
3489
3490 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3491
3492         A fix for bug #423981
3493         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3494
3495 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3496
3497         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3498         ConvertImplicitly.
3499
3500 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3501
3502         A fix for bugs: #324750, #335946
3503         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3504         lookup rule to determine ?-based tokens.
3505
3506 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3507
3508         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3509         expressions (like event adding or removing) end up here, so we
3510         need to treat those as statements.
3511
3512         Add LoadAssembly method.
3513
3514 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3515
3516         * repl.cs: Add Time method.
3517
3518 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3519
3520         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3521
3522 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3523
3524         * repl.cs: Add workaround for old compilers.
3525
3526 2008-09-04  Jb Evain  <jbevain@novell.com>
3527
3528         * repl.cs (PrettyPrint): pretty print everything that
3529         implements IDictionary, as well as IEnumerables. Also,
3530         add a quit helper property.
3531
3532 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3533
3534         * constant.cs: Better error reporting for decimal literals.
3535         
3536         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3537         field attributes.
3538         
3539 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3540                         Miguel de Icaza  <miguel@novell.com>
3541
3542         A fix for bug #422951
3543         * assign.cs (Assign.DoResolve): Perform the type conversions
3544         checks before we attempt to initialize `New' initializers. 
3545
3546 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3547
3548         A fix for bug #422853
3549         * delegate.cs (DelegateCreation): Add special handling for
3550         EmptyExpression.Null instance expression which is just another
3551         hack for undecided member instance exression.
3552
3553 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3554
3555         * expression.cs, ecore.cs: Emit full expression tree for reduced
3556         binary expressions.
3557
3558 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3559
3560         * expression.cs (This): Guard against multi-resolving.
3561         
3562         * ecore.cs, statement.cs (Throw): Simplified.
3563         
3564         * flowanalysis.cs: Also verify event fields.
3565
3566 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3567
3568         * assign.cs (Assign.DoResolve): Perform the type conversions
3569         checks before we attempt to initialize `New' initializers. 
3570
3571         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3572
3573         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3574         public. 
3575
3576         * repl.cs: Update help.
3577
3578 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3579
3580         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3581         handling of the default config handling, including the special
3582         treatment of System.Core assembly. 
3583
3584         Fixes the REPL processing for LINQ.
3585
3586 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3587
3588         A fix for bug #422507
3589         * expression.cs (UnboxCast): Add missing child expression mutator.
3590
3591 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3592
3593         * driver.cs: Don't self reference System.Core assembly.
3594
3595 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3596
3597         A fix for bug #422507
3598         * expression.cs (StringConcat): Add missing type mutator.
3599
3600 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3601
3602         * generic.cs (TypeInferenceContext): Follow equality rule for
3603         constructed type lower bound type inference.
3604
3605 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3606
3607         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3608         <dblank@cs.brynmawr.edu> which updates the cursor position on
3609         refresh.
3610         
3611 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3612
3613         A fix for bug #367145
3614         * driver.cs: Fixed import of extension methods when using -noconfig
3615         option.
3616
3617 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3618
3619         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3620         version from non-generic implementation instead.
3621
3622 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3623
3624         A fix for bug #418908
3625         * class.cs: Use AddScopeStatement for field initializers.
3626
3627 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3628
3629         A fix for bug #415385
3630         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3631
3632 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3633
3634         A fix for bug #421736
3635         * iterators.cs: Don't crash on unreachable iterators.
3636
3637 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3638
3639         A fix for bug #421628
3640         * parameter.cs, attribute.cs: Clone also parameter attributes.
3641
3642 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3643
3644         * namespace.cs (LookupType): In EvalMode, try to replace
3645         the TypeBuilder from our cache with a Type as Reflection.Emit does
3646         not  like to mix code from older assemblies emitted and new
3647         assemblies emitted. 
3648
3649         This sounds like a serious Mono bug that prevents multiple
3650         assemblies to be generated and consumed at the same time.
3651
3652         * cs-parser.jay (push_current_class): Do not make interactive
3653         classes internal or private, make them public as we currently
3654         generate each new class in a new assembly.   
3655
3656 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3657
3658         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3659         remove types that are entered into the global namespace during
3660         parsing so that we can remove them on failure.
3661  
3662         * cs-parser.jay: Parsing: we now keep track of types that are
3663         entered into global variables and queue those in case the parsing
3664         or resolution fail.
3665  
3666         This happens in a few situations: during partial-input, we invoke
3667         the parser repeatedly for example with the string "class X", this
3668         would cause X to be registed, and we need to remove this
3669         registration so that another parse attempt later with say "class X {"
3670         would actually work.
3671  
3672         Additionally, if there is an error in the resolution phase, for
3673         example: "class X : NonExistant {}" th
3674         
3675         * cs-parser.jay: Be more precise with the errors being raised,
3676         instead of flagging all exceptions during parsing to be attributed
3677         to the parsing process, distinguish those from errors happening in
3678         the actions and hint that using -v would produce the actual
3679         exception. 
3680
3681         * repl.cs: Do not load all compiler references on each reset,
3682         doing the partial reset takes care of this.
3683         
3684 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3685
3686         * repl.cs: Add support for loading all the files from
3687         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3688         as shell libraries.
3689
3690         Introduce a micro-parser that is able to deambiguate on its input
3691         whether we are dealing with a compilation unit (namespace, class,
3692         interface, struct, delegate) declaration or a statement.   This
3693         allows both declarations and statements to be entered. 
3694
3695         Set history size by default to 300 lines.
3696
3697         Instead of distinguishing based on the parser.InteractiveResult,
3698         have only two cases: statements were parsed, or a compilation unit
3699         was.   Always pull the Using statement additions from the
3700         compilation unit parse.
3701         
3702         * cs-tokenizer.cs: Rename tokens to better describe their intent
3703         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3704         
3705         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3706         EvalMode is used to trigger the lookup of global variables while
3707         StatementMode is used turn variable declarations into static
3708         fields.
3709
3710         * getline.cs: Allow history size to be set.
3711         
3712 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3713
3714         A fix for bug #360755
3715         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3716
3717 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3718
3719         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3720         
3721         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3722         member name, it is too confusing
3723         
3724         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3725         
3726         * rootcontext.cs: Finally default to warning level 4.
3727
3728 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3729
3730         * class.cs (CheckBase): Ignore overloaded operators.
3731
3732 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3733
3734         A fix for bug #420830
3735         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3736
3737 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3738
3739         A fix for bug #420832
3740         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3741
3742 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3743
3744         A fix for bug #420386
3745         * nullables.cs: Fixed logic of nullable user comparison operators involving
3746         null values.
3747
3748 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3749         
3750         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3751
3752 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3753
3754         * repl.cs: Add support for aborting the running code with C-c. 
3755
3756 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3757
3758         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3759
3760 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3761
3762         * cs-parser.jay (interactive_statement_list): A new set of rules
3763         for hosting statements that uses the "interactive_" prefix.   
3764
3765         * repl.cs: Add support for parsing `using' as a statement or as a
3766         directive.  Deambiguating before passing this to the parser.
3767
3768         We need to distinguish statement_expressions that occur at the
3769         toplevel vs those that occur embedded into expressions.
3770
3771         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3772         that fixes the cursor key handling, and a history bug.
3773         
3774 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3775
3776         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3777         limitations in Console, instead the 2.0 bootstrap libraries now
3778         include the Console bits.
3779
3780         Also, remove the use of Nullables from getline.cs
3781
3782         ------------
3783         
3784         Interactive support for the C# compiler.   Use gmcs --shell to
3785         enter a read-eval-print loop shell.
3786
3787         Docs: http://www.mono-project.com/CsharpRepl
3788         
3789         * sources: include repl.cs here and getline.cs for gmcs.exe,
3790         everything else is getline.cs impaired.
3791
3792         * Makefile: when bootstrapping pass a special flag
3793         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3794         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3795         This distinguishes those two cases.
3796
3797         * repl.cs: Support for a read-eval-print loop.   Will be soon
3798         refactored into eval support and then REPL on top of it.
3799
3800         * ecore.cs: If a simplename lookup fails, before erroring out,
3801         if we are in EvalMode to resolve the name to a declaration in the
3802         Eval-land.    
3803
3804         This means that variable declarations that happened in previous
3805         classes (as repl puts every statement in a separate class) are
3806         made visible in this way.
3807
3808         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3809         triggered an error due to the end of file being reached.   This is
3810         used to do multi-line input, and notify the caller that the user
3811         needs to provide more text before a successful parse.
3812
3813         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3814         to drive the evaluation with a custom wrapper. 
3815
3816         * driver.cs: Add support for --shell, and refactor some code to be
3817         reused from repl.cs
3818         
3819         * namespace.cs: Add support for serializing the contents of the
3820         namespaces and reloading them.  
3821
3822         * getline.cs: A managed implementation of ReadLine under
3823         X11/Apache2 license terms.  Easy to embed in other applications as
3824         well.
3825
3826         * namespace.cs: Add some functions to save and restore the
3827         namespace state.
3828
3829         * rootcontext.cs: New public field.
3830
3831         * cs-tokenizer.cs: Add support for one of the possible characters
3832         we introduce into the token stream.  
3833
3834         This patch does not affect the regular tokenization process, the
3835         only performance hit would happen if there is an invalid character
3836         on the input string.
3837
3838         * support.cs: Move isatty helper routine here.
3839
3840         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3841         code generator for in-memory assemblies.
3842
3843 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3844
3845         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3846         parameter cannot be always used as a type.
3847
3848 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3849
3850         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3851
3852 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3853
3854         * convert.cs: Implement explicit array to IList<T> conversion.
3855
3856 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3857
3858         A fix for bug #362740
3859         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3860
3861 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3862         
3863         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3864         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3865         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3866         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3867         handling to use just one type of infrastructure and deal with generics
3868         more effectivelly.
3869
3870 2008-07-23  Martin Baulig  <martin@ximian.com>
3871
3872         *** Merged this from trunk revision 108527 ***
3873
3874         * statement.cs
3875         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3876         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3877         scope variable.
3878
3879 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3880         
3881         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3882         error checks.
3883
3884 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3885         
3886         * delegate.cs: Fixed compiler crash when creating delegate using partial
3887         method.
3888         
3889         * typemanager.cs: MulticastDelegate is not a delegate.
3890
3891 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3892         
3893         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3894         checks.
3895
3896 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3897
3898         * cs-parser.jay (type): Allow 'var' in mcs too.
3899         (local_variable_type): Likewise.
3900
3901 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3902         
3903         * driver.cs: Removed broken -noconfig variants.
3904
3905 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3906         
3907         A fix for bug #417078
3908         * expression.cs: Emit correctly left side pointer operators.
3909
3910 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3911
3912         * generic.cs, lambda.cs: Inflate method generic arguments only.
3913
3914 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3915
3916         * class.cs: Fixed struct layout check regression.
3917
3918 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3919
3920         * cs-parser.jay, enum.cs: Simplified enum parsing.
3921         
3922         * decl.cs: Check all type parameters conflicts.
3923         
3924         * expression.cs, statement.cs, attribute.cs: More expression checks.
3925
3926 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3927
3928         * generic.cs: Add type inference types restriction.
3929         
3930         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3931         anonymous.cs, expression.cs: Allocate less accessor parameters.
3932
3933 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3934
3935         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3936         classes.
3937
3938 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3939
3940         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3941
3942 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3943
3944         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3945         Also fixes #362146 and #381592.
3946
3947 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3948
3949         * ecore.cs: Reduced constant cannot be used as an attribute value.
3950         
3951         * cs-parser.jay: Base expression has to be a type.
3952         
3953         * expression.cs (Conditional): Uses ReducedExpression.
3954
3955 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3956
3957         A fix for bug #376826
3958         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3959         address of hoisted local variable or parameter cannot be taken.
3960
3961 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3962
3963         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3964         anonymous method inside checked/unchecked expression.
3965
3966 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3967
3968         * typemanager.cs (IsEqual): Guard against null.
3969         
3970         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3971         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3972         routine. Fixed few misleading conversion errors.
3973
3974 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3975
3976         * class.cs: Consider generics when checking cycles in struct layout.
3977
3978 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3979
3980         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3981
3982 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3983
3984         A fix for bug #414165
3985         * anonymous.cs: Use same anonymous implementation method for all anonymous
3986         method emits.
3987
3988 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3989
3990         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3991         constraints.
3992
3993 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3994
3995         * cs-parser.jay: Typeof argument has to be a type expression.
3996         
3997         * namespace.cs: Check alias and namespace definitions collisions.
3998         
3999         * class.cs, pending.cs: Moved explicit interface accessor implementation
4000         check.
4001         
4002         * delegate.cs, expression.cs: Verify special name invocations.
4003         
4004 2008-08-01  Marek Safar  <marek.safar@gmail.com>
4005
4006         * cs-parser.jay: Don't choke on empty generic type arguments.
4007         
4008         * cs-tokenizer.cs: Handle escaped preprocessor directives.
4009         
4010         * expression.cs, ecore.cs: Minor expressions bugs.
4011
4012 2008-08-01  Marek Safar  <marek.safar@gmail.com>
4013
4014         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
4015         and added more error handling.
4016         
4017         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
4018         
4019         *  modifiers.cs, enum.cs: Fixed.
4020
4021 2008-07-31  Jb Evain  <jbevain@novell.com>
4022
4023         * driver.cs: remove -pkg ability of smcs.
4024
4025 2008-07-30  Marek Safar  <marek.safar@gmail.com>
4026
4027         * statement.cs (Switch): Correctly set empty default target for single
4028         blocks.
4029
4030 2008-07-30  Marek Safar  <marek.safar@gmail.com>
4031
4032         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
4033         string switch statement implementation to use string dictionary which
4034         significantly (2-8x) improves performance of generated code.
4035
4036 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4037
4038         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
4039         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
4040         
4041 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4042
4043         A fix for bug #412595
4044         * typemanager.cs, convert.cs, expression.cs: Some types are never
4045         convertible to each other.
4046
4047 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4048
4049         * nullable.cs (CreateNullConstant): An error messages update.
4050
4051 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4052
4053         A fix for bug #412595
4054         * cfold.cs: Don't cast undefined bool constant.
4055
4056 2008-07-29  Martin Baulig  <martin@ximian.com>
4057
4058         * symbolwriter.cs
4059         (SymbolWriter.Reset): New public static method.
4060
4061         * driver.cs
4062         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
4063
4064 2008-07-28  Marek Safar  <marek.safar@gmail.com>
4065
4066         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
4067         
4068         * expression.cs (ElementAccess): Exact size allocation.
4069
4070 2008-07-26  Marek Safar  <marek.safar@gmail.com>
4071
4072         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
4073
4074 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4075
4076         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
4077         
4078         * class.cs: Removed $PRIVATE$ field hack which caused problems during
4079         flow analysis.
4080
4081 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4082
4083         A fix for bug #412217
4084         * assign.cs: Mutate also assignment type.
4085
4086 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4087
4088         A fix for bug #323644
4089         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
4090         indexers.
4091
4092 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4093
4094         A fix for bug #412134
4095         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
4096         non-enumerable operands when overloading equality or bitwise operators.
4097
4098 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4099
4100         * anonymous.cs: Cache closed generic anonymous method delegates.
4101
4102 2008-07-24  Marek Safar  <marek.safar@gmail.com>
4103
4104         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
4105         anonymous.cs, statement.cs: Always emit anonymous method as static method
4106         when is instance free. Use nesting for nested anynomous methods blocks.
4107         
4108 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4109
4110         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
4111         types.
4112
4113 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4114
4115         * expression.cs: Removed MakeSimpleCall.
4116
4117 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4118
4119         A fix for bug #323012
4120         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
4121         Base method implementing interface has to be public.
4122
4123 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4124
4125         * cs-parser.jay: Don't break on missing argument.
4126
4127 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4128
4129         A fix for bug #320993
4130         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
4131           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
4132
4133 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4134
4135         A fix for bug #320748
4136         * convert.cs: Implicit user operators cannot convert to interfaces
4137
4138 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4139
4140         A fix for bug #312686
4141         * driver.cs: Ignore empty assembly references.
4142
4143 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4144
4145         A fix for bug #387040
4146         * ecore.cs: Skip constrains check for an explicit implementation.
4147
4148 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4149
4150         A fix for bug #409045
4151         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
4152           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
4153           identifiers are file specific unless passed as input arguments.
4154
4155 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4156
4157          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
4158          to emit UnmanagedMarshal data under 2.0 profile.
4159
4160 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4161
4162         A fix for bug #410369
4163         * parameter.cs: Clone correctly ParamsParameter.
4164
4165 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4166
4167         * expression.cs (Argument): Always report type for type based expressions
4168         errors.
4169
4170 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4171
4172         A fix for bug #410666
4173         * anonymous.cs: Correctly initialize generic storey reference.
4174
4175 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4176
4177         * convert.cs: Don't box same type arguments.
4178
4179 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4180
4181         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
4182         Finished missing generic type mutators.
4183
4184 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4185
4186         * iterators.cs, statement.cs: Finished statements CloneTo.
4187
4188 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4189
4190         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
4191         
4192         * expression.cs: Emit optimized default value expressions in expression tree
4193         array initializer.
4194
4195 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4196
4197         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
4198
4199 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4200
4201         A fix for bug #367536
4202         * cs-parser.jay: Check static constructor of generic types for an access
4203         modifier.
4204
4205 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4206
4207         A fix for bug #353800
4208         * lambda.cs: Emit ret for contextual statements.
4209         
4210         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
4211         up emitting redundant ret for all anonymous methods with return.
4212
4213 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4214
4215         A fix for bug #365188
4216         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
4217         create anonymous method storey in unreachable block.
4218
4219 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4220
4221         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
4222         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
4223         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
4224         statement.cs: Fixed relevant defects found by Gendarme.
4225
4226 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4227
4228         A fix for bug #325291
4229         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
4230         statement.cs: Replaced IAnonymousHost with top level block flag.
4231
4232 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4233
4234         * cs-parser.jay: Clean up unused open_parens.
4235
4236 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4237
4238         * ecore.cs: Custom error message for a range variable assignment.
4239
4240 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4241
4242         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
4243         load.
4244
4245 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4246
4247         * literal.cs: Null literal is of object type.
4248
4249 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4250
4251         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
4252         expression of nullable equality comparison.
4253
4254 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4255
4256         * expression.cs(PointerArithmetic): Removed redundant assignment.
4257
4258 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4259
4260         * decl.cs (GetSignatureForError): Report full namespace name for containers.
4261
4262 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4263
4264         A fix for bug #408361
4265         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
4266         they are replaced by GetMethod.
4267
4268 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4269
4270         A fix for bug #408721 by jeremie.laval@gmail.com
4271         * expression.cs (Indirection): Implemented CloneTo.
4272
4273 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4274
4275         * statement.cs (AssignableSlots): Temporary disabled variable initialization
4276         assert check.
4277
4278 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4279
4280         * report.cs (EnableReporting): Don't reinitialize 0-based values.
4281
4282 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4283
4284         * linq.cs: Reset tranparent parameter counter in probing mode.
4285
4286 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4287
4288         * anonymous.cs: Mutate anonymous method type.
4289
4290 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4291
4292         * ecore.cs, anonymous.cs: Mutate field expressions.
4293
4294 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4295
4296         A fix for bug #369670
4297         * linq.cs, statement.cs: Use explicit block for query expressions variables.
4298
4299 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4300
4301         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
4302
4303 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
4304
4305         Fix bug #314902
4306         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
4307         only one '>', and finds a '>>', abort the generic lookahead.
4308
4309 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4310
4311         A fix for bug #319902
4312         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
4313
4314 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4315
4316         A fix for bug #406371
4317         * statement.cs: Moved EmitSymbolInfo to Block.
4318
4319 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4320
4321         * ecore.cs: Report better error for extension method overload failures.
4322
4323 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4324
4325         * expression.cs (Is): No need to box reference values.
4326
4327 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4328
4329         * class.cs: Use event resolve context when initializing CreateEmitContext.
4330
4331 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4332
4333         A fix for bug #394436
4334         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
4335         method used inside expression trees. Added more LINQ to expression tree
4336         conversions.
4337
4338 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4339
4340         A fix for bug #378189, #370577
4341         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
4342         from expression.
4343
4344 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4345
4346         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
4347         hierarchically.
4348
4349 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4350
4351         A fix for bug #406702
4352         * anonymous.cs: Always park anonymous method in the nearest parent storey.
4353
4354 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4355
4356         A fix for bug #406648
4357         * cs-parser.jay: Report nullable use in mcs for some cases.
4358
4359 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4360
4361         * ecore.cs: Improved argument mismatch error messages.
4362
4363 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4364
4365         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
4366
4367 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4368
4369         * expression.cs (TypeOf): Mutate type argument.
4370
4371 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4372
4373         * class.cs: Report missing partial modifier for correct type.
4374
4375 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4376
4377         * ecore.cs, expression.cs (VariableReference): Variable property is 
4378         protected.
4379
4380 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4381
4382         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
4383         
4384 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4385
4386         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
4387         method delegates.
4388
4389 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4390
4391         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
4392         anonymous method storey to an instance method when only "this" is hoisted.
4393
4394 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4395
4396         A fix for bug #321615
4397         * expression.cs: Pointer comparisons use unsigned operator.
4398
4399 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4400
4401         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
4402
4403 2008-07-02  Marek Safar  <marek.safar@gmail.com>
4404
4405         A fix for bug #404905
4406         * class.cs: Always initialize local unsafe variables.
4407
4408 2008-06-30  Marek Safar  <marek.safar@gmail.com>
4409
4410         A fix for bug #396987
4411         * expression.cs (NewInitialize): Clear local temporary variable for next run
4412
4413 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4414
4415         A fix for bug #401020
4416         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4417
4418 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4419
4420         A fix for bug #398319
4421         * cs-parser.jay: Implemented undocumented base access expression inside
4422         anonymous types.
4423
4424 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4425
4426         A fix for bug #404227
4427         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4428
4429 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4430
4431         A fix for bug #404227
4432         * convert.cs: Fixed explicit array to interface cast.
4433
4434 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4435
4436         A fix for bug #403894
4437         * delegate.cs: Mutate DelegateInvocation type.
4438
4439 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4440
4441         A fix for bug #379348
4442         * delegate.cs: Box a load of generic parameters.
4443
4444 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4445
4446         * expression.cs: Add an array creation arguments mutate.
4447
4448 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4449
4450         A fix for bug #386068
4451         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4452         parameter.
4453
4454 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4455
4456         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4457         CloneTo.
4458
4459 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4460
4461         A fix for bug #403518
4462         * delegate.cs: Type correctly anonymous method new invocation.
4463
4464 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4465
4466         A fix for bug #394826
4467         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4468         calls.
4469
4470 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4471
4472         A fix for bug #394826
4473         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4474         needed.
4475
4476 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4477
4478         * class.cs: Clone indexer parameters for localized capturing.
4479
4480 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4481
4482         A fix for bug #402379
4483         * expression.cs: Don't crash when an object initializer resolve fails.
4484
4485 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4486
4487         A fix for bug #402888
4488         * expression.cs: Mutate conditional expression.
4489
4490 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4491
4492         A fix for bug #401012
4493         * class.cs: Keep StructLayout in shared container.
4494
4495 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4496
4497         A fix for bug #400438
4498         * decl.cs, class.cs: Only properties can be automatically implemented.
4499
4500 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4501
4502         * statement.cs (ChangeToIterator): Copy also labels.
4503
4504 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4505
4506         * ecore.cs: Pass type argument details to parent extension method.
4507
4508 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4509
4510         A fix for bug #375966
4511         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4512
4513 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4514
4515         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4516
4517 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4518
4519         A fix for bug #394347
4520         * anonymous.cs: Cache compatible delegates as compatibility check produces
4521         a new method every time.
4522
4523 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4524
4525         * anonymous.cs: Propagate storey reference for single references.
4526
4527 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4528
4529         A fix for bug #387615
4530         * assign.cs, expression.cs: Correctly clone compound assignment.
4531
4532 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4533
4534         A fix for bug #359611, #359604
4535         * anonymous.cs: Mutate all types of hoisted parameters.
4536
4537 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4538
4539         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4540         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4541         expression.cs, codegen.cs, statement.cs
4542         
4543         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4544         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4545         
4546         ** Anonymous methods, lambda expressions rewrite **
4547         
4548         Anonymous expressions are now resolved when an explicit block is resolved 
4549         and they don't require any registration procedure anymore. Further,
4550         anonymous methods are defined when explicit block is emitted which allows
4551         better control of whole process and opens possibilities for more
4552         optimizations as well as alternative to reverse whole process.
4553         
4554         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4555         process consistent and to correctly emit hoisted generic methods when they
4556         have at least 1 hoisted variable.
4557         
4558 2008-06-17  Martin Baulig  <martin@ximian.com>
4559
4560         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4561         iterator method.
4562         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4563         virtual property; check it in Emit().
4564         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4565         an iterator.
4566         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4567         an iterator.
4568         (Indexer.Define): Likewise.
4569
4570 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4571
4572         * convert.cs: Don't use IsInterface on type arguments.
4573         
4574         * delegate.cs: DelegateInvocation uses MethodInfo.
4575         
4576         * parameter.cs: Removed IsTypeParameter.
4577         
4578         * generic-mcs.cs: More missing stuff.
4579
4580 2008-06-16  Martin Baulig  <martin@ximian.com>
4581
4582         * modifiers.cs
4583         (Modifiers.DEBUGGER_HIDDEN): New public const.
4584
4585         * typemanager.cs
4586         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4587
4588         * class.cs
4589         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4590         (AbstractPropertyEventMethod): Likewise.
4591         (Constructor.Emit): Likewise.
4592         (SourceMethod.SetCompilerGenerated): Removed.
4593
4594         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4595         on MoveNext().
4596
4597         * anonymous.cs
4598         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4599         if we're an `IteratorHost'.
4600         (AnonymousMethodMethod..ctor): Don't set
4601         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4602         not on the method.
4603
4604 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4605
4606         * statement.cs: Clean-up foreach statements.
4607
4608 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4609
4610         * class.cs: Stop using public method which should not exist
4611         (MethodBuilder.SetGenericMethodSignature).
4612
4613 2008-06-11  Martin Baulig  <martin@ximian.com>
4614
4615         * location.cs
4616         (Location.LookupFile): Add `CompilationUnit' argument; when given
4617         a relative file name, make it relative to the directory the .cs
4618         file is located in instead of using the current directory.
4619
4620 2008-06-11  Martin Baulig  <martin@ximian.com>
4621
4622         * class.cs
4623         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4624         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4625         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4626         (SourceMethod.SetCompilerGenerated): Likewise.
4627
4628 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4629
4630         * codegen.cs, driver: Only write symbol file when it's asked for.
4631
4632 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4633
4634         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4635
4636 2008-06-10  Martin Baulig  <martin@ximian.com>
4637
4638         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4639
4640 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4641
4642         A fix for bug #316290
4643         * expression.cs: Include decimal operators in predefined table.
4644         
4645         * parameters.cs: More readonlyness.
4646
4647 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4648
4649         A fix for bug #397213
4650         * cs-parser.jay: One more missing current_local_parameters reset.
4651
4652 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4653
4654         A fix for bug #396633
4655         * class.cs: Host backing field in partial container.
4656
4657 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4658
4659         A fix for bug #397068
4660         * expression.cs: Check both operand types when predefined operator is used.
4661
4662 2008-06-05  Martin Baulig  <martin@ximian.com>
4663
4664         Merged the `debugger-kahalo' branch.
4665
4666         * class.cs
4667         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4668         we're an iterator method.
4669         (SourceMethod): Reflect latest symbol writer changes;
4670         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4671         now `start_row' and `end_row'.
4672         (Constructor.Emit): Fix the logic whether to emit symbol information.
4673
4674         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4675         generated methods.
4676
4677         * location.cs
4678         (CompilationUnit): New public class; derives from `SourceFile'.
4679         (SourceFileEntry.DefineSymbolInfo): New public method.
4680         (SourceFileEntry.SetChecksum): New public method.
4681         (Location): Encode hidden line numbers by using `column == 255';
4682         the .ctor now accepts `column == -1' to mark a hidden line number.
4683         (Location.Hidden): New public property.
4684         (Location.CheckPoint): Add `CompilationUnit'.
4685         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4686         (Location.Push): Add `CompilationUnit compile_unit' argument.
4687         (Location.CompilationUnit): New public property.
4688
4689         * statement.cs
4690         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4691
4692         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4693
4694         * driver.cs: `SourceFile' -> `CompilationUnit'.
4695
4696         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4697
4698         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4699
4700         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4701         `#line hidden'.
4702
4703         * symbolwriter.cs
4704         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4705         new symbol writer API to also pass the file.
4706
4707 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4708
4709         * statement.cs: Emit catch variable assignment using variable expression.
4710         
4711 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4712
4713         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4714         with other variable types.
4715
4716 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4717
4718         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4719         GetLength method emit, it breaks resolve rules.
4720         
4721 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4722             Marek Safar  <marek.safar@gmail.com>
4723                         
4724         A fix for bug #395542
4725         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4726         declaration.
4727         
4728 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4729
4730         A fix for bug #395287
4731         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4732
4733 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4734
4735         A fix for bug #395845
4736         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4737         non-nullable parameter type.
4738         
4739 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4740
4741         * class.cs: Handle contructor initializer as a statement in top-level block.
4742
4743 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4744
4745         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4746         security attributes.
4747
4748 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4749
4750         * ecore.cs, expression.cs: Small IVariable refactoring.
4751
4752 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4753
4754         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4755
4756 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4757
4758         * cs-parser.jay: Removed redundant catch type check.
4759
4760 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4761
4762         A fix for bug #390372
4763         * nullable.cs: Set correct return type.
4764
4765 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4766
4767         A fix for bug #391062
4768         * typemanager.cs: Fixed crash when comparing null types.
4769
4770 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4771
4772         A fix for bug #391871
4773         * cs-parser.jay: Better error handling for invalid catch type.
4774
4775 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4776
4777         A fix for bug #392155
4778         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4779
4780 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4781
4782         A fix for bug #390666
4783         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4784         expressions.
4785
4786 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4787
4788         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4789         in getter.
4790
4791 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4792
4793         A fix for bug #389625
4794         * delegate.cs, generic.cs: Some progress on method group return type
4795         inference.
4796
4797 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4798
4799         A fix for bug #378419
4800         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4801
4802 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4803
4804         * class.cs (Constructor): Added IsCompilerGenerated.
4805
4806 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4807
4808         * expression.cs: Enum binary operators can accept non-enum operand only when
4809         is implicitly convertible to underlying type.
4810
4811 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4812
4813         A fix for bug #389272
4814         * support.cs: Workaround System.InvalidOperationException for enums.
4815
4816 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4817
4818         A fix for bug #389073
4819         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4820
4821 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4822
4823         * driver.cs: Split Parse.
4824         
4825         * location.cs (LookupFile): Uses string.Empty.
4826
4827 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4828
4829         * expression.cs, parameter.cs: Small ParameterReference clean up.
4830
4831 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4832
4833         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4834         hack. Fixes #387502.
4835
4836 2008-05-06  Martin Baulig  <martin@ximian.com>
4837
4838         * class.cs (Constructor.Emit): Fix the logic whether to emit
4839         symbol information.
4840
4841 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4842
4843         Fix #385503
4844         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4845         InvalidOperationException when the iterator is before the start or
4846         after the end.
4847
4848 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4849
4850         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4851         when left is nullable type.
4852
4853 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4854
4855         A fix for bug #386628
4856         * expression.cs (LocalVariableReference): Continue in resolving when
4857         variable is not assigned.
4858
4859 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4860
4861         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4862         nullable operations.
4863
4864 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4865
4866         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4867         it saves many redundant temporary variables for nullable operations.
4868
4869 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4870
4871         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4872         
4873         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4874         method.
4875         
4876         * nullable.cs: Constant coalescing operator optimizations.
4877
4878 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4879
4880         * constant.cs: Use unsigned conversion for values which are unsigned only.
4881
4882 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4883
4884         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4885         coalescing operator as it should be.
4886
4887 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4888
4889         A fix for bug #371016
4890         * expression.cs: All predefined delegate operators require implicit method
4891         group conversion.
4892         
4893 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4894
4895         * constant.cs: Emit long constant as uint when fits the range.
4896         
4897         * convert.cs, expression.cs: Fixed few unsafe conversions.
4898
4899 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4900
4901         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4902
4903 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4904
4905         Fix #385758
4906         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4907         'expr'.
4908         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4909
4910 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4911
4912         * constant.cs, literal.cs: IsLiteral property for error reporting.
4913         
4914         * ecore.cs, expression.cs: Implemented Property expression.
4915
4916 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4917
4918         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4919         
4920         * nullable.cs: Implemented nullable coalescing null operator.
4921
4922         * ecore.cs, expression.cs: Expression trees work.
4923
4924 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4925
4926         * ecore.cs: CreateExpressionTree is finally abstract.
4927
4928         * expression.cs, linq.cs: Updated.
4929
4930 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4931
4932         * expression.cs, ecore.cs: Block base access expression inside expression
4933         tree.
4934
4935 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4936
4937         A fix for bug #385058
4938         * expression.cs: User-defined operator implementations always take
4939         precedence over predefined operator implementations.
4940
4941 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4942
4943         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4944         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4945         expression tree conversions.
4946         
4947 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4948
4949         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4950         operators method details to Operator class.
4951
4952 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4953
4954         * anonymous.cs: Pass unsafe flags to anonymous container.
4955         
4956         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4957         inside expression tree.
4958
4959 2008-04-29  Martin Baulig  <martin@ximian.com>
4960
4961         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4962         (Tokenizer.PopPosition): Also restore the `line'.
4963
4964 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4965
4966         * delegate.cs: Implemented Invoke expression.
4967
4968 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4969
4970         * expression.cs: Fixed equality reference comparison regression.
4971
4972 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4973
4974         * ecore.cs: Clean up EmptyCast hack.
4975         
4976         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4977         using correct conversion rules. Also fixes #383993.
4978
4979 2008-04-28  Martin Baulig  <martin@ximian.com>
4980
4981         * class.cs (Constructor.Emit): Don't emit debugging information
4982         for generated default .ctor's.
4983
4984 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4985
4986         * convert.cs: Empty-cast ushort to int conversion.
4987
4988 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4989
4990         A fix for bug #384191
4991         * ecore.cs, expression.cs: Fixed expression cloning.
4992
4993 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4994
4995         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4996
4997 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4998
4999         Fix #381559, test-638.cs, test-639.cs
5000         * assign.cs (CompoundAssign.Helper): New wrapper.
5001         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
5002         access.
5003         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
5004         Pass unconverted expressions to the params array creation expression.
5005         (FieldExpr.EmitAssign): Don't special-case StringConcat.
5006         (PropertyExpr.EmitAssign): Likewise.
5007         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
5008         element if it is of kind CompoundAssign.Helper.
5009         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
5010         first before anything else.
5011         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
5012         (ArrayAccess.LoadArrayAndArguments): Simplify.
5013
5014 2008-04-27  Marek Safar  <marek.safar@gmail.com>
5015
5016         * expression.cs: Fixed cloning of typeof(void).
5017
5018 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
5019
5020         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
5021         (Assign.Emit): Likewise.  Move it to ...
5022         (CompoundAssign.DoResolve): ... here and ...
5023         (CompoundAssign.Emit): ... here.
5024         (EventAddOrRemove): New helper to handle += and -= on events, and
5025         avoid the use of BinaryDelegates.
5026         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
5027         (EventExpr.EmitAddOrRemove): Improve.
5028         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
5029
5030         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
5031         create VarExprs for 'foo.bar.var'.
5032         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
5033         is a highly inappropriate name for its functionality.
5034
5035 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
5036
5037         Simplify handling of multiple assignments
5038         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
5039         inheritable-only.
5040         (SimpleAssign): New.  Class to be used for normal assignments.
5041         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
5042         * expression.cs, parameter.cs, statement.cs: Likewise.
5043
5044 2008-04-25  Marek Safar  <marek.safar@gmail.com>
5045
5046         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
5047         for incompatible underlying types, more to come, uff.
5048
5049 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
5050
5051         Fix gtest-388.cs
5052         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
5053         Handle 'leave_copy'.
5054
5055 2008-04-25  Marek Safar  <marek.safar@gmail.com>
5056
5057         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
5058
5059 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
5060
5061         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
5062         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
5063         * statement.cs (While, Do, For): Allow test to have side effects.
5064         (For.DoEmit): Always emit InitStatement.
5065
5066         Fix test-635.cs
5067         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
5068         Always create SideEffectConstant.
5069         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
5070         of type EnumConstant.
5071
5072         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
5073         Handle 'right' being SideEffectConstant of type 'bool'.
5074
5075         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
5076         Use left.EmitBranchable instead of open coding it, so as to
5077         improve optimization opportunities.
5078
5079         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
5080
5081         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
5082         assumptions.
5083         (Expression.EmitSideEffect): Document.
5084
5085 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5086
5087         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
5088
5089 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5090
5091         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
5092
5093 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5094
5095         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
5096         conversion to expression tree.
5097
5098 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5099
5100         * ecore.cs: Removed unused expression.
5101
5102 2008-04-22  Marek Safar  <marek.safar@gmail.com>
5103
5104         * expression.cs: Implemented NegateChecked and New expressions.
5105
5106 2008-04-22  Marek Safar  <marek.safar@gmail.com>
5107
5108         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
5109
5110 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
5111
5112         Fix #351102
5113         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
5114         needing final 'ret' instruction.
5115
5116 2008-04-22  Marek Safar  <marek.safar@gmail.com>
5117
5118         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
5119
5120 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5121
5122         * expression.cs: Emit ldnull and not null expression as an instance argument
5123          of static method expression calls.
5124
5125 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5126
5127         A fix for bug #378200
5128         * expression.cs: Fixed crash when creating parameterless expression tree
5129         method call.
5130
5131 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5132
5133         A fix for bug #375297
5134         * anonymous.cs: Fixed crash when inferring from null argument anonymous
5135         method.
5136
5137 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5138
5139         A fix for bug #377596
5140         * decl.cs, class.cs: Emit delegate type argument attributes.
5141
5142 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5143
5144         A fix for bug #365314
5145         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
5146         
5147 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5148
5149         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
5150         only.
5151
5152 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5153
5154         * generic.cs (TypeParameter): Removed redundant location.
5155
5156 2008-04-19  Marek Safar  <marek.safar@gmail.com>
5157
5158         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
5159         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
5160         FullNamedExpression in all declaration type expression, statements will come
5161         later.
5162
5163 2008-04-18  Marek Safar  <marek.safar@gmail.com>
5164
5165         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
5166         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
5167
5168 2008-04-18  Marek Safar  <marek.safar@gmail.com>
5169
5170         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
5171         code.
5172
5173 2008-04-17  Marek Safar  <marek.safar@gmail.com>
5174
5175         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
5176         constraints.
5177
5178 2008-04-17  Marek Safar  <marek.safar@gmail.com>
5179
5180         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
5181         name expressions.
5182         Also fixes #340463.
5183
5184 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
5185
5186         Hook up 'EmitSideEffect'
5187         * constant.cs (Constant.EmitSideEffect): New.
5188         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
5189         (SideEffectConstant.EmitSideEffect): New.
5190         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
5191         unconditional branch in EmitBranchable.
5192         (FieldExpr.EmitBranchable): New.
5193         * expression.cs (Unary.EmitSideEffect): New.
5194         (Binary.EmitSideEffect): New.
5195         (VariableReference.EmitSideEffect): New.  Do nothing.
5196
5197 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
5198
5199         Introduce 'EmitSideEffect'
5200         * ecore.cs (Expression.EmitSideEffect): New.
5201         (TypeCast): Rename from EmptyCast.
5202         (EmptyCast): New.
5203         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
5204         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
5205         * convert.cs, nullable.cs: Update to changes.
5206
5207 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5208
5209         * class.cs, cs-parser.jay: Early check for base types expression.
5210
5211 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5212
5213         * decl.cs (MemberName): Declare PrettyName as obsolete.
5214
5215 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5216
5217         * namespace.cs: Use MemberName comparison.
5218
5219 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
5220
5221         Fix build break
5222         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
5223         FullName.
5224         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
5225         (MemberName.FullyQualifiedName): New.  Provides the functionality
5226         that users assume FullName would have.
5227         * ecore.cs, namespace.cs: Update to changes.
5228
5229         * statement.cs (Using.assign): Make into ExpressionStatement.
5230         (Using.EmitPreTryBody): Simplify.
5231
5232 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5233
5234         * report.cs: ColorFormat is protected.
5235         
5236         * rootcontext.cs: Unused fields clean-up.
5237         
5238         * namespace.cs: Made UsingEntry name private.
5239
5240 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5241
5242         * cs-tokenizer.cs, location.cs: Removed unused field.
5243
5244 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
5245             Raja R Harinath  <harinath@hurrynot.org>
5246
5247         Fix #379822
5248         * constant.cs (SideEffectConstant.value): Rename from 'left'.
5249         (SideEffectConstant.side_effect): Rename from 'right'.
5250         (SideEffectConstant..ctor): Normalize 'side_effect'.
5251         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
5252         value of this constant.
5253         * cfold.cs: Update to changes.
5254
5255 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5256
5257         * cs-paser.jay: Removed unused variable.
5258         
5259         * driver.cs: Made Compile instance method.
5260
5261 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
5262
5263         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
5264
5265 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5266
5267         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
5268
5269 2008-04-13  Jb Evain  <jbevain@novell.com>
5270
5271         * namespace.cs: update the System.Core fullname for 2.1
5272         * driver.cs: update the list of required assemblies for 2.1.
5273         Merged from the Moonlight 2 branch.
5274
5275 2008-04-11  Marek Safar  <marek.safar@gmail.com>
5276
5277         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
5278         types and user defined operators. User operators arguments has to be checked
5279         for null value before invocation, which also means no operator is called
5280         when any argument is not convertible to unwrapped nullable type.
5281         
5282 2008-04-09  Marek Safar  <marek.safar@gmail.com>
5283
5284         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
5285         of Unary expressions to follow operator overloading rules precisely.
5286         Also fixes #321794, #323794
5287         
5288 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5289
5290         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
5291         expression.
5292         
5293 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5294
5295         * expression.cs, ecore.cs: Implemented MemberInit expression.
5296         
5297 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
5298
5299         Fix mono/tests/exception4.cs
5300         * statement.cs (ExceptionStatement, TryCatch): Revert to using
5301         ec.NeedReturnLabel () rather emitting a 'nop'.
5302
5303         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
5304         simple heuristic.
5305         (TryCatch.SomeCodeFollows): Likewise.
5306         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
5307         for 'break', 'continue' and 'return' statements inside a try.
5308         We're fairly sure that the generated IL stream will have more
5309         instructions textually following the try.
5310         (FlowBranchingTryCatch): Likewise.
5311
5312         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
5313         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
5314         overrides.
5315
5316         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
5317         wrapper -- forward everything to CollectionForeach.
5318         (CollectionForeach.NonDisposableWrapper): New.
5319         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
5320         instead of a pop + branch to end.
5321
5322 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5323
5324         A fix for bug #377485
5325         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
5326         Propagate location for extension method groups. Report conversion failure at
5327         right place.
5328
5329 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5330
5331         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
5332         ListInit and Field expressions.
5333
5334 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
5335
5336         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
5337         Since $PC is always -1 inside the body of MoveNext, the fault
5338         handler is a no-op.
5339         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
5340         * statement.cs (ExceptionStatement.emit_finally): Likewise.
5341         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
5342
5343         The denouement!  Fix #324708
5344         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
5345         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
5346         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
5347         'finally' inside the finally clause.
5348
5349         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
5350         inside an iterator.  Don't emit the body of the 'finally' inside
5351         the finally clause yet.
5352
5353         Use the ResumableStatement infrastructure for MoveNext ()
5354         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
5355         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
5356         'old_resume_points'.  Move dispatcher upfront.
5357         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
5358         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
5359         in an enumerator.  This encodes the main fix in this patch series
5360         -- we can only jump into the first instruction of a try from the
5361         outside, but we want to emit try/finally regions in iterators and
5362         resume in the middle of them.
5363
5364 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
5365
5366         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
5367         of NeedReturnLabel here.
5368
5369         Introduce a common point for emitting try/finally to IL
5370         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
5371         features of the various subclasses, which are now driven by ...
5372         (ExceptionStatement.EmitPreTryBody): ... this and ...
5373         (ExceptionStatement.EmitTryBody): ... this and the original
5374         EmitFinallyBody.
5375         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
5376         Remove DoEmit and update to follow above protocol.
5377
5378         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
5379         of the dispatcher are the same, skip emitting the 'switch'.
5380         * iterator.cs (Iterator.EmitDispose): Update to changes.
5381
5382         Clean up handling of 'using' statement
5383         * statement.cs (UsingTemporary): New.  Carved out of ...
5384         (Using): ... this.  Simplify drastically.  Handle exactly
5385         one variable.
5386         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
5387         or Using as appropriate.  If there are multiple variable declared,
5388         create nested Using statements.
5389         (resource_acquisition): Kill.
5390
5391         * statement.cs (ExceptionStatement.EmitForDispose): Use
5392         EmitFinallyBody, not EmitFinally.
5393
5394         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
5395         * iterator.cs: Update to changes.
5396
5397         Start using the ResumableStatement infrastructure
5398         * statement.cs (ResumeableStatement.PrepareForDispose): New.
5399         (ResumableStatement.EmitForDispose): New.
5400         (ExceptionStatement): Override them.
5401         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
5402         EmitForDispose to create the body of the Dispose method.  Don't
5403         use OldResumePoint.
5404
5405         * iterator.cs (Iterator.AddResumePoint): Move here from ...
5406         * statement.cs (Toplevel.AddResumePoint): ... here.
5407         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
5408         * flowanalysis.cs (FlowBranchingIterator): New.
5409         * codegen.cs (EmitContext): Update to changes.
5410
5411         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
5412         (Iterator.old_resume_points): Rename from 'resume_points'.
5413         (Iterator.MoveNextStatement): Remove unused class.
5414
5415         New infrastructure for try/finally in iterators (still unused)
5416         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5417         (FlowBranchingToplevel.AddResumePoint): Hook into
5418         ToplevelBlock.AddResumePoint.
5419         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5420         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5421         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5422         resume points and assign program-counter values.
5423         (ExceptionBlock.AddResumePoint): Collect resume points for
5424         de-muxer at the top of try block.
5425         * iterators.cs (Yield.CheckContext): Simplify.
5426         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5427
5428 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5429
5430         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5431         argument to an ExitStatement.
5432         (FlowBranchingException): Refactor saved origins code.
5433         * statement.cs (ExitStatement): Update to cahges.
5434         * iterator.cs (YieldBreak): Likewise.
5435
5436         * statement.cs (ResumableStatement): New.  Common base class for
5437         YieldReturn and ExceptionStatement.
5438         (ExitStatement): New.  Common base class for Return and YieldBreak.
5439         (Return): Update to changes.
5440         * iterator.cs (YieldBreak): Likewise.
5441         * lambda.cs (ContextualReturn): Likewise.
5442
5443         Fix #377028
5444         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5445         emit a meaningful error message.
5446
5447         Fix #324765, #319508
5448         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5449         (VariableInfo.SetAssigned): Set it.
5450         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5451         determine if CS0219 or CS0168 is appropriate.  Don't use
5452         flow-analysis information.
5453         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5454         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5455         (EmitContext.EndFlowBranching): ... this.
5456
5457 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5458
5459         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5460
5461 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5462
5463         A fix for bug #376508
5464         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5465         ImplicitConversionExists.
5466
5467 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5468
5469         * expression.cs (Binary): Added remaining binary operators to expression
5470         tree builder.
5471
5472         * nullable.cs: Optimize shift with null argument.
5473
5474 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5475
5476         Fix minor IL regression
5477         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5478         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5479         * cs-parser.jay (try_statement): Update to changes.
5480
5481         * statement.cs (TryFinally.need_exc_block): Delete.
5482         (TryFinally): Update to changes.
5483
5484         Now all ExceptionStatements are unconditional
5485         * statement.cs (CollectionForeach.DisposableWrapper): New.
5486         Extract out the try/finally code into a new wrapper.
5487         (CollectionForeach.Resolve): Use it to simplify the code.
5488
5489 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5490
5491         Start at simplifying ExceptionStatement semantics a bit
5492         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5493         * cs-parser.jay (try_statement): Update to changes.
5494         (opt_catch_clauses): Remove.
5495         * flowanalysis.cs: Update to changes.
5496         (FlowBranching.BranchingType.TryCatch): New.
5497         (FlowBranchingTryCatch): New.
5498
5499         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5500         (FlowBranching.CreateBranching): Update to changes.
5501         (FlowBranchingBlock.AddSibling): Add sanity check.
5502         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5503         Update to changes.
5504
5505         * iterators.cs (Iterator.MarkFinally): Remove.
5506         * statement.cs (ExceptionStatement): Update to changes.
5507
5508         Add support for skipping over finally blocks at runtime.  First
5509         in a series to fix #324708
5510         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5511         (Iterator.EmitMoveNext): Initialize it.
5512         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5513         branch over the body of the 'finally' clause.
5514
5515 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5516
5517         Avoid lopsided use of Foo/DoFoo names
5518         * statement.cs (ExpressionStatement.EmitFinallyBody):
5519         Rename from EmitFinally.
5520         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5521         * iterator.cs: Update to changes.
5522
5523 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5524
5525         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5526         based on UserOperatorCall. More binary nullable operators clean up.
5527
5528 2008-04-02  Martin Baulig  <martin@ximian.com>
5529
5530         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5531
5532 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5533
5534         * nullable.cs: Merge user and empty conversions when lifting expression
5535         trees.
5536         
5537         * expression.cs (StringConcat): Implemented expression tree representation.
5538
5539 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5540
5541         * nullable.cs: When lifting null literal and a user operator exists, no call 
5542         is made.
5543         
5544 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5545
5546         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5547         null.
5548
5549 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5550
5551         * nullable.cs, expression.cs: Use namespace instead heavily nested
5552         monster abstract class.
5553
5554 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5555
5556         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5557         lifting of null literal and user operators. Clean up of some temporary
5558         nullable hacks.
5559
5560 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5561
5562         Fix #368224, test-629.cs
5563         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5564         if it crossed an unwind-protect boundary.
5565         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5566         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5567         inside an unwind-protected region.
5568         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5569         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5570         'leave' instead of a 'br' if unwind-protected.
5571         (Iterator.EmitYieldBreak): Likewise.
5572
5573 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5574
5575         * driver.cs: Only define versioninfo resources if no win32 resource
5576         file was specified.
5577
5578 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5579
5580         A fix for bug #372375
5581         * convert.cs: Fixed boxing of nullable types.
5582
5583 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5584
5585         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5586         type.
5587
5588 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5589
5590         A fix for bug #374619
5591         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5592         
5593 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5594
5595         * lambda.cs: Check return type only for invocation.
5596         
5597 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5598
5599         A fix for bug #374214
5600         * ecore.cs: Correctly report argument type mismatch.
5601
5602 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5603
5604         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5605         and not rely on broken IsEnum.
5606
5607 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5608
5609         * nullable.cs: New file, extracted from generic.cs.
5610         
5611         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5612
5613 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5614
5615         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5616         predefined comparison operators and null literals.
5617         
5618         * report.cs: New warning ID.
5619         
5620 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5621
5622         A fix for bug #370577
5623         * lambda.cs: Check return type too.
5624
5625 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5626
5627         A fix for bug #372846
5628         * class.cs: Automatic properties can be declared as unsafe.
5629
5630 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5631
5632         * location.cs: Use string based concatenation.
5633         
5634         * expression.cs: LiftedBinaryOperator is gmcs only.
5635         
5636 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5637
5638         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5639         conversions rules and expression trees.
5640
5641 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5642
5643         * delegate.cs: Use extension method source as delegate target.
5644
5645 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5646
5647         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5648         binary operations to be purely based on binary operations and optimized
5649         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5650         and other ET refactoring.
5651         
5652         * typemanager.cs: Fixed warning.
5653         
5654 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5655
5656         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5657         
5658         * symbolwriter.cs: Fixed.
5659
5660 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5661
5662         * anonymous.cs, driver.cs: Reset anonymous types counters.
5663
5664 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5665
5666         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5667         
5668         * class.cs: Use fullname for all type member definitions.
5669         
5670 2008-02-19  Martin Baulig  <martin@ximian.com>
5671
5672         * class.cs
5673         (IMethodData.EmitExtraSymbolInfo): New interface method.
5674         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5675         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5676         interface method here as an empty public virtual method.
5677
5678         * anonymous.cs
5679         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5680         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5681         CodeGen.SymbolWriter.SetRealMethodName().       
5682
5683 2008-02-18  Martin Baulig  <martin@ximian.com>
5684
5685         * anonymous.cs
5686         (ScopeInfo.EmitType): Override this and emit debugging
5687         information for captured variables.
5688         (RootScopeInfo.EmitType): Override this and emit symbol
5689         information for a captured `this'.
5690
5691 2008-02-15  Martin Baulig  <martin@ximian.com>
5692
5693         * iterators.cs: Emit debugging info.
5694
5695         * codegen.cs
5696         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5697         (EmitContext.OmitDebuggingInfo): New public property.
5698
5699         * statement.cs
5700         (While): Override Emit() and don't emit symbol info there; do it
5701         inside DoEmit() instead.
5702         (Block.Emit): Omit symbol information while emitting the scope
5703         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5704         block logic.
5705         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5706         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5707         .ctor to make `IsIterator' work.
5708
5709 2008-03-14  Martin Baulig  <martin@ximian.com>
5710
5711         * symbolwriter.cs: Added the new symbol writer function from the
5712         debugger's `terrania' branch; temporarily enclose them inside
5713         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5714         my vacations.
5715
5716 2008-03-14  Martin Baulig  <martin@ximian.com>
5717
5718         * symbolwriter.cs
5719         (SymbolWriter): Make this a public static class.
5720
5721         * codegen.cs
5722         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5723         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5724
5725 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5726
5727         A fix for bug #370577
5728         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5729         return type.
5730         
5731 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5732
5733         * typemanager.cs (CSharpName): Made 250 times faster.
5734
5735 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5736
5737         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5738         
5739 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5740
5741         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5742         crash when predefined field does not exist.
5743         
5744 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5745
5746         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5747         
5748 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5749
5750         * class.cs (FixedField): Don't crash when contructors are missing.
5751
5752 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5753
5754         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5755         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5756         check internal types accessibility for internal and external types.
5757         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5758
5759 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5760
5761         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5762         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5763         attribute.cs, statement: Use corect instance of predefined types (work
5764         related to #364674).
5765
5766 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5767
5768         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5769         
5770 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5771
5772         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5773         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5774         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5775         predefined types clean up, delayed predefined types members initialization
5776         (work related to #364674).
5777
5778 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5779
5780         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5781         
5782 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5783
5784         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5785         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5786         predefined types clean up (work related to #364674).
5787
5788 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5789
5790         * ecore.cs: Print an error message instead of throwing exception.
5791         
5792 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5793
5794         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5795         expression.cs, statement.cs: Unififed null literal representation.
5796
5797 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5798
5799         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5800         expression.cs: Refactored binary operators resolve phase and improved speed.
5801         The nullable code is still missing and won't work correctly, more fixes
5802         required.
5803
5804         It also fixes #323726, #324312, #324248, and many other unreported issues.
5805
5806 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5807
5808         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5809         instead of 'gmcs'.
5810
5811 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5812
5813         * ecore.cs: Clean-up and split BetterConversion.
5814         
5815 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5816
5817         Fix #363791
5818         * enum.cs (EnumMember.Value): Only access 'value' if
5819         ResolveValue says it's ok.
5820         (EnumMember.DoResolveValue): Don't set prev_member.value.
5821         (Enum.GetDefinition): Reverse arguments of Equals --
5822         EnumMember.Value can return 'null'.
5823
5824         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5825
5826 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5827
5828         * generic.cs, expression.cs: More ongoing work on expression trees.
5829         
5830 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5831
5832         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5833         handle missing matches when mutiple operators exist.
5834         
5835 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5836
5837         A fix for bug #363218
5838         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5839         initializers.
5840         
5841 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5842
5843         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5844         update. This time to deal correctly with SideEffectConstant expression used
5845         as an argument for another constant folding.
5846
5847 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5848
5849         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5850         MethodBuilder.
5851
5852 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5853
5854         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5855
5856 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5857
5858         A fix for bug #328136
5859         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5860         side is a false constant, because we still need to evaluate the right-hand
5861         side.
5862
5863         * statement.cs (If): Emit two types of boolean constants (simple constant,
5864         side-effect constant).
5865
5866 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5867
5868         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5869
5870         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5871         constants.
5872
5873 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5874
5875         A fix for bug #361457
5876         * ecore.cs (IsApplicable): Params methods have lower priority.
5877
5878         * support.cs: Return correct parameter modifier for params types.
5879
5880 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5881
5882         * generic.cs (TypeParameter): Cache attribute target name.
5883
5884         * support.cs: Removed unused variable.
5885
5886         * typemanager.cs: Removed debugging leftover.
5887
5888         * ecore.cs: Use local type instead of a property;
5889
5890         * class.cs (VerifyMembers): Consider also parent to test whether type member
5891         is local or public.
5892
5893         * expression.cs (FullMethodDesc): Removed.
5894
5895         * attribute.cs (IsValidArgumentType): Made static.
5896
5897 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5898
5899         Cleanup to be more readable.
5900         * Makefile (GMCS_PROFILE): Remove.
5901         (COMPILER_NAME): New helper.
5902
5903 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5904
5905         * cs-tokenizer.cs: if a conditional expression happens inside a
5906         (...) this also means that we do not need to de-ambiguate between
5907         an parenthesized expression and a cast.
5908
5909         Fixes 346484.
5910
5911         * constant.cs (SideEffectConstant): a constant value that happens
5912         to have a side effect.
5913
5914         Fixes the build regressions introduced by the fix for #359789
5915
5916 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5917
5918         * expression.cs (Conditional.Emit): when emitting the ternary
5919         operator, use local variables to generate code verifiable code.
5920
5921         The verifier cannot infer that the type on stack before the
5922         stloc.0 is executed is of type ParentB. This happens because the
5923         stack merge algorithm uses only parent types when deciding which
5924         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5925         335.
5926
5927         This code compiled with mcs is not verifiable under MS. The MS
5928         verifier picks the first common interface of Foo and Bar, which is
5929         wrong, but doesn't use a full join type of the 2 interfaces.
5930
5931         CSC uses a clever hack to compile such code in a verifiable
5932         way. It stores the intermediate values in a local variable with
5933         the expected type.
5934
5935         Fixes: #358102
5936
5937 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5938
5939         * expression.cs: Do not fold BitwiseAnd operators when the left
5940         side is a false constant, because we still need to evaluate the
5941         right-hand side.
5942
5943         Fixes #359789
5944
5945         * support.cs: Instead of throwing an InternalErrorException when
5946         the position of the stream is outside the boundary of our buffer,
5947         reset the state of the reader, and restart the reading from the
5948         beginning of the file.
5949
5950 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5951
5952         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5953
5954 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5955
5956         A fix for bug #361686
5957         * decl.cs: A protected types used inside a private class which parents
5958         derives from the protected class are accessible.
5959
5960 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5961
5962         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5963         the parameterless constructor.
5964
5965 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5966
5967         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5968         lookup methods to use standard member cache when doing member lookup.
5969
5970 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5971
5972         * driver.cs: Don't report full path for referenced module as assembly error.
5973
5974 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5975
5976         * Makefile: Fixed `qh' target to work on all machines.
5977
5978         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5979         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5980         and HasElementType with TypeManager implementation.
5981
5982 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5983
5984         A fix for bugs #325134, #359749
5985         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5986         first binds point to non-method member expression.
5987
5988 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5989
5990         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5991
5992 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5993
5994         A fix for bugs #321394, #323028
5995         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5996         Reworked naive IsAccessibleAs implementation to handle nested types.
5997
5998 2008-02-05  Jb Evain  <jbevain@novell.com>
5999
6000         * class.cs: use generic type comparison for parameters
6001         as well.
6002
6003 2008-02-05  Marek Safar  <marek.safar@gmail.com>
6004
6005         A fix for bug #325372
6006         * class.cs: Use generic type comparison when testing method signatures.
6007
6008 2008-02-05  Marek Safar  <marek.safar@gmail.com>
6009
6010         A fix for bug #357047
6011         * ecore.cs: Applied C# 3.0 changes to better conversion.
6012
6013 2008-02-05  Marek Safar  <marek.safar@gmail.com>
6014
6015         A fix for bug #358374
6016         * cs-parser.jay: Correctly set modifiers for all constructor types.
6017
6018 2008-02-04  Marek Safar  <marek.safar@gmail.com>
6019
6020         A fix for bug #355251
6021         * generic.cs: Added base class constraint based type inference.
6022
6023 2008-02-01  Marek Safar  <marek.safar@gmail.com>
6024
6025         A fix for bug #357255
6026         * decl.cs: One more missing visibility check.
6027
6028 2008-02-01  Marek Safar  <marek.safar@gmail.com>
6029
6030         * support.cs: Fixed broken return.
6031
6032 2008-01-25  Marek Safar  <marek.safar@gmail.com>
6033
6034         * report.cs: Correctly reset warnings count after probing.
6035
6036 2008-01-25  Martin Baulig  <martin@ximian.com>
6037
6038         * namespace.cs
6039         (NamespaceEntry.SymbolFileID): Make this work again after
6040         MemberName.ToString() is gone.
6041
6042 2008-01-25  Marek Safar  <marek.safar@gmail.com>
6043
6044         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
6045         expressions.
6046
6047 2008-01-25  Marek Safar  <marek.safar@gmail.com>
6048
6049         * generic.cs: Use full implicit conversion for type inference fixing.
6050
6051 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6052
6053         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
6054         Fixed user operator conversions.
6055
6056 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6057
6058         * generic.cs: Do nullable type to null comparison optimization during
6059         resolve phase.
6060
6061 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6062
6063         A fix for bug #355163
6064         * generic.cs: Enabled l-value resolve on nullable expressions.
6065
6066 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6067
6068         A fix for bug #353986
6069         * class.cs: Ingore static ctors with parameters for any further checks.
6070
6071 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6072
6073         A fix for bug #354310
6074         * namespace.cs: Removed redundant check.
6075
6076 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6077
6078         A fix for bug #354928
6079         * expression.cs: ElementInitializers can be resolved only once.
6080
6081 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6082
6083         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
6084         Condition expressions.
6085
6086 2008-01-23  Marek Safar  <marek.safar@gmail.com>
6087
6088         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
6089
6090 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6091
6092         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
6093         not allowed.
6094
6095         * generic.cs: Implemented coalesce expression.
6096
6097 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6098
6099         A fix for bug #355145
6100         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
6101         expression tree type inference.
6102
6103 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
6104
6105         Fix #354663
6106         * expression.cs (Binary.IsUnsignedType): Fix typo.
6107
6108 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6109
6110         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
6111
6112 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6113
6114         A fix for bug #355161
6115         * ecore.cs, expression.cs: Wider range of extension method supported
6116         expressions.
6117
6118 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
6119
6120         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
6121         AssemblyBuilder to operate in compiler context. Fixes mcs part of
6122         bug #354970.
6123
6124 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6125
6126         A fix for bug #355148
6127         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
6128
6129 2008-01-22  Miguel de Icaza  <miguel@novell.com>
6130
6131         * expression.cs (CreateExpressionTree): Add support for or and
6132         logical or, and indent following the coding conventions.
6133
6134         * typemanager.cs (LinqExpression): renamed from
6135         ExpressionTreeManager, for a shorter name.
6136
6137         Use TypeManager.CoreLookupType to lookup types from our core
6138         assemblies and turn those into "Type" variables.
6139
6140         Consumers that previously used "Namespace" and "Type" from this
6141         class should instead use the TypeExpression which is a type that
6142         is fully resolved (without involving the regular C# resolution
6143         rules). 
6144
6145         This typically looks like this:
6146
6147         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
6148         new MemberAccess (texpr, name, type_arguments, loc)
6149
6150         This avoids the problem in: #355178
6151
6152 2008-01-21  Marek Safar  <marek.safar@gmail.com>
6153
6154         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
6155         feature in parser only as we do in other cases.
6156         
6157 2008-01-21  Marek Safar  <marek.safar@gmail.com>
6158
6159         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
6160         typemanager.cs: A refactoring of params arguments to reuse existing
6161         expressions (params -> array initializer) to emit params argument instead
6162         of specialized handling.
6163         It was required by expression tree implementation and it has other benefits
6164         as well, we now apply same optimization for params arguments as we do for
6165         array initializers.
6166         
6167 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6168
6169         A fix for bug #353526
6170         * generic.cs: A type inference of params arguments may not required any
6171         temporary array creation.
6172         
6173 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6174
6175         A fix for bug #353534
6176         * generic.cs, ecore.cs, expression.cs: A method group type inference is
6177         supported for delegates only.
6178         
6179 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6180
6181         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
6182         type for more than 1 candidates.
6183         
6184 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6185
6186         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
6187         expressions.
6188         
6189 2008-01-16  Marek Safar  <marek.safar@gmail.com>
6190
6191         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
6192         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
6193         operator) expressions. 
6194                 
6195 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
6196
6197         * statement.cs: Avoid declaring an IL variable for this_variable since it is
6198         not accessed from the generated IL.
6199
6200 2008-01-14  Marek Safar  <marek.safar@gmail.com>
6201
6202         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
6203         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
6204         statement.cs: The first expression tree implementation drop, mostly
6205         infrastructure work.
6206
6207 2008-01-14  Marek Safar  <marek.safar@gmail.com>
6208
6209         * ecore.cs (IsNestedChild): Refactored.
6210
6211 2008-01-11  Marek Safar  <marek.safar@gmail.com>
6212
6213         * lambda.cs: Don't use a cast on unknown expression statement.
6214
6215 2008-01-10  Geoff Norton  <gnorton@novell.com>
6216
6217         * cs-tokenizer.cs: One more token to distinguish between method and lambda
6218         arguments
6219
6220 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6221
6222         * doc.cs: Report better /doc crash details.
6223         
6224 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6225
6226         A fix for bug #352536
6227         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
6228
6229 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6230
6231         A fix for bug #352287
6232         * ecore.cs, expression.cs: Do `this' access checking in all member access
6233         expressions.
6234         
6235 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6236
6237         * rootcontext.cs, driver.cs: Switch to linq mode by default.
6238         
6239         * report.cs: Reset message stacks.
6240         
6241 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6242
6243         * generic.cs (InferInPhases): Correctly calculate params position.
6244         
6245 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6246
6247         * cs-tokenizer.cs: No need to parse full string when parsing lambda
6248         arguments.
6249
6250 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6251
6252         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
6253         
6254         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
6255         
6256         * driver.cs: Updated --help option.
6257         
6258 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6259
6260         * generic.cs (InferParamsTypeArguments): Removed.
6261         (InferInPhases): Add params type inference.
6262         (LowerBoundInference): Fixed scoring mechanism.
6263         
6264         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
6265         
6266 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
6267
6268         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
6269         byte array for unsigned "baked" assemblies.
6270
6271 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
6272
6273         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
6274         array for assemblies that are not strongnamed.
6275
6276 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6277
6278         A fix for bug #351481
6279         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
6280         declaring type for nested generic types.
6281         
6282 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6283
6284         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
6285         instead of ToString.
6286         
6287 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6288
6289         A fix for bug #351047
6290         * expression.cs (Binary.ResolveOperator): Allow equality operators between
6291         null and structs only when equality and inequality operators are defined
6292         either as an user-operators or predefined operators.
6293         
6294 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6295
6296         A fix for bug #351047
6297         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
6298         
6299 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6300
6301         A fix for bug #351257
6302         * cs-tokenizer.cs: Advance line number for '\r' correctly.
6303         
6304 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6305
6306         A fix for bug #351157
6307         * class.cs (Using): Fixed yet another broken cloning.
6308         
6309         (Block): Put back more sensible default value for statements.
6310         
6311 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
6312
6313         * codegen.cs: Allow AssemblyVersion with only major version component.
6314         Fixes bug #351055.
6315
6316 2007-12-29  Marek Safar  <marek.safar@gmail.com>
6317
6318         A fix for bug #324654
6319         * class.cs: Use FullName property as member name.
6320
6321 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6322
6323         A fix for bug #342117
6324         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
6325         constructor constraint.
6326
6327 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6328
6329         A fix for bug #338273
6330         * class.cs (ProbertyBase): Access modifier checks are required for overrides
6331         only.
6332
6333 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6334
6335         A fix for bug #350839
6336         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
6337
6338 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6339
6340         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6341         GHOP:
6342         
6343         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6344
6345         * statement.cs: Changed some Hashtables to use HybridDictionaries
6346         instead. It was observed that some HashTables only contained a few
6347         items in the vast majority of cases. Since HybridDictionary is
6348         more efficient on small sets (<10 elements), "known_variables"
6349         from class ExplicitBlock as well as "labels" and "constants " from
6350         class Block were changed to HybridDictionaries. 
6351
6352         Atsai results: (56216kb->54987kb)
6353
6354         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
6355
6356
6357 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6358
6359         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6360         GHOP:
6361         
6362         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6363         
6364         * expression.cs: foreach loop to for loop, saved on allocation of
6365         enumerator (59333kb->59141kb)
6366
6367         * statement.cs. Changed foreach loops to for loops, saved on
6368         allocation of enumerator (59141kb->59006kb)
6369
6370         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
6371         when constructed with no specified capacity. This was causing a
6372         few ArrayLists to allocate more memory than they would potentially
6373         need in the Block class and MemberCache class. Setting the
6374         ArrayLists to construct with a capacity of 1 saves some
6375         memory. (56216kb->55585kb)
6376
6377 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6378
6379         A fix for bug #347189 (2nd issue)
6380         * expression.cs (MemberAccess): Nested type can be found in base non-generic
6381         type.
6382
6383 2007-12-27  Miguel de Icaza  <miguel@novell.com>
6384         
6385         * report.cs: Do not use colors if stdout and stderr are not a
6386         terminal.
6387
6388 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6389
6390         A fix for bug #346998
6391         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
6392         overloads.
6393
6394 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6395
6396         A fix for bug #343465
6397         * class.cs: Explicit method name for nested types uses dots only.
6398
6399 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6400
6401         A fix for bug #343707
6402         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
6403
6404 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6405
6406         * ecore.cs: Report type inference errors only when arguments count matches
6407         parameter count.
6408         
6409         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
6410         
6411         * expression.cs, report.cs: New warning.
6412         
6413         * typemanager.cs: Catch anonymous method type too.
6414
6415 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6416
6417         A fix for bug #346379
6418         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6419
6420 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6421
6422         A fix for bug #347359
6423         * expression.cs (Invocation): Don't resolve already resolved expression.
6424
6425 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6426
6427         A fix for bug #347189
6428         * class.cs (FixedField): Use non-dependent code only in the define phase.
6429
6430 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6431
6432         A fix for bug #348076
6433         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6434
6435 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6436
6437         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6438         discovered extension methods.
6439
6440 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6441
6442         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6443         method.
6444
6445 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6446
6447         * report.cs (ErrorMessage): Add support for using colors on
6448         terminals that support it. 
6449
6450 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6451
6452         * ecore.cs: Use information about expanded params for error reporting.
6453
6454 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6455
6456         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6457         and logic for params overloads.
6458         
6459 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6460
6461         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6462         as this is also created from the parser.  Fixes #349034
6463
6464 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6465
6466         * statement.cs (Throw.CloneTo): it is valid to have empty
6467         expressions for throw. 
6468
6469 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6470
6471         * cs-parser.jay: Set delegate constraint parsing region correctly.
6472
6473 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6474
6475         A fix for bug #345467
6476         * typemanager.cs (IsEqual): Compare generic parameters position only.
6477         
6478 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6479
6480         * expression.cs (BaseAccess): Type arguments can be null.
6481
6482 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6483
6484         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6485         consistent even when an error has occured.
6486         (Switch.Resolve): Likewise.
6487
6488 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6489
6490         A fix for bug #334505
6491         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6492         overrides.
6493         
6494 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6495
6496         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6497         refactorings required to resolve extension methods correctly when mixing
6498         generics and non-generics members.
6499         
6500 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6501
6502         A fix for bug #342584
6503         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6504         conversion.
6505         
6506 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6507
6508         A fix for bug #342512
6509         * delegate.cs: Use delegate argument expression when is available. Don't
6510         emit virtual call when class is sealed.
6511         
6512 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6513
6514         A fix for bug #325423
6515         * assign.cs (FieldInitializer): Use resolved expression for emit.
6516         
6517         * class.cs: Print less confusing error message.
6518         
6519 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6520
6521         * cs-tokenizer.cs: Removed GMCS ifdefs.
6522         
6523         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6524         mcs.
6525         
6526         * cs-parser.jay: Disabled nullable check.
6527         
6528         * generic-mcs: Copied more generic stuff.
6529                 
6530 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6531
6532         * gcs-parser.jay: Merged to cs-parser.jay.
6533         
6534         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6535         * *.csproj, *.sources: Updated to use only jay parser file.
6536
6537 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6538
6539         * gcs-parser.jay: Added nullable and default expression feature checks.
6540         
6541 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6542
6543         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6544         it fixes many TODOs and hidden bugs.
6545         
6546         * expression: Removed duplicate error check.
6547
6548 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6549
6550         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6551         implicitly type local variable only when it is used in a declaration.
6552
6553 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6554
6555         * attribute.cs: Use CS0612 for empty strings.
6556
6557 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6558
6559         * lambda.cs, statement.cs: Contextual return may act as a statement.
6560
6561 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6562
6563         A fix for a regression cause by #324222
6564         * class.cs: Don't report unused even when it implements an interface.
6565         
6566 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6567
6568         A fix for bug #341205
6569         * ecore.cs, expression.cs: Method group expression cannot do static
6570         method access with an instance reference check before overloading takes
6571         a place.
6572         
6573 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6574
6575         A fix for bug #325359
6576         * class.cs: Use predictable name for automatically generated property.
6577         
6578 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6579
6580         A fix for bug #324996
6581         * expression.cs (Is): Handle case where D is nullable and T is not
6582         correctly.
6583         
6584         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6585         
6586 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6587
6588         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6589         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6590         Flush small error reporting changes.
6591         
6592 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6593
6594         A fix for bug #324996
6595         * expression.cs: Rewrote Is expression implementation to work with
6596         generics, nullable types, anonymous method. A const result expression 
6597         uses existing infrastructure instead of custom not fully-featured one.
6598         
6599 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6600
6601         A fix for bug #340202
6602         * class.cs: Consider generics for volatile field.
6603
6604 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6605
6606         A fix for bug #335594
6607         * expression.cs: Use conversion rules when handling string addition.
6608         
6609 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6610
6611         A fix for bug #336651
6612         * expression.cs: Fixed a crash when probing is on.
6613         
6614 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6615
6616         A fix for bug #324242
6617         * covert.cs: Added a conversion from any nullable-type with an 
6618         underlying enum-type to the type System.Enum.
6619         
6620 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6621
6622         A fix for bug #324222
6623         * class.cs: Report all non-used event fields.
6624         
6625 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6626
6627         A fix for bug #325161
6628         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6629         qualifier for generic types.
6630         
6631 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6632
6633         A fix for bug #322971
6634         * expression.cs, ecore.cs: Added intermediate result value check for
6635         indexers. 
6636         
6637 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6638
6639         A fix for bug #324754
6640         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6641         when it was requested.
6642
6643 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6644
6645         A fix for bug #325101
6646         * expression.cs: Do type not value comparison for `is' expression.
6647
6648 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6649
6650         A fix for bug #320236
6651         * convert.cs: Don't apply user conversion on underlying target type.
6652
6653 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6654
6655         * expression.cs: Don't use unresolved expression for error reporting.
6656  
6657 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6658
6659         A fix for bugs #337712, #324490
6660         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6661         overloading resolution too.
6662         
6663         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6664         the process consistent and more robust.
6665         
6666         * expression.cs, linq.cs, report.cs: Update.
6667
6668 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6669
6670         A fix for bug #332909
6671         * attribute.cs: Resolve attributes in correct context using error
6672         handling procedure.
6673         
6674         * rootcontext.cs: Define Obsolete attribute members as core members.
6675         
6676 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6677
6678         * statement.cs: Removed unused methods.
6679         
6680 2007-10-31  Wade Berrier  <wberrier@novell.com>
6681
6682         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6683         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6684         during 'make dist')
6685
6686 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6687
6688         A fix for bug #338102
6689         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6690         methods registered as non-generics.
6691         
6692 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6693
6694         A fix for bugs #337712, #324490
6695         * delegate.cs: Delegate covariance and contravariance is not allowed for
6696         value types.
6697         
6698 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6699
6700         A fix for bug #337719 
6701         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6702         `from' keyword.
6703         
6704 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6705  
6706         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6707
6708 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6709  
6710         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6711         query expressions.
6712
6713 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6714
6715         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6716
6717 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6718  
6719         A fix for bug #334652
6720         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6721         extension methods when we have not found the best candidate in normal
6722         container.
6723
6724 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6725
6726         * AssemblyInfo.cs: Keep up-to-date.
6727
6728 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6729
6730         * Makefile: Fixed generics compiler name.
6731         
6732 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6733
6734         * lambda.test: removed, lambda parsing is done differently.
6735         
6736         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6737
6738 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6739
6740         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6741
6742 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6743
6744         * Makefile, *.sources : All C# compilers are in mcs folder.
6745         
6746         * *.cs: Use existing 2_1 define for smcs.
6747
6748 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6749
6750         A fix for bug #335847
6751         * assign.cs, expression.cs: Couple of changes to avoid creating a
6752         temporary variable for each object initializer assignment statement. It
6753         simplifies struct initialization too, otherwise two temporary variables
6754         would be required.
6755         Implemented optimization of redundant default element initializers.
6756         
6757 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6758
6759         A fix for bug #336766
6760         * expression.cs (Class.CheckBase): Use generic name when method is
6761         generic.
6762         
6763 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6764
6765         A fix for bug #334737
6766         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6767         variable and not variable argument for prepared copies.
6768
6769 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6770
6771         A fix for bug #325110
6772         * class.cs, expression.cs, attribute.cs: Use open generic method when
6773         checking conditional attribute.
6774         
6775 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6776
6777         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6778         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6779         FeatureIsNotAvailable.
6780
6781 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6782
6783         ** C# 3.0 Partial methods
6784         
6785         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6786         methods support. Because of member cache issue with generics only
6787         non-generics partial methods are fully supported.
6788         
6789 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6790         
6791         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6792         generics and to use member cache for member checking. It also improves
6793         performance and fixes remaining overloads issues.
6794         
6795 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6796         
6797         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6798         roottypes.cs, typemanager.cs:
6799                 
6800         A member cache creation logic changed to add members immediately and
6801         not rely on fallback. The member cache is now only prefered way
6802         how to access and find type declaration members. It saves 5 MB of memory
6803         during MWF compilation and makes code ready for more optimizations and
6804         clean-ups, it's also a pre-requirement for partial methods.
6805         
6806 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6807
6808         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6809         handling for generic parameters.
6810
6811 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6812         
6813         * class.cs (FixedField): Removed redundant volatile check.
6814         
6815 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6816         
6817         * class.cs, decl.cs: Fixed overload members verification to do only one
6818         check per possible collision.
6819         
6820 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6821         
6822         A fix for bug #325478
6823         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6824         and create only one disposable flags container.
6825         
6826 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6827         
6828         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6829         * statement.cs (Fixed): Fixed variables cloning.
6830         
6831 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6832         
6833         A fix for bug #333342
6834         * class.cs (EventField): Don't mark value type event as synchronized. 
6835         
6836 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6837         
6838         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6839         inference to identify best candidate method correctly.
6840         (ProperyExpr): A range variable is read only and cannot be modified.
6841         
6842 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6843         
6844         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6845         logic to identify best candidate method correctly.
6846         
6847 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6848         
6849         * location.cs (Equals, GetHashCode): Removed.
6850         
6851 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6852         
6853         * report.cs: Implemented message recorder. It is used mainly for lambda
6854         expressions to capture otherwise swallowed error messages.
6855         
6856         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6857
6858         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6859         and not at the top.
6860         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6861                 
6862         * expression.cs (MemberAccess): Always report lookup failure.
6863         
6864         * location.cs: Implemented Equals, GetHashCode.
6865         
6866         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6867         
6868 2007-10-10  Jb Evain  <jbevain@novell.com>
6869
6870         * codegen.cs: re-enable assembly version check.
6871
6872 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6873         
6874         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6875         checks.
6876         
6877         * namespace.cs (UsingAlias): Do correct version check.
6878         
6879 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6880         
6881         * expresison.cs, ecore.cs: Issue extension method error message when
6882         appropriate.
6883         
6884         * rootcontext.cs: Added ISO_2 compiler mode option.
6885
6886 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6887         
6888         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6889          message.
6890         
6891 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6892         
6893         * attribute.cs (GetString, GetBoolean): Work with both literal and
6894         constant.
6895         
6896         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6897         Moved method overload specific methods to MethodGroupExpr.
6898         
6899         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6900         it should be less memory consuming.
6901         
6902 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6903
6904         * codegen.cs: remove the assembly version check until the buildbot is
6905         fixed.
6906
6907 2007-10-07  Jb Evain  <jbevain@novell.com>
6908
6909         * attribute.cs (Attribute.GetString): if the value
6910         expression is a StringConstant, return its string value.
6911
6912 2007-10-07  Jb Evain  <jbevain@novell.com>
6913
6914         * typemanager.cs: add `assembly_version_attribute_type`.
6915         * codegen.cs: on attribute emission, check that the
6916         AssemblyVersionAttribute doesn't overflow.
6917
6918 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6919         
6920         A fix for bug #324677
6921         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6922         parent container of a scope container with currently resolved one. 
6923         
6924 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6925         
6926         A fix for bug #325534
6927         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6928         only.
6929         
6930 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6931         
6932         A fix for bug #327504
6933         * class.cs (Operator.Define): Refactored implicit and explicit user
6934         operator conversion rules.
6935         
6936 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6937         
6938         A fix for bug #327520
6939         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6940         
6941 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6942         
6943         A fix for bug #328022
6944         * class.cs (MethodData.Define): Use correct method to check whether
6945         a method implementents an accessor.
6946         
6947 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6948         
6949         A fix for bug #330069
6950         * statement.cs (Fixed.Resolve): Read the first array element only when
6951         an array is instantiated. 
6952         
6953 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6954         
6955         * expression.cs, assign.cs, generics.cs: Print correct operator when
6956         compound assignment is used.
6957         
6958 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6959         
6960         A fix for bug #325841
6961         * expression.cs (ArrayAccess): Use full argument cloning only for
6962         string compound concatenation.
6963         
6964 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6965         
6966         A fix for bug #328774
6967         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6968         assignment.
6969         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6970         assignment.
6971
6972 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6973
6974         Fix #328490
6975         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6976         Event accessibility checks here.  Remove some bogus code that
6977         accidently made GenericMethods work.
6978         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6979
6980 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6981         
6982         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6983         
6984         * statement.cs (Block): Refactored AddVariable to allow error handling
6985         customization.
6986         
6987         * generic.cs: New stub.
6988         
6989 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6990         
6991         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6992         flag.
6993         
6994 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6995
6996         * class.cs: Use partial container to record whether any partial part
6997         contains static field initializer and therefore default contructor has
6998         to be defined.
6999         
7000 2007-09-14  Marek Safar  <marek.safar@gmail.com>
7001
7002         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
7003         mono-list when only one of two partial parts has defined accessibility
7004         modifier.
7005         
7006 2007-09-14  Marek Safar  <marek.safar@gmail.com>
7007
7008         A fix for bug #82845
7009         
7010         * class.cs (TypeContainer): Set correct resolve context for all field
7011         initializers.
7012         
7013 2007-09-13  Marek Safar  <marek.safar@gmail.com>
7014
7015         * assign.cs: Fixed a crash when field is resolved twice with an error.
7016         
7017         * codegen.cs: Changed InFieldInitializer to be flag.
7018         
7019         * anonymous.cs, ecore.cs, expression.cs: Update after
7020         IsInFieldInitializer rename.
7021         
7022         * const.cs: Removed unused parameter.
7023         
7024         * class.cs: Changed the way how we resolve and emit field initializers.
7025         The field initilizers have to have access to contructor block to emit
7026         compiler generated code.
7027
7028 2007-09-13  Marek Safar  <marek.safar@gmail.com>
7029
7030         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
7031         generics use TypeContainer instead.
7032         
7033 2007-09-12  Marek Safar  <marek.safar@gmail.com>
7034         
7035         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
7036
7037         * lambda.cs (ResolveParameters): Use more powerful
7038         InflateGenericArgument.
7039         
7040         * parameters.cs: Better exception message.
7041                 
7042 2007-09-10  Marek Safar  <marek.safar@gmail.com>
7043
7044         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
7045         correct expression block type. 
7046         
7047         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
7048         
7049         * expression.cs (Invocation): Extracted method group resolve to
7050         DoResolveOverload.
7051         
7052 2007-09-07  Marek Safar  <marek.safar@gmail.com>
7053
7054         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
7055         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
7056         
7057         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
7058         generic extension methods.
7059
7060 2007-09-06  Marek Safar  <marek.safar@gmail.com>
7061
7062         A fix for bug #82676 (Do I get it right now?)
7063         * convert.cs (Binary.ResolveOperator): An interface is converted to the
7064         object before a standard conversion is applied.
7065         
7066 2007-09-06  Marek Safar  <marek.safar@gmail.com>
7067
7068         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
7069         #82676.
7070         
7071 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7072
7073         A fix for bug #82676
7074         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
7075         non-generic interface types.
7076         
7077 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7078
7079         A fix for bug #82690
7080         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
7081         
7082 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7083
7084         A fix for bug #82571
7085         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
7086         modifier for container based methods.
7087         
7088 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7089
7090         A fix for bug #82676
7091         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
7092         any interface-type T means to any of interface type T.
7093
7094 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7095
7096         * namespace.cs: We have 2 versions of System.Core assembly.
7097
7098 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7099
7100         A fix for bug #82652
7101         * class.cs (Class.GetClassBases): Compare types and not expressions.
7102
7103 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7104
7105         A fix for bug #82620
7106         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
7107         actually never worked before.
7108         (IndexerAccess): Emit prepared arguments before they are modified.
7109         
7110 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7111
7112         A fix for bug #82563
7113         * assign.cs: Revert wrong fix.
7114         
7115         * expression.cs (VariableReference.EmitAssign): Handle ref reference
7116         correctly.
7117         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
7118         Instead of ldelema/stdind we have to use temporary variables to handle
7119         cases like String.Concat (params string[]).
7120         
7121 2007-08-31  Marek Safar  <marek.safar@gmail.com>
7122
7123         * class.cs: EmitAttributes to Emit rename.
7124         
7125         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
7126         null.
7127         (MemberCore.HasClsCompliantAttribute): Don't depend on 
7128         GetClsCompliantAttributeValue execution.
7129         
7130 2007-08-31  Marek Safar  <marek.safar@gmail.com>
7131
7132         * anonymous.cs: Use shorter type prefix.
7133         
7134         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
7135         when exist.
7136         
7137         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
7138         variables when probing is on.
7139         
7140         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
7141         unresolved variables.
7142         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
7143         handle transparent identifiers.
7144         
7145 2007-08-26  Marek Safar  <marek.safar@gmail.com>
7146
7147         * attribute.cs (IsClsCompliant): Add nullable types test.
7148         
7149 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
7150
7151         * doc.cs : catch other types of exception than XmlException to
7152           report CS1570. Fixed bug #82565.
7153
7154 2007-08-23  Marek Safar  <marek.safar@gmail.com>
7155
7156         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
7157         The number of delegate parameters has to match.
7158         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
7159         arrays.
7160
7161 2007-08-21  Marek Safar  <marek.safar@gmail.com>
7162
7163         * anonymous.cs (AnonymousMethod): Generate private anonymous method
7164         to fix problem with private arguments.
7165
7166 2007-08-20  Marek Safar  <marek.safar@gmail.com>
7167
7168         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
7169         
7170         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
7171         
7172         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
7173         empty. Add cloning suport.
7174         
7175         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
7176
7177 2007-08-20  Marek Safar  <marek.safar@gmail.com>
7178
7179         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
7180         to create EmptyCast. It handles EmptyConstantCast specialization for
7181         constants.
7182         
7183 2007-08-18  Marek Safar  <marek.safar@gmail.com>
7184
7185         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
7186         (EmitArrayArgument): One routine for array arguments.
7187         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
7188         
7189 2007-08-17  Marek Safar  <marek.safar@gmail.com>
7190
7191         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
7192
7193 2007-08-17  Marek Safar  <marek.safar@gmail.com>
7194
7195         * anonymous.cs: MemberLookupFinal update.
7196
7197         * class.cs (ConstructorInitializer): Is expression based.
7198         
7199         * delegate.cs: MethodGroupExpr update.
7200         
7201         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
7202         messages.
7203         (Error_MemberLookupFailed): Customizable error override.
7204         (MethodGroupExpr): Keep queried type for later usage.
7205         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
7206         resolve.
7207         
7208         * expression.cs: Error_MemberLookupFailed refactoring.
7209         (New.DoResolve): Resolve as much as possible.
7210         (ElementInitializer.Error_MemberLookupFailed): Object initializer
7211         customization for invalid member types.
7212
7213         * statement.cs: MethodGroupExpr update.
7214         
7215 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7216
7217         * modifier.cs (Check): Check all modifiers and not only accessibility
7218         ones.
7219
7220 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7221
7222         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
7223         type and not an expression.
7224
7225 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7226
7227         * statement.cs (Catch.Clone): Type and variable can be null.
7228
7229 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7230
7231         A fix for bug #81979
7232         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
7233         I am really not sure whether this is the best fix.
7234         
7235         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
7236         only once.
7237         
7238 2007-08-14  Marek Safar  <marek.safar@gmail.com>
7239
7240         ** C# 3.0 Object and collection initializers (major re-write)
7241         
7242         * assign.cs (DoResolve): Initializers are not assign related.
7243         
7244         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
7245         used during collection or object initialization.
7246         
7247         * expression.cs (Error_InvalidArguments): Add initializers specific
7248         messages. More will come later because it requires some general
7249         refactoring.
7250         (New.DoResolve): Better error handling for unsafe types.
7251         (EmptyExpressionStatement): New class.
7252         (ElementInitializer): An object initializer expression.
7253         (CollectionElementInitializer): A collection initializer expression.
7254         (CollectionOrObjectInitializers): A block of object or collection
7255         initializers.
7256         (NewInitialize): New expression with element/object initializers.
7257         
7258         * statement.cs: Reverted object/collection initializer hacks.
7259         
7260         * typemanager.cs (CSharpName): Filter __arglist type.
7261         
7262 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7263
7264         ** C# 3.0 Anonymous Types (update to the latest standard)
7265         
7266         * expression.cs (Binary.ResolveOperator): Threat all null based types
7267         same.
7268         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
7269         (AnonymousTypeParameter): Updated.
7270         
7271         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
7272         (AnonymousTypeClass): New anonymous type container.
7273         
7274         * class.cs (AddField): Return operation result.
7275         
7276         * generic.cs: Another empty TypeArguments overload.
7277         
7278         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
7279         are stored at top of normal hierarchy.
7280         
7281         * typemanager.cs (CSharpName): Filter anonymous types.
7282         
7283 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7284
7285         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
7286         as single Concat call. How could we miss that :-(
7287         
7288 2007-08-08  Marek Safar  <marek.safar@gmail.com>
7289
7290         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
7291         
7292 2007-08-07  Miguel de Icaza  <miguel@novell.com>
7293
7294         * expression.cs: Fix the previous commit, the creation of the
7295         arguments array list needs also to be conditional on the arguments
7296         not being null.
7297
7298         * class.cs: Add a little bit of help to help narrow down problems.
7299
7300         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
7301         not try to copy in that case. 
7302
7303         * driver.cs: When building SMCS, include a new different set of
7304         default assemblies here.   Do this here so we can control whether
7305         to include the default assemblies with /noconfig.
7306
7307 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7308
7309         A fix for bug #81979
7310         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
7311         only.
7312
7313 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7314
7315         A fix for bug #82300
7316
7317         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
7318         we are in probing scope.
7319
7320 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7321
7322         A fix for bug #82301
7323
7324         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
7325         (Statement.CloneTo): Clone and not map children blocks.
7326
7327 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7328
7329         A fix for bug #82299
7330
7331         * expression.cs (LocalVariableReference.CloneTo): Remap local info
7332         variable too.
7333         
7334         * statement.cs (Statement.CloneTo): Clone variables before statements
7335         to allow remaping of local variables.
7336
7337 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7338
7339         A fix for bug #82296
7340
7341         * anonymous.cs,
7342         * report.cs: Log crash details for future clone problems.
7343         
7344         * statement.cs (Return.Clone): Don't clone non-existent expression.
7345
7346 2007-08-03  Raja R Harinath  <harinath@gmail.com>
7347
7348         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
7349         (Class.AddBasesForPart): Move CS0537 check here from ...
7350         * cs-parser.jay (class_declaration): ... here.  Move calling of
7351         'AddBasesForPart' to ...
7352         (class_bases): ... here.
7353         (struct_declaration, interface_declaration): Update to changes.
7354
7355 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7356
7357         A fix for bug #81923
7358
7359         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
7360         conversion is allowed.
7361
7362 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7363
7364         A fix for bug #81564
7365
7366         * ecore.cs (EventExpr): Add IsBase handling.
7367
7368         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
7369         too.    
7370         
7371 2007-08-02  Raja R Harinath  <harinath@gmail.com>
7372
7373         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
7374         * cs-parser.jay: Some whitespace cleanups.
7375         (current_delegate): New.
7376         (type_name): New.
7377         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
7378         a dummy code block, and use 'type_name' instead of 'member_name'.
7379         (interface_declaration, class_declaration): Likewise.
7380         (delegate_declaration): Likewise.  Rearrange slightly and use
7381         'current_delegate'.
7382         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
7383         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
7384
7385 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7386
7387         A fix for bug #82039
7388
7389         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
7390         available.
7391
7392         * typemanager.cs (CSharpName): Split to string overload.
7393
7394 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7395
7396         * expression.cs,
7397         * report.cs: Updated warning CS0472.
7398
7399 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7400
7401         A fix for bug #82181
7402         * cs-parser.jay,
7403         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
7404
7405 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7406
7407         A fix for bug #82277
7408         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
7409
7410 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7411
7412         ** C# 3.0 Type Inference (major bits are working)
7413         
7414         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
7415         (.ImplicitStandardConversionExists): Uses compatible.
7416         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7417         (.InferReturnType): New method.
7418         (.Compatible): Refactored.
7419         (.ResolveParameters): Uses factory to create resolved parameters.
7420         (.CompatibleMethod): Add probing mode support.
7421         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7422         clearly distinguish between 2 different operations.
7423         (LambdaMethod): Moved to lambda.cs.
7424         (AnonymousMethod): Removed unused fields and methods.
7425         (AnonymousDelegate): Simplified.
7426         
7427         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7428         
7429         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7430         
7431         * delegate.cs (Delegate): New mehods to reduce code duplication.
7432         (.GetConstructor): New method.
7433         (.GetInvokeMethod): New method.
7434         (DelegateCreation): Updated.
7435         
7436         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7437         does not exist.
7438         (OverloadResolve): Made probing little bit faster.
7439         
7440         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7441         when probing is on.
7442         
7443         * generic.cs (TypeInferenceContext): Dummy implementation.
7444         
7445         * iterators.cs: Updated after Resolve/Define rename.
7446         
7447         * lambda.cs (LambdaExpression)
7448         (.ResolveParameters): Handles both type of arguments and type inference too.
7449         
7450         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7451         (InflateTypes): Updated.
7452         
7453         * support.cs (InflateTypes): Changed signature and updated.
7454         
7455         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7456         (MemberLookup_FindMembers): More MS tricks.
7457         (GetParameterData): Ditto.
7458         (GetDelegateParameters): Uses quick path for dynamic types.
7459         
7460 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7461
7462         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7463         only.
7464
7465 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7466
7467         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7468         syntax.
7469         
7470 2007-07-26  Jb Evain  <jbevain@novell.com>
7471
7472         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7473         which takes a boolean 'report_errors', similar to the GetMethod.
7474         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7475         in .net 2.1, do not report errors here.
7476
7477         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7478         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7479         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7480         in .net 2.1.
7481
7482         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7483         of the type InternalsVisibleToAttribute before the first call
7484         to CoreLookupType which is allowed to fail (third boolean parameter
7485         to true). Because, during the resolution for a type that is not
7486         immediately found, we try to check if the type is not defined in
7487         a friend assembly, and to do so, we need the
7488         InternalVisibleToAttribute.
7489
7490 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7491
7492         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7493         feature that allows structs to be compared against null and inline
7494         the result as true or false.
7495
7496         Notice that the same code is not permitted inside a generic block
7497         of code that would do:
7498
7499         class Foo<T> where T : struct {
7500             bool Eval (T x)
7501             {
7502                  return x == null;
7503             }
7504         }
7505
7506         It is only allowed if the type of T is not bound (no where
7507         clause).   In my opinion, this CSC 2 behavior is broken but people
7508         seem to be using it (IronRuby does, a few bug reports on bugzilla
7509         have it and some people have complained about it).
7510
7511         All of the users that depend on this behavior have code that is
7512         very likely broken. 
7513         
7514         * report.cs (Warning, Error): make these take object arguments,
7515         not strings, as that allows us to take advantage of Format.
7516
7517 2007-07-20  William Holmes  <billholmes54@gmail.com>
7518
7519         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7520           Left member variable for the Count.
7521         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7522           MemberName.CountTypeArguments to avoid a NRE. 
7523
7524         This code is contributed under the MIT X11 license
7525
7526 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7527
7528         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7529
7530 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7531
7532         * doc.cs : generic method arguments are written as ``x while generic
7533           type arguments are `x. Combined with the previous change, fixed bug
7534           #79706.
7535
7536 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7537
7538         Fix #82120
7539         * expression.cs (Binary.ResolveOperator): When converting
7540         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7541
7542 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7543
7544         * doc.cs : when T: or whatever x: is specified, it does not really
7545           check the doc comment's syntax correctness. Fixed bug #82006.
7546
7547 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7548
7549         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7550         LambdaExpression better.
7551         
7552         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7553         
7554         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7555         
7556         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7557         as it can be generated.
7558         
7559         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7560         modifiers.
7561         
7562         * lambda.cs (LambdaExpression): Refactored to share same code with
7563         AnonymousMethodExpression.
7564         
7565 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7566
7567         * anonymous.cs (MakeName): Include host name for easier debugging.
7568         (LambdaMethod): New class for lambda spcecific stuff.
7569         
7570         * attribute.cs: Set EmitContext return type.
7571
7572         * class.cs: Set EmitContext return type.
7573         
7574         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7575         with null/void meaning.
7576         
7577         * iterators.cs (ContainerType): Implemented.
7578         
7579         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7580         
7581         * statement.cs (Return): Updated to lambda expressions.
7582         (Block.CloneTo): Parent can be null.
7583                 
7584 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7585
7586         A fix for bug #81917
7587         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7588         
7589         * class.cs (FixedField): Check whether field is in unsafe scope.
7590
7591         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7592         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7593
7594         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7595         FieldExpr.
7596         
7597         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7598                 
7599 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7600
7601         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7602         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7603         from Report class.
7604
7605 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7606
7607         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7608         
7609 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7610
7611         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7612         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7613         
7614         * codegen.cs(EmitContext): Add ProbingMode flag.
7615         
7616         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7617         
7618         * driver.cs: For now set both warning values.
7619         
7620         * ecore.cs (SimpleName): Name is readonly.
7621         (MethodGroup.OverloadResolve): One quick path for probing.
7622         
7623         * expression.cs (Unary): Set Oper r/o.
7624         (Binary): Set Oper r/o.
7625         (ParameterReference): Set few instance variables as r/o.
7626         (ParameterReference.DoResolveBase): Don't capture aruments when 
7627         the probing is on.
7628         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7629         (Arglist): arguments are private.
7630         (SizeOf): type is private and r/o.
7631         (MemberAccess): arguments are private.
7632
7633         * report.cs: Enhanced reporting on/off capabilities.
7634         
7635         * lambda.cs: Uses ec.IsInProbingMode.
7636         (ContextualReturn): Derives from return.
7637         
7638         * rootcontext.cs: For now set both warning values.
7639         
7640         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7641         copy if one exists.
7642         (Return.Resolve): Don't die immediately.
7643         (Block.Resolve): Speed-up probing.
7644         (Block.CloneTo): Clone only child blocks.
7645
7646 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7647
7648         * iterators.cs: reverted Miguel's latest change (r81925) as it
7649         breaks the build in System.
7650
7651 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7652
7653         * iterators.cs (Yield.CheckContext): Check for the iterator type
7654         also here as we can call into Yield even in codepaths that are not
7655         directly checked by
7656         (MethodOrOperator is the only path that was checked).
7657
7658         In addition to the standard check, use a more specific check for
7659         constructors to report a more verbose error. 
7660
7661 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7662
7663         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7664         report the warning and continue 
7665
7666         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7667         values on the stack on the call to Emit.   Use EmitStatement if
7668         possible, or using Emit + Pop if not possible.   Fixes #82064
7669
7670 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7671
7672         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7673         avoid try...finally in some cases.
7674
7675 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7676
7677         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7678         
7679         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7680         instead of method. Re-use standard error handling.
7681         (ConstructorInitializer.Emit): Simplified.
7682         
7683         * delegate.cs: Updated after Invocation.EmitCall change.
7684         
7685         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7686         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7687         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7688         method and don't permanently changing input arguments.
7689         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7690         is resolved it has one of the candidates is the best one which is later
7691         used to emit. Removed a few unused method.
7692         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7693
7694         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7695         (Binary.ResolveOperator): Ditto.
7696         (ConditionalLogicalOperator.DoResolve): Ditto.
7697         (Invocation): Uses method group.
7698         (Invocation.DoResolve): Simplified.
7699         (Invocation.EmitCall): Removed useless is_static.
7700         (Invocation.Emit): Delegate to method group.
7701         (Invocation.EmitStatement): Simplified.
7702         (New): Uses method group.
7703         (MemberAccess.DoResolve): Don't destroy original expression.
7704         
7705         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7706         
7707 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7708
7709         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7710         
7711         * anonymous.cs,
7712         * lambda.cs: Add custom error message type.
7713
7714 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7715
7716         * lambda.cs: Simplified little bit.
7717         
7718         * parameter.cs: Introduced ImplicitLambdaParameter.
7719         (Parameters.CreateFullyResolved): New factory instead of ctor.
7720         
7721         * anonymous.cs,
7722         * class.cs,
7723         * delegate.cs: Updated parameter creation.
7724         
7725 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7726
7727         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7728         arguments.
7729         
7730         * generic.cs: Synchronized with gmcs.
7731         
7732 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7733
7734         * class.cs (Indexer): Check return type as soon as possible.
7735         
7736         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7737         members too.
7738         
7739         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7740         
7741         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7742         
7743         * parameter.cs (Parameter): Use expression type when it is available.
7744         
7745         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7746         method modifier for the first parameter only.
7747
7748 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7749
7750         A fix for bug #81938
7751         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7752         
7753         * constant.cs: Tide up an exception message.
7754
7755 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7756
7757         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7758         an uninitialized variable is used.
7759         
7760         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7761
7762 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7763
7764         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7765         not found error handling.
7766
7767         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7768         simplified.
7769         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7770         (ArrayCreation.DoResolve): Simplified.
7771         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7772         its own resolve process.
7773         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7774
7775 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7776
7777         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7778         more error details.
7779         
7780 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7781
7782         * cs-tokenizer.cs: Removed var related stuff.
7783         
7784         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7785         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7786         a type and a keyword at same time.
7787         
7788         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7789         matches to "var".
7790         
7791         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7792         implicitly typed arrays, more changes will follow.
7793         
7794         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7795         
7796 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7797
7798         * ecore.cs (VarExpr): Removed Handled field.
7799         
7800         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7801         build-in assign functionality.
7802         (ForEach.Resolve): Removed all implicitly typed local variable code and
7803         simplified.
7804         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7805         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7806
7807 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7808
7809         * assign.cs: Removed implicitly typed local variable check.
7810         
7811         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7812         referencing implicitly typed local variable.
7813         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7814         variable here.
7815         
7816         * statement.cs (Fixed): Removed unsupported implicitly typed local
7817         variable code.
7818
7819 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7820
7821         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7822
7823 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7824
7825         A fix for bugs #81855 and #76274
7826         * attribute.cs (AttachTo): Always set owner for global attributes to
7827         prefined owner.
7828         
7829         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7830         usefull too.
7831         
7832         * cs-parser.jay: Assembly and module attributes must precede all other
7833         elements except using clauses and extern alias declarations.
7834
7835 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7836
7837         A fix for bug #81748
7838         * cs-tokenizer.cs,
7839         * expression.cs: More checks for non ISO-1 features.
7840
7841 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7842
7843         A fix for bug #81807
7844         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7845         present inside switch statement and it is required by nullable check.
7846
7847 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7848
7849         A fix for bug #81840
7850         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7851         when type matching fails.
7852         
7853         * namespace.cs: Tiny error message change.
7854
7855 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7856
7857         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7858         reporting. Added automatic property check.
7859         
7860         * class.cs: Updated after CheckAbstractAndExtern relocation.
7861         (AEventPropertyAccessor.GetSignatureForError): Customized.
7862         
7863 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7864
7865         * class.cs (DefineBaseTypes): Base type can be undefined.
7866         
7867         * ecore.cs (TypeLookup): Minor refactoring.
7868         (DoResolveAsTypeStep): Removed redundant check.
7869
7870         * namespace.cs (Lookup): Removed redundant check.
7871                 
7872         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7873         ResolveAsTypeTerminal step.
7874         (BootstrapCorlib_*): Simplified.
7875         (PopulateCoreType): Core types can be now external.
7876
7877 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7878
7879         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7880          verification only.
7881          (InferTypeArguments): Infers anonymous expression type arguments.
7882          (Compatible): Split to Compatible and InferTypeArguments. 
7883         
7884         * lambda.cs: Updated.
7885
7886 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7887
7888         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7889
7890 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7891
7892         Fix #80477, cs0135-2.cs, cs0135-3.cs
7893         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7894         names to the "known" variables list.
7895         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7896         parameter names are also "known".
7897         (Block.CheckError136): Remove.
7898         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7899         null.
7900
7901 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7902
7903         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7904
7905 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7906
7907         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7908         internal error not an user error.
7909          
7910         * expression.cs (IsApplicable): Refactored to make debugging easier.
7911
7912         * support.cs: More tricks for non-mono runtimes.
7913         
7914         * typemanager.cs (CoreLookupType): Made public.
7915         (InitSystemCore): All linq specific stuff moved to linq.cs
7916
7917 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7918
7919         * typemanager.cs (CSharpSignature): One more missing build-in types
7920         replacement.
7921         More tricks for non-mono runtime.
7922
7923 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7924
7925         * statement.cs (Block.CheckError136_InParents): Remove.
7926         (Block.AddVariable): Use GetParameterInfo instead.
7927         (ToplevelBlock.ProcessArguments): Likewise.
7928
7929 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7930
7931         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7932         information too.
7933         (ToplevelBlock.GetParameterInfo): Split out of ...
7934         (ToplevelBlock.GetParameterRefernce): ... this.
7935         (ToplevelBlock.ParameterMap): Remove.
7936         * expression.cs (ParameterReference): Update to use
7937         ToplevelParameterInfo.
7938
7939         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7940         regression.
7941
7942         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7943         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7944
7945         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7946         (ToplevelBlock.ProcessParameters) ... here.
7947         (ToplevelBlock..ctor): Invoke it.
7948
7949         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7950         new parameters.
7951
7952         * statement.cs (IKnownVariable): New interface.
7953         (LocalInfo): Implement it.
7954         (ToplevelParameterInfo): New class.
7955         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7956         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7957         GetKnownVariableInfo.
7958
7959 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7960
7961         Partly speed up CS0136 error checks.
7962         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7963         'recurse' parameter.
7964         (Block.DoCheckError136): Only check errors in parameters.  Move
7965         local variable checks ...
7966         (Block.AddVariable): ... here, and ...
7967         (ToplevelBlock.ResolveMeta): ... here.
7968
7969 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7970
7971         * statement.cs (Block.IsChildOf): Remove.
7972
7973         * statement.cs (Statement.Clone): Move special case code ...
7974         (Block.CloneTo): ... here.
7975
7976 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7977
7978         * statement.cs (ToplevelBlock.container): Remove field.  It's
7979         redundant with 'Parent'.
7980         (ToplevelBlock.ContainerBlock): Remove accessor.
7981         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7982         child with parent here, ...
7983         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7984         current_block.
7985         (start_anonymous): Don't save current_block.
7986         (top_current_block): Remove.
7987
7988         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7989         (Block.Resolve): Update to changes.
7990         (Block..ctor): Move setting of "correct" 'Toplevel'
7991         and 'Explicit' fields to ...
7992         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7993
7994 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7995
7996         Kill Block.Implicit
7997         * statement.cs (Block.Implicit): Remove.
7998         (Block): Update to changes.
7999         * flowanalysis.cs: Likewise.
8000
8001         Mildly speed up CheckInvariantMeaningInBlock
8002         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
8003         Recursively call AddKnownVariable to all enclosing blocks.
8004         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
8005         Remove recursive calls.
8006         (Block): Update to changes.
8007
8008         New ExplicitBlock invariants
8009         * statement.cs (Block.Explicit): New field.  It points to the
8010         immediately enclosing non-implicit block.
8011         (Block..ctor): Maintain the invariant.
8012         * cs-parser.jay: Take advantage of invariant.
8013
8014         Introduce ExplicitBlock
8015         * statement.cs (ExplicitBlock): New.
8016         (ToplevelBlock): Derive from it.
8017         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
8018         sense of flag.
8019         (Block.Implicit): Update to changes.
8020         * cs-parser.jay: Update to changes.
8021
8022         Remove unused field
8023         * codegen.cs (EmitContext.IsLastStatement): Remove.
8024         * statement.cs (Block.DoEmit): Update to changes.
8025
8026 2007-05-25  Raja R Harinath  <rharinath@novell.com>
8027
8028         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
8029         modifying current_block directly.
8030
8031 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
8032         
8033         * class.cs: Implemented automatic properties (C# 3.0)
8034           Thanks to Marek for the help.
8035
8036 2007-05-23  Raja R Harinath  <rharinath@novell.com>
8037
8038         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
8039         variable as assigned, note also that all its components are
8040         assigned too.
8041         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
8042
8043 2007-05-19  Marek Safar  <marek.safar@gmail.com>
8044
8045         * anonymous.cs, class.cs: Emit Compiler generated attribute when
8046         member is marked as compiler generated.
8047         
8048         * decl.cs (MemberCore): Refactored ModFlags into property.
8049
8050         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
8051         (Check): Check only accessibility modifiers.
8052
8053 2007-05-18  Raja R Harinath  <rharinath@novell.com>
8054
8055         Track all assignable slots in one bit array
8056         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
8057         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
8058         logic from VariableMap constructor here.  Use the same 'offset'
8059         variable that's later used for computing offsets of local
8060         variables.
8061         * flowanalysis.cs (UsageVector.parameters): Remove.
8062         (UsageVector): Update to changes.
8063         (VariableMap): Remove.
8064
8065         Avoid creating ParameterMap in every block
8066         * statement.cs (Block.ParameterMap): Move ...
8067         (ToplevelBlock.ParameterMap): ... here.
8068         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
8069         only once.
8070         * flowanalysis.cs (FlowBranching.param_map): Remove.
8071         (FlowBranching.UsageVector): Update to changes.
8072         (FlowBranchingToplevel.CheckOutParameters): Likewise.
8073
8074         * statement.cs (Block.CloneTo): Clone Toplevel field too.
8075
8076         * expression.cs (ParameterReference): Distinguish between block
8077         where parameter was referenced and declared.
8078
8079 2007-05-18  Marek Safar  <marek.safar@gmail.com>
8080
8081         * flowanalysis.cs, statement.cs: Put back improved error handling.
8082
8083 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
8084         
8085         * assign.cs:
8086         * expression.cs:
8087           Imporved object and collection initialization (C# 3.0).
8088
8089 2007-05-15  Marek Safar  <marek.safar@gmail.com>
8090
8091         A fix for bug #81380
8092         * expression.cs (Is.DoResolve): Only value types have constant `is'
8093         behaviour.
8094
8095 2007-05-15  Raja R Harinath  <rharinath@novell.com>
8096
8097         * statement.cs (ToplevelBlock.child): Remove.
8098
8099 2007-05-15  Raja R Harinath  <harinath@gmail.com>
8100
8101         Rationalize ResolveMeta: refactoring
8102         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
8103         out constant handling code into ...
8104         (Block.DoResolveConstants): ... this.
8105
8106         Rationalize ResolveMeta: kill local_map
8107         * statement.cs (Block.local_map, Block.LocalMap): Remove.
8108         (Block.AssignableSlots): New.
8109         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
8110         for locals -- move code from VariableMap here.  Avoid unnecessary
8111         allocations.
8112         * flowanalysis.cs (FlowBranching.local_map): Remove.
8113         (FlowBranching..ctor): Use Block.AssignableSlots.
8114         (VariableMap): Remove unused constructors.
8115
8116 2007-05-11  Raja R Harinath  <rharinath@novell.com>
8117
8118         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
8119
8120 2007-05-11  Marek Safar  <marek.safar@gmail.com>
8121
8122         * typemanager.cs (IsFriendAssembly): Should not be called for building
8123         assembly.
8124
8125 2007-05-09  Marek Safar  <marek.safar@gmail.com>
8126
8127         * literal.cs (NullConstant): Print null in all cases.
8128         
8129         * expression.cs (Binary.ResolveOperator): Implemented delegate
8130          comparison based on C# 2.0 changes.
8131
8132 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
8133
8134         This code is contributed under the MIT X11 license
8135         
8136         The following enables support for several C# 3.0 language features:
8137         
8138         * cs-tokenizer.cs: Added support for the "var" keyword.
8139         
8140         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
8141           Added VarExpr class to facilitate type inferencing.
8142         
8143         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
8144           to support anonymous types.
8145         
8146         * assign.cs: Added support for type inferencing and initialization.
8147         
8148         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
8149         
8150         * expression.cs: Added implicit array support to ArrayCreation.
8151           Added 5 types and 1 interface:
8152           
8153           IInitializable                Implementing classes can inject initializing
8154                                         statements after object instantiation.
8155           
8156           Initializer                   Stores data for object initialization.
8157           
8158           AnonymousType                 An expression for anonymous types.
8159           
8160           AnonymousTypeParameter        Stores data about an anonymous type's field.
8161           
8162           NewInitialize                 An expression for object initialization.
8163           
8164           CollectionInitialize          An expression for collection initialization.
8165         
8166         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
8167           statements.
8168
8169 2007-05-06  Marek Safar  <marek.safar@gmail.com>
8170
8171         A fix for bug #81500
8172         * cs-tokenizer.cs: Add special handling for coalescing operator.
8173
8174 2007-05-06  Marek Safar  <marek.safar@gmail.com>
8175
8176         A fix for bug #81529
8177         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
8178         its value from base class until it is redefined.
8179
8180 2007-05-02  Raja R Harinath  <rharinath@novell.com>
8181
8182         Fix regression in cs0631-3.cs
8183         * cs-parser.jay (operator_declarator): Add opt_attributes to error
8184         fallback.  Make error fallback catch more cases.
8185
8186 2007-05-01  Miguel de Icaza  <miguel@novell.com>
8187
8188         * cs-parser.jay: Allow parameters in operator declarations to have
8189         attributes. 
8190
8191 2007-04-27  Miguel de Icaza  <miguel@novell.com>
8192
8193         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
8194         exists. 
8195
8196         * lambda.cs (ContextualReturn.Resolve): An expression is valid
8197         inside the ContextualReturn, it does not have to be an
8198         ExpressionStatement. 
8199
8200 2007-04-24  Miguel de Icaza  <miguel@novell.com>
8201
8202         * lambda.cs (ContextualReturn.Resolve): if the return type is not
8203         set, set it.
8204
8205 2007-04-23  Miguel de Icaza  <miguel@novell.com>
8206
8207         * anonymous.cs (AnonymousContainer): split the virtual Resolve
8208         method in two methods: ResolveNoDefine and Resolve.
8209
8210         ResolveNoDefine will stop just after ResolveTopBlock has been
8211         called.   
8212
8213         Resolve will then continue by creating a method and issuing the
8214         call to method.Define ().
8215
8216         (AnonymousMethod): Split and implement the new Resolve and
8217         ResolveNoDefine as well.
8218
8219         * lambda.cs (LambdaExpression): Split the anonymous method
8220         resolution code into a separate routine (CoreCompatibilityTest)
8221         from DoCompatibleTest.
8222
8223         (LambdaExpression.TryBuild): New method, this method tries to
8224         build the LambdaExpression with the given set of types to be used
8225         as the types for the various parameters of the lambda expression. 
8226
8227         If the compilation succeed with the given types, the infered type
8228         of the Anonymous method is returned, otherwise null is returned.
8229
8230 2007-04-23  Marek Safar  <marek.safar@gmail.com>
8231
8232         A fix for bug #81414
8233         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
8234
8235 2007-04-22  Miguel de Icaza  <miguel@novell.com>
8236
8237         * cs-tokenizer.cs: Change various identifiers here from the
8238         camelCasing to the recommended Linux-like style for instance
8239         variables from the Coding Guidelines. 
8240
8241 2007-04-19  Martin Baulig  <martin@ximian.com>
8242
8243         * convert.cs
8244         (Convert.ImplicitReferenceConversionCore): Allow conversions from
8245         System.Enum to System.ValueType.
8246
8247 2007-04-13  Martin Baulig  <martin@ximian.com>
8248
8249         Rewrote implicit reference conversions.  We need to distinguish
8250         between implicit reference conversions (13.1.4) and implicit
8251         boxing conversions (13.1.5).
8252
8253         According to the spec, there's an an implicit conversion
8254         "From a one-dimensional array-type S[] to IList<T> and base
8255         interfaces of this interface, provided there is an implicit
8256         reference conversion from S to T."  Note that this does not
8257         include boxing conversions.
8258
8259         * convert.cs
8260         (Convert.ImplicitTypeParameterBoxingConversion): New method.
8261         (Convert.ImplicitReferenceConversion): Split into
8262         ImplicitReferenceConversionCore() and
8263         ImplicitBoxingConversionExist().
8264         (Convert.ImplicitReferenceConversionExists): Use the new
8265         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
8266
8267 2007-04-12  Martin Baulig  <martin@ximian.com>
8268
8269         * convert.cs (Convert.ImplicitReferenceConversion): Move the
8270         `TypeManager.null_type' checks up to the top of the method.
8271
8272 2007-04-11  Marek Safar  <marek.safar@gmail.com>
8273
8274         A fix for bug #81350
8275         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
8276         extension methods.
8277
8278 2007-04-11  Martin Baulig  <martin@ximian.com>
8279
8280         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
8281         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
8282         to make this work for generic classes; fixes #79561.
8283
8284 2007-04-11  Martin Baulig  <martin@ximian.com>
8285
8286         * expression.cs (As): Add support for nullable types; fixes #79371.
8287
8288 2007-04-11  Martin Baulig  <martin@ximian.com>
8289
8290         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
8291         `type.FullName' is null; fixes #80243.
8292
8293 2007-04-11  Martin Baulig  <martin@ximian.com>
8294
8295         * expression.cs (Invocation.IsApplicable): Don't modify the method
8296         if type inference succeeded, but the method was not applicable.
8297         Fixes #81250.
8298
8299 2007-04-10  Marek Safar  <marek.safar@gmail.com>
8300
8301         A fix for bug #81324
8302         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
8303         internal and external namespaces containers.
8304
8305 2007-04-10  Martin Baulig  <martin@ximian.com>
8306
8307         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
8308         TypeManager.DropGenericMethodArguments() so we also call
8309         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
8310
8311 2007-04-10  Martin Baulig  <martin@ximian.com>
8312
8313         * iterators.cs (Iterator.CreateIterator): Don't crash if
8314         `method.ReturnType' is null.  This happens if something went wrong
8315         while resolving that typ (we already reported an error in this case).
8316
8317 2007-04-10  Martin Baulig  <martin@ximian.com>
8318
8319         * expression.cs (New.DoResolve): Don't call CheckComImport() on
8320         generic interfaces; report the CS0144 directly.
8321
8322 2007-04-10  Martin Baulig  <martin@ximian.com>
8323
8324         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
8325         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
8326
8327 2007-04-10  Martin Baulig  <martin@ximian.com>
8328
8329         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
8330
8331 2007-04-09  Raja R Harinath  <rharinath@novell.com>
8332
8333         A better fix
8334         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
8335         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
8336
8337         Fix #81338
8338         * statement.cs (For.Resolve): If resolution fails, use
8339         KillFlowBranching.
8340
8341 2007-04-08  Marek Safar  <marek.safar@gmail.com>
8342
8343         * anonymous.cs (MakeName): Make faster and zero-based.
8344         (VerifyExplicitParameterCompatibility): Back to mode where generic
8345         parameter is ignored.
8346         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
8347
8348         * class.cs (EmitType): Method can emit another new method.
8349
8350         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
8351
8352         * driver.cs: Updated.
8353
8354         * lambda.cs: Reuse predefined empty parameters.
8355
8356         * parameter.cs: Updated
8357
8358         * support.cs: Implemented InflateTypes.
8359
8360         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
8361         (InitSystemCore): Introduced to isolate 3.0 dependencies.
8362
8363 2007-04-03  Martin Baulig  <martin@ximian.com>
8364
8365         Fix #80632.
8366
8367         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
8368         version of TypeManager.IsOverride() which also works with generic
8369         types.  
8370
8371 2007-04-03  Martin Baulig  <martin@ximian.com>
8372
8373         Fix #81044.
8374
8375         * convert.cs
8376         (Convert.ExplicitReferenceConversion): We need to cast when
8377         converting from IList<T> to S[].
8378
8379 2007-04-01  Marek Safar  <marek.safar@gmail.com>
8380
8381         * decl.cs (FindExtensionMethods): Consider all candidates with same name
8382         at this level.
8383         
8384         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
8385
8386 2007-03-31  Marek Safar  <marek.safar@gmail.com>
8387
8388         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
8389         argument and return type inferring.
8390
8391         * codegen.cs (InferReturnType): Flag whether return can be inferred.
8392         (ReturnType): Turned to property.
8393
8394         * statement.cs (Return): Implemented return type inferring.
8395
8396         * support.cs (ReflectionParameters): Use local types if possible.
8397
8398 2007-03-30  Raja R Harinath  <rharinath@novell.com>
8399
8400         * flowanalysis.cs (FlowBranching.Reachability): Remove.
8401         (FlowBranching.UsageVector): Update to changes.
8402
8403         Prepare to kill 'Reachability'
8404         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
8405         argument of constructor.
8406
8407 2007-03-29  Raja R Harinath  <rharinath@novell.com>
8408
8409         Prepare to kill 'Reachability'
8410         * flowanalysis.cs (UsageVector.is_unreachable): New.
8411         (UsageVector): Update to maintain 'is_unreachable' in parallel to
8412         'reachability', and verify they're consistent.
8413
8414         Fix #81121
8415         * expression.cs (New.EmitStatement): Handle type parameters here too.
8416
8417 2007-03-29  Martin Baulig  <martin@ximian.com>
8418
8419         Fix #79148.
8420
8421         * anonymous.cs
8422         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8423         CompilerGeneratedClass.
8424         (ScopeInfo.EmitScopeInstance): Make this protected.
8425         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8426         `ec.CurrentAnonymousMethod.Scope == Scope'.
8427
8428         * statement.cs (Block.ScopeInfo): Make this a property.
8429
8430 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8431
8432         Prepare to kill 'Reachability'
8433         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8434         (FlowBranching.UsageVector.Reachability): Remove property.
8435         (FlowBranching.UsageVector.IsUnreachable): New property.
8436         (FlowBranching.UsageVector.ResetBarrier): New.
8437         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8438         * codegen.cs, statement.cs: Update to changes.
8439
8440 2007-03-27  Martin Baulig  <martin@ximian.com>
8441
8442         Fix #81209.
8443
8444         * decl.cs
8445         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8446         generic types.
8447
8448 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8449
8450         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8451         instead of TriState.  Remove all mention of TriState.
8452
8453         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8454         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8455         and maintain invariants.
8456
8457 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8458
8459         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8460
8461 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8462
8463         * expression.cs: Stop using obsolete 2.0 opcodes.
8464
8465 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8466
8467         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8468         one of the latests Martin's fixes.
8469
8470 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8471
8472         * expression.cs: On BigEndian systems, swap the bytes, temporary
8473         solution until we get a new bitconverter class.
8474
8475 2007-03-23  Martin Baulig  <martin@ximian.com>
8476
8477         Fix #81158.
8478
8479         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8480         "Method" and "Method`1".  Normally, a cache lookup is done on the
8481         "Method" form (ie. without the generic arity), but this one makes
8482         lookups on the full form work as well.
8483
8484 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8485
8486         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8487         unused properties.
8488
8489 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8490         * class.cs: 
8491         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8492         ordered_member_list, to TypeBuilder to store members to be defined
8493         in the order they were parsed in.
8494         - ordered_explicit_member_list contains all properties indexers
8495           and methods that are defined as explicit implementation of an
8496           interface or base class.
8497         - ordered_member_list contains all properties indexers and methods
8498           that are not defined as explicit implementation of an interface
8499           or base class.
8500
8501         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8502         functionality in these removed classes has been replaced with 
8503         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8504         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8505
8506         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8507         to CheckForDuplications inside GetMethod and SetMethod Define Method
8508         to handle method property and indexer name conflicts.
8509
8510         Fixes #79434
8511
8512         All code is contributed under the MIT/X11 license.
8513
8514 2007-03-20  Martin Baulig  <martin@ximian.com>
8515
8516         * class.cs (TypeContainer.Interfaces): Removed; they're now
8517         included in `TypeContainer.Types'.
8518
8519 2007-03-20  Martin Baulig  <martin@ximian.com>
8520
8521         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8522
8523         * class.cs (TypeContainer.CreateType): New public method.  This is
8524         now called before DefineType() to create the TypeBuilders.
8525         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8526         has already been created by CreateType().
8527         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8528         don't resolve our base classes here; this has been moved into
8529         DefineBaseTypes().  We're now called from CreateType().
8530         (TypeContainer.DefineBaseTypes): New private method; resolve our
8531         base classes here.  We're now called from DefineType().
8532
8533         * rootcontext.cs
8534         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8535         our types first to create all the TypeBuilders.  After that, call
8536         TypeContainer.DefineType() on all the types which'll resolve their
8537         base classes and setup the resolve order.
8538
8539 2007-03-20  Martin Baulig  <martin@ximian.com>
8540
8541         * class.cs (TypeContainer.Enums): Removed; they're now included in
8542         `TypeContainer.Types'.  
8543
8544 2007-03-20  Martin Baulig  <martin@ximian.com>
8545
8546         * class.cs
8547         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8548         (TypeContainer.DoResolveMembers): Call DefineType() on our
8549         `compiler_generated' classes; moved here from DefineNestedTypes().
8550
8551         * rootcontext.cs
8552         (RootContext.ResolveTree): Call ResolveMembers() on all
8553         TypeContainer's in the `type_container_resolve_order'.
8554
8555 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8556
8557         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8558
8559 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8560
8561         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8562         implementation flags.
8563
8564 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8565
8566         * class.cs: More optimizations for type parameters.
8567
8568 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8569
8570         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8571
8572         * ecore.cs, parameter.cs: More common code for both corlibs.
8573
8574         * typemanager.cs (IsGenericMethod): Simplified.
8575
8576 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8577
8578         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8579         'returns'.
8580         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8581
8582         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8583         unconditionally.  Simplify explanation.
8584         (Try.Resolve, Using.Resolve): Likewise.
8585
8586 2007-03-15  Martin Baulig  <martin@ximian.com>
8587
8588         Fix #80731.
8589
8590         * decl.cs (DeclSpace): If we're a partial class, use our
8591         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8592
8593 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8594
8595         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8596         'throws'.
8597         (FlowBranching.UsageVector): Update to changes.
8598         (FlowBranching.MergeSiblings): Likewise.
8599         * statement.cs: Likewise.
8600
8601 2007-03-15  Martin Baulig  <martin@ximian.com>
8602
8603         Fix #79302.
8604
8605         * decl.cs
8606         (MemberCache): Added a special .ctor for type parameters.
8607
8608         * typemanager.cs
8609         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8610         `MemberCache'.  
8611
8612 2007-03-09  Martin Baulig  <martin@ximian.com>
8613
8614         * enum.cs (Enum): Make this a TypeContainer.
8615         (EnumMember): Derive from `Const'.
8616
8617         * const.cs
8618         (Const.DoResolveValue): New protected virtual method; move most of
8619         the functionality of ResolveValue() here so we can override it in
8620         `EnumMember'.
8621         (Const.CreateConstantReference): Make this virtual.
8622
8623         * class.cs (Kind): Add `Kind.Enum'.
8624         (TypeContainer.Emit): Don't emit the enums here; they're already
8625         in the `RootContext.typecontainer_resolve_order'.
8626
8627         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8628         here; they're already in the `typecontainer_resolve_order'.
8629
8630         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8631         TypeManager.DropGenericTypeArguments().
8632
8633         * typemanager.cs
8634         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8635         (TypeManager.IsEnumType): Likewise.
8636         (TypeManager.EnumToUnderlying): Likewise.
8637         (TypeManager.IsEqual): Add support for enums.
8638
8639 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8640
8641         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8642         DefaultParameterValueAttribute to be undefined, say if System.dll
8643         is not referenced.
8644
8645 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8646
8647         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8648         any mscorlib.
8649
8650 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8651
8652         * class.cs, parameter.cs: Unified parameters verification.
8653
8654 2007-03-08  Martin Baulig  <martin@ximian.com>
8655
8656         * cs-parser.jay (constructor_header): Pass the location to the
8657         newly created TopLevelBlock.
8658
8659 2007-03-07  Martin Baulig  <martin@ximian.com>
8660
8661         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8662
8663 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8664
8665         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8666         with the changes from David, fixes the build.
8667
8668 2007-03-05  David Mitchell  <dmitchell@logos.com>
8669
8670         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8671         and its base interfaces to a one-dimensional array type S[],
8672         provided there is an implicit or explicit reference conversion
8673         from S to T.
8674
8675 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8676
8677         * cs-tokenizer.cs: Implemented basic linq grammar.
8678
8679         * driver.cs: Set linq lang version on demand.
8680
8681 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8682
8683         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8684
8685 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8686
8687         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8688         (Fixes #80455)
8689
8690         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8691         here.
8692         Check property and event extern attributes.
8693
8694         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8695         charset.
8696
8697 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8698
8699         A fix for bug #80407
8700         * ecore.cs: Don't report ambiguity error when methods have same parent.
8701
8702 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8703
8704         A fix for bug #80878
8705         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8706
8707 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8708
8709         * attribute.cs: Enable ExtensionAttribute presence test.
8710
8711 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8712
8713         * class.cs: Warn about missing GetHashCode only when Equals is override.
8714
8715         * decl.cs: Check accessibility of type arguments.
8716
8717         * typemanager.cs: Correctly report nullable array.
8718
8719 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8720
8721         * class.cs, report.cs: Capture more details when things go wrong.
8722
8723 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8724
8725         A fix for bug #80650
8726         * cs-parser.jay: Anonymous container starts at constructor declaration
8727         and not at block beginning because it has to be usable in constructor
8728         initializer.
8729
8730         * statement.cs: Use context location and not block one for error reporting.
8731
8732 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8733
8734         A fix for bug #78712
8735         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8736         too.
8737
8738 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8739
8740         A fix for bug #80493 by Atsushi Enomoto
8741         * cs-parser.jay: Ignore invalid attribute target.
8742
8743 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8744  
8745         * cs-tokenizer.cs: Ignore '\0' as white space character.
8746
8747 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8748
8749         * cs-parser.jay: Add support for lambda expressions to the mcs
8750         compiler as well.
8751
8752         * lambda.cs: Only clone when we are probing, not on the final call
8753         (Compatible is the final call). 
8754
8755         * statement.cs (CloneContext): Introduce class to provide block
8756         remapping during clone.
8757
8758         All statements Clone themselves now.
8759
8760         (Clone): special handling for blocks, when we clone a block, we
8761         register the block inside this routine, as children of the block
8762         might trigger a lookup. 
8763         
8764         * expression.cs: Add support for CloneContext in all expressions. 
8765         
8766 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8767  
8768         A fix for bug #80493
8769         * statement.cs: Report ambiguous warning when interfaces are not related.
8770
8771 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8772
8773         C# 3.0 extension methods.
8774
8775         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8776         cannot be used directly.
8777
8778         * class.cs (Class.Emit): Emit extension attribute if any class method
8779         is extension method.
8780         (Method.Define): Add basic extension method validation conditions.
8781         (Method.Emit): Emit extension attribute for method.
8782
8783         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8784         extension method exists. Currently we follow same approach as Microsoft
8785         does, emit even if a method or a class are private but this can change
8786         later.
8787
8788         * cs-parser.jay: Add handling of `this' keyword in method parameters
8789         context.
8790
8791         * decl.cs (DeclSpace.IsStaticClass): New property.
8792         (MemberCache.FindExtensionMethods): Looks for extension methods with
8793         defined name and extension type.
8794
8795         * doc.cs: Updated after OverloadResolve changes.
8796
8797         * driver.cs: Add new soft reference to System.Core.dll.
8798
8799         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8800         (ExtensionMethodGroupExpr): Represents group of extension methods.
8801
8802         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8803         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8804         to MethodGroupExpr and made non-static for easier customization.
8805         (Invocation.DoResolve): Add extension method lookup when no standard
8806         method was found.
8807         (MemberAccess.DoResolve): Try extension methods if no member exists.
8808
8809         * modifiers.cs: Add METHOD_EXTENSION modifier.
8810
8811         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8812         as well as candidate extension type.
8813         (ComputeNamespaces): When assembly constains extension methods registers
8814         them.
8815         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8816         extension method lookup.
8817         (Namespace.LookupExtensionMethod): Looks for extension method in this
8818         namespace.
8819         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8820         find a method which matches name and extensionType.
8821
8822         * parameter.cs (Parameter): Add This modifer.
8823         (HasExtensionMethodModifier): New property.
8824         (Resolve): Add extension parameter check.
8825         (ModFlags): turned to property to exclude this modifier as it is not real
8826         parameter modifier.
8827         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8828
8829         * support.cs (ParameterData): Add ExtensionMethodType.
8830         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8831
8832         * typemanager.cs: Add type and ctor extension attribute type.
8833
8834 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8835
8836         * report.cs (DisableErrors, EnableErrors): used to prevent error
8837         output when we are "trying" to compile various methods with
8838         different types. 
8839
8840         * ecore.cs (Expression): Add Clone method that calls the virtual
8841         CloneTo method.  The current CloneTo method in Expression throws
8842         an exception so we can track down all the places where this must
8843         be implemented (not using abstract, because that would be a lot of
8844         up-front-work before we can start testing the implementation
8845         idea). 
8846
8847         Important: we only need Clone capabilities for expressions created
8848         by the parser, as the expressions we will be cloning are
8849         expressions in the pre-resolved state.   This vastly simplifies
8850         the work required. 
8851         
8852         (SimpleName): Add CloneTo that does nothing.
8853         (EmptyCast): Add CloneTo.
8854         
8855         * expression.cs (Binary): Implement CloneTo.
8856         (Invocation.IsApplicable): Store the current ec in
8857         EmitContext.TempEc and restore it on return.  This is used so we
8858         do not have to sprinkle hundres of methods with an extra
8859         EmitContext, we know that the only user is the lambda expression
8860         ImplicitConversionExists code. 
8861         
8862         (Argument): Add Cloning capabilities.
8863         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8864         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8865         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8866         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8867         IndexerAccess): Add Clone capability.
8868
8869         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8870
8871         (Argument): Add cloning capability.
8872
8873         * assign.cs (Assign): Implement CloneTo.
8874
8875         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8876         
8877         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8878         version by calling Convert with the EmitContext (that we are
8879         currently storing in ec, this is not great, but will do for now,
8880         to avoid passing EmitContext parameters to hundreds of functions
8881         that do not need them now).
8882
8883         (SetExpression): Remove, it is not needed.
8884         
8885         (ContextualReturn): Implement CloneTo.
8886
8887         * statement.cs (Statement): Implement cloning infrastructure,
8888         similar to expressions.
8889
8890         (Block): Partial implementation of Clone for statements.
8891
8892         (Return): Implement clone.
8893         
8894         * constant.cs (Constant.CloneTo): New method, does nothing.
8895
8896         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8897         solution, until we decide how to exactly do this.  
8898         
8899 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8900  
8901         A fix for bug #80493
8902         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8903         a property is override we need to use second accessor.
8904
8905 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8906  
8907         A fix for bug #80418
8908         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8909         methods.
8910
8911 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8912
8913         Another fix for bug #80749
8914         * pending.cs: Abstract class has priority over interfaces.
8915
8916 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8917
8918         Another fix for bug #80749
8919         * pending.cs: Abstract class has priority over interfaces.
8920
8921 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8922
8923         Another fix for bug #80749
8924         * pending.cs: Abstract class has priority over interfaces.
8925
8926 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8927
8928         Another fix for bug #80749
8929         * pending.cs: Abstract class has priority over interfaces.
8930
8931 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8932
8933         * class.cs Better error message.
8934
8935         * driver.cs: Add shorter versions of -optimize option.
8936
8937 2007-02-13  Martin Baulig  <martin@ximian.com>
8938
8939         * class.cs (Constructor.Emit): Check the return value of
8940         ec.ResolveTopBlock() and return on error.
8941
8942 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8943
8944         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8945         message to fix error message regression.
8946
8947 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8948
8949         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8950
8951 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8952
8953         A fix for bug #80749
8954         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8955         its parent container.
8956
8957         * class.cs (DefineFieldInitializers): Each initializer can has different
8958         resolve context.
8959
8960         * const.cs: Updated.
8961
8962 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8963
8964         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8965         now all the heavy lifting to check that embedded statements or
8966         expressions have the right form is done in the ContextualReturn.
8967
8968         (ContextualReturn): New class.  
8969
8970         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8971         method that can be invoked to report 201, so we do not replicate
8972         this everywhere.
8973
8974         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8975         
8976         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8977         treating tabs as spaces. 
8978
8979 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8980
8981         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8982         * assign.cs: Use full implicit conversion for right side check.
8983
8984 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8985
8986         * statement.cs (Switch): Switch over boolean type is not standardized.
8987
8988 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8989
8990         A fix for bug #80755
8991         * decl.cs (FindBaseEvent): Don't use method cache for events.
8992
8993 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8994
8995         * cs-parser.jay: Better syntax error handling.
8996
8997         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8998         instead of underlying type value.
8999
9000 2007-02-06  Marek Safar  <marek.safar@gmail.com>
9001
9002         * driver.cs: Check define identifier before is registered.
9003
9004         * namespace.cs: Use existing error message.
9005
9006         * report.cs: New warning.
9007
9008 2007-02-06  Marek Safar  <marek.safar@gmail.com>
9009
9010         A fix for bug #80742
9011         * expression.cs: Delegate Invoke method can be called directly.
9012
9013 2007-02-06  Marek Safar  <marek.safar@gmail.com>
9014
9015         A fix for bug #80676
9016         * class.cs (IsEntryPoint): The Main method can have params modifier.
9017
9018 2007-02-04  Miguel de Icaza  <miguel@novell.com>
9019
9020         * parameter.cs (Parameter, Parameters): Add Clone method.
9021
9022         * anonymous.cs (Compatible): Turn method into virtual method, so
9023         LambdaExpression can implement a different behavior.
9024
9025         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
9026         out the basic checking here, so it can be used by
9027         LambdaExpressions.
9028         
9029         * lambda.cs: Introduce "Compatible" function that will do the
9030         heavy lifting.
9031
9032 2007-02-02  Marek Safar  <marek.safar@gmail.com>
9033
9034         * attribute.cs: Unified one error message.
9035
9036         * class.cs (Class): Use type attributes and not properties to test static
9037         class.
9038         (IsEntryPoint): Don's pass local variable.
9039
9040         * convert.cs: Removed duplicate check.
9041
9042         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
9043
9044         * driver.cs: Don't crash when soft reference does not exist.
9045
9046         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
9047         (UsingEntry): Removed redundant allocation.
9048
9049         * parameter.cs: Add fast path for type parameters.
9050
9051         * support.cs: Don't allocate attribute when it's not used.
9052
9053 2007-01-30  Miguel de Icaza  <miguel@novell.com>
9054
9055         * anonymous.cs
9056         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
9057         this into a virtual method, so we can override it in LambdaExpression.
9058
9059         * driver.cs: Improve diagnostics in case of failure. 
9060
9061         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
9062         write a function that is slightly more complex and that parses:
9063
9064         type identifier [, type identifier]* )
9065
9066         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
9067         this expression:
9068
9069                 (canEmpty ? i >= 0 : i > 0)
9070
9071 2007-01-30  Raja R Harinath  <rharinath@novell.com>
9072
9073         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
9074         exception on possibly valid code.
9075
9076 2007-01-29  Raja R Harinath  <rharinath@novell.com>
9077
9078         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
9079         Push/PopPosition.
9080         (parse_opt_type_arguments): Remove.  It's almost the same as
9081         parse_less_than.
9082         (parse_namespace_or_typename): Use parse_less_than.
9083
9084 2007-01-28  Miguel de Icaza  <miguel@novell.com>
9085
9086         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
9087         this bug took a few hours to find, because the state saved and
9088         restored by PushPosition and PopPosition was ignoring the state of
9089         parse_generic_less_than.
9090
9091         I can also now remove the handling of OP_LT and OP_GT, this solves
9092         the big mistery.
9093         
9094         * cs-tokenizer.cs: store the location for the ARROW token, we use
9095         that in the parser.
9096
9097         (PushPosition, PopPosition): save/restore also `current_token',
9098         restore `parse_generic_less_than' (was missing).
9099
9100         (parse_opt_type_arguments): use parse_type, not
9101         parse_namespace_or_typename to parse types.
9102
9103         * lambda.cs: Empty new file, will eventually have the lambda
9104         expression implementation.
9105
9106         * lambda.test: used to test the internal tokenizer. 
9107
9108         * report.cs (FeatureIsNotISO1): Rename from
9109         FeatureIsNotStandardized, because it was about the language level
9110         (1 vs 2) it was not about standarization.
9111
9112         (FeatureRequiresLINQ): New.
9113
9114         * support.cs (SeekableStreamReader): Only require that the reader
9115         is a TextReader, not a StreamReader, so we can plug StringReader. 
9116
9117         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
9118         given position in the input stream the following tokens can be
9119         parsed as a type followed by an identifier.
9120
9121         (is_punct): after a '(' if parse_type_and_parameter returns true,
9122         then return a special token OPEN_PARENS_LAMBDA which is used to
9123         avoid reduce/reduce errors in the grammar for the
9124         lambda_expression rules.
9125
9126         (parse_type): implement a type parser inside the
9127         tokenizer, the parser only returns true or false depending on
9128         whether the input at a given position can be parsed as a type.
9129
9130         (peek_token): new method used during type parsing.
9131
9132 2007-01-28  Raja R Harinath  <rharinath@novell.com>
9133
9134         Fix #80531
9135         * anonymous.cs (ScopeInfo.InflateParameters): New.
9136         (AnonymousContainer.Resolve): Use it to redirect types of
9137         delegate parameters.
9138
9139 2007-01-27  Raja R Harinath  <rharinath@novell.com>
9140
9141         Fix #80530
9142         * expression.cs (Error_InvalidArguments): Don't use two different
9143         messages for CS1503.  Use ExtraInformation and
9144         SymbolRelatedToPreviousError instead.
9145
9146         Fix #80358
9147         * decl.cs (DeclSpace.initialize_type_params): Don't access
9148         'type_params' of a partial class directly.
9149
9150 2007-01-26  Miguel de Icaza  <miguel@novell.com>
9151
9152         * constant.cs: Removed a handful of out-of-range checks that were
9153         not necessary. 
9154
9155 2007-01-25  Marek Safar  <marek.safar@gmail.com>
9156
9157         * expression.cs (CheckUselessComparison): Add additional check for char
9158         constants.
9159
9160         * namespace.cs: Fixed typo.
9161
9162 2007-01-23  Miguel de Icaza  <miguel@novell.com>
9163
9164         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
9165         gone, instead we inline the test, preventing the needless casts to
9166         longs, ulongs and doubles for the parameters, avoiding calls to
9167         methods that overchecked stuff, and instead inlined things
9168         nicely. 
9169
9170 2007-01-20  Marek Safar  <marek.safar@gmail.com>
9171
9172         * cs-parser.jay: Better parameter error handling.
9173
9174 2007-01-17  Marek Safar  <marek.safar@gmail.com>
9175
9176         A fix for bug #80368, #80522
9177         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
9178         whether array initializer contains constants only.
9179         (ArrayCreation.Emit): Use better formula to decide when
9180         are array initializers for static initialization.
9181         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
9182         have to emit even constants otherwise they are pre-initialized.
9183
9184 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
9185             Raja R Harinath  <rharinath@novell.com>
9186
9187         Fix emit order of 'get' vs. 'set'.
9188         * support.cs (Accessors): New.
9189         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
9190         Note the order in which accessors are declared in the source.
9191         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
9192         Refactored from Property.Define and Indexer.Define.
9193         (PropertyBase.DefineAccessors): New helper that calls the above in
9194         appropriate order as noted by the parser.
9195         (Property.Define, Indexer.Define): Update to changes.
9196         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
9197
9198 2007-01-17  Raja R Harinath  <rharinath@novell.com>
9199
9200         Fix cs0029-6.cs and gcs0029-2.cs (regression)
9201         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
9202         there's an implicit conversion from the current type to the target
9203         type before converting the underlying constant.
9204
9205 2007-01-16  Marek Safar  <marek.safar@gmail.com>
9206
9207         * const.cs (ResolveValue): Updated after constant conversion was made more
9208         generic.
9209
9210         * constant.cs (GetAttributableValue): constant to object conversion is
9211         used for attributes only.
9212         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
9213         constant conversions.
9214         (LongConstant.ConvertImplicitly): Ditto.
9215
9216         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
9217         (ImplicitConversionStandard): Handle constant conversion as extra step.
9218         It solves the issue when constant conversion was called indirectly like
9219         inside array initializer and constant folding was skipped.
9220
9221         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
9222         this change.
9223
9224         * statement.cs(ImplicitConversionStandard): Updated after constant
9225         conversion was made more generic.
9226
9227 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
9228
9229         * expression.cs (As.DoResolve): Use GenericConstraints instead of
9230         Constraints, solves the problem where the compiler incorrectly
9231         reported that a type parameter was not constrained to a class (Bug
9232         80518)
9233
9234 2007-01-14  Marek Habersack  <grendello@gmail.com>
9235
9236         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
9237
9238 2007-01-14  Marek Safar  <marek.safar@gmail.com>
9239
9240         A fix for bug #80368
9241         * assign.cs (FieldInitializer): New class implements field
9242         initializer statement.
9243
9244         * attribute.cs: Update after FieldMember rename.
9245
9246         * class.cs (PropertyBasedMember): New common class for property based
9247         types.
9248         (InterfaceMemberBase): New base class for all members which can be used as
9249         an interface members.
9250         (MethodCore): Moved really common code to InterfaceMemberBase.
9251         (Method.Define): Equal and GetHasCode detection is relevant for methods
9252         only.
9253         (MethodData.Define): Don't assume that public event implements an
9254         interface automatically.
9255         (MethodData.DefineMethodBuilder): Issue an error even if only extern
9256         modifier is used.
9257         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
9258         (FieldMember): Merged with FieldBase.
9259         (EventProperty.AEventPropertyAccessor): New specialization to check whether
9260         event extern modifier can be used.
9261         (EventField.EventFieldAccessor): Moved event field specific code here.
9262         (Event.AllowedModifiers): Even event can be extern.
9263         (Event.FindOutBaseMethod): New override specific to events.
9264         (Indexer.parameters): Reintroduce parameters because base class holds
9265         only properties common data.
9266         (Indexer.CheckForDuplications): Indexers are threated as methods so we
9267         need do extra parameters check.
9268
9269         * const.cs: Update after FieldMember rename.
9270
9271         * decl.cs (MemberCache.FindBaseEvent): New method.
9272
9273         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
9274         to reflect that indexer is now derived from PropertyBased.
9275
9276         * ecore.cs (GetMemberType): Made public.
9277         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
9278         obsolete event.
9279
9280         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
9281         
9282         * typemanager.cs (CSharpSignature): Correctly print event accessors.
9283         (RegisterEvent): Removed.
9284         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
9285         (GetPrivateFieldOfEvent): Renamed to GetEventField.
9286
9287 2007-01-11  Raja R Harinath  <rharinath@novell.com>
9288
9289         Fix #80249
9290         * statement.cs (CollectionForeach.TryType): Prefer generic
9291         GetEnumerator over non-generic variant.  Fix code to follow comments.
9292
9293 2007-01-09  Raja R Harinath  <rharinath@novell.com>
9294
9295         Fix #80446
9296         * support.cs (ReflectionParameter): Don't use an invalid index on
9297         the generic parameter data.
9298
9299 2007-01-08  Miguel de Icaza  <miguel@novell.com>
9300
9301         * driver.cs: Just add a tiny bit of infrastructure.
9302
9303 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9304
9305         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
9306         where field type is struct from current assembly.
9307         
9308         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
9309         it is possible.
9310
9311 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9312
9313         A fix for bug #80381
9314         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
9315         the core types.
9316
9317         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
9318         messages.
9319         (Namespace.LookupType): Always use core types from corlib when speficied.
9320
9321         * report.cs: A new warning.
9322
9323         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
9324         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
9325         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
9326
9327         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
9328         (InitCoreTypes): Set expression type of object_type and value_type
9329         immediately after lookup.
9330
9331 2007-01-01  Miguel de Icaza  <miguel@novell.com>
9332
9333         * cs-tokenizer.cs: Accept Pc class characters (Connector
9334         Punctuation) as valid identifiers.  Fixes #78259
9335
9336         * expression.cs (Invocation.DoResolve): Moved the check for the
9337         use of `this' for doing method calls to the Invocation resolution
9338         step, after overload resolution has taken place instead of doing
9339         the check at the low-level `This.DoResolve' level.
9340
9341         The `This.DoResolve'(appens before overload resolution, so it has
9342         no way of knowing if the method that will be called will be
9343         instace or static, triggering an erroneous report for cs0188 (Bug
9344         78113).
9345
9346         We now do the check for instance method invocations after we know
9347         what method will be called.
9348
9349         (This.CheckThisUsage): Move the actual use of this structure
9350         checking into its own method and expose it. 
9351
9352         * Everywhere that called Error_ValueCannotBeConverted: pass a new
9353         EmitContext.
9354
9355         Exceptions: Null.ConvertImplicitly,
9356         Constant.ImplicitConversionRequired as there are too many call
9357         sites for passing the ec. 
9358
9359         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
9360         EmitContext, if the value is null, then we do not try to provide
9361         the extra information from the error (If a userdefined conversion
9362         exists, as UserDefinedConversion requires a non null-EmitContext).
9363
9364         Fixes: #80347
9365
9366 2006-12-30  Raja R Harinath  <rharinath@novell.com>
9367
9368         * flowanalysis.cs (MyBitVector): Document some invariants.
9369         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
9370         introduced below, and add a couple of others, 
9371
9372 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9373
9374         * attribute.cs (GetMethodObsoleteAttribute): Uses new
9375         GetPropertyFromAccessor and GetEventFromAccessor.
9376         
9377         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
9378         overrides non-obsolete one.
9379         (Indexer.Define): Error message has been moved to the parser.
9380
9381         * cs-parser.jay: Better syntax errors handling.
9382
9383         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
9384         when an invocation has no arguments.
9385
9386         * ecore.cs: Removed not used caching.
9387
9388         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
9389         implementation.
9390
9391         * report.cs: Add a new warning.
9392
9393         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
9394
9395         * typemanager.cs (enumeration_type): Removed.
9396         (CSharpSignature): Reuses IsSpecialMethod.
9397         (IsEqual): Hack for MS BCL.
9398         (GetPropertyFromAccessor): New method.
9399         (GetEventFromAccessor): New method.
9400         (IsSpecialMethod): Fixed to handle more cases.
9401
9402 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9403
9404         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
9405         Made white spaces array static.
9406
9407         * ecore.cs (RemoveGenericArity): Optimized.
9408
9409         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
9410         10 times faster).
9411         (MyBitVector.initialize_vector): Simplified.
9412
9413 2006-12-22  Miguel de Icaza  <miguel@novell.com>
9414
9415         * ecore.cs: Am not entirely happy with this hack, but it seems to
9416         address the issue in 80257 (a small test case for
9417         CreativeDocs.NET). 
9418
9419         I set the MethodGroupExpr.Type to an internal compiler type
9420         (itself in this case) to force the resolution to take place.   Why
9421         it does not take place with a null is beyond me.
9422
9423 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9424
9425         A fix for bug #80288
9426         * expression.cs (ResolveOperator): Consider user defined conversion for
9427         logical and operator too.
9428         (EmitBranchable): Optimization for logical and when full constant folding
9429         could not be applied but one operand is constant.
9430
9431 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9432
9433         * class.cs (GetClassBases): Write 5 times every day, will never use
9434         FullName for error reporting.
9435
9436         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9437
9438 2006-12-19  Martin Baulig  <martin@ximian.com>
9439
9440         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9441         the symbol file info here.
9442
9443 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9444
9445         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9446         of `elseif' is taking then following sections are not taking.
9447         Fixes an issue reported on mono mailing list.
9448
9449 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9450
9451         A fix for bug #80300
9452         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9453         a caller is not taking.
9454
9455 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9456
9457         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9458         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9459         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9460         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9461         * class.cs: Update to changes.
9462
9463 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9464
9465         A fix for bug #79934
9466         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9467         partial container.
9468
9469         * class.cs (ResolveMembers): Register an iterator in current container and
9470         not in shared one.
9471
9472 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9473
9474         Fix test-543.cs
9475         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9476         satisfy a params annotated parameter.
9477
9478 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9479
9480         A fix for bug #77014
9481         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9482         paramters correctly and not rely on hacks in Parameters class.
9483         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9484         at any possition.
9485         (Invocation.VerifyArgumentsCompat): Ditto.
9486         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9487         any possition.
9488
9489         * parameter.cs (HasParams): Don't assume that params is the last one.
9490
9491         * support.cs (ReflectionParameters.ctor): Look for params attribute
9492         correctly.
9493         (ReflectionParameters.ParameterType): Removed hack when we returned last
9494         parameter for out of range parameters.
9495         (ParameterName, ParameterModifier): Ditto.
9496
9497 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9498
9499         A fix for bug #79987
9500         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9501         when assembly is not CLS compliant but type is. I have no idea why is this
9502         allowed.
9503
9504         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9505
9506 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9507
9508         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9509         in struct constructors, they are basically no-ops.
9510
9511 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9512
9513         * cs-tokenizer.cs (Position): Save preprocessor status too.
9514
9515 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9516
9517         A fix for bug #77794
9518         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9519
9520 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9521
9522         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9523         Fixes #69299.
9524         (pp_expr): Report error for an invalid expression.
9525         (handle_preprocessing_directive): Simplified; add more error checking.
9526
9527 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9528
9529         A fix for bug #74939
9530         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9531         directives handling.
9532
9533 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9534
9535         A fix for bugs #80093, and #75984
9536         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9537         logic, it seems to me as it worked before "by coincidence".
9538         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9539         (cleanup): Enabled endif check.
9540
9541 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9542
9543         A fix for bug #80162
9544         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9545         enumerators are never ambiguous.
9546
9547 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9548
9549         Fix #80060
9550         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9551
9552 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9553
9554         A fix for bug #80144
9555         * class.cs (EventProperty.Define): Explicit implementation means
9556         that an even is used.
9557
9558 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9559
9560         Fixes the operators implementation (part II)
9561
9562         * cfold.cs (DoConstantNumericPromotions): Renamed to
9563         DoBinaryNumericPromotions and simplified.
9564         (BinaryFold): Couple of conversion fixes; simplified.
9565
9566         * constant.cs, ecore.cs, literal.cs
9567         (ToType): Renamed to ConvertImplicitly.
9568         (Reduce): Renamed to ConvertExplicitly.
9569
9570         * class.cs, convert.cs: Updated.
9571
9572         * expression.cs: TryReduce doesn't throw an exception.
9573
9574 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9575
9576         A fix for bug #80108
9577         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9578         compatible.
9579
9580 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9581
9582         Fixes unary operators implementation (part I)
9583         Also fixes #80026
9584
9585         * cfold.cs (Error_CompileTimeOverflow): Made internal
9586
9587         * const.cs (IConstant): Changed to use reference to constant and
9588         not constant itself.
9589         Updated IConstant implementations.
9590
9591         * constant.cs (CreateConstant): New factory method.
9592         Updated IConstant implementation.
9593
9594         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9595
9596         * ecore.cs: Updated to use CreateConstantReference.
9597
9598         * enum.cs: Reflects IConstant changes.
9599
9600         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9601
9602         * literal.cs (NullConstant): Change to be independently usable.
9603
9604 2006-11-29  Martin Baulig  <martin@ximian.com>
9605
9606         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9607         we need to emit the scope initializer before calling the base .ctor.
9608
9609         * anonymous.cs: Merged back from the new anonymous methods branch.
9610         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9611
9612         * expression.cs (ParameterReference.DoResolveBase): Create a
9613         "normal" ScopeInfo when capturing parameters rather than using the
9614         root scope; this makes things work with anonymous methods having
9615         parameters.
9616
9617         * statement.cs
9618         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9619
9620 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9621
9622         A fix for bug #79987
9623         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9624         check to a base class.
9625         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9626         only when assembly has missing attribute.
9627         * report.cs: Update.
9628
9629 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9630
9631         * cs-tokenizer.cs: Merged with gmcs version.
9632
9633 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9634
9635         * cs-tokenizer.cs,
9636         * cs-parser.jay: Better error message when partial keyword is misplaced.
9637
9638 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9639
9640         A fix for bug #79810
9641         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9642         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9643         a RuntimeWrappedException by default.
9644
9645 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9646
9647         A fix for bug #79843
9648         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9649         implementation.
9650         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9651
9652 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9653
9654         * driver.cs, namespace.cs: Uses faster IndexOf version.
9655
9656 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9657
9658         A fix for bug #79941
9659         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9660         operators.
9661         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9662         even if internal name is different.
9663         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9664         (UserDefinedConversion): Simplified as the operators cannot be internal.
9665         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9666         conversions.
9667         (MethodLookup): Replaced EmitContext with parentType.
9668         * expression.cs: Updated.
9669
9670 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9671
9672         * driver.cs (BadAssembly): Handle all the ugliness of
9673         DefineDynamicAssembly.
9674
9675 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9676
9677         Address parts of #58244 -- most of what's left is in the runtime
9678         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9679         CS1509 error checks, and handle them for all assembly loads, not
9680         just the first invocation.
9681         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9682         * codegen.cs (AssemblyClass.AddModule): ... here.
9683
9684 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9685
9686         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9687         IEnumerable<T> is ambiguous.
9688
9689 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9690
9691         A fix for bug #67689
9692         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9693         GetEnumerator is ambiguous.
9694
9695         * report.cs: Add new warning.
9696
9697 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9698
9699         A fix for bug #78602
9700         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9701         to protected member can be nested type.
9702
9703 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9704
9705         A fix for bug #78965
9706         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9707         to protected member must derive from current type.
9708
9709 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9710
9711         assign.cs: Reuses error method.
9712
9713         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9714         instead of type for constants.
9715         (Expression.Error_ValueAssignment): Common error method.
9716
9717         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9718         for any assignment.
9719
9720 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9721
9722         A fix for bug #79081
9723         * expression.cs (MemberAccess.DoResolve): Check nested type
9724         accessibility.
9725
9726 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9727
9728         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9729
9730 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9731
9732         A fix for bug #76591
9733         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9734
9735 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9736
9737         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9738         type forwarder of the same type multiple times.
9739
9740 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9741
9742         Fix #78820
9743         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9744         instance as an rvalue, even when we later resolve as an lvalue.
9745
9746 2006-10-25  Martin Baulig  <martin@ximian.com>
9747
9748         * anonymous.cs: Fix #79673.
9749
9750 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9751
9752         A fix for bug #79666
9753         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9754         ignored when is optimized (= default value) as its value is already set.
9755
9756 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9757
9758         A fix for bug #79724
9759         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9760         TypeContainer for type lookup.
9761
9762 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9763
9764         A fix for bug #79231
9765         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9766         * expression.cs (OverloadResolve): Always convert type name for
9767         an error message.
9768         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9769         other member.
9770
9771 2006-10-18  Martin Baulig <martin@ximian.com>
9772
9773         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9774
9775 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9776
9777         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9778         an int32, but requesting an int64 from the conversion
9779
9780 2006-10-12  Martin Baulig  <martin@ximian.com>
9781
9782         * anonymous.cs
9783         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9784         
9785 2006-10-12  Martin Baulig  <martin@ximian.com>
9786
9787         * statement.cs
9788         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9789
9790 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9791
9792         * convert.cs: Remove broken code: I was doing the "Existance"
9793         tests for Implicit conversions.
9794
9795 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9796
9797         * convert.cs: Added one missing case in
9798         ImplicitStandardConversionExists uint64 to intptr.
9799
9800         Fixes #59800
9801         
9802         * typemanager.cs (uintptr_type): another core known type.   
9803
9804         * ecore.cs (OperatorCast): routine used to do cast operations that
9805         depend on op_Explicit.  We could change some of the Decimal
9806         conversions to use this.
9807
9808         This one has a probe mechanism that checks both types for an op_
9809         which it coudl be used to eliminate two classes: CastToDecimal
9810         and CastFromDecimal.
9811
9812         * convert.cs: Implement the conversions documented in #59800
9813         
9814 2006-10-10  Martin Baulig  <martin@ximian.com>
9815
9816         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9817         before RootScope.ResolveMembers().
9818
9819         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9820         `CurrentType' if appropriate.
9821
9822 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9823
9824         A fix for bug #78568
9825         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9826         when contains binary operators.
9827         * cs-parser.jay: Updated.
9828
9829 2006-10-09  Martin Baulig  <martin@ximian.com>
9830
9831         * delegate.cs
9832         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9833         moved that into Define() and also do the other type parameter
9834         checks there.  Fixes #79094.  Added gtest-292.cs.
9835
9836         * expression.cs
9837         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9838         since that doesn't include type parameters; don't use `Ldelema'
9839         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9840
9841 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9842
9843         A fix for #77796
9844         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9845         conversion is allowed.
9846
9847 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9848
9849         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9850         error reporting when no error occurs.
9851
9852 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9853
9854         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9855         does not exist.
9856
9857 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9858
9859         Fix #79584
9860         * class.cs (DefineTypeBuilder): Check circular dependencies before
9861         setting the parent of the TypeBuilder.
9862         (CheckRecursiveDefinition): Don't use 'BaseType', since
9863         it may not be valid until after DefineTypeBuilder.  Use
9864         'base_type' instead.
9865
9866 2006-10-04  Martin Baulig  <martin@ximian.com>
9867
9868         Merged the Anonymous Methods patch.
9869
9870         * anonymous.cs, iterators.cs: The new anonymous methods code.
9871
9872         * statement.cs (Variable): New public abstract class.
9873         (LocalInfo.Variable): New public property.
9874         (LocalInfo.ResolveVariable): New public method.
9875         (Block.Flags): Add `IsIterator'.
9876         (Block.AddVariable): Improved the CS0136 check.
9877         (Block.AnonymousChildren): New public property.
9878         (Block.AddAnonymousChild): New public method.
9879         (ToplevelBlock): Update to use the new anonymous method framework.
9880         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9881         `ToplevelBlock'; this is required to correctly implement the
9882         CS0136 check.
9883         (Fixed, Using): Use `TemporaryVariable' instead of directly
9884         creating the `LocalBuilder'.
9885
9886         * parameter.cs (Parameter.ResolveVariable): New public method.
9887         (Parameters.ResolveVariable): Likewise.
9888
9889         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9890
9891         * class.cs (TypeContainer): Replaced the `iterators' list and
9892         corresponding methods with a list of `CompilerGeneratedClass'es.
9893         (TypeContainer.ResolveMembers): New public method.
9894         (Method): `IIteratorContainer' has been replaced by
9895         `IAnonymousHost'.
9896
9897         * expression.cs (VariableReference): New public abstract base
9898         class for `LocalVariableReference', `ParameterReference' and
9899         `This'.
9900
9901         * codegen.cs (EmitContext): Removed `capture_context',
9902         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9903         (EmitContext.EmitThis): Removed.
9904
9905         * cs-parser.jay: Replace `iterator_container' with
9906         `anonymous_host'.       
9907
9908 2006-10-04  Martin Baulig  <martin@ximian.com>
9909
9910         * generic.cs (GenericMethod): Don't make this abstract.
9911         (Constraints.Clone): Added dummy implementation.
9912
9913 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9914
9915         Fix #79577
9916         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9917         'declspaces'.  Avoid allocating arrays willy-nilly.
9918
9919         Fix #79553
9920         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9921         cases out of the switch.
9922
9923 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9924
9925         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9926         message when non-generic type is used with the type arguments.
9927         * expression.cs: Updated.
9928
9929 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9930
9931         Fix #79013
9932         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9933         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9934         Change semantics slightly.  Don't insist on having only one
9935         temporary EmptyExpression -- just throttle the creation of new ones.
9936
9937         Fix #79451
9938         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9939         non-interfaces too.  If no methods are found, don't try to create
9940         a MethodGroupExpr.
9941
9942 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9943
9944         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9945         generic type.
9946
9947         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9948         us produce better error message.
9949
9950 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9951
9952         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9953         of the `|' operator.
9954
9955         * report.cs: A new warning added.
9956
9957 2006-09-27  Martin Baulig  <martin@ximian.com>
9958
9959         * generic.cs (GenericMethod): Don't make this abstract.
9960
9961 2006-09-27  Martin Baulig  <martin@ximian.com>
9962
9963         * report.cs
9964         (InternalErrorException): Added overloaded ctor taking a params array.
9965
9966 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9967
9968         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9969         Fixed the cases when same error was reported twice.
9970
9971         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9972         now report symbol information.
9973
9974 2006-09-25  Martin Baulig  <martin@ximian.com>
9975
9976         * class.cs: Completely unified with the gmcs version.
9977
9978 2006-09-25  Martin Baulig  <martin@ximian.com>
9979
9980         * typemanager.cs (TypeManager.IsNullableType): New public function.
9981         (TypeManager.IsNullableTypeOf): Likewise.
9982         (TypeManager.IsNullableValueType): Likewise.
9983
9984         * class.cs (MethodCore): Added the `GenericMethod' argument from
9985         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9986
9987 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9988
9989         * convert.cs: Unify with gmcs version.
9990
9991 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9992
9993         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9994         verify them as well.
9995
9996         * report.cs: New warning.
9997
9998 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9999
10000         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
10001         for anonymous block with out argument.
10002
10003 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
10004
10005         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
10006         not used private events only.
10007
10008 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
10009
10010         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
10011
10012         * const.cs (Const.Define): Check for constant type.
10013         (Const.IsConstantTypeValid): Looks for valid constant types.
10014
10015         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
10016
10017         * ecore.cs (EmptyConstantCast): New common class for all constant based
10018         EmptyCast(s).
10019
10020         * expression.cs (Is.DoResolve): Handle null constant especially.
10021         (New.DoResolve): Check for new void().
10022         (MemberAccess.DoResolve): Cope with all kind of nulls.
10023
10024         * literal.cs (NullConstant): Uses EmptyConstantCast.
10025         (NullDefault): Based on EmptyConstantCast.
10026         (NullLiteral): Uses EmptyConstantCast.
10027
10028         * statement.cs (Block.ResolveMeta): Check for constant type.
10029
10030 2006-09-22  Martin Baulig  <martin@ximian.com>
10031
10032         * delegate.cs, attribute.cs: Merged with the gmcs versions.
10033
10034 2006-09-22  Raja R Harinath  <rharinath@novell.com>
10035
10036         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
10037         not the null type.
10038
10039         Fix part of #79451
10040         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
10041         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
10042         code slightly.
10043
10044 2006-09-22  Martin Baulig  <martin@ximian.com>
10045
10046         * ecore.cs: Merged with the gmcs version.
10047
10048         * generic.cs (ConstructedType): New dummy class.
10049         (TypeArguments): Don't make this abstract.
10050
10051         * typemanager.cs
10052         (TypeManager.IsGenericTypeDefinition): New method.
10053         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
10054
10055 2006-09-22  Raja R Harinath  <rharinath@novell.com>
10056
10057         * expression.cs (ComposedCast): Check for arrays of TypedReference
10058         before creating the type, not after.
10059
10060 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
10061
10062         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
10063         after ToType change.
10064
10065         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
10066         when constant must be implicitly convertible.
10067
10068         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
10069
10070         * ecore.cs (NullCast): Derives from NullConstant.
10071
10072         * expression.cs (Is.DoResolve): Removed useless variables.
10073         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
10074         (New.Constantify): Add enum support.
10075         (MemberAccess.DoResolve): Add warning when accessing null constant or
10076         variable.
10077
10078         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
10079         property.
10080
10081         * literal.cs (NullConstant): New abstract class with common
10082         functionality for all null specializations.
10083         (NullDefault): Represents default(X) when result can be
10084         reduced to null.
10085         (NullLiteral): Updated.
10086
10087         * report.cs: Add new warning.
10088
10089 2006-09-21  Martin Baulig  <martin@ximian.com>
10090
10091         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
10092
10093 2006-09-21  Martin Baulig  <martin@ximian.com>
10094
10095         * generic.cs (GenericConstraints): New dummy class.
10096         (Constraints): Likewise.
10097         (TypeParameter): Likewise.
10098         (TypeParameterName): Likewise.
10099         (GenericMethod): Likewise.
10100
10101         * typemanager.cs (TypeManager.GetGenericArguments): New method.
10102
10103         * decl.cs: Merged with the gmcs version.
10104
10105 2006-09-21  Raja R Harinath  <rharinath@novell.com>
10106
10107         * generic.cs (TypeParameter): Implement IMemberContainer.
10108         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
10109
10110         * rootcontext.cs: Unify with gmcs version.
10111
10112         * report.cs: Unify with gmcs version.
10113         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
10114         from gmcs/generics.cs.
10115         * generics.cs (TypeParameter): New dummy class.
10116
10117         * support.cs: Unify with gmcs version.
10118
10119 2006-09-20  Raja R Harinath  <rharinath@novell.com>
10120
10121         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
10122         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
10123
10124         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
10125         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
10126         * mcs.exe.sources: Add generic.cs.
10127
10128         * codegen.cs: Unify with gmcs version.
10129
10130         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
10131         (EmitContext): Add GenericDeclContainer implementation.
10132         * decl.cs (MemberCore, DeclSpace): Likewise.
10133         * namespace.cs: Remove #ifdef GMCS_SOURCE.
10134
10135         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
10136         MCS TypeManager has a corresponding dummy method.
10137
10138 2006-09-19  Martin Baulig  <martin@ximian.com>
10139
10140         * expression.cs: Completely merged with the gmcs version.
10141
10142 2006-09-19  Martin Baulig  <martin@ximian.com>
10143
10144         * expression.cs (Invocation): Merged with the gmcs version.
10145         (ArrayAccess.GetStoreOpcode): Likewise.
10146
10147 2006-09-19  Martin Baulig  <martin@ximian.com>
10148
10149         * typemanager.cs
10150         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
10151         (TypeManager.IsGenericMethodDefinition): Likewise.
10152
10153 2006-09-19  Martin Baulig  <martin@ximian.com>
10154
10155         * typemanager.cs
10156         (TypeManager.IsEqual): Moved the gmcs implementation here.
10157         (TypeManager.DropGenericTypeArguments): Likewise.
10158         (TypeManager.DropGenericMethodArguments): Likewise.
10159         (TypeManager.GetTypeArguments): Moved here from gmcs.
10160         (TypeManager.HasGenericArguments): Likewise.
10161
10162 2006-09-19  Martin Baulig  <martin@ximian.com>
10163
10164         * expression.cs (Binary): Merged with the gmcs version.
10165
10166 2006-09-19  Martin Baulig  <martin@ximian.com>
10167
10168         * expression.cs (Probe, As, Is): Merged with the gmcs version.
10169
10170 2006-09-19  Martin Baulig  <martin@ximian.com>
10171
10172         * typemanager.cs: Merged with the gmcs version.
10173
10174 2006-09-16  Raja R Harinath  <rharinath@novell.com>
10175
10176         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
10177         * driver.cs: Likewise.
10178
10179 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
10180
10181         A fix for #79401
10182         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
10183         only if parent type is class.
10184         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
10185         update.
10186
10187 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
10188
10189         * cs-parser.jay,
10190         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
10191         keywords are used.
10192         * typemanager.cs(CSharpName): Converts NullType to null.
10193
10194 2006-09-15  Martin Baulig  <martin@ximian.com>
10195
10196         * typemanager.cs
10197         (TypeManager.GetMethodName): Added mcs implementation.
10198         (TypeManager.IsEqual): Likewise.
10199
10200         * ecore.cs
10201         (SimpleName.RemoveGenericArity): Added dummy implementation.
10202
10203         * pending.cs: Merged with the gmcs version.     
10204
10205 2006-09-15  Martin Baulig  <martin@ximian.com>
10206
10207         * statement.cs: Merge with the gmcs version.
10208
10209 2006-09-15  Martin Baulig  <martin@ximian.com>
10210
10211         * statement.cs (Switch): Merge with the gmcs implementation
10212         (without nullables), which is newer.
10213
10214 2006-09-15  Martin Baulig  <martin@ximian.com>
10215
10216         * statement.cs (Block.Variables): Make this public.
10217         (ToplevelBlock.Parameters): Make this a property.
10218         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
10219
10220 2006-09-15  Martin Baulig  <martin@ximian.com>
10221
10222         * namespace.cs: Merge with the gmcs version.
10223
10224 2006-09-15  Martin Baulig  <martin@ximian.com>
10225
10226         * decl.cs (MemberName): Minor code cleanups.
10227
10228 2006-09-15  Martin Baulig  <martin@ximian.com>
10229
10230         * parameter.cs: Merge with the gmcs version.
10231
10232 2006-09-15  Martin Baulig  <martin@ximian.com>
10233
10234         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
10235         and an error in mcs.
10236
10237 2006-09-15  Martin Baulig  <martin@ximian.com>
10238
10239         * flowanalysis.cs: Merged from GMCS; added the generics code into
10240         a `GMCS_SOURCE' conditional so we can share this file.
10241
10242 2006-09-08  Martin Baulig  <martin@ximian.com>
10243
10244         * typemanager.cs (TypeManager.interlocked_type): New public field.
10245         (TypeManager.int_interlocked_compare-exchange): New public field.
10246         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
10247         enumerator types here and call InitGenericCoreTypes().
10248         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
10249         after calling InitEnumUnderlyingTypes().
10250
10251         * rootcontext.cs
10252         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
10253         `classes_second_stage'. 
10254
10255 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
10256
10257         * assign.cs, ecore.cs, expression.cs: Share error message text.
10258         * class.cs (FieldMember.Define): Check for varible of static type.
10259         * driver.cs (LoadAssembly): Uses error output for errors.
10260         * statement.cs: Updated.
10261
10262 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
10263
10264         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
10265         type instance.
10266
10267 2006-09-07  Martin Baulig  <martin@ximian.com>
10268
10269         * driver.cs
10270         (MainDriver): Revert r62663 from Marek; see #70506 for details.
10271
10272 2006-08-29  Miguel de Icaza  <miguel@novell.com>
10273
10274         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
10275         
10276 2006-08-17  Miguel de Icaza  <miguel@novell.com>
10277
10278         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
10279         #52019 and #79064, the use of the \uXXXX sequence in source code
10280         to represent unicode characters.
10281
10282 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
10283
10284         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
10285         support.
10286         * class.cs, ecore.cs, statement.cs: Merged to one error message.
10287
10288 2006-08-13  Miguel de Icaza  <miguel@novell.com>
10289
10290         * assign.cs: Catch attempts to assign to a method groups in += and
10291         report as 1656
10292
10293 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
10294
10295         A fix for #79056
10296         * cs-parser.jay: Don't destroy current array type by typeof of array's.
10297
10298 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
10299
10300         * class.cs (Method.Define): Issue a warning when generic method looks like
10301         an entry point.
10302         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
10303         as well.
10304
10305 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
10306  
10307         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
10308         looking for ctor.
10309         * decl.cs (MemberCache.FindMembers): When container is interface we need to
10310         search all base interfaces as a member can be ambiguous.
10311         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
10312         Constructor member type filter. 
10313         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
10314         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
10315         reporting for returned memberinfos.
10316         * report.cs: Updated.
10317         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
10318         version to work on all runtimes.
10319         (TypeManager.RealMemberLookup): Removed members filtering.
10320
10321 2006-08-08  Raja R Harinath  <rharinath@novell.com>
10322
10323         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
10324         (PropertyExpr.EmitAssign): Likewise.
10325         * expression.cs (Indirection.EmitAssign): Likewise.
10326         (LocalVariableReference.EmitAssign): Likewise.
10327         (ParameterReference.EmitAssign): Likewise.
10328         (Invocation.EmitArguments): Likewise.
10329         (ArrayAccess.EmitAssign): Likewise.
10330         (IndexerAccess.EmitAssign): Likewise.
10331         (This.EmitAssign): Likewise.
10332         (ConditionalLogicalOperator.Emit): Likewise.
10333
10334         Fix #79026
10335         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
10336         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
10337         leave it in after returning it.
10338         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
10339
10340 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
10341
10342         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
10343         message.
10344
10345 2006-08-03  Raja R Harinath  <rharinath@novell.com>
10346
10347         Fix cs0146-3.cs and cs0146-4.cs.
10348         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
10349         enclosing types don't depend on the current type.
10350
10351 2006-08-02  Raja R Harinath  <rharinath@novell.com>
10352
10353         Fix #77963
10354         * class.cs (TypeContainer.DoDefineMembers): Use
10355         FindBaseMemberWithSameName on Parent, since we're interested in
10356         whether we hide inherited members or not.
10357         (FindBaseMemberWithSameName): Make slightly more robust.
10358
10359         Fix the non-generic testcase from #77396
10360         * decl.cs (DeclSpace.DeclContainer): Remove override.
10361
10362         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
10363         declspaces for doppelgangers too.
10364         (UsingEntry): Implement IResolveContext.
10365         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
10366         'this' as the resolve context.
10367         (LocalAliasEntry): Likewise.
10368
10369         Implement parts of #77403
10370         * roottypes.cs (RootDeclSpace): New.  Used to represent the
10371         toplevel declaration space.  Each namespace declaration introduces
10372         a "partial" root declaretion space.
10373         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
10374         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
10375         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
10376         from 'current_namespace.SlaveDeclSpace'.
10377         (namespace_declaration): Likewise.
10378         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
10379         check.  It can't happen now.
10380         * decl.cs (DeclSpace.LookupType): Likewise.
10381         * driver.cs (MainDriver): Sanity check.
10382
10383 2006-08-01  Raja R Harinath  <rharinath@novell.com>
10384
10385         * decl.cs (DeclSpace.FindNestedType): Remove.
10386         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
10387         LookupTypeContainer to get the container of the nested type.
10388         * class.cs (TypeContainer.FindNestedType): Make non-override.
10389
10390 2006-07-31  Raja R Harinath  <rharinath@novell.com>
10391
10392         * decl.cs (DeclSpace.PartialContainer): Move field from ...
10393         * class.cs (TypeContainer.PartialContainer): ... here.
10394         (TypeContainer.AddBasesForPart): New helper.
10395         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
10396         instead.
10397         * cs-parser.jay (current_class): Convert to DeclSpace.
10398         (struct_declaration, interface_declaration, class_declaration):
10399         Use AddBasesForPart instead of .Bases directly.
10400         * const.cs, iterators.cs: Update to changes.
10401
10402 2006-07-28  Raja R Harinath  <rharinath@novell.com>
10403
10404         * class.cs (TypeContainer.AddMemberType): Rename from
10405         AddToTypeContainer.
10406         (TypeContainer.AddMember): Rename from AddToMemberContainer.
10407         (AddTypeContainer): New.  Combine AddClassOrStruct and
10408         AddInterface.
10409         (AddPartial): Update.  Add 'is_partial' argument.
10410         * roottypes.cs: Update to changes.
10411         * cs-parser.jay (push_current_class): New helper for handling
10412         current_container and current_class.
10413         (struct_declaration, interface_declaration, class_declaration):
10414         Use it.
10415
10416 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10417
10418         * roottypes.cs: Rename from tree.cs.
10419
10420         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10421         * tree.cs (Tree, ITreeDump): Remove types.
10422         * rootcontext.cs (tree, Tree): Remove fields.
10423         (root, ToplevelTypes): New.
10424         * *.cs: Update to rename.
10425
10426         * tree.cs (Tree.RecordDecl): Remove.
10427         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10428         namespace here.
10429         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10430
10431 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10432
10433         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10434         DoFlowAnalysis and OmitStructFlowAnalysis here.
10435         (ec.With): Rename from WithUnsafe and generalize.
10436         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10437         (ec.WithFlowAnalyis): New.
10438         * ecore.cs, expression.cs, statement.cs: Update.
10439
10440 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10441
10442         * statement.cs (Block.ResolveMeta): Simplify slightly.
10443
10444         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10445         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10446         check_state to flags.
10447         (CheckState, ConstantCheckState): Update.
10448         (InUnsafe): New read-only property.
10449         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10450         arbitrary flags.
10451         (WithUnsafe): New helper similar to WithCheckState.
10452         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10453         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10454
10455 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10456
10457         Make comparisons use the same IL irrespective of whether they're
10458         in a 'checked' or 'unchecked' context: one of the issues in #78899
10459         * codegen.cs (EmitContext.CheckState): Make read-only property.
10460         (EmitContext.ConstantCheckState): Likewise.
10461         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10462         helper that implement a save/restore stack for CheckState
10463         values.  This is the only way to change check-state.
10464         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10465         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10466         (CheckedExpr.EmitBranchable): New forwarding method.
10467         (UnCheckedExpr): Likewise.
10468         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10469         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10470         (Checked.Resolve, checked.DoEmit): Likewise.
10471
10472 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10473
10474         * anonymous.cs: Cache the resolved anonymous delegate, and return
10475         this so that the ResolveTopBlock is only triggered once, not
10476         twice.
10477
10478         Currently we trigger ResolvetopBlock twice due to a first pass of
10479         argument check compatibility, and a second pass that does the
10480         actual resolution.   
10481         
10482 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10483
10484         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10485         modifiers.
10486         * rootcontext.cs (Reset): Add helper_classes.
10487
10488 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10489
10490         A fix for #78860
10491         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10492         correctly.
10493
10494 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10495
10496         * statement.cs (Lock): Handle expressions of type
10497         TypeManager.null_type specially.  Fixes #78770
10498
10499 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10500
10501         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10502         to an event.
10503
10504 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10505
10506         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10507         for accessors as well.
10508         * ecore.cs (EventExpr): Add AccessorTable.
10509
10510 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10511
10512         A fix for #78738
10513         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10514         for CS0122 where appropriate.
10515         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10516         level attributes.
10517         (Filter): Assembly can be null in the case of top level attributes.
10518
10519 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10520
10521         A fix for #78690
10522
10523         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10524         is done at global level.
10525
10526 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10527
10528         A fix for #77002, Implemented TypeForwarder support.
10529
10530         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10531         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10532         * typemanager.cs (): Add type_forwarder_attr_type.
10533
10534 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10535
10536         * report.cs: Add CS0469 warning.
10537
10538 2006-06-21  Martin Baulig  <martin@ximian.com>
10539
10540         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10541         the `try'-block, so we also report CS0016 etc. there.
10542
10543 2006-06-21  Martin Baulig  <martin@ximian.com>
10544
10545         * delegate.cs
10546         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10547
10548 2006-06-21  Martin Baulig  <martin@ximian.com>
10549
10550         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10551         also report CS1686 for parameters.
10552
10553 2006-06-21  Martin Baulig  <martin@ximian.com>
10554
10555         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10556         instead of an error if the value is not implicitly convertible to
10557         the switch types; fixes #77964.
10558
10559 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10560
10561         Fix #78673
10562         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10563         FieldBuilder is null.
10564
10565         Fix #78662
10566         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10567         'left' and 'right' before error-checking.
10568
10569 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10570
10571         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10572         Fixed bug #78601.
10573         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10574         (FieldExpr.DoResolve): likewise.
10575         (PropertyExpr.InstanceResolve): likewise.
10576         (EventExpr.InstanceResolve): likewise. 
10577
10578 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10579
10580         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10581         attribute applicable tests for attribute argument.
10582
10583 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10584
10585         Fix #78079
10586         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10587         (Binary.OverloadResolve_PredefinedIntegral): New.
10588         (Binary.OverloadResolve_PredefinedFloating): New.
10589         (Binary.OverloadResolve_PredefinedString): New.
10590         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10591         Follow the standard more closely, and treat numeric promotions in
10592         terms of overload resolution.
10593         (Binary.CheckShiftArguments): Simplify.
10594
10595 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10596
10597         * flowanalysis.cs (MyBitVector): Simplify representation.
10598         (MyBitVector.Clone): Avoid allocating BitArray.
10599         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10600         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10601         (*): Update.  Change all references to MyBitVector.And and
10602         MyBitVector.Or to &= and |=.
10603
10604 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10605
10606         Fix cs0231-[34].cs.
10607         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10608         to param arguments too.
10609
10610 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10611
10612         * cs-parser.jay: Catch another parsing form for arglist being
10613         followed by other arguments.  Fixes #78313.
10614
10615 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10616
10617         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10618         checking of out parameters to ...
10619         (FlowBranchingToplevel.Merge): ... here.
10620         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10621         set, propagate the origin upward, and only complain if there was
10622         no other error.
10623         (FlowBranchingException.AddContinueOrigin): Likewise.
10624         (FlowBranchingException.AddReturnOrigin): Likewise.
10625         (FlowBranchingException.AddGotoOrigin): Likewise.       
10626
10627 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10628
10629         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10630         unreachable, skip it.
10631         (FlowBranchingException.Merge): Always propagate jumps, even if
10632         the finally block renders subsequent code unreachable.
10633
10634 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10635
10636         Fix #77601
10637         * statement.cs (Goto.Resolve): Move responsibility for resolving
10638         'goto' to FlowBranching.AddGotoOrigin.
10639         (Goto.SetResolvedTarget): New.  Callback to set the
10640         LabeledStatement that's the target of the goto.
10641         (Goto.DoEmit): Use Leave instead of Br when crossing an
10642         unwind-protect boundary.
10643         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10644         LookupLabel and adjust to new semantics.
10645         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10646         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10647         Goto.SetResolvedTarget to update target.
10648         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10649         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10650         AddBreakOrigin & co.  Delay propagation until ...
10651         (FlowBranchingException.Merge): ... this.
10652
10653         * statement.cs (Block.Resolve): Always depend on flow-branching to
10654         determine unreachability.  Kill workaround that originally emitted
10655         only one statement after an "unreachable" label (see infloop in
10656         test-515.cs).
10657
10658         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10659         This is still "wrong", but anything better would probably need a
10660         multi-pass algorithm.
10661         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10662         usage vector.  Force current usage vector to be reachable, to
10663         optimistically signify backward jumps.
10664         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10665         detected.
10666         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10667         detected, return the original salted-away usage vector instead,
10668         updated with appropriate changes.  Print unreachable warning if
10669         necessary.
10670         * statement.cs (Block.Resolve): Don't print unreachable warning on
10671         a labeled statement.
10672
10673 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10674
10675         * driver.cs: Pass filename without path to AssemblyBuilder's 
10676         AddResourceFile. Fixes bug #78407.
10677
10678 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10679
10680         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10681         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10682         (FlowBranching.MergeChild): Overwrite
10683         reachability information from Labeled branchings too.
10684
10685 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10686
10687         * statement.cs (Goto.Resolve): Merge jump origins here ...
10688         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10689
10690         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10691         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10692         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10693         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10694         here, ...
10695         * statement.cs (Goto.Resolve): ... not here.
10696         (Goto.Emit): Remove CS1632 check.
10697
10698 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10699
10700         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10701         error message.
10702
10703 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10704
10705         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10706         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10707         (FlowBranchingException.Label): Likewise.
10708
10709         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10710         given value.
10711         (MyBitVector.Or): Use it to avoid losing information (Count).
10712         (FlowBranching.MergeOrigins): Likewise.
10713
10714         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10715         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10716         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10717         (UsageVector.ToString): Simplify.
10718         (UsageVector.MergeSiblings): Move here from ...
10719         (FlowBranching.Merge): ... here.
10720         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10721         not a MyBitVector.
10722
10723 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10724
10725         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10726         null bitvector is treated as all-true.
10727
10728         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10729         (MyBitVector): Rationalize invariants.  'vector != null' implies
10730         that we have our own copy of the bitvector.  Otherwise,
10731         'InheritsFrom == null' implies all inherited bits are true.
10732
10733 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10734
10735         * statement.cs (LocalInfo): Add IsConstant.
10736         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10737         local variable for constants.
10738
10739 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10740
10741         * flowanalysis.cs (MyBitVector.Empty): New.
10742         (MyBitVector): Don't allow InheritedFrom to be null.
10743         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10744         (UsageVector, FlowBranching): Update to changes.
10745
10746         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10747         recursion.  The 'Parent == null' condition isn't sufficient for
10748         anonymous methods.
10749         (FlowBranching.AddBreakOrigin): Likewise.
10750         (FlowBranching.AddContinueOrigin): Likewise.
10751         (FlowBranching.AddReturnOrigin): Likewise.
10752         (FlowBranching.StealFinallyClauses): Likewise.
10753         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10754         (FlowBranching.CheckOutParameters): Likewise.
10755         (FlowBranchingToplevel): Terminate all the above recursions here.
10756         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10757         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10758
10759         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10760         toplevel block.
10761         (FlowBranchingToplevel): New.  Empty for now.
10762         (FlowBranching.MergeTopBlock): Update.
10763         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10764         branching for the anonymous delegate.
10765         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10766
10767         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10768         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10769         information at the start of the merge.  Reorganize.
10770
10771 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10772
10773         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10774
10775 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10776
10777         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10778         to newly introduced ctor.
10779
10780         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10781         message to one place.
10782         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10783         global namespace.
10784
10785 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10786
10787         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10788
10789         * ecore.cs (Expression.ResolveAsConstant): Updated.
10790
10791         * statement.cs (ResolveMeta): Updated.
10792
10793 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10794
10795         * cs-parser.jay: __arglist cannot be used in initializer.
10796
10797 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10798
10799         A fix for #77879
10800         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10801         private types.
10802
10803 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10804
10805         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10806         (LabeledStatement): Add 'name' parameter.
10807         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10808         (Block.AddLabel): Update to changes.
10809         * cs-parser.jay (labeled_statement): Likewise.
10810
10811         * flowanalysis.cs (BranchingType.Labeled): New.
10812         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10813         (FlowBranchingLabeled): New.  Does nothing for now, but will
10814         eventually handle 'goto' flows.
10815         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10816         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10817         that's terminated ...
10818         (Block.Resolve): ... here.
10819
10820         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10821         (UsageVector.MergeFinallyOrigins): Likewise.
10822         (FlowBranching.InTryOrCatch): Likewise.
10823         (FlowBranching.AddFinallyVector): Likewise.
10824         (FlowBranchingException): Update to changes.
10825
10826         Fix #78290
10827         * statement.cs (Return.Resolve): Move error checking to ...
10828         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10829         (FlowBranchingException): Handle return origins like break and
10830         continue origins.
10831         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10832
10833 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10834
10835         A fix for #76122
10836         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10837         filter.
10838
10839 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10840
10841         A fix for #77543
10842         * class.cs (MethodData.Define): Do public accessor check only when method
10843         implements an interface.
10844
10845 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10846
10847         Remove special handling of 'break'
10848         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10849         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10850         (UsageVector.Break): Remove.
10851         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10852         reachability.
10853         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10854
10855         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10856         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10857
10858 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10859
10860         A fix for #75726
10861         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10862         be the interface member.
10863
10864 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10865
10866         A fix for #60069
10867         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10868         for emitting small (int) values.
10869
10870 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10871
10872         Fix #59427
10873         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10874         control-flow passes through the 'finally' after merging-in all the
10875         control-flows from 'try' and the 'catch' clauses.
10876
10877         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10878         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10879         always true at the only non-recursive entry point.
10880         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10881         FlowBranchingBreakable.
10882         (FlowBranchingLoop): Remove.
10883         * statement.cs (Return.DoResolve): Update to changes.
10884
10885         Fix #76471, #76665
10886         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10887         (FlowBranching.CreateBranching): Handle it: create a
10888         FlowBranchingContinuable.
10889         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10890         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10891         except that it handles the 'continue' command.
10892         (FlowBranching.UsageVector.MergeOrigins): Rename from
10893         MergeBreakOrigins.
10894         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10895         except that it overrides AddContinueOrigin.
10896         (FlowBranchingException): Override AddContinueOrigin, similar to
10897         AddBreakOrigin.
10898         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10899         Create a new branching around the embedded statement.
10900         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10901         control flow after the embedded statement.
10902         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10903
10904         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10905         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10906         FlowBranchingBreakable.
10907         (FlowBranchingSwitch): Remove.
10908
10909         Fix test-503.cs
10910         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10911         error reporting to ...
10912         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10913         Rename from 'AddBreakVector'.  Add new location argument.  Return
10914         a bool indicating whether the 'break' crosses an unwind-protect.
10915         (FlowBranchingException.AddBreakOrigin): Add.
10916         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10917         flowbranching after updating with the effects of the 'finally'
10918         clause.
10919         (FlowBranchingBreakable): New common base class for
10920         FlowBranchingLoop and FlowBranchingSwitch.
10921
10922         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10923         embedded statement.
10924         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10925
10926 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10927
10928         * statement.cs (Do.Resolve): If the loop is infinite, set the
10929         barrier.
10930         (While.Resolve, For.Resolve): Set a barrier after the embedded
10931         statement.  There's no direct control flow that goes from the end
10932         of the embedded statement to the end of the loop.
10933         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10934         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10935         above ensure that the reachability is correctly computed.
10936
10937         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10938         (UsageVector.MergeBreakOrigins): If the current path is
10939         unreachable, treat it as if all parameters/locals are initialized.
10940         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10941         infinite loops before merging-in break origins.
10942
10943         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10944         (Reachability.Reachable): Split part into ...
10945         (Reachability.Unreachable): ... this.  Simplify.
10946         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10947
10948         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10949         (Reachability.SetThrowsSometimes): Likewise.
10950         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10951         TriState.Always, use corresponding property.
10952         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10953         (Block.Resolve): Likewise.  Remove some redundant checks.
10954
10955 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10956
10957         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10958         (Reachability.Meet): Don't bother checking AlwaysThrows --
10959         barrier is always set.
10960         (FlowBranchingBlock.Merge): Likewise.
10961
10962 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10963
10964         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10965         checks for unreachable.
10966
10967 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10968
10969         A fix for #77980
10970         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10971
10972         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10973         whether field is really assigned.
10974
10975 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10976
10977         * flowanalysis.cs (Reachability): Make 4-argument constructor
10978         private.
10979         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10980         (Reachability.Always): Rename from the highly misleading
10981         'Reachability.Never'.
10982         (FlowBranching.Merge): Update to changes.  Mark an impossible
10983         situation with a 'throw'.
10984         (*): Update to changes.
10985
10986 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10987
10988         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10989         Remove 'Undefined'.
10990         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10991         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10992         (*): Update to changes.
10993         * statement.cs: Update to changes.
10994
10995 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10996
10997         A fix for #78049
10998         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10999
11000 2006-04-28  Raja R Harinath  <harinath@gmail.com>
11001
11002         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
11003         dummy UsageVector.
11004
11005         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
11006         argument to two arguments: an usage-vector and a bool.  Move call
11007         to FlowBranching.Merge () ...
11008         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
11009
11010         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
11011         handling of loop and switch reachability to ...
11012         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
11013
11014 2006-04-27  Raja R Harinath  <harinath@gmail.com>
11015
11016         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
11017         handling to FlowBranchingLoop.InLoop.
11018         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
11019
11020 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
11021
11022         A fix for #78115
11023         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
11024         anonymous method is allowed from AnonymousContainer here.
11025
11026         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
11027
11028 2006-04-24  Raja R Harinath  <rharinath@novell.com>
11029
11030         Fix #78156
11031         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
11032
11033 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
11034
11035         A fix for #49011.
11036         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
11037         (DoubleConstant.Reduce): Ditto.
11038
11039 2006-04-23  Raja R Harinath  <rharinath@novell.com>
11040
11041         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
11042         Remove 'lvalue_right_side' argument.  Move parts to ...
11043         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
11044         (LocalVariable.DoResolveLValue): ... these.
11045
11046 2006-04-21  Raja R Harinath  <rharinath@novell.com>
11047
11048         Fix cs1655.cs
11049         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
11050         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
11051         (LocalVariableReference.DoResolveBase): Use it to implement new
11052         CS1655 check.
11053         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
11054         (Argument.Resolve): Simplify.  Move CS1510 check ...
11055         * ecore.cs (Expression.ResolveLValue): ... here.
11056         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
11057         (PropertyExpr.DoResolveLValue): Likewise.
11058         (FieldExpr.Report_AssignToReadonly): Likewise.
11059         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
11060         LValueMemberAccess or LValueMemberOutAccess on instance depending
11061         on it.
11062         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
11063         DoResolve as appropriate.
11064
11065 2006-04-20  Raja R Harinath  <rharinath@novell.com>
11066
11067         Fix #75800
11068         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
11069         implicit conversions on 'out' and 'ref' arguments.
11070
11071         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
11072         improve clarity.  Remove dead code.
11073
11074         Fix #66031
11075         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
11076         (Catch.Resolve): Resolve VarBlock if it exists.
11077
11078 2006-04-19  Miguel de Icaza  <miguel@novell.com>
11079
11080         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
11081         twice, this was some residual code, the enumerator was emitted
11082         properly in the two branche of if later.
11083
11084 2006-04-19  Raja R Harinath  <rharinath@novell.com>
11085
11086         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
11087         cast is never an lvalue.
11088         (Cast.DoResolve, Cast.ResolveRest): Combine.
11089         (Argument.Emit): Simplify slightly.  Move 'Expr is
11090         IMemoryLocation' check ...
11091         (Argument.Resolve): ... here.
11092         (Argument.Error_LValueRequired): Remove.  Inline into only user.
11093
11094         Simplifications.  Fix cs0191-2.cs
11095         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
11096         CS1649 and CS1651 to ...
11097         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
11098         the actual selection of the error code and message to a lookup
11099         table.  Add a dummy return value to simplify callsites.
11100         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
11101         readonly fields of other instances of the same type.  Move CS0197
11102         warning from ...
11103         * expression.cs (Argument.Resolve): ... here.  Simplify code.
11104         Ensure that ec.InRefOutArgumentResolving is only set during LValue
11105         resolution of an out or ref argument.  The code simplification
11106         above uses this invariant.
11107
11108 2006-04-18  Raja R Harinath  <rharinath@novell.com>
11109
11110         Possibly fix #77752.  Fix cs1690-[4-7].cs.
11111         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
11112         CheckMarshallByRefAccess.  Drop parameter.
11113         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
11114         warning.
11115         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
11116         InstanceExpression.
11117         * report.cs (AllWarnings): Add CS1690.
11118         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
11119         for ref access too.
11120         (LocalVariableReference.DoResolveBase): Update.
11121
11122 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11123
11124         * class.cs (MethodOrOperator): Moved common parts from method class.
11125         detect obsolete attributes.
11126         (Method.Define): Simplified as it reuses code from base.
11127         (Constructor.ValidAttributeTargets): Fixed issue found during
11128         refactoring.
11129         (Destructor.ValidAttributeTargets): Fixed issue found during
11130         refactoring.
11131         (Operator): Finished refactoring set off by #78020. Operator class is now
11132         ordinary method class.
11133
11134         * anonymous.cs: Updated.
11135
11136         * decl.cs (DeclSpace): Add IsGeneric
11137
11138 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11139
11140         * class.cs (Constructor.Emit): Don't emit the attributes twice.
11141
11142 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11143
11144         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
11145         detect obsolete attributes.
11146         (Method.CreateEmitContext): Moved to MethodOrOperator.
11147
11148 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11149
11150         A fix for #78048.
11151         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
11152         customized exception to make crash detection easier.
11153         (MethodOrOperator): Started to work on new base class for methods and
11154         operators.
11155         (Method): Derives from MethodOrOperator.
11156         (Constructor.Emit): Emits its own attributes.
11157         (AbstractPropertyEventMethod.Emit): Ditto.
11158         (Operator): Derives from MethodOrOperator, will refactor fully in extra
11159         patch.
11160         (Operator.Emit): It's temporary more tricky than should be.
11161         
11162         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
11163
11164         * report.cs (InternalErrorException): Add ctor with inner exception.
11165
11166 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
11167
11168         A fix for #76744.
11169         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
11170         only not visible.
11171
11172 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
11173
11174         A fix for #77916.
11175         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
11176         array.
11177
11178 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
11179
11180         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
11181         attribute is present and Guid not.
11182         (Interface.ApplyAttributeBuilder): Ditto.
11183
11184         * attribute.cs: Add error message.
11185
11186 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
11187
11188         A fix for #78020.
11189
11190         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
11191         sources (it's composite) so hold them in extra array as they are used in
11192         Emit phase only. It worked in the previous versions by mistake.
11193         (Attribute.Emit): Emit attribute for more owners when exist.
11194
11195         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
11196         it has now different behaviour.
11197
11198 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
11199
11200         * constant.cs (Constant.IsDefaultInitializer): New method.
11201
11202         * class.cs: Updated.
11203
11204         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
11205         re-initialize default values. It saves KBs almost for every assembly.
11206         Thanks Zoltan for the idea.
11207         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
11208         (ArrayCreation.DoResolve): Resolve only once.
11209         (ArrayCreation.Emit): Emit static initializer only when it is faster.
11210         (ArrayCreation.GetAttributableValue): Cope with optimized values.
11211
11212 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
11213
11214         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
11215         From #77961.
11216
11217 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11218
11219         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
11220         in an embedded statement too.
11221
11222 2006-04-01  Raja R Harinath  <rharinath@novell.com>
11223
11224         Fix #77958
11225         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
11226
11227 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11228
11229         A fix for #77966.
11230
11231         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
11232         was not specified.
11233
11234         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
11235
11236 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
11237
11238         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
11239         phase.
11240
11241         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
11242         LocalTemporary change.
11243
11244         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
11245         TypeContainer.
11246         (ClassOrStruct.DefineFieldInitializers): Implemented static field
11247         initializers optimization.
11248         (ClassOrStruct.TypeAttr): Moved from modifiers.
11249         (Constructor.CheckBase): Don't crash when static ctor has parameters.
11250         (FieldBase.ResolveInitializer): Resolves initializer.
11251         (FieldBase.HasDefaultInitializer): New property.
11252
11253         * cs-parser.jay: Removed message.
11254
11255         * expression.cs (CompilerGeneratedThis): New specialization.
11256
11257         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
11258
11259 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
11260
11261         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
11262
11263 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11264
11265         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
11266         be now EnumConstants only.
11267
11268 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11269
11270         * attribute.cs, driver.cs: Reset more caches.
11271
11272 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11273
11274         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
11275
11276 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11277
11278         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
11279         for easier reuse. Updated all overrides.
11280         (IntegralConstant): New base class for all integral constants.
11281         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
11282         of the constant range, report custom error.
11283         (UIntConstant.Reduce): Fixed uint conversion.
11284
11285         * ecore.cs, literal.cs: Reduce updates.
11286
11287 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11288
11289         A fix for #75813.
11290
11291         * class.cs (Constructor.Define): Removed extra if for default ctors.
11292         A patch from Atsushi Enomoto.
11293
11294 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11295
11296         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
11297         GetAttributableValue.
11298
11299         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
11300         when required.
11301
11302         * convert.cs (ImplicitConversionRequired): Error message moved to
11303         DoubleLiteral.
11304
11305         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
11306         automatic implicit conversion of an output value.
11307         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
11308
11309         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
11310         conversion.
11311         (TypeOf.GetAttributableValue): Add extra handling for object type.
11312
11313         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
11314         special error message.
11315
11316 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
11317
11318         * class.cs (Constructor.Emit): Don't crash when struct ctor is
11319         InternalCall.
11320         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
11321         compatible with MS runtime.
11322
11323 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
11324
11325         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
11326         attribute arguments here.
11327
11328         * class.cs (Indexer.Define): The check was moved to attribute class.
11329
11330 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
11331
11332         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
11333         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
11334         easier.
11335
11336 2006-03-22  Raja R Harinath  <rharinath@novell.com>
11337
11338         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
11339         mcs to keep code differences small.
11340         * attribute.cs (Attribute.GetParameterDefaultValue): New.
11341         * typemanager.cs (parameter_default_value_attribute_type): New.
11342         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
11343         CS1908 check.
11344
11345 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11346
11347         * expression.cs (StringConcat.Append): Reverted back to no warning state.
11348
11349 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11350
11351         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
11352
11353         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
11354         the blocks too.
11355
11356 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
11357
11358         * doc-bootstrap.cs : fix build.
11359
11360 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11361
11362         * expression.cs (StringConcat.Append): Issue a warning when empty string
11363         is going to append.
11364
11365 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11366
11367         * assign.cs (CompoundAssign.ResolveSource): Removed.
11368
11369         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
11370         clean up.
11371
11372         * class.cs (TypeContainer.FindMethods): Removed.
11373         (TypeContainer.CheckMemberUsage): Made static.
11374
11375         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
11376
11377         * constant.cs (CheckRange): Removed unused type argument.
11378         (CheckUnsigned): Removed unused type argument.
11379
11380         * cs-parser.jay: Updated after MemberAccess clean up.
11381         Uses Length for empty string test.
11382
11383         * cs-tokenizer.cs: Uses Length for empty string test.
11384         (IsCastToken): Made static.
11385         (is_hex): Made static.
11386         (real_type_suffix): Made static.
11387
11388         * decl.cs (SetupCache): Made static.
11389         (OnGenerateDocComment): Removed unused ds argument.
11390
11391         * delegate.cs (VerifyDelegate): Removed unused argument.
11392
11393         * doc.cs: Uses Length for empty string test.
11394
11395         * driver.cs: Uses Length for empty string test.
11396
11397         * enum.cs (IsValidEnumType): Made static
11398
11399         * expression.cs (EnumLiftUp): Removed unused argument.
11400         (ResolveMethodGroup): Ditto.
11401         (BetterConversion): Ditto.
11402         (GetVarargsTypes): Ditto.
11403         (UpdateIndices): Ditto.
11404         (ValidateInitializers): Ditto.
11405         (MemberAccess.ctor): Ditto.
11406         (GetIndexersForType): Ditto.
11407
11408         * flowanalysis.cs: (MergeFinally): Removed unused argument.
11409
11410         * iterators.cs: Updated after MemberAccess clean up.
11411
11412         * location.cs: Uses Length for empty string test.
11413
11414         * namespace.cs: Uses Length for empty string test.
11415
11416          * report.cs (CheckWarningCode): Made static.
11417
11418         * statement.cs (LabeledStatement): Removed unused argument.
11419
11420         * typemanager.cs (FilterNone): Removed.
11421
11422 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11423
11424         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11425         obsolete.
11426
11427         * class.cs: Updated.
11428
11429 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11430
11431         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11432
11433 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11434
11435         A fix for #77822.
11436
11437         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11438         reporting, it's more tricky than I thought.
11439
11440 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11441
11442         A fix for #77816.
11443
11444         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11445         host container.
11446         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11447         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11448         Add more error reporting; Fixed issue with params.
11449
11450         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11451
11452         * cs-parser.jay: AnonymousMethod requires host container.
11453
11454         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11455
11456 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11457
11458         * class.cs: Change 'TypeContainer ds' constructor argument to
11459         'DeclSpace parent'.  Some classes were missed below due to
11460         different naming convention.
11461
11462         * class.cs (MemberCore.Parent): Delete.  This makes the
11463         ParentContainer changes below enforceable by the compiler.
11464
11465         Treat pointers to enclosing declaration space as 'DeclSpace', not
11466         'TypeContainer'.
11467         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11468         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11469
11470         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11471         of TypeContainer.
11472         (Block.AddThisVariable): Likewise.
11473         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11474         (AbstractPropertyEventMethod.Emit): Likewise.
11475         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11476         (GetMethod.Define, SetMethod.Define): Likewise.
11477         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11478         (DelegateMethod.EmitMethod): Likewise.
11479
11480         Fix regression test-partial-13.cs.
11481         Rationalize use of PartialContainer.  Ensure that the partial
11482         class semantics can be tied to type-correctness, i.e., any
11483         violation will cause a compile error.
11484         * class.cs, const.cs: Access all fields that belong to class
11485         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11486         Resolve()-like functions still use 'Parent'.
11487
11488         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11489         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11490         (PropertyMethod.CheckModifiers): Remove unused argument.
11491         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11492         DeclSpace.
11493
11494 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11495
11496         Make semantics of PartialContainer simpler.
11497         * decl.cs (DeclSpace.IsPartial): Remove.
11498         * class.cs (TypeContainer.IsPartial): Likewise.
11499         (TypeContainer..ctor): Set PartialContainer to point to self.
11500         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11501         (TypeContainer.FindNestedType): Likewise.
11502         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11503
11504 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11505
11506         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11507
11508 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11509
11510         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11511         classes.
11512
11513 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11514
11515         * class.cs (Operator.Define): An error for base conversion was not
11516         reported correctly.
11517
11518 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11519
11520         * iterator.cs : yield break is allowed in try statement which has
11521           catch clauses. Fixed bug #77767.
11522
11523 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11524
11525         A fix for #77593, #77574.
11526
11527         * class.cs (MethodCore.CheckBase): Another if for operator.
11528
11529 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11530
11531         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11532         were not resolved
11533
11534         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11535         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11536         conversion test.
11537         
11538         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11539         not needed.
11540
11541         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11542         Updated after another emitcontext usage was clean up. It should help us to
11543         synchronize with gmcs easier.
11544
11545 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11546
11547         A fix for #77353.
11548
11549         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11550         (Event.Define): ditto
11551         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11552
11553         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11554         Removed redundant code and set NewSlot for Invoke method too.
11555
11556         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11557         (Parameters.MergeGenerated): New method. Use this method when you merge
11558         compiler generated argument with user arguments.
11559
11560 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11561
11562         * attribute.cs (ResolveAsTypeTerminal): Removed.
11563
11564         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11565         specialization for predefined types; 30% speed up.
11566         Finally placed obsolete check to right place.
11567         (Expression.ResolveType): Removed.
11568
11569         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11570         Updated after ResolveType was removed.
11571
11572         * expression.cs (Cast.ctor): Check void cast.
11573         (Binary.ResolveAsTypeTerminal): Is never type.
11574         (Conditional.ResolveAsTypeTerminal): Is never type.
11575
11576         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11577
11578 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11579
11580         Fix #77679.
11581         * expression.cs (ParameterReference.DoResolveBase): Change return
11582         type to bool.
11583         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11584         Update.
11585
11586         Fix #77628.
11587         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11588
11589         Fix #77642.
11590         * typemanager.cs (GetFullNameSignature): Don't nullref on
11591         protected accessors.
11592
11593 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11594
11595         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11596         these two separated members to simplify the code.
11597         (Attribute.Resolve): Refactored to use new fields and methods.
11598         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11599         implemented obsolete attribute checking.
11600         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11601         implemented obsolete checking again. It look line never ending quest ;-)
11602         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11603
11604         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11605
11606         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11607
11608         *class.cs (Property.Define): Add RegisterProperty call.
11609
11610         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11611         argument groups (only 2).
11612
11613         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11614         encoding expression to arguments.
11615         (Expression.ExprClassToResolveFlags): Just turned to property.
11616
11617         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11618         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11619         optimized as well as implemented support for zero-length attributes.
11620
11621         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11622         Add caching of PropertyInfo's.
11623
11624 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11625
11626         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11627         error multiple times.
11628
11629 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11630
11631         New partial class implementation.
11632         A fix for #77027, #77029, #77403
11633
11634         * attribute.cs (Attributable): Made attributes protected.
11635
11636         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11637         the replacements of ClassPart and PartialContainer.
11638         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11639         (TypeContainer.AddInterface): Ditto.
11640         (TypeContainer.AddPartial): The main method for partial classes. It checks
11641         for errors and merges ModFlags and attributes. At the end class is added to
11642         partial_parts list.
11643         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11644         required here.
11645         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11646         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11647         from the rest of partial classes.
11648         (TypeContainer.GetClassBases): Simplified.
11649         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11650         DefineType.
11651         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11652         (TypeContainer.HasExplicitLayout): Uses Flags now.
11653         (PartialContainer): Removed.
11654         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11655         (StaticClass): Was merged with Class.
11656         (Class.GetClassBases): class and static class bases are verified here.
11657         (Class.TypeAttr): Added static attributes when class is static.
11658         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11659         (MemberBase): In some cases we need to call parent container for partial
11660         class. It should be eliminated but it's not easy now.
11661
11662         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11663
11664         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11665         partial classed to accumulate class comments.
11666         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11667
11668         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11669
11670         * driver.cs (MainDriver): Tree.GetDecl was removed.
11671
11672         * modifiers.cs (Modifiers): Add partial modifier.
11673
11674         * tree.cs (Tree.decl): Removed.
11675         (RootTypes): Started to use this class more often for root types
11676         specializations.
11677
11678 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11679
11680         A fix for #77615
11681
11682         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11683         external interface does not have an attribute.
11684
11685 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11686
11687         Another prerequisites for new partial classs implementation.
11688         
11689         * attribute.cs (Attribute.Equal): Implemented.
11690         (Attribute.Emit): Changed as attributes can be applied more than twice.
11691         (Attributes.Emit): Check for duplicate attributes here.
11692
11693         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11694         as a parameter, clean-up.
11695
11696 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11697
11698         A fix for #77485
11699
11700         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11701         contains obsolete attribute check which can in some cases look for base
11702         type of current class which is not initialized yet.
11703         (TypeContainer.BaseType): Replacement of ptype.
11704
11705         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11706
11707 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11708
11709         First of prerequisites for new partial classs implemention.
11710         
11711         * attribute.cs (Attributable): Extended by ResolveContext;
11712         Attributes finally have correct context for resolving in all cases.
11713         (AttachTo): Attribute owner is assigned here.
11714
11715         * codegen.cs (IResolveContext): Introduce new interface to hold
11716         all information needed in resolving phase.
11717         (EmitContext): Implements IResolveContext; more clean-up needed here.
11718         
11719         * decl.cs (MemberCore): Implemented IResolveContext.
11720
11721         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11722         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11723         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11724         Refactored to use new IResolveContext instead of EmitContext; cleanup
11725
11726 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11727
11728         * codegen.cs (EmitScopeInitFromBlock): check here the
11729         capture_context, there is no need to make two calls to the
11730         EmitContext. 
11731
11732         * anonymous.cs: Add some debugging messages that might help me
11733         track other instances of this problem in the future (the
11734         regression of test 467).
11735
11736         * cs-parser.jay: track the variable block, as we need to initalize
11737         any captured variables declared in this block for the "catch"
11738         portion of the "Try" statement.
11739
11740         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11741         scope initialization for captured variables. 
11742
11743         Also, move the emit for the variables after the block location has
11744         been marked.
11745
11746 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11747
11748         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11749
11750 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11751
11752         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11753         commit yesterday, the initialization for the roots is necessary.
11754         What is not necessary is the scope activation.
11755
11756 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11757
11758         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11759         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11760         CS0206 checks.
11761         (Argument.Resolve): Remove CS0206 checks.
11762
11763 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11764
11765         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11766         scopes for all the roots, the scopes will now be emitted when the
11767         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11768
11769         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11770         code.  This reduces a lot of existing cruft.
11771         
11772         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11773         that the ScopeInfo is generated as we enter the scope, not at the
11774         time of use, which is what we used to do before.
11775
11776         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11777         every time a Block is about to be emitted if we have a
11778         CaptureContext. 
11779
11780 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11781
11782         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11783         (Reset): Update.
11784         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11785
11786         * typemanager.cs (cons_param_array_attribute): Make private.
11787         (Reset): Set it to null.
11788         (InitCoreHelpers): Don't initialize it.
11789         (ConsParamArrayAttribute): New.  Initialize it as needed.
11790         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11791
11792 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11793
11794         * expression.cs: There might be errors reported during the
11795         selection of applicable methods.  If there are errors, do not
11796         continue execution as it will lead the compiler to crash.
11797
11798 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11799
11800         * expression.cs: Member access is not allowed on anonymous
11801         methods.  Fixes #77402.
11802
11803 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11804
11805         Fix #77401
11806         * cs-parser.jay (VariableDeclaration): Don't set
11807         current_array_type to null.
11808         (field_declaration, event_declaration, declaration_statement):
11809         Set it to null here.
11810
11811 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11812
11813         * typemanager.cs (GenericParameterPosition): New.
11814         * doc.cs: Use it.
11815
11816 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11817
11818         * doc.cs : To process "include" elements, first we should create
11819           another list than XmlNodeList, because it could result in node
11820           removal, which could result in that the XmlNodeList gives up
11821           yielding next node.
11822
11823           (Also made code identical to gmcs again.)
11824
11825 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11826
11827         * ecore.cs: Introduce an error report that we were not catching
11828         before, if not silent, we must report the error.  Gonzalo ran into
11829         it.
11830
11831 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11832
11833         A fix for bug: #76957
11834         
11835         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11836         ComputeMethodHost before creating the method, this is a new
11837         requirement. 
11838
11839         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11840         that this method references (RegisterScope).  The actual scope
11841         where the method is hosted is computed with the ComputeMethodHost
11842         before we create the method.
11843
11844         Moved the Deepest routine here.
11845
11846         (AnonymousContainer.ComputeMethodHost): New routine used to
11847         compute the proper ScopeInfo that will host the anonymous method.
11848
11849         (ScopeInfo): Deal with multiple roots.  The problem was that we
11850         did not have a unique root where all ScopeInfos could be hanged
11851         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11852         of roots.  
11853
11854         Remove AdjustMethodScope which is now computed at the end.  Remove
11855         LinkScope which did a partial link, instead link all ScopeInfos
11856         before code generation from the new "LinkScopes" routine. 
11857
11858         Simplify all the Add* routines as they no longer need to maintain
11859         the tree, they just need to record that they are using variables
11860         from a ScopeInfo.
11861
11862         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11863         routines to produce the forest of ScopeInfo trees.
11864
11865         * class.cs (TypeContainer.AppendMethod): This is just like
11866         AddMethod, but ensures that an interface implementation method
11867         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11868         methods, but at the end.
11869
11870         We use this functionality to ensure that the generated MoveNext
11871         method in the iterator class is resolved/emitted before the
11872         enumerator methods created.   
11873
11874         This is required because the MoveNext method computes the right
11875         ScopeInfo for the method.  And the other methods will eventually
11876         need to resolve and fetch information computed from the anonymous
11877         method. 
11878
11879 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11880             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11881
11882         Fix rest of #76995.
11883         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11884         the 'aliases' hash.
11885         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11886         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11887
11888 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11889
11890         Fix #76656, cs0231-2.cs.
11891         * cs-parser.jay (formal_parameter_list): Make error case catch
11892         more issues.
11893         (parenthesized_expression_0): Add CS1026 check.
11894         (invocation_expression): Remove unused { $$ = lexer.Location }.
11895
11896 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11897
11898         Fix #76824.
11899         * cs-parser.jay (statement_expression): Don't list out the
11900         individual statement-expressions.  Convert syntax error into
11901         CS0201 check.
11902
11903 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11904
11905         Fix #76874.
11906         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11907         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11908         CheckIntermediateModification.
11909         (FieldExpr.DoResolve): Add new two-argument version that
11910         allows us to resolve the InstanceExpression as an lvalue.
11911         The one-argument variant is now just a wrapper.
11912         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11913         Resolve the lhs as an lvalue if the it has a value type.
11914         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11915         from Assign.DoResolve.
11916         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11917         resolved as an lvalue.
11918         (PropertyExpr.DoResolve): Update.
11919         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11920         has a value type.  Move CS1612 check here from
11921         CheckIntermediateModification.
11922         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11923         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11924         'right_side' of a ResolveLValue on an 'out' argument.
11925         (EmptyExpression.LValueMemberAccess): New.  Used as the
11926         'right_side' of a propagated ResolveLValue on a value type.
11927         (LocalVariableReference.DoResolveBase): Recognize
11928         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11929         Add CS1654 check.
11930         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11931         EmptyExpression.Null.
11932
11933 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11934
11935         * typemanager.cs : added IsGenericParameter(). In mcs it always
11936           return false.
11937         * doc.cs : for generic parameters, use GenericParameterPosition,
11938           not FullName.
11939
11940 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11941
11942         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11943
11944 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11945
11946         This fixes the problem where we used ldfld instead of ldflda to
11947         load the "THIS" pointer on captured parameters, when THIS is a
11948         value type.  See bug #77205.
11949         
11950         * iterators.cs (CapturedThisReference.Emit): Pass false to
11951         EmitThis (we do not need the address).
11952
11953         * codegen.cs (EmitThis): it needs to know whether we need the
11954         address of `this' or not.  This is used by value types.  
11955
11956         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11957         every other call passes false.
11958
11959 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11960
11961         Fix #77221.
11962         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11963         GetOverride.
11964         * expression.cs (Invocation.OverloadResolve): Update.
11965         (Invocation.DoResolve): Avoid double resolution of invocation.
11966
11967 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11968
11969         Fix #77180.
11970         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11971         unary negation of floating point types as 0-expr; negation cannot
11972         overflow in floating point types.
11973
11974         Fix #77204.
11975         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11976         on operands of 'void' type.
11977
11978         Fix #77200.
11979         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11980         and ExclusiveOr for boolean constants too.
11981
11982 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11983
11984         Fix #75636.
11985         * expression.cs (Invocation.OverloadResolve): Replace reflected
11986         override methods with their base virtual methods, rather than
11987         skipping over them.
11988         * typemanager.cs (TypeManager.GetOverride): New.
11989
11990 2006-01-05  Jb Evain  <jbevain@gmail.com>
11991
11992         * class.cs (Property.Define, Indexer.Define): do not tag the
11993         properties as SpecialName | RTSpecialName.
11994
11995 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11996
11997         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11998         doing a low-level comparission of parameter types.  It was lacking
11999         a check for __argslist. 
12000
12001 2005-12-30  Miguel de Icaza  <miguel@novell.com>
12002
12003         * expression.cs (ParameterReference.DoResolveBase): Allow
12004         reference parameters if they are local to this block. 
12005
12006         This allows the ref and out parameters of a delegate to be used in
12007         an anonymous method, for example:
12008
12009         delegate void set (out int x);
12010
12011         set s = delegate (out int x){
12012                 x = 0;
12013         };
12014
12015         This is used by functionality introduced late in the C# language.
12016         
12017         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
12018         method that take ref and out parameters. 
12019
12020         Fixes #77119 which was a late change in the spec.
12021
12022 2005-12-23  Miguel de Icaza  <miguel@novell.com>
12023
12024         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
12025         parent if its the same scope.  Fixes #77060.
12026
12027 2005-12-21  Miguel de Icaza  <miguel@novell.com>
12028
12029         * driver.cs: Report the case of no source files and no -out:
12030         argument provided.
12031
12032 2005-12-20  Raja R Harinath  <rharinath@novell.com>
12033
12034         Fix #77035.
12035         * expression.cs (ComposedCast.GetSignatureForError): Define.
12036
12037 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12038
12039         Fix #76995
12040
12041         * namespace.cs (NamespaceEntry): Add extern_aliases as a
12042         ListDictionary, to contain the ExternAliasEntry entries (in
12043         addition to the NamespaceEntry.aliases hashtable). This field is
12044         shared between the original entry and its doppelganger (bodyless 
12045         copy of it).
12046         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
12047         extern_aliases field.
12048         (NamespaceEntry.Lookup): Move the IsImplicit check after the
12049         lookup in extern_aliases.
12050
12051 2005-12-16  Raja R Harinath  <rharinath@novell.com>
12052
12053         Fix #77006.
12054         * class.cs (TypeContainer.Mark_HasEquals): New.
12055         (TypeContainer.Mark_HasGetHashCode): New.
12056         (ClassPart): Override them.
12057         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
12058
12059         Fix #77008.
12060         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
12061         'parent' argument to the base constructor.
12062
12063         Remove all mention of TypeContainer from decl.cs.
12064         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
12065         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
12066         (DeclSpace.DeclSpace): Likewise.
12067         (DeclSpace.DefineMembers): Remove unused argument.
12068         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
12069         debugging check -- we don't care if the debug code throws an
12070         InvalidCastException instead of an InternalErrorException.
12071         * class.cs (TypeContainer.DefineMembers): Update to changes.
12072         (TypeContainer.DoDefineMembers): Likewise.
12073         (TypeContainer.GetMethods): Likewise.
12074         (PropertyMember.Define): Likewise.
12075         (MemberBase.Parent): New property that forwards to
12076         MemberCore.Parent, but ensures that we get a TypeContainer.
12077         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
12078         (RootContext.PopulateTypes): Likewise.  Remove special case code
12079         for !RootContext.StdLib: DefineMembers is idempotent.
12080
12081 2005-12-14  Miguel de Icaza  <miguel@novell.com>
12082
12083         * convert.cs (ExplicitConversionCore): Check the return value from
12084         ExplicitConversionCore which can return null on failure.  Fixes #76914
12085
12086 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
12087
12088         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
12089
12090 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
12091
12092         * doc.cs : The search for referenced namespace was insufficient to
12093           get global one as it used to do. Fixed bug #76965.
12094
12095 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
12096
12097         * doc.cs : check name in cref in the last phase that whether it is
12098           namespace or not.
12099
12100 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
12101
12102         * cs-tokenizer.cs : reverted the latest change: it somehow broke
12103           Mono.C5.
12104
12105 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
12106
12107         * doc.cs : so it turned out that we cannot skip override check for 
12108           interface members. Fixed bug #76954.
12109
12110 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
12111
12112         * cs-tokenizer.cs : fixed bug #75984:
12113           - #warning and #error should not be handled when the source line
12114             is disabled.
12115           - #line is not checked strictly when the source line is disabled.
12116           - #define and #undef is on the other hand checked strictly at any
12117             state.
12118
12119 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
12120
12121         * cs-tokenizer.cs : missing Location (actually, filename) in one of
12122           CS1027 report.
12123
12124 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
12125
12126         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
12127
12128         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
12129         event initializers.
12130         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
12131         (FieldBase.Initializer): Initializer is now optional.
12132         (EventField.Define): Only event field can have initializer.
12133
12134         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
12135
12136         * const.cs (Const): Reuse initializer.
12137
12138         * cs-parser.jay: Updated after FieldBase changes.
12139         Added current_array_type to simplify array initializers.
12140
12141         * ecore.cs (NullCast.IsDefaultValue): Implemented.
12142
12143         * expression.cs, iterators.cs: Updated.
12144
12145         * namespace.cs (NamespaceEntry): Made UsingFound private.
12146
12147 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
12148
12149         * parameterCollection.cs: Obsolete, removed.
12150         * parser.cs: Obsolete, removed.
12151
12152 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
12153
12154         Fix #76849.
12155         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
12156
12157         * enum.cs (Enum.Define): Set obsolete context here.
12158
12159 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
12160
12161         * doc.cs :
12162           - FindDocumentedMember() now expects 1) paramList as null
12163             when "we don't have to check the number of parameters" and
12164             2) Type.EmptyTypes when "there is no arguments".
12165           - Introduced FoundMember struct to hold the exact type which was
12166             used to find the documented member (the above change broke
12167             test-xml-044; it might be better just to use DeclaringType than
12168             what MS does, like this change does, but it depends on usage.)
12169
12170 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
12171
12172         * doc.cs : documented member might be from DeclaringType for nested
12173           types. Fixed bug #76782.
12174
12175 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
12176
12177         * anonymous.cs: Have the param code handle leaving copies on the
12178         stack etc. Allows anonymous params to take part in the assignment
12179         code (++, +=, etc). Fixes bug #76550
12180
12181         * expression.cs: Handle the prepare_for_load/leave_copy by passing
12182         it down to the anon code.
12183
12184         * iterators.cs: Use dummy var here
12185
12186         * codegen.cs: Handle new vars
12187
12188 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
12189
12190         Fix #76849.
12191         * class.cs (MethodData.Define): Set proper Obsolete context.
12192
12193         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
12194         obsolete context.
12195         (FieldExpr.DoResolve): Ditto.
12196
12197 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
12198
12199         Fix #76849.
12200         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
12201         parent is not obsolete.
12202
12203 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
12204
12205         * doc.cs : (FindDocumentedMember) find parameterless members first
12206           and get CS0419 in the early stage. Fixed first case of bug #76727.
12207
12208 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
12209
12210         Fix #76859.
12211         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
12212         no error was reported.
12213
12214         *expression.cs (Binary.DoResolve): left can be null.
12215
12216 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
12217
12218         Fix #76783.
12219         * class.cs (MethodData.Emit): Parameters should be labeled first.
12220
12221 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
12222
12223         Fix #76761.
12224         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
12225
12226 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
12227
12228         * attribute.cs (AreParametersCompliant): Moved to Parameter.
12229
12230         * class.cs (MethodCore): Parameter clean up.
12231         (IMethodData): Added ParameterInfo.
12232         (MethodData): Parameter clean up.
12233         (Indexer.Define): Parameter clean up.
12234
12235         * anonymous.cs,
12236         * codegen.cs,
12237         * cs-parser.jay,
12238         * decl.cs,
12239         * doc.cs,
12240         * ecore.cs,
12241         * flowanalysis.cs,
12242         * iterators.cs,
12243         * pending.cs,
12244         * statement.cs,
12245         * typemanager.cs: Parameter clean up.
12246
12247         * delegate.cs (Define): Get rid of duplicated code.
12248
12249         * expression.cs (ParameterReference): Removed useless parameters
12250         and simplified.
12251         (Invocation): Ditto.
12252
12253         * parameter.cs (ParamsParameter): New class, params specialization.
12254         (ArglistParameter): Attemp to separate arglist.
12255         (Parameter): Refactored to be reusable and faster.
12256         (Parameter.Modifier): Made understandable.
12257         (Parameters): Changed to be used as a class for `this' assembly
12258         parameters. Refactored to use new specialized classes.
12259
12260         * support.cs (ParameterData): Added Types property.
12261         (InternalParameters): Deleted.
12262
12263 2005-08-20  Martin Baulig  <martin@ximian.com>
12264
12265         Merging this patch from GMCS to fix #75867.
12266
12267         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12268         scope if we don't already have it.
12269
12270 2005-11-17  Martin Baulig  <martin@ximian.com>
12271
12272         * anonymous.cs
12273         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
12274         inherit the scope from our parent.  Fixes #76653.
12275
12276 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12277
12278         * doc.cs : the previous patch does not actually fix the bug.
12279           PropertyInfo override check is now implemented and really fixed it.
12280         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
12281
12282 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12283
12284         * doc.cs : apply "override filter" also to properties.
12285           Fixed bug #76730.
12286
12287 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12288
12289         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
12290           no need to check overrides. For classes, omit those results from 
12291           interfaces since they must exist in the class. Fixed bug #76726.
12292
12293 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12294
12295         * typemanager.cs : (GetFullNameSignature) differentiate indexers
12296           with different parameters. Fixed the second problem in #76685.
12297
12298 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12299
12300         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
12301           get expected 'protected' access in CheckValidFamilyAccess()).
12302           Fixed bug #76692.
12303
12304 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12305
12306         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
12307           Fixed bug #76705.  CS1569 was incorrectly commented out.
12308
12309 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12310
12311         * doc.cs : use Invocation.IsOverride() to do real override check.
12312         * expression.cs : made Invocation.IsOverride() internal.
12313
12314 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12315
12316         * doc.cs : use TypeManager.FindMembers() instead of (possible)
12317           TypeBuilder.FindMembers() and filter overriden base members out.
12318           Fixed bug #76990.
12319
12320 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12321
12322         * doc.cs : ref/out parameters are represented as '@' (instead of
12323           '&' in type FullName). Fixed bug #76630 (additionally crefs).
12324
12325 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12326
12327         * doc.cs : when there was no '.' in cref to methods in doc comment,
12328           then parameters were missing in the output. Fixed bug #76691.
12329
12330 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12331
12332         * driver.cs : don't output docs when there is an error.
12333           Fixed bug #76693.
12334
12335 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12336
12337         * doc.cs :
12338           Now it should detect indexers. Fixed primary concern in bug #76685.
12339           Fixed CS0419 message to not show the identical member signature in
12340           the message.
12341
12342 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12343
12344         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
12345           instead of Type.FindMembers() since it does not handle events.
12346           Fixed bug #71604.
12347
12348 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
12349
12350         * codegen.cs: Fixed typo (speficied -> specified).
12351
12352 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12353
12354         Fix #76369.
12355         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
12356
12357 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12358
12359         * attribute.cs: Changed error message.
12360
12361         * cs-tokenizer.cs: One more check.
12362
12363 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12364
12365         * statement.cs (Block.Resolve): Ignore empty statement.
12366
12367 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12368
12369         * report.cs: Made error/warning methods more strict to avoid
12370         their misuse.
12371
12372         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
12373         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
12374         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
12375         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
12376
12377 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
12378
12379         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
12380         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
12381
12382         * class.cs (TypeContainer.IsComImport): New property.
12383         (Constructor.Define): Create proper ctor for ComImport types.
12384
12385         * expression.cs (New.CheckComImport): Fixed.
12386
12387 2005-11-07  Miguel de Icaza  <miguel@novell.com>
12388
12389         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
12390         that a parameter has been captured does not mean that we do not
12391         have to do the rest of the processing.  This fixes the second part
12392         of #76592.  If there was another anonymous method capturing
12393         values in the past, the Scope would never be set for the second
12394         method that captured the same parameter.
12395
12396         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
12397         properly manipulate the stack.   Second part of fix for #76592.
12398
12399         * expression.cs (New): Add support for invoking "new" on
12400         interfaces that have been flagged with the ComImport attribute and
12401         the CoClass.  Fixes #76637 
12402
12403         * statement.cs (Try.DoEmit): When a variable is captured, do not
12404         try to emit the vi.LocalBuilder variable as it has been captured.
12405         Create a temporary variable and store the results on the
12406         FieldBuilder.  Fixes #76642
12407
12408 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
12409
12410         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
12411
12412         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
12413
12414         * expression.cs (Binary.DoResolve): Added && optimalization.
12415     
12416         * typemanager.cs (AddUserType): Removed useless argument.
12417
12418 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12419
12420         * statement.cs (Block.variables): Uses ListDictionary.
12421
12422 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12423
12424         Fix #75969.
12425         * class.cs (PartialContainer.EmitType): Customized to emit
12426         security attributes.
12427         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12428         for partial classes.
12429
12430 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12431
12432         Fix #76599.
12433         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12434         access has to be fixed.
12435         
12436         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12437
12438 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12439
12440         Fix #76590.
12441         * ecore.cs (NullCast.Reduce): Implemented.
12442
12443         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12444         constant type.
12445         
12446         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12447         properly.
12448         (Foreach.Resolve): Catch null properly.
12449
12450 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12451  
12452         * cs-tokenizer.cs: Warning text fix.
12453
12454         * driver.cs: AllWarningNumbers exposed on public interface.
12455
12456         * report.cs (): Reviewed warning numbers.
12457         (IsValidWarning): Use binary search.
12458
12459 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12460  
12461         * driver.cs: Implemeted resource visibility.
12462         (Resources): New class for code sharing between /res: and
12463         /linkres:
12464  
12465 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12466
12467         Fix #76568.
12468         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12469         folding.
12470         
12471         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12472         contants only.
12473         
12474         * ecore.cs (NullCast): Child is contant only.
12475         
12476         * literal.cs (NullLiteral.Reduce): null can be converted to any
12477         reference type.
12478
12479 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12480
12481         * driver.cs: Use Encoding.Default as default code page instead
12482           of ISO-28591.
12483
12484 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12485
12486         Fix #76085.
12487         * expression.cs (Invocation.Error_InvalidArguments): Handle
12488         __arglist parameters.
12489         (Invocation.VerifyArgumentsCompat): Likewise.
12490         * support.cs (ReflectionParameters.GetSignatureForError): Print
12491         __arglist parameters.
12492         (InternalParamters.GetSignatureForError): Likewise.
12493         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12494
12495 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12496
12497         * attribute.cs (GetPropertyValue): Made public.
12498
12499         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12500         Resolve.
12501         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12502         attribute.
12503         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12504         is not defined.
12505         
12506         * driver.cs: Reflect method name change.
12507         
12508         * statement.cs (Try.Resolve): Warn when try has both general
12509         exception handlers.
12510         
12511         * typemanager.cs: runtime_compatibility_attr_type new predefined
12512         type.
12513
12514 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12515
12516         Fix #76419.
12517         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12518         treat it as an empty parameter list.
12519
12520 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12521
12522         Fix #76271.     
12523         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12524         ResolveAsTypeStep silent.
12525         * statement.cs (Block.AddConstant): Mark block as used.
12526         (Block.ResolveMeta): Avoid piling on error messages
12527         if a constant initializer resolution fails.
12528
12529 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12530
12531         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12532         Remove.
12533         (NamespaceEntry.VerifyAllUsing): New.
12534         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12535         behaviour.  Delegates actual resolution of alias to ...
12536         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12537         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12538         Update.
12539         * driver.cs (Driver.MainDriver): Update.
12540         
12541         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12542         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12543         property.
12544         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12545         Remove.
12546         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12547         RootNamespace.DefineNamespacesForAll.
12548
12549 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12550
12551         * typemanager.cs (assemblies, external_aliases, modules)
12552         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12553         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12554         overhead.  Move resposibility ...
12555         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12556         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12557
12558 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12559
12560         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12561         cached_namespaces.  Improve usage.
12562         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12563         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12564         Move from GlobalRootNamespace and simplify.
12565         (RootNamespace.Global): Make instance variable.
12566         (RootNamespace.RootNamespace): Add "alias name" parameter.
12567         (GlobalRootNamespace): Simplify drastically.
12568         (Namespace.Lookup): Don't use GetNamespace.
12569         * typemanager.cs (GetRootNamespace): Rename from
12570         ComputeNamespaceForAlias.
12571         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12572
12573 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12574
12575         * anonymous.cs (AnonymousContainer): Don't crash when container
12576         doesn't exist.
12577
12578 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12579
12580         * expression.cs (Binary.DoResolve): Warn when comparing same
12581         values.
12582
12583 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12584
12585         Fix #76486.
12586         * expression.cs (Binary.DoResolve): It looks like there are no
12587         convetsion rules in enum context.
12588
12589 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12590
12591         Add support for extern alias qualifiers.
12592         * typemanager.cs: Move some LookupTypeReflection code
12593         to namespace.cs, to have cleaner code. Added some methods
12594         to help us keep track of the extern aliased references.
12595         * driver.cs: Add suport for extern alias assemblies on command
12596         line and check for their warnings/errors. Also keep track of the
12597         extern aliased assemblies.
12598         * namespace.cs: Move the global functionality of Namespace
12599         to GlobalRootNamespace/RootNamespace. Now the global namespace
12600         is GlobalRootNamespace.Globa. Also the code moved from 
12601         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12602         Finally added LocalAliasEntry (AliasEntry before) and
12603         ExternAliasEntry, to handle alias statements.
12604         * cs-parser.jay: Add support in the grammar for extern alias
12605         statement.
12606         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12607         Update callings to Namespace (now in GlobalRootNamespace).
12608
12609 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12610
12611         Fix #76371.
12612         * class.cs (TypeContainer.DefineType): Move updating of
12613         topological sort earlier in the code.
12614         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12615
12616 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12617
12618         Fix #76273.
12619         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12620         
12621         * constant.cs (Constant.TryReduce): Moved from Cast class.
12622         (Reduce): Made little bit more OO and fixed missing conversions.
12623         
12624         * ecore.cs (Reduce): Implemented.
12625         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12626         
12627         * literal.cs (Reduce): Implemented.
12628         
12629         * class.cs: Reverted Miguel's wrong commit.
12630
12631 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12632
12633         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12634
12635 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12636
12637         * cs-parser.jay, expression.cs : CS0214 was missing error location
12638           for constants. Fixed bug #76404.
12639
12640 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12641
12642         Fix #76370.
12643         * convert.cs (ExplicitConversionCore): Fixed object->enum
12644         conversion.
12645
12646 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12647
12648         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12649         InstanceExpression.
12650         (PropertyExpr.EmitCall): Likewise.
12651         * expression.cs (Invocation.EmitArguments): Handle case where
12652         arguments == null.
12653         (Invocation.EmitCall): Avoid allocating temporary variable if
12654         there are no arguments.
12655
12656 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12657
12658         Fix #76323.
12659         * convert.cs (ImplicitConversionStandard): Move conversion of
12660         void* to arbitrary pointer types ...
12661         (ExplicitConversionStandard): .. here.
12662         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12663         error to always print typenames.
12664
12665 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12666
12667         * convert.cs (GetConversionOperator): Rename from
12668         GetConversionOperators.  Move operator selection code from ...
12669         (UserDefinedConversion): ... here.
12670
12671 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12672
12673         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12674         conversion.
12675
12676 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12677
12678         * assign.cs (Assign.DoResolve): Error method changed.
12679
12680         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12681         
12682         * const.cs (ResolveValue): Reset in_transit immediately.
12683         
12684         * constant.cs: Error method changed.
12685         
12686         * convert.cs: Removed useless location parameter.
12687         (ExplicitNumericConversion): Don't do double enum check.
12688         (ExplicitConversionCore): Renamed from ExplicitConversion.
12689         (ExplicitUnsafe): Extracted from ExplicitConversion.
12690         (ExplicitConversion): Uses for error reporting.
12691         
12692         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12693         error messages.
12694         (ResolveBoolean): Uses common error method.
12695         (CastToDecimal): Get rid of ec.
12696         (CastFromDecimal): Optimized.
12697         (ConvCast): Get rid of ec.
12698         
12699         * enum.cs (ResolveValue): Reset in_transit immediately.
12700         (Emit): Return after first error.
12701         
12702         * expression.cs: Convert changes.
12703         
12704         * literal.cs: Error method changed.
12705         
12706         * statement.cs: Error method changed.
12707
12708 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12709
12710         * support.cs (SeekableStreamReader.Position): Don't error out when
12711         the requested position is just beyond the end of the current
12712         buffered data.
12713
12714 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12715
12716         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12717         try to keep in sync with the byte count of the underlying Stream.
12718         However, this limits us to a window size of 2048 characters: i.e.,
12719         the maximum lookahead of our lexer/parser can be 2048 characters.
12720
12721 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12722
12723         Fix #76255.
12724         * driver.cs: Fix compilation files with full root path.
12725
12726 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12727
12728         * report.cs (SymbolRelatedToPreviousError): Format the output so
12729         it does not use an open parenthesis that is never closed. 
12730
12731         * driver.cs: Follow coding guidelines
12732
12733 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12734
12735         Fix #72930.
12736         * const.cs (Const.ResolveValue): Check for assigning non-null
12737         value to reference type.
12738
12739 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12740
12741         * anonymous.cs: Implemented ExprClassName.
12742         
12743         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12744         delegate.
12745         
12746         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12747         check.
12748         
12749         * class.cs (StaticClass.DefineContainerMembers): Report protected
12750         members as error.
12751         
12752         * codegen.cs: if(ed) PRODUCTION.
12753         
12754         * convert.cs (Error_CannotImplicitConversion): Better error
12755         distinction.
12756         
12757         * cs-parser.jay: More error checks.
12758         
12759         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12760         
12761         * driver.cs (CSCParseOption): Enabled wrong option check.
12762         
12763         * ecore.cs (Expression.ExprClassName): Turned to property.
12764         (MemberExpr.CheckIntermediateModification): For checking boxed
12765         value types     modification.
12766         
12767         * statement.cs (Fixed.Resolve): Expression type must be
12768         convertible to fixed type.
12769         (CollectionForeach.GetEnumeratorFilter,TryType):
12770         Small refactoring for easier error checking.
12771
12772 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12773
12774         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12775         attributes.
12776         
12777         * class.cs (GeneratedBaseInitializer): New class for customization
12778         compiler generated initializers.
12779         (MemberBase.DoDefine): Check Obsolete attribute here.
12780         (FieldMember.DoDefine): Ditto.
12781         
12782         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12783         constants.
12784         
12785         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12786         (MemberCore.GetObsoleteAttribute): Removed argument.
12787         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12788         (MemberCore.CheckObsoleteType): New helper.
12789         
12790         * delegate.cs,
12791         * enum.cs,
12792         * statement.cs: Updates after MemberCore changes.
12793         
12794         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12795         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12796         
12797         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12798         obsolete attribute for compiler construct.
12799         (As.DoResolve): Cache result.
12800         
12801         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12802
12803 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12804
12805         Fix #76133.
12806         * expression.cs (This.VerifyFixed): In a value type T, the type of
12807         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12808         value type R, 'this' is treated as a value parameter.
12809
12810 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12811
12812         * statement.cs (Lock): Use the TemporaryVariable class instead of
12813         manually using local variables as those do not work when variables
12814         are captured.
12815
12816         * ecore.cs: Moved the TemporaryVariable class from being a nested
12817         class inside Foreach to be a public class that can be employed in
12818         other places. 
12819
12820 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12821
12822         * cs-parser.jay: interface_accessors replaced by
12823         accessor_declarations.
12824
12825         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12826         location.
12827         
12828         * statement.cs (GotoCase.Resolve): Convert null constant to
12829         null case.
12830         (SwitchLabel.ResolveAndReduce): Ditto.
12831         (SwitchLabel.NullStringCase): Custom null stamp.
12832         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12833         
12834         typemanager.cs (CSharpSignature): Don't skip first argument
12835         for full names.
12836
12837 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12838
12839         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12840
12841         * location.cs (InEmacs): in this mode, do not report column
12842         location as it confuses Emacs.
12843
12844 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12845
12846         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12847         expression.cs, iterators.cs, literal.cs: Store constants and
12848         literals location.
12849         
12850         * class.cs (MemberBase.ShortName): Pass location.
12851         
12852         * cs-parser.jay: Some location fixes.
12853         
12854         * ecore.cs (Expression.Location): Made virtual.
12855
12856 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12857
12858         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12859         if the underlying types are the same, otherwise we need to produce
12860         code that will do the proper cast.
12861
12862         This was exposed by Marek's constant rewrite which produced
12863         invalid code for the call site:
12864
12865         enum X : long { a }
12866         void Method (X v) {}
12867
12868         Method ((X) 5)
12869
12870         This fixes test-49.cs
12871
12872 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12873
12874         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12875           Type/Object should be allowed as well. Fixed bug #75968.
12876
12877 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12878
12879         * expression.cs : (Binary.DoResolve): when one is enum constant and
12880           another is constant 0, then return enum one *as enum type*.
12881           Fixed bug 74846.
12882
12883 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12884
12885         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12886         internal.
12887
12888         Fix #75941.
12889         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12890         flow-branching for LocalVariableReferences in case we were invoked
12891         from a MemberAccess.
12892         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12893         Carved out of ...
12894         (LocalVariableReference.DoResolveBase): ... this.
12895         (MemberAccess.Resolve): Do the check that was disabled during
12896         SimpleNameResolve.
12897
12898 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12899
12900         * class.cs :
12901           (PartialContainer.Create): check abstract/sealed/static strictly
12902           but abstract/sealed can exist only at one side. Fixed bug #75883.
12903
12904 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12905
12906         Fix #75945.
12907         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12908         specified, don't default to UnmanagedType.I4.
12909
12910 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12911
12912         * expression.cs : conditional operator should check possibly
12913           incorrect assign expression. Fixed bug #75946.
12914
12915 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12916
12917         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12918           Reverting the change. gmcs is much complex than mcs on this matter.
12919
12920 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12921
12922         * cs-tokenizer.cs : To read another token ahead of the actual 
12923           consumption, use new SavedToken and cache token instead of moving
12924           back the stream with SeekableStreamReader (it seemed problematic).
12925         * cs-parser.jay,
12926           driver.cs : Thus use StreamReader directly.
12927         * support.cs : Thus removed SeekableStreamReader.
12928
12929 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12930
12931         Fix #75934.
12932         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12933         (ScopeInfo.EmitScopeType): Use it to construct field names from
12934         names of captured locals.
12935
12936         Fix #75929.
12937         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12938         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12939         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12940         (ExplicitConversion): Remove enum cases already handled by
12941         implicit conversion.  Move implicit conversion check to the beginning.
12942         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12943         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12944         Don't treat System.Enum as a struct.
12945
12946 2005-08-30  Jb Evain  <jbevain@gmail.com>
12947
12948         * attribute.cs: handles as expression in parameters.
12949
12950 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12951
12952         Fix #75802.
12953         * class.cs (TypeContainer.VerifyClsName): Don't use a
12954         PartialContainer when verifying CLS compliance.
12955         (AbstractPropertyEventMethod): Set Parent here, ...
12956         (PropertyMethod): ... not here.
12957
12958 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12959
12960         * attribute.cs : escaped attribute name should not be allowed to be
12961           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12962
12963 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12964
12965         Fix #75927.
12966         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12967         when converting a long constant to unsigned long.
12968         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12969         detect where IsApplicable and VerifyArgumentsCompat disagree.
12970
12971 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12972         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12973
12974         Fix #75848.
12975         * class.cs (TypeContainer.CanElideInitializer): New helper.
12976         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12977         can safely emitting the initializer of a field.
12978
12979 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12980
12981         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12982           allowed inside a switch (without loop). Fixed bug #75433.
12983
12984 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12985
12986         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12987         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12988
12989 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12990
12991         * driver.cs : kinda reverting the default encoding changes (not exact 
12992           revert since I noticed that "codepage:reset" might not work fine).
12993
12994 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12995
12996         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12997           Location. Now getter and setter store location correctly.
12998           (errors/cs0111-12.cs now reports the expected location.)
12999
13000 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
13001
13002         * driver.cs : Use default encoding on the environment.
13003           Removed (now that) extra parameter for SeekableStreamReader.
13004         * support.cs : (SeekableStreamReader) third .ctor() argument for
13005           StreamReader is not required (always true). preamble size could
13006           be acquired in simpler and safe way.
13007
13008 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
13009
13010         * cs-parser.jay: report CS0642 at warning level 3
13011           and report CS0642 for an if else statement also
13012           fixes bug #74745. Patch by John Luke (and a bit
13013           modified by me).
13014           Removed extra CS0642 warning check for "while",
13015           "for" and "fixed".
13016         * statement.cs: In Block.Resolve(), CS0642 check
13017           is reimplemented to check a sequence of an empty
13018           statement and a block.
13019
13020           Both fix bug #66777.
13021
13022 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
13023
13024         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
13025         detection until I fix it.
13026         
13027         * cs-tokenizer.cs: Changed error message.
13028         
13029         * cs-parser.jay: Fixed 2 error locations.
13030         
13031         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
13032         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
13033         properties.
13034         
13035         * enum.cs (GetSignatureForError): Fixed.
13036         
13037         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
13038         method detection.
13039         
13040         * class.cs,
13041         * typemanager.cs (RegisterProperty): Removed.
13042         
13043         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
13044
13045 2005-08-24  Raja R Harinath  <rharinath@novell.com>
13046
13047         Fix #75874.
13048         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
13049         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
13050
13051 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13052
13053         * expression.cs : tiny fix is required for not warning positive ulong.
13054           See test-441.cs.
13055
13056 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13057
13058         * expression.cs : add CS0652 check for constant and integral
13059           expression. Fixed bug #53974.
13060
13061 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13062
13063         * expression.cs : in DoNumericPromotions(), check if there is implicit
13064           conversion overload for string (to check CS0034). Fixed bug #52492.
13065
13066 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13067
13068         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
13069
13070 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13071
13072         * ecore.cs : report location when it is *not* Null.
13073
13074 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13075
13076         * codegen.cs,
13077           ecore.cs,
13078           flowanalysis.cs,
13079           expression.cs:
13080           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
13081           correctly. Fixed bug #75721.
13082
13083 2005-08-23  Raja R Harinath  <rharinath@novell.com>
13084
13085         * support.cs (SeekableStreamReader.Position): Avoid an expensive
13086         loop that performs 'min (pos, char_count)'.
13087
13088         Fix #75862.
13089         * expression.cs (Unary.ResolveOperator): Don't discard implicit
13090         converted value in Operator.OnesComplement.
13091
13092 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
13093
13094         * anonymous.cs: If the anon method is pulled into a helper class,
13095         it needs to be `internal' not `private'. Fixes runtime behavior on
13096         msft. bug #75704
13097
13098 2005-08-20  Martin Baulig  <martin@ximian.com>
13099
13100         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
13101         scope if we don't already have it.
13102
13103         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
13104         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
13105         fixes #75867.
13106
13107 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
13108
13109         Fix #75803
13110         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
13111         is a partial class.
13112
13113 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
13114
13115         The big constants rewrite
13116         Fix #75746, #75685 and more
13117         As a side effect saved 1MB for MWF ;-)
13118         
13119         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
13120         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
13121         enum based for corlib compilation.
13122         
13123         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
13124         subtractions.
13125         
13126         * class.cs (FixedField.Define): Use ResolveAsConstant.
13127         
13128         * const.cs (IConstant): Interface constants and enums.
13129         (Const.ResolveValue): New method for constant resolvning.
13130         (ExternalConstant): Constants from imported assemblies.
13131         
13132         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
13133         conversion; like enums.
13134         (Constant.ToType): Converts this constant to different type.
13135         (Constant.Increment): Adds 1.
13136         
13137         * convert.cs (ImplicitConversionRequired): Simplified.
13138         
13139         * cs-parser.jay: Create EnumMember directly.
13140         
13141         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
13142         
13143         * doc.cs (GenerateEnumDocComment): Removed.
13144         
13145         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
13146         (ConvertIntLiteral): Removed.
13147         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
13148         
13149         * enum.cs (EnumMember): Implement IConstant.
13150         (Enum.IsValidEnumConstant): Removed.
13151         (Enum.GetNextDefaultValue): Removed.
13152         (Enum.FindMembers): Updated.
13153         (Enum.GenerateDocComment): Iterate enum members.
13154         
13155         * expression.cs (Cast.TryReduce): Handle enums correctly.
13156         (New.Constantify): Made public.
13157         (MemberAccess.DoResolve): Removed contant specific if(s).
13158         
13159         * literal.cs (NullLiteral): Implement new abstract methods.
13160         
13161         * statement.cs (GotoCase.Resolve): Use new constant methods.
13162         (SwitchLabel.ResolveAndReduce): Use new constant methods.
13163         
13164         * typemanager.cs (LookupEnum): Removed.
13165         (IsEnumType): Fixed to work with corlib.
13166         (RegisterConstant): Removed.
13167         (LookupConstant): Removed.
13168         (GetConstant): Changed to work with IConstant.
13169
13170 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
13171
13172         * location.cs : Fixed overflown (>255) column number.
13173
13174 2005-08-03  Raja R Harinath  <rharinath@novell.com>
13175
13176         First cut of the qualified-alias-member feature.
13177         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
13178         token.
13179         * cs-parser.jay (DOUBLE_COLON): New token.
13180         (namespace_or_type_name): Add rule for recognizing
13181         qualified-alias-members.
13182         (primary_expression): Likewise.
13183         (element_access): Allow QualifiedAliasMember as a possible
13184         type-bearing expression.
13185         (local_variable_type, local_variable_pointer_type): Likewise.
13186         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
13187         aliases in the current and enclosing namespace declarations.
13188         (NamespaceEntry.UsingAlias): Add CS0440 warning.
13189         * decl.cs (MemberName.is_double_colon): New.
13190         (MemberName.MemberName): Add new constructor for alias-member.
13191         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
13192         * expression.cs (QualifiedAliasMember): New expression type.
13193
13194 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13195
13196         * location.cs : it borked when no argument was specified.
13197
13198 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13199
13200         * location.cs : tiny ToString() format fix.
13201
13202 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13203
13204         * statement.cs : oops, it was missing.
13205
13206 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13207
13208         A set of fixes for precise line/column location.
13209
13210         * location.cs :
13211           "token" field now holds a file/line "delta", a line number offset 
13212           from the segment, and a column number. See also:
13213           http://lists.ximian.com/pipermail/mono-devel-list/2004-
13214           December/009508.html
13215           Removed static IsNull. Use instance IsNull property instead.
13216         * cs-tokenizer.cs :
13217           For some tokens it stores Location. For Identifier it stores
13218           LocatedToken which is a pair of string name and location.
13219           Column numbers are adjusted only at getChar().
13220         * report.cs :
13221           Use Location.ToString() for reporting (it now contains column).
13222         * cs-parser.jay :
13223           Largely modified to use LocatedToken instead of
13224           string (IDENTIFIER), and to acquire Location from some tokens.
13225         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
13226           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
13227           codegen.cs :
13228           Now MemberName holds Location. DeclSpace.ctor() receives Location
13229           as a parameter. Removed extra parameters to all derived classes.
13230           Replaced Location.IsNull() with instance property.
13231         * assign.cs, expression.cs :
13232           Added .ctor() overload that omits Location.
13233         * attribute.cs :
13234           Added "nameEscaped" flag that indicates the identifier was escaped
13235           in the source file. This fixes bug #57047.
13236
13237 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
13238
13239         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
13240         New method, looking for lo-case imported cls type.
13241
13242         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
13243         here.
13244
13245         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
13246
13247         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
13248
13249         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
13250         all_imported_types.
13251         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
13252
13253         Optimized to save 3.5 MB for SWF compilation.
13254
13255 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13256
13257         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
13258         (PartialContainer.Create): Moved logic AddToContainer.
13259         (PartialContainer.MarkForDuplicationCheck): Shares name.
13260         
13261         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
13262         place.
13263         
13264         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
13265         initialization.
13266         (Namespace.GetSignatureForError): New method.
13267         
13268         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
13269         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
13270
13271 2005-08-01  Raja R Harinath  <rharinath@novell.com>
13272
13273         Fix #75669.
13274         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
13275         member lookup rather than qualifier_type, since qualifier_type can
13276         be null.
13277
13278 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13279
13280         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
13281         enum member.
13282
13283 2005-07-31  Miguel de Icaza  <miguel@novell.com>
13284
13285         * statement.cs: Copy the local exception into the exception
13286         captured local.  Fixes 75674
13287
13288 2005-07-31  Raja R Harinath  <harinath@gmail.com>
13289
13290         Fix #75658.
13291         * expression.cs (Invocation.OverloadResolve): Don't report error
13292         CS1501 if error CS1502 has been reported.
13293         (New.DoResolve): Delegate CS1501 reporting to
13294         Invocation.OverloadResolve.
13295
13296         Fix #75656.
13297         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
13298         invariant-meaning-in-block property in an enclosing block if
13299         necessary.
13300
13301 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
13302
13303         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
13304         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
13305         (Switch.CheckSwitch): Just save 50kb for SWF.
13306
13307 2005-07-27  Martin Baulig  <martin@ximian.com>
13308
13309         * anonymous.cs (CaptureContext.AddField): Added
13310         `AnonymousContainer am' argument; compute its toplevel scope if
13311         it's not already computed.  Fixes #75649.
13312
13313 2005-07-26  Raja R Harinath  <rharinath@novell.com>
13314
13315         Fix #75628.
13316         * class.cs (Constructor.Emit): Reset block to null if the block
13317         resolve fails.
13318
13319 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13320
13321         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
13322
13323 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13324
13325         * class.cs (MethodData.Define): Check whether accessor implementing
13326         interface is public.
13327
13328         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
13329
13330 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
13331
13332         Fix #57245
13333         * namespace.cs (LookupType): Moved same type check to...
13334         
13335         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
13336         with the same name.
13337
13338 2005-07-21  Raja R Harinath  <rharinath@novell.com>
13339
13340         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
13341         already found a typebuilder.
13342         * class.cs (MethodCore.IsDuplicateImplementation): Compare
13343         MemberNames, not strings.
13344
13345         * const.cs (Error_ExpressionMustBeConst): 
13346         Rename from Error_EpressionMustBeConst.
13347         * const.cs, class.cs, statement.cd: Update.
13348
13349 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
13350
13351         Fix #65573
13352
13353         * const.cs (Const.LookupConstantValue): Report missing contant expression
13354         everytime.
13355         (Error_EpressionMustBeConstant): Only one error method.
13356
13357         * class.cs, statement.c: Updated.
13358
13359 2005-07-20  Raja R Harinath  <rharinath@novell.com>
13360
13361         * statement.cs (Block.Flags): Add back HasVarargs.
13362         (Block.flags): Make protected.
13363         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
13364
13365         * typemanager.cs (types, typecontainers, user_types): Remove.
13366         (UserTypes, TypeContainers): Likewise.
13367         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
13368         (CleanUp, Reset): Update.
13369         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
13370         (GetNestedType): Use Type.GetNestedType.
13371         (CoreLookupType): Take two arguments, the namespace and the
13372         basename of the type.  Update to use the Namespace.Lookup
13373         mechanism.
13374         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
13375         (RealMemberLookup): Use IsNestedChildOf instead of playing with
13376         string concatenation and substring matches.
13377         * class.cs, enum.cs, delegate.cs: Update to changes.
13378
13379 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
13380
13381         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
13382         Expression and made virtual.
13383
13384         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
13385         (ImplicitStandardConversionExists): Fixed `byte' typo ?
13386
13387         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
13388
13389         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
13390         error message.
13391
13392         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
13393         change.
13394
13395 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
13396
13397         Fix #57707
13398         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
13399         AssemblyCultureAttribute is not used on executable.
13400
13401         * rootcontext.cs,
13402         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
13403
13404 2005-07-16  Raja R Harinath  <rharinath@novell.com>
13405
13406         Fix #60638.
13407         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
13408         New.  Reports CS0252/CS0253.
13409         Mostly taken from preliminary patch by Duncak Mak.
13410         (Binary.DoResolveOperator): Store results of operator lookup.
13411         Use them to detect if we need to warn about unintended reference
13412         comparisons.
13413
13414 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13415
13416         Fix #72969.
13417         * namespace.cs (Namespace.Lookup): Add back location parameter.
13418         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13419         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13420
13421         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13422         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13423         (Namespace.LookupType): ... this.
13424         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13425         of namespaces.
13426         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13427         purported to handle pointers.
13428         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13429         CoreLookupType.
13430
13431 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13432
13433         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13434         type as namespace.
13435
13436 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13437
13438         * namespace.cs (Namespace.Lookup): Drop location parameter.
13439         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13440         (NamespaceEntry.Lookup): ... this.
13441         (NamespaceEntry.Error_AmbiguousTypeReference):
13442         Move here from DeclSpace.
13443         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13444         names ...
13445         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13446         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13447         Move to NamespaceEntry.
13448         * delegate.cs, expression.cs: Update to changes.
13449
13450 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13451
13452         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13453         CheckAttributeType and refactored.
13454         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13455         ResolveAsTypeTerminal error handling.
13456         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13457         handling.
13458         (GetSignatureForError): Print errors in same way.
13459
13460         * class.cs,
13461         * codegen.cs: Reflect attribute GetSignatureForError change.
13462
13463         * ecore.cs,
13464         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13465
13466         * namespace.cs (UsingEntry): Refactored to make fields private.
13467
13468         * assign.cs,
13469         statement.cs: Error_UnexpectedKind has extra parameter.
13470
13471 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13472
13473         * ecore.cs (IAlias): Remove.
13474         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13475         that implement the interface.
13476         * namespace.cs (Namespace): Likewise.
13477         (Namespace.declspaces): Renamed from 'defined_names'.
13478         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13479         DeclSpace instead of an IAlias.
13480         * tree.cs (Tree.AddDecl): Update.
13481
13482 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13483
13484         * statement.cs (Block.Flags); Remove HasVarargs.
13485         (Block.HasVarargs): Move to ToplevelBlock.
13486         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13487         (Block.Variables): Make protected.  Initialize variable hashtable
13488         if necessary.
13489         (Block.AddVariable): Update.
13490         (Block.Resolve): Update to changes.
13491         (ToplevelBlock.HasVarargs): New boolean.
13492         (ToplevelBlock.ThisVariable): Move here from Block.
13493         (ToplevelBlock.AddThisVariable): Likewise.
13494         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13495         * expression.cs (This.ResolveBase): Update to changes.
13496         (ArglistAccess.DoResolve): Likewise.
13497
13498 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13499
13500         Fix #75321
13501         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13502
13503         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13504         not used and not used & assigned.
13505         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13506
13507 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13508
13509         Fix #75053
13510         * expression.cs (Is.DoResolve): null is never provided type.
13511
13512 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13513
13514         Fix #52496
13515         * cs-parser.jay: Less strict event error rule to catch more errors.
13516
13517 2005-07-08  Martin Baulig  <martin@ximian.com>
13518
13519         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13520         gettter (allowed) or setter (not allowed).
13521
13522         * class.cs (Accessor): Implement IIteratorContainer.
13523         (Accessor.Yields): New public field.
13524         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13525         per-accessor basis.
13526
13527         * cs-parser.jay
13528         (get_accessor_declaration, set_accessor_declaration): Set the
13529         `yields' flag on the accessor, not the property.
13530         (property_declaration): Do the iterators check on a per-accessor
13531         basis and not for the whole property.
13532
13533 2005-07-08  Martin Baulig  <martin@ximian.com>
13534
13535         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13536         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13537
13538 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13539
13540         Fix #74975
13541         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13542         (ExtractSecurityPermissionSet): Cope with self referencing security
13543         attributes properly.
13544
13545         * driver.cs (SetOutputFile): Made public property OutputFile.
13546
13547 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13548
13549         Fix #75486.
13550         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13551         has_nonstatic_fields.  Make into a FieldBase pointer.
13552         (TypeContainer.AddField): Add CS0282 check.
13553         (TypeContainer.EmitType): Update.
13554
13555 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13556
13557         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13558         compare if they start with __.
13559
13560 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13561
13562         * statement.cs (Switch.SwitchGoverningType): Only look at
13563         UserCasts that don't need implicit standard conversions to one of
13564         the allowed switch types (Fixes test-322.cs).
13565         (LocalInfo.Resolve): Re-enable sanity-test.
13566
13567 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13568
13569         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13570         
13571         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13572         
13573         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13574
13575 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13576
13577         Fix #75472.
13578         * ecore.cs (SimpleName.GetSignatureForError): Add.
13579         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13580         (MemberAccess.GetSignatureForError): Add.
13581
13582 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13583  
13584         The big error and warning messages review.
13585         
13586         * anonymous.cs,
13587         * assign.cs,
13588         * attribute.cs,
13589         * class.cs,
13590         * codegen.cs,
13591         * convert.cs,
13592         * cs-parser.jay,
13593         * cs-tokenizer.cs,
13594         * decl.cs,
13595         * delegate.cs,
13596         * doc.cs,
13597         * driver.cs,
13598         * ecore.cs,
13599         * enum.cs,
13600         * expression.cs,
13601         * flowanalysis.cs,
13602         * iterators.cs,
13603         * literal.cs,
13604         * location.cs,
13605         * modifiers.cs,
13606         * namespace.cs,
13607         * parameter.cs,
13608         * pending.cs,
13609         * report.cs,
13610         * rootcontext.cs,
13611         * statement.cs,
13612         * support.cs,
13613         * tree.cs,
13614         * typemanager.cs: Updated.
13615         
13616         * class.cs: (MethodCore.SetYields): Moved here to share.
13617         (PropertyMethod.Define): Moved iterator setup here.
13618         
13619         * iterators.cs: Add orig_method to have full access to parent
13620         container.
13621
13622 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13623
13624         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13625         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13626         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13627         variable of struct type.
13628         * expression.cs (Unary.ResolveOperator): Update to change.
13629         (Indirection.VerifyFixed): Likewise.
13630         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13631         (ParameterReference.VerifyFixed): Value parameters are fixed.
13632         (This.VerifyFixed): Treat 'this' as a value parameter.
13633         * statement.cs (LocalInfo.IsFixed): Remove.
13634
13635 2005-07-01  Martin Baulig  <martin@ximian.com>
13636
13637         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13638         `ec.EmitThis ()' to get the correct scope.
13639
13640 2005-07-01  Martin Baulig  <martin@ximian.com>
13641
13642         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13643         instance is a ParameterReference; fixes #75299.
13644
13645 2005-07-01  Martin Baulig  <martin@ximian.com>
13646
13647         Reverted Marek's latest patch (r46725):
13648         - it contains structural changes which are neither mentioned in
13649           the ChangeLog nor explained anywhere; for example the additional
13650           argument of EmitContext's and Iterator's .ctor's and the
13651           TypeContainer.DefineMembers() change.
13652         - structural changes like this should go in in seperate patches
13653           and not be hidden in a huge patch which just seems to affect
13654           warnings and errors.
13655           a big and hard to understand patch.
13656         - it breaks iterators and causes regressions, for instance in
13657           test-iter-03.cs.      
13658
13659 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13660
13661         Fix #75412.
13662         * expression.cs (Indexers.map): Remove.
13663         (Indexers.Append): Filter out inaccessible setters and getters.
13664         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13665
13666         Fix #75283.
13667         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13668         Refactored from ...
13669         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13670         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13671         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13672         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13673
13674 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13675
13676         Fix #75322
13677         * class.cs (FieldBase.GetInitializerExpression): One more field
13678         for backup.
13679
13680 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13681
13682         * pending.cs: Do not define a proxy if the base method is virtual,
13683         it will be picked up by the runtime (bug 75270).
13684
13685 2005-06-08  Martin Baulig  <martin@ximian.com>
13686
13687         The big Iterators rewrite :-)
13688
13689         * iterators.cs: Rewrite this to use the anonymous methods framework.
13690
13691         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13692         before the TypeContainers; see 2test-21.cs.
13693
13694         * class.cs
13695         (TypeContainer.DefineType): Don't create a new EmitContext if we
13696         already have one (this only happens if we're an Iterator).
13697         (TypeContainer.Define): Also call Define() on all our iterators.
13698         (Method.CreateEmitContext): Added support for iterators.
13699
13700         * anonymous.cs
13701         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13702         (AnonymousContainer.CreateMethodHost): Moved here from
13703         AnonymousMethod and made abstract.
13704         (AnonymousContainer.CreateScopeType): New abstract method.
13705         (AnonymousContainer.IsIterator): New public property.
13706         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13707         get the ScopeTypeBuilder rather than manually defining it here. 
13708         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13709         iterators here.
13710
13711         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13712         before RootContext.DefineTypes().
13713
13714         * codegen.cs (EmitContext.RemapToProxy): Removed.
13715         (EmitContext.CurrentAnonymousMethod): Changed type from
13716         AnonymousMethod -> AnonymousContainer.
13717         (EmitContext.ResolveTopBlock): Protect from being called twice.
13718         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13719         (EmitContext.EmitThis): Removed the iterators hacks; use the
13720         anonymous methods framework for that.
13721
13722         * statement.cs
13723         (ToplevelBlock.Container): Make this a property, not a field.
13724         (ToplevelBlock.ReParent): New public method; move the
13725         ToplevelBlock into a new container.
13726         (Foreach.TemporaryVariable): Simplify.
13727
13728 2005-06-05  Martin Baulig  <martin@ximian.com>
13729
13730         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13731         (Block.AddTemporaryVariable): New public method; creates a new
13732         `LocalInfo' for a temporary variable.
13733         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13734         variables here.
13735         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13736         non-iterator variables.
13737
13738 2005-06-05  Martin Baulig  <martin@ximian.com>
13739
13740         * statement.cs (Foreach.TemporaryVariable): Create the
13741         LocalBuilder in the Emit phase and not in Resolve since in some
13742         situations, we don't have an ILGenerator during Resolve; see
13743         2test-19.cs for an example.
13744
13745 2005-06-04  Martin Baulig  <martin@ximian.com>
13746
13747         **** Merged r45395 from GCS ****
13748
13749         The big Foreach rewrite - Part II.
13750
13751         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13752         with `PropertyInfo ienumerator_getcurrent'.
13753
13754         * codegen.cs (VariableStorage): Removed.
13755
13756         * statement.cs
13757         (Foreach): Derive from Statement, not ExceptionStatement.
13758         (Foreach.CollectionForeach): New nested class.  Moved all the code
13759         dealing with collection foreach here.
13760         (Foreach.ForeachHelperMethods): Removed.
13761         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13762
13763 2005-05-23  Martin Baulig  <martin@ximian.com>
13764
13765         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13766         don't need to.  Fix #75014.
13767
13768 2005-05-20  Martin Baulig  <martin@ximian.com>
13769
13770         Merged r44808 from GMCS.
13771
13772         * class.cs (TypeContainer.CircularDepException): Removed.
13773         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13774         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13775         (CS0146) and interface (CS0529) dependencies here.
13776
13777 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13778
13779         * expression.cs (Invocation.EmitCall): Fix initialization
13780         'this_call' to reflect current behaviour.  Fix indentation.
13781
13782         * convert.cs (FindMostEncompassedType): Add two trivial special
13783         cases (number_of_types == 0 || number_of_types == 1).
13784         (FindMostEncompasingType): Likewise.
13785
13786 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13787
13788         Some cleanups preparing for the fix of #75283.
13789         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13790         error testing.
13791         (EventExpr.InstanceResolve): Likewise.
13792         (EventExpr.DoResolve): Remove redundant checks.
13793
13794 2005-06-10  Duncan Mak  <duncan@novell.com>
13795
13796         * cs-tokenizer.cs (process_directives): New flag for controlling
13797         the processing of preprocessor directives.
13798         (x_token): After seeing a '#', return Token.NONE instead of going
13799         to handle_preprocessing_directive() when not processing
13800         directives. This avoids unnecessary processing during the token peek in
13801         is_punct().
13802
13803         This fixes #74939.
13804
13805         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13806         the existing error reporting methods instead of Report.Error.
13807
13808         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13809         after Raja's rewrite.
13810
13811 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13812
13813         * class.cs: Small fix.
13814
13815 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13816
13817         Fix #75160.
13818         * class.cs (GetPartialBases): Fix return value check of
13819         part.GetClassBases.
13820
13821 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13822
13823         Ensure that partial classes are registered in their enclosing
13824         namespace.  Initial part of fix of #75160.
13825         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13826         Register declspace with namespace here, not in
13827         DeclSpace.RecordDecl.
13828         * cs-parser.jay: Pass namespace to RecordDecl.
13829         * class.cs (PartialContainer.Create): Likewise.
13830         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13831         called.
13832         * decl.cs (Declspace.RecordDecl): Remove.
13833         * namespace.cs (NamespaceEntry.DefineName): Remove.
13834
13835 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13836
13837         * rootcontext.cs: Reset TargetExt as well.
13838
13839 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13840
13841         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13842         -langversion:ISO-1.
13843
13844 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13845
13846         Fix #75080, cs0119.cs.
13847         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13848         of ...
13849         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13850         allowing ExprClass.Type and ExprClass.Namespace for
13851         ResolveFlags.VariableOrValue.
13852         (Expression.Resolve) [1-argument variant]: Change default resolve
13853         flags based on language version.
13854         (Expression.Error_UnexpectedKind): Use a simple string array
13855         rather than an ArrayList.
13856         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13857         not ExprClass.Type.
13858         (TypeOfVoid.DoResolve): Likewise.
13859         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13860         flags argument -- it always has the same value.
13861
13862 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13863
13864         Fix #75081.
13865         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13866         Use it in the error message.
13867         * assign.cs, expression.cs, statement.cs: Update.
13868
13869 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13870
13871         Fix #75088.
13872         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13873         the "almostMatchedMember" case too.
13874         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13875         that failed the accessibility checks to 'almost_match'.
13876
13877 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13878
13879         * attribute.cs: Use internal MethodBuilder methods to set
13880         ExactSpelling and SetLastError on PInvoke methods, instead
13881         of passing them via charset.  Fixes #75060.
13882
13883 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13884
13885         * parameter.cs (Parameter): Remove TODO comment.
13886         (Parameter.DefineParameter): Remove Location parameter.
13887         (Parameters.LabelParameters): Likewise.
13888         * class.cs (Constructor.Emit): Update to change.
13889         (MethodData.Emit): Likewise.
13890         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13891         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13892
13893 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13894
13895         * parameter.cs,
13896           Removed Parameters.Location and added Parameter.Location instead.
13897           Removed Location parameter from Emit() and GetSignature().
13898         * anonymous.cs,
13899           class.cs,
13900           cs-parser.jay,
13901           delegate.cs,
13902           iterators.cs,
13903           statement.cs :
13904           Modified all related calls.
13905
13906 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13907
13908         Improve user-defined conversion handling.
13909         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13910         applicable operators.
13911         (AddConversionOperators): New.  Helper for GetConversionOperators.
13912         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13913         there is only one most encompassed/encompassing type.
13914         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13915         "applicable operator" handling.
13916         (UserConversion): Move cache here from GetConversionOperators.
13917         Directly cache the chosen operator, rather than the whole
13918         MethodGroup.
13919         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13920         case.  Allow conversion of decimal to sbyte and byte too.
13921         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13922         New static methods.  Used to avoid allocating EmptyExpressions in
13923         convert.cs.
13924
13925 2005-05-24  Duncan Mak  <duncan@novell.com>
13926
13927         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13928         another class, used in Convert.ExplicitNumericConversion.
13929         (CastToDecimal): New class, similar to above, but casts to
13930         System.Decimal, used in Convert.ImplicitNumericConversion and also
13931         in explicit convesion from double/float to decimal.
13932
13933         * convert.cs (ImplicitNumericConversion): Handle implicit
13934         conversions to System.Decimal.
13935         (ExplicitNumericConversion): handle explicit conversions to
13936         System.Decimal.
13937
13938         This fixes #68711.
13939         
13940 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13941
13942         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13943         know the type at this stage, just break through.   Fixes #75008 
13944
13945 2005-05-19  Martin Baulig  <martin@ximian.com>
13946
13947         * delegate.cs
13948         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13949         to disable error reporting.
13950
13951         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13952         here since we don't want to report an error; see the new test-336.cs.
13953
13954 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13955
13956         * statement.cs (ToplevelBlock.GetParameterReference)
13957         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13958         Move here from class Block.
13959         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13960         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13961
13962 2005-05-18  Martin Baulig  <martin@ximian.com>
13963
13964         Fix #74978.
13965
13966         * flowanalysis.cs
13967         (FlowBranching.Reachability): Add non-static public And() and Or()
13968         methods.
13969         (FlowBranchingSwitch): New class; do the `break_origins' thing
13970         like in FlowBranchingLoop.
13971         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13972         reachability, not just locals and parameters.
13973         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13974         switch; MergeBreakOrigins() now takes care of that.
13975
13976 2005-05-18  Martin Baulig  <martin@ximian.com>
13977
13978         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13979         a loop and may leave it, reset the barrier; fixes #74974.
13980
13981 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13982         
13983         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13984         is back.
13985         
13986         * cs-parser.jay: Catch more lexical errors.
13987         
13988         * report.cs: Add one more Error method.
13989         
13990         * rootcontext.cs,
13991         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13992
13993 2005-05-17  Martin Baulig  <martin@ximian.com>
13994
13995         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13996         #70970. 
13997
13998 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13999
14000         Fix test-382.cs.  Emit values of decimal constants.
14001         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
14002         Carved out of ...
14003         (TypeContainer.AddField): ... this.
14004         (TypeContainer.EmitFieldInitializers): Allow the list of fields
14005         with initializers to include 'Const's.
14006         (ClassPart.RegisterFieldForInitialization): Forward to
14007         PartialContainer.
14008         * const.cs (Const.Const): Pass initializer to base class.
14009         (Const.Define): In case of decimal constants, register them for
14010         initialization in a static constructor.
14011
14012 2005-05-14  Martin Baulig  <martin@ximian.com>
14013
14014         * statement.cs (Block.Resolve): Correctly handle unreachable code;
14015         do not call ResolveUnreachable() on unreachable statements in
14016         here, see the comment in the source code.
14017
14018 2005-05-13  Raja R Harinath  <rharinath@novell.com>
14019
14020         Fix #74934.
14021         * expression.cs (BinaryResolveOperator): If one of the operands of
14022         an equality comparison is 'null' and the other is a pointer type,
14023         convert the null to a NullPointer.
14024         * convert.cs (ImplicitReferenceConversion): If the expression is a
14025         NullLiteral and the target type is a pointer type, return a
14026         NullPointer instead.
14027         (ImplicitConversionStandard): Likewise.
14028
14029 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
14030         
14031         * cs-parser.jay: Set readonly context based on special constructs.
14032         
14033         * expression.cs (LocalVariableReference.DoResolveBase): Improved
14034         readonly variable error handling.
14035         
14036         * rootcontext.cs (EmitCode): Don't verify members when error
14037         occurred.
14038         
14039         * statement.cs (LocalInfo): Add reaodnly context information.
14040         (SetReadOnlyContext, GetReadOnlyContext): New methods.
14041
14042 2005-05-13  Raja R Harinath  <rharinath@novell.com>
14043
14044         * statement.cs (Block.Resolve): Revert change below.  Modify fix
14045         for #74041 to initialize 'resolved' to false only for explicit
14046         blocks.  Fixes #74873.
14047
14048 2005-05-12  Raja R Harinath  <harinath@gmail.com>
14049
14050         Fix #74920.
14051         * typemanager.cs (unmanaged_enclosing_types): New.
14052         (IsUnmanagedType): Avoid infloops by using
14053         'unmanaged_enclosing_types' to talk with recursive invocations.
14054
14055 2005-05-13  Martin Baulig  <martin@ximian.com>
14056
14057         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
14058         instance variable, not a local.  Fix #74873.
14059         (Block.ResolveUnreachable): Set it to true here.
14060
14061 2005-05-11  Duncan Mak  <duncan@novell.com>
14062
14063         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
14064         continuing to process for 'arg'.
14065         (handle_preprocessing_directive): Check the argument of the #endif
14066         directive and report error CS1025 if there are any trailing
14067         characters.
14068
14069         According to the C# spec, having even whitespace after the #endif
14070         directive is illegal; however, because we call arg.TrimEnd ()
14071         beforehand, we have the same behavior as csc, allowing whitespace
14072         after the directive.
14073
14074         Fixes #74892.
14075
14076 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
14077
14078         Fix #74863.
14079         
14080         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
14081         (Constructor.GetObsoleteAttribute): Implemented correctly.
14082
14083 2005-05-10  Martin Baulig  <martin@ximian.com>
14084
14085         * support.cs (ReflectionParameters.ParameterModifier): Use
14086         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
14087         and `ParameterAttributes.In'.  Fixes #74884.
14088
14089 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
14090
14091         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
14092         
14093         * expression.cs (Argument.GetParameterModifier): Turned to property.
14094         (Invocation.Error_InvalidArguments): Add more descriptive errors.
14095         
14096         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
14097         its C# equivalent.
14098         
14099 2005-05-09  Raja R Harinath  <rharinath@novell.com>
14100
14101         Fix #74852.
14102         * decl.cs (MemberCache.AddMethods): Register override methods,
14103         rather than non-override methods.
14104         * typemanager.cs (RegisterOverride): New.
14105         (IsOverride): Update.
14106
14107 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
14108
14109         Fix #73105.
14110         
14111         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
14112         recursive declaration.
14113         
14114         * statement.cs (Block.ResolveMeta): Report any error in resolving.
14115         
14116 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
14117
14118         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
14119         
14120         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
14121
14122 2005-05-05  Raja R Harinath  <rharinath@novell.com>
14123
14124         Fix #74797.
14125         * decl.cs (DeclSpace.FamilyAccessible): 
14126         Use TypeManager.IsNestedFamilyAccessible.
14127
14128         Fix reopened #64812.
14129         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
14130         internal'.
14131
14132 2005-05-04  Raja R Harinath  <rharinath@novell.com>
14133             Abin Thomas  <projectmonokochi@rediffmail.com>
14134             Anoob V E  <projectmonokochi@rediffmail.com>
14135             Harilal P R  <projectmonokochi@rediffmail.com>
14136
14137         Fix #64812.
14138         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
14139         allow access to all static members.
14140
14141 2005-05-04  Martin Baulig  <martin@ximian.com>
14142
14143         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
14144
14145 2005-05-04  Martin Baulig  <martin@ximian.com>
14146
14147         Fix #74655.
14148
14149         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
14150         section at the end; make things work if `default' is not the last
14151         section.        
14152
14153 2005-05-04  Martin Baulig  <martin@ximian.com>
14154
14155         Fix #70400.
14156
14157         * statement.cs (Switch): Replaced the `got_default' field with a
14158         `default_section' one.
14159         (Switch.CheckSwitch): Set `default_section' here.
14160         (Switch.Resolve): If we're a constant switch and the constant is
14161         not found, use the default section.
14162
14163 2005-05-03  Martin Baulig  <martin@ximian.com>
14164
14165         * expression.cs (ArrayAccess.EmitGetLength): New public method.
14166
14167         * statement.cs (Foreach.ArrayForeach): New nested class.
14168         (Foreach.TemporaryVariable): New nested class.
14169         (Foreach.EmitArrayForeach): Removed; this is now in the new
14170         ArrayForeach class.
14171
14172 2005-05-03  Raja R Harinath  <rharinath@novell.com>
14173
14174         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
14175         more conservative.
14176         (VerifyPendingMethods): Revert change below.
14177
14178         * typemanager.cs (IsOverride, RegisterNonOverride): New.
14179         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
14180         that used to trigger warning -28.  Remove warning -28.
14181         * expression.cs (Invocation.OverloadResolve): Use
14182         TypeManager.IsOverride to distinguish override methods.
14183
14184         Fix #74773.
14185         * pending.cs (VerifyPendingMethods): If a base type implements the
14186         requested interface, don't bother checking individual methods of
14187         the base type.  As a side-effect, this prevents the creation of
14188         unnecessary proxies.
14189
14190 2005-05-02  Martin Baulig  <martin@ximian.com>
14191
14192         Fix #70182.
14193
14194         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
14195         Also `And' the locals if the old vector is null.
14196         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
14197         null; in this case we basically reset all the variables.        
14198
14199 2005-05-02  Martin Baulig  <martin@ximian.com>
14200
14201         Fix #74529.
14202
14203         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
14204         Added `FlowBranching branching' argument; always `and' the
14205         variables instead of `or'ing them unless we're an infinite loop.
14206
14207         * statement.cs (While.Resolve): Create a new sibling unless we're
14208         infinite.       
14209
14210 2005-05-02  Martin Baulig  <martin@ximian.com>
14211
14212         Fix #70140.
14213
14214         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
14215         arguments; use it instead of creating a new TopLevelBlock.
14216         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
14217         our ConstructorInitializer.
14218
14219         * statement.cs
14220         (TopLevelBlock.TopLevelBranching): New public property.
14221         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
14222         and create our `TopLevelBranching'.
14223
14224         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
14225         anonymous method host, use `block.TopLevelBranching' rather than
14226         creating a new branching.
14227
14228 2005-04-20  Miguel de Icaza  <miguel@novell.com>
14229
14230         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
14231         a ScopeInfo, if any of the current children is a child of the new
14232         entry, move those children there.
14233
14234 2005-04-30  Martin Baulig  <martin@ximian.com>
14235
14236         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
14237         at the beginning of a SwitchSection.  Fix #73335.
14238
14239 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
14240
14241         Fix #74378
14242         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
14243         
14244         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
14245         (FieldExpr.DoResolve): Obsolete members are ignored for field
14246         initializers.
14247         
14248 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
14249
14250         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
14251         of arrays detection.
14252
14253         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
14254         verification.
14255         (Field.VerifyClsCompliance): Volatile fields are not compliant.
14256
14257         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
14258         arrays report.
14259
14260 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
14261
14262         * cs-parser.jay: Use the prefered version of -unsafe in error
14263         message.
14264
14265 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
14266
14267         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
14268         circumstances.
14269
14270 2005-04-20  John Luke  <john.luke@gmail.com>
14271
14272         * driver.cs: fix typo in error message, --outout to --output
14273
14274 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
14275
14276         * codegen.cs (InRefOutArgumentResolving): New field.
14277         
14278         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
14279         fields outside contructor.
14280         
14281         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
14282         
14283 2005-04-19  Miguel de Icaza  <miguel@novell.com>
14284
14285         * anonymous.cs (CaptureContext.EmitParameterInstance): The
14286         parameter code was not completed ever, so it was not as up-to-date
14287         as local variables.  Must finish it.
14288
14289         The bug fix was to compare the Toplevel of the block, not the
14290         current block.  Thanks for Ben for pointing this out. 
14291
14292 2005-04-19  Raja R Harinath  <rharinath@novell.com>
14293
14294         * decl.cs (AddMethods): Use the declaring type of the problem
14295         method to determine if we want to squash a warning.
14296
14297 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
14298
14299         * attribute.cs: Removed debug output.
14300
14301         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
14302         
14303         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
14304         Report.Stderr.
14305         
14306 2005-04-18  Raja R Harinath  <rharinath@novell.com>
14307
14308         Fix #74481.
14309         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
14310         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
14311         all null comparisons against reference types.
14312
14313 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
14314
14315         Fix# 74565
14316         * class.cs (TypeContainer.CircularDepException) New nested
14317         exception class.
14318         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
14319         (TypeContainer.DefineType): Removed error, reset InTransit before
14320         exit.
14321         (Class.DefineType): Throw exception when is in Transit.
14322         Catch exception and report error.
14323         (Struct.DefineType): Throw exception when is in Transit.
14324         Catch exception and report error.
14325         (Interface.DefineType): Throw exception when is in Transit.
14326         Catch exception and report error.
14327
14328         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
14329         handle nested exception handlers.
14330
14331         * flowanalysis.cs (InTryWithCatch): New method, search for try with
14332         a catch.
14333
14334         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
14335         InFinally and InCatch storage.
14336
14337         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
14338         (Catch.Resolve): Set and Restore ec.InCatch.
14339         (Try.Resolve): Set and Restore ec.InFinally.
14340         (Try.HasCatch): True when try has catch.
14341
14342 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
14343
14344         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
14345           for the same event member, so exclude such cases from warning 419.
14346           Fixed bug #74633.
14347
14348 2005-04-16  Miguel de Icaza  <miguel@novell.com>
14349
14350         * expression.cs (Binary.ResolveOperator): Apply patch from John
14351         Luke to fix bug 59864: operators &, | and ^ on enumerations
14352         require that the same enum type on both sides.
14353
14354         * driver.cs: Add warnings to old flag usage, this is to assist
14355         people who produce Makefiles and hope that the Makefiles will be
14356         used on Windows.
14357
14358         * class.cs (TypeContainer.EmitType): Moved the definition of the
14359         special $PRIVATE$ field from the resolve phase to the Emit phase.
14360         During resolve we do not know if we are a struct with
14361         HasExplicitLayout, we know this only after the attributes for the
14362         type are emitted.
14363
14364         Set the FieldOffset to zero on the dummy field that we create for
14365         the class.   Fixes 74590.
14366
14367 2005-04-16  Raja R Harinath  <rharinath@novell.com>
14368
14369         Fix #73834.
14370         * ecore.cs (PropertyExpr.resolved): New.
14371         (DoResolve): Use it to handle a case of double resolution here.
14372         Handle a case of identical-name-and-type-name.
14373         * expression.cs (ArrayCreation.CheckIndices): Avoid double
14374         resolution by storing the results of expression resolution back
14375         into the "probes" array.
14376
14377 2005-04-15  Raja R Harinath  <rharinath@novell.com>
14378
14379         Fix cs0208-7.cs and cs0208-8.cs.
14380         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
14381         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
14382         error reporting to point out the reason a struct is not unmanaged.
14383
14384 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14385
14386         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
14387           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
14388
14389 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14390
14391         Fix #74528.
14392         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
14393         IdenticalNameAndTypeName here.
14394         (EventExpr.InstanceResolve): Likewise.
14395
14396 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
14397
14398         C# 2.0 DefaultCharSetAttribute implementation
14399         
14400         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
14401         which allows us to set GlobalNamespace for every resolve.
14402         (Attribute.ResolveArguments): Cut from Resolve.
14403         (Attribute.GetCharSetValue): Returns CharSet named argument.
14404         (Attribute.DefinePInvokeMethod): Gets default charset from
14405         module settings.
14406         (GlobalAttribute.ResolveAsTypeStep): Override.
14407         (GlobalAttribute.ResolveArguments): Override.
14408         
14409         * class.cs (TypeAttr): Is protected.
14410         
14411         * codegen.cs (ModuleClass.DefaultCharSet): New member.
14412         (ModuleClass.DefaultCharSetType): New memeber.
14413         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
14414         
14415         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
14416         charset from module.
14417         
14418         * delegate.cs (TypeAttr): Override.
14419         (Delegate.DefineType): Use this TypeAttr.
14420         
14421         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14422         at very early stage (before types are defined) to resolve model
14423         module attributes. It will probably not work with corlib but it
14424         should be ok.
14425         
14426         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14427         charset from module.
14428         
14429         * typemanager.cs (default_charset_type): New type.
14430
14431 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14432
14433         * decl.cs (MemberCache.AddMethods): Don't warn if
14434         System.Object.Finalize has buggy MethodAttributes.
14435
14436         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14437         removed below.
14438
14439 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14440
14441         * doc.cs : detect ambiguous reference to overloaded members.
14442           Fixed bug #71603. MS 1.1 csc does not detect it.
14443
14444 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14445
14446         * doc.cs : delegates must not be referenced with parameters.
14447           Fixed bug #71605.
14448
14449 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14450
14451         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14452
14453 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14454
14455         * driver.cs (MainDriver): Stop processing if the CLS stage found
14456         errors. 
14457
14458         (CompilerCallableEntryPoint.InvokeCompiler): Always
14459         reset after execution;   Take a TextWriter argument for the
14460         output.
14461
14462         * report.cs: Use the error stream instead of hardcoding stderr. 
14463
14464 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14465
14466         * class.cs: Reduce code paths to test, too small of an
14467         optimization to make it worth the extra testing.  Always perform
14468         it. 
14469
14470 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14471
14472         Fix #74510.
14473         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14474         operators that had errors reported on them.
14475
14476 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14477
14478         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14479         argument types.
14480         (Attribute.Resolve): Add named argument type checking.
14481         
14482         * class.cs (FixedField.Define): Use IsPrimitiveType
14483         
14484         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14485         
14486         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14487         unsafe parameter types.
14488         
14489         * statement.cs (Using.ResolveExpression): Add better error description.
14490         
14491         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14492         
14493 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14494
14495         Fix #74484.
14496         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14497         AttributeUsageAttribute in the emitcontext of the attribute class,
14498         not in the emitcontext of the attributable entity it was attached to.
14499         * cs-parser.jay: Use 'current_class', not 'current_container',
14500         when creating a GlobalAttribute.
14501
14502 2005-04-08  Alp Toker  <alp@atoker.com>
14503
14504         * pending.cs: The fix to #58413 failed to compile methods implementing
14505         interfaces with/without params modifiers and vice versa, even though
14506         params modifiers aren't part of the signature. Make the modifier check
14507         less strict as in csc.
14508
14509 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14510             Anoob V E  <projectmonokochi@rediffmail.com>
14511             Harilal P R  <projectmonokochi@rediffmail.com>
14512
14513         Fix #58413.
14514         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14515         modifiers of pending methods.
14516         (PendingImplementation.PendingImplementation): Initialize it.
14517         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14518         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14519         with ParameterData.  Add check for modifiers.
14520         * class.cs (MethodData.Define): Update to changes.
14521
14522 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14523
14524         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14525
14526 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14527
14528         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14529         property.
14530         
14531         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14532         
14533         * rootcontext.cs,
14534         * typemanager.cs: Registered RequiredAttributeAttribute.
14535         
14536 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14537
14538         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14539         Warning CS0169 is back at level 3.
14540         (IMethodData.SetMemberIsUsed): New method.
14541         
14542         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14543         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14544         
14545         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14546
14547         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14548         contants.
14549         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14550         is used.
14551         
14552         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14553         is used.
14554         
14555         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14556         to avoid the problems with nested types.
14557
14558 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14559             Anoob V.E  <projectmonokochi@rediffmail.com>
14560             Harilal P.R  <projectmonokochi@rediffmail.com>
14561             Raja R Harinath  <rharinath@novell.com>
14562
14563         Fix #73820.
14564         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14565         attribute.
14566         * typemanager (GetConstructor): Make public.
14567
14568 2005-04-05  John Luke  <john.luke@gmail.com>
14569             Raja R Harinath  <rharinath@novell.com>
14570
14571         Fix #62232.
14572         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14573         struct too.  Return false quicker in a few cases.
14574         (VerifyUnManaged): Use it.
14575
14576 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14577
14578         Fix #74041.
14579         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14580         not 'unreachable_seen'.
14581
14582 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14583
14584         * attribute.cs (Attribute.GetValue): Removed unused.
14585         
14586         * codegen.cs (CodeGen.TrimExt): Removed unused.
14587         
14588         * cs-parser.jay (output): Removed unused.
14589         
14590         * cs-tokenizer.cs (hex_digits): Removed unused.
14591         
14592         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14593         
14594         * expression.cs (Indirection.LoadExprValue): Removed unused.
14595         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14596         
14597         * iterators.cs (Iterator.param_types): Removed unused.
14598         
14599         * statement.cs (Goto.block): Removed unused.
14600         (ToplevelBlock.did): Removed unused.
14601         (Switch.ResolveConstantSwitch): Removed unused.
14602
14603 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14604
14605         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14606         resetting thingy.
14607
14608 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14609
14610         Fix #74232 and cs0208-3.cs.
14611         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14612         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14613         unmanaged type.  Don't use FieldBuilders when 't' is a
14614         TypeBuilder.  Use ModFlags and MemberType fields.
14615         * class.cs (MemberBase.member_type): Rename from MemberType.
14616         (MemberBase.MemberType): New property.  Determines member_type on
14617         demand.
14618         (MemberBase.DoDefine): Don't initialize MemberType here.
14619         (FieldMember.Define): Likewise.
14620
14621 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14622
14623         Fix #74241
14624         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14625         Attributes are emitted there.
14626         
14627 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14628
14629         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14630         keyword in 'partial enum' too.
14631         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14632         is not allowed).
14633         Report from Kamil Skalski <nazgul@omega.pl>.
14634
14635         Fix #74309.
14636         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14637         have partial containers too.
14638
14639         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14640         in block' checks to Block.CheckInvariantMeaningInBlock.
14641         * statement.cs (Block.GetKnownVariableInfo): Make private.
14642         (Block.IsVariableUsedInChildBlock): Remove.
14643         (Block.IsVariableUsedInBlock): Likewise.
14644         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14645         conflicting declaration.
14646         (Block.AddVariable): Make error messages less long-winded and more
14647         specific.  Show location of conflicting declaration.
14648         * parameter.cs (Parameters.Location): New readonly property.
14649
14650 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14651
14652         Clean up semantics of invoking ResolveMemberAccess.
14653         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14654         can have an instance, ensure that we pass in a non-TypeExpression
14655         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14656         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14657         argument.  Update to changes and simplify.
14658         (FieldExpr.Emitinstance): Remove CS0120 check.
14659         (PropertyExpr.EmitInstance): Likewise.
14660         * expression.cs (Argument.Resolve): Likewise.
14661         (Invocation.DoResolve): Update to changes in semantics of
14662         InstanceExpression.
14663
14664 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14665
14666         Fix #74241
14667         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14668         customization.
14669         
14670         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14671
14672 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14673
14674         Fix difference in behaviour with commandline invocation.
14675         * driver.cs (Driver.Reset): New.
14676         (CompilerCallableEntryPoint): Call it.
14677
14678         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14679         variable" warnings if the boolean expression failed to resolve.
14680
14681 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14682
14683         * attribute.cs: Fix the union of several permissions when some of them
14684         are unrestricted (so the result isn't an unrestricted permission set).
14685         Fix #74036.
14686
14687 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14688
14689         * ecore.cs (MemberExpr): New class.  Convert from interface
14690         IMemberExpr.
14691         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14692         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14693         error checks.
14694         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14695         (MethodGroupExpr.IsExplicitImpl): Remove.
14696         (Expression.GetFieldFromEvent): Remove.
14697         (SimpleName.MemberStaticCheck): Remove.
14698         (SimpleName.DoSimpleNameResolve): Update to changes.
14699         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14700         (MemberAccess.IdenticalNameAndTypeName): Remove.
14701         (MemberAccess.error176): Move to MemberExpr.
14702         (MemberAccess.DoResolve): Update to changes.
14703         (BaseAccess.DoResolve): Likewise.
14704
14705 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14706
14707         C# 2.0 Conditional attribute class implementation
14708         
14709         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14710         Analyzes class whether it has attribute which has ConditionalAttribute
14711         and its condition is not defined.
14712         
14713         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14714         (Class.IsExcluded): New method. Search for at least one defined
14715         condition in ConditionalAttribute of attribute class.
14716
14717 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14718
14719         * ecore.cs (PropertyExpr): Derive from Expression, not
14720         ExpressionStatement.
14721         (PropertyExpr.EmitStatement): Remove.
14722
14723 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14724
14725         Fix #74060.
14726         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14727         internal field "value__" of an enum be private.  The examples for
14728         "value__" that I found on MSDN all used FieldAttributes.Private.
14729
14730         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14731         Don't mention IL method attribute names.
14732
14733         Fix #47991.  Remove a TODO.
14734         * statement.cs (Block.Toplevel): Make into a field.
14735         (Block.Parameters): Move into ToplevelBlock.
14736         (Block.known_variables): Rename from child_variable_names.
14737         (Block.Block): Remove variants that take Parameters.  Initialize
14738         'Toplevel' with the immediately surrounding toplevel block.
14739         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14740         LocalInfo parameter.
14741         (Block.GetKnownVariableInfo): New.
14742         (Block.IsVariableNameUsedInChildBlock): Update.
14743         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14744         the block, even though it may not be in scope.
14745         (Block.AddVariable): Remove Parameters parameter.  Use
14746         Toplevel.Parameters instead.
14747         (Block.AddConstant): Remove Parameters parameter.
14748         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14749         (Block.IsParamaterReference): Likewise.
14750         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14751         (ToplevelBlock.Parameters): New.  Moved from Block.
14752         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14753         initialize Parameters to a non-null value.
14754         * cs-parser.jay: Update to changes.
14755         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14756         simple names that mean different things in the same block.  Use
14757         Block.IsVariableNameUsedInBlock.
14758
14759 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14760
14761         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14762         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14763         GetTypeHandle.  It is possible for a reflected type to derive from
14764         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14765         System.Array during mscorlib compilation).
14766         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14767         contain a method_hash, don't create one either.  Don't create a
14768         deep copy of the base cache's method_hash.
14769         (MemberCache.SetupCache): Rename back from DeepCopy.
14770         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14771         already initialized.  If we see an override function, add its
14772         underlying base virtual function to the member_hash too.
14773
14774         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14775
14776 2005-03-26  Raja R Harinath  <harinath@acm.org>
14777
14778         Fix #73038.
14779         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14780         fails to resolve, ensure that the LHS is still resolved as an
14781         lvalue.
14782
14783 2005-03-25  Raja R Harinath  <harinath@acm.org>
14784
14785         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14786         ec.ContainerType.
14787         (Enum.current_ec): Remove.
14788         (Enum.LookupEnumValue): Remove EmitContext argument.
14789         Just uses the one created during DefineType.
14790         (Enum.FindMembers): Update.
14791         * expression.cs (MemberAccess.DoResolve): Update.
14792
14793 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14794
14795         * assign.cs (Assign.DoResolve): Check for CS1717 when
14796         source and target are same (uses Equals).
14797
14798         * expression.cs (LocalVariableReference, ParameterReference,
14799         This): Implemented Equals, GetHashCode.
14800
14801         * statement.cs (Block.GetParameterReference): Removed useless
14802         local variable.
14803
14804 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14805
14806         Fix cs0128.cs
14807         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14808         blocks before deciding whether the error is cs0136 or cs0128.
14809
14810         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14811         (using_alias_directive, using_namespace_directive): Pass
14812         MemberName, not an expression to Namespace.UsingAlias and
14813         Namespace.Using.
14814         (MakeName): Use the MemberName of the namespace.
14815         * namespace.cs (Namespace.MemberName): New.
14816         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14817         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14818         Likewise.
14819         * decl.cs (MemberName.Name): Make readonly.
14820         (MemberName.FromDotted): New "constructor".
14821         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14822         (MemberCore.Name): Compute from MemberName on demand.
14823         (MemberCore.SetMemberName): Provide a way to change the
14824         MemberName.
14825         (MemberCore.AddToContainer): Don't take a fullname parameter.
14826         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14827         fully qualified name of the container to the member name.
14828         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14829         only if the type is a member of the root container.
14830         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14831         MemberName.Left rather than searching for an embedded ".".
14832         (PartialContainer.CreatePart): Update to changes in RootContext.
14833         (MemberBase.ShortName): Turn into a property.  Use
14834         MemberCore.SetMemberName.
14835         (MemberBase.ExplicitInterfaceName): Remove.
14836         (MemberBase.UpdateMemberName): Remove.
14837         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14838         (PropertyBase.SetMemberName): New override.
14839         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14840         (Tree.GetDecl): New.
14841         (Tree.AllDecls): Rename from Decls.
14842         * attribute.cs, enum.cs, report.cs: Update to changes.
14843         * driver.cs (MainDriver): Use MemberName.FromDotted on
14844         RootContext.MainClass.
14845
14846 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14847
14848         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14849         checks.
14850
14851         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14852
14853 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14854
14855         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14856         property accessor modifiers.
14857
14858         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14859         fixed buffer attribute (CS1716).
14860         (PropertyMethod.HasCustomAccessModifier): When property accessor
14861         has custom modifier.
14862
14863         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14864         modifiers.
14865         (PropertyExpr.DoResolveLValue): Add CS0272.
14866
14867 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14868
14869         * convert.cs: When converting to a pointer, use the proper Conv.U
14870         or Conv.I depending on the source data type.
14871
14872         * cs-tokenizer.cs: Make the size for large decimal constants,
14873         fixes #72957.
14874
14875 2005-03-17  Martin Baulig  <martin@ximian.com>
14876
14877         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14878         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14879
14880 2005-03-17  Martin Baulig  <martin@ximian.com>
14881
14882         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14883         to bool so we can return an error condition.
14884         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14885         returned an error.
14886
14887 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14888
14889         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14890         attributes.
14891
14892 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14893
14894         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14895         Refactor to avoid traversing the list of assemblies, and to avoid
14896         string concatenation.
14897         * typemanager.cs (guid_attr_type): Remove.
14898         (negative_hits, pointers, references): Remove hashes.
14899         (type_hash): New.
14900         (GetConstructedType): New.  Uses type_hash to handle constructed
14901         types (arrays, references, pointers).
14902         (GetReferenceType, GetPointerType): Use it.
14903         (GetNestedType): New.  Uses type_hash to handle nested types of
14904         reflected types.
14905         (LookupType, LookupTypeDirect): Remove.
14906         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14907         'types' hash and LookupTypeReflection directly.
14908         (params_string, params_object): Use GetConstructedType.
14909         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14910         top-level types.
14911         (Namespace.Lookup): Use cached_types.
14912         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14913         provided by old TypeManager.LookupType.
14914         * rootcontext.cs (MakeFQN): Remove.
14915         * decl.cs (DeclSpace.MakeFQN): Likewise.
14916         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14917         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14918         TypeManager.GetConstructedType.
14919         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14920
14921 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14922
14923         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14924         indexers.
14925
14926         * cs-parser.jay: Reports CS1527 for any namespace element.
14927
14928         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14929         Added CS0407.
14930
14931         * expression.cs (ParameterReference.IsAssigned): Changed error to
14932         CS0269.
14933         (Error_WrongNumArguments): Moved CS0245 detection here.
14934
14935         * statement.cs (Return.Resolve): Add CS1622 report.
14936
14937 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14938
14939         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14940
14941 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14942
14943         * attribute.cs expression.cs: Get rid of some allocations.
14944
14945 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14946
14947         * doc.cs : just eliminate the latest change.
14948
14949 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14950
14951         * doc.cs : commented out the latest change. It breaks xml-030.cs
14952
14953 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14954
14955         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14956           fail. So invoke CreateType() in FindDocumentedType().
14957
14958 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14959
14960         * cs-tokenizer.cs : added IsKeyword().
14961         * doc.cs : Detect keyword incorrectly used as identifier.
14962           Allow identifiers prefixed by @.
14963
14964 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14965
14966         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14967         It caused exception in namespace resolving (again!).
14968         
14969         * class.cs (Class.ctor): Removed exit.
14970         (PropertyMethod.ctor): ditto.
14971         
14972         * codegen.cs (Codegen.Reset): Reset static data.
14973         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14974         
14975         * cs-tokenizer.cs (Cleanup): Removed.
14976         
14977         * driver.cs (GetSystemDir): Rewrote to one line command.
14978         It caused problem with unloaded dynamic modules.
14979         (UnixParseOption): Removed Exit.
14980         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14981         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14982         Now can be mcs used as library.
14983         
14984         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14985         empty location.
14986         
14987         * location.cs (Reset): Reset static data.
14988         
14989         * namespace.cs (Reset): Reset static data.
14990         
14991         * report.cs (Report.Reset): Reset static data.
14992         
14993         * rootcontext.cs (RootContext.Reset): Reset static data.
14994         
14995         * tree.cs (RootTypes.ctor): Use Location.Null
14996         
14997         * typemanager.cs (TypeManager.Reset): Reset static data.
14998         (CoreLookupType): Removed Exit.
14999         (TypeHandle.Reset): Reset static data.
15000         
15001 2005-03-10  Raja R Harinath  <rharinath@novell.com>
15002
15003         Fix #73516.
15004         * typemanager.cs (ComputeNamespaces): Import namespaces from
15005         referenced modules too.
15006
15007 2005-03-09  Raja R Harinath  <rharinath@novell.com>
15008
15009         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
15010         than '.'.
15011
15012 2005-03-09  Raja R Harinath  <rharinath@novell.com>
15013
15014         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
15015         enclosing DeclSpace.  This ensures that a name-lookup populates
15016         more caches and there are fewer 'TypeExpression's.  Carve out
15017         nested type lookup into ...
15018         (LookupNestedTypeInHierarchy): ... this.
15019
15020 2005-03-09  Raja R Harinath  <rharinath@novell.com>
15021
15022         Clean up a few partial-class semantics.  
15023         Fixes test-357.cs and cs1618-2.cs.
15024         * cs-parser.jay (struct_declaration): Use 'current_class' as
15025         parent of newly-created struct.  Remove call to Register ().
15026         Use 'pop_current_class' to complete handing the current struct.
15027         (interface_declaration): Likewise.
15028         (class_declaration): Likewise.
15029         (enum_declaration): Use 'current_class' as parent of newly created
15030         enum.
15031         (delegate_declaration): Likewise.
15032         (pop_current_class): New function.  This is used to handle closing
15033         up the 'current_class' and 'current_container', and pointing them
15034         to the enclosing class/container.
15035         (CSharpParser): Initialize 'current_class' too.
15036         * decl.cs (MemberCore): Add check for invariant: a partial
15037         container is not a parsed entity, and thus does not enclose any
15038         parsed members.
15039         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
15040         (DeclSpace.BaseTypeExpr): Use it.
15041         (DeclSpace.LookupType): Add check for invariant.
15042         * class.cs (TypeContainer): Add check for invariant: a nested
15043         class should have the same NamespaceEntry as its enclosing class.
15044         (TypeContainer.EmitFieldInitializers): Make virtual.
15045         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
15046         MemberCore.
15047         (TypeContainer.Register): Remove.
15048         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
15049         null.  Use TypeResolveEmitContext for resolving base types and
15050         interfaces.  Move initialization of Parts.TypeBuilder here from
15051         ...
15052         (TypeContainer.DefineNestedTypes): ... here.
15053         (PartialContainer): Take a Namespace not a NamespaceEntry.
15054         (PartialContainer.Create): Don't use Register.  Call the
15055         appropriate Add... function directly.
15056         (ClassPart): Take both the PartialContainer and the enclosing
15057         class as constructor arguments.
15058         (ClassPart.EmitFieldInitializers): Override.
15059         (ClassPart.PartFindNestedTypes): Remove.
15060         (FieldBase.GetInitializerExpression): Resolve the initializer
15061         expression in the emit context of the enclosing class.
15062         * tree.cs (RootTypes): Remove Register ().
15063         
15064 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
15065
15066         * cs-parser.jay: Removed CS0134.
15067         
15068         * driver.cs: Removed CS1901.
15069         
15070         * expression.cs (SizeOf.DoResolve): Don't report CS0233
15071         for predefined types.
15072
15073 2005-03-07  Duncan Mak  <duncan@novell.com>
15074
15075         * codegen.cs (Save):  Catch UnauthorizedAccessException as
15076         well. Fixes bug #73454.
15077
15078 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
15079
15080         * cs-tokenizer.cs (xtoken): Add CS1035.
15081         
15082         * class.cs (MethodData.Define): Add CS0683.
15083         (FieldMember.ctor): Add CS0681.
15084
15085 2005-03-07  Raja R Harinath  <rharinath@novell.com>
15086
15087         * ecore.cs (SimpleName.DoResolve): Rename from
15088         SimpleName.DoResolveAllowStatic.
15089         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
15090         Pass 'intermediate' flag to MemberStaticCheck.
15091         (SimpleName.MemberStaticCheck): Skip "static check" only in case
15092         of "intermediate" lookups via MemberAccess.
15093         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
15094         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
15095
15096 2005-03-07  Raja R Harinath  <rharinath@novell.com>
15097
15098         Fix #73394.
15099         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
15100         slipped in because of variable names that are identical to a
15101         builtin type's BCL equivalent ('string String;', 'int Int32;').
15102         (PropertyExpr.EmitInstance): Likewise.
15103
15104 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
15105
15106         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
15107         
15108         * report.cs (warning_ignore_table): Made public.
15109
15110 2005-03-04  Raja R Harinath  <rharinath@novell.com>
15111
15112         Fix #73282.
15113         * class.cs (MethodData.Emit): Pass 'container' to
15114         container.GetObsoleteAttribute instead of 'container.Parent'.
15115
15116 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
15117
15118         * cs-parser.jay: Add 1534 error test.
15119
15120         * iterators.cs (Yield.CheckContext): Add error 1629.
15121         (Iterator.ctor): Save unsafe modifier.
15122         (MoveNextMethod.DoEmit): Restore unsafe context.
15123
15124         * namespace.cs (UsingAlias): Better error message.
15125
15126 2005-03-03  Dan Winship  <danw@novell.com>
15127
15128         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
15129         the warning message [#73219]
15130
15131 2005-03-03  Raja R Harinath  <rharinath@novell.com>
15132
15133         Fix compile with MCS 1.0.0.0.
15134         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
15135         w_restore to not depend on string constant folding.
15136
15137 2005-03-03  Raja R Harinath  <rharinath@novell.com>
15138
15139         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
15140         CS0246 check to users who passed 'silent = false'.
15141         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
15142         check.
15143         (SimpleName.SimpleNameResolve): Update.
15144         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
15145         (MemberAccess.IdenticalNameAndTypeName): Update.
15146         * doc.cs (FindDocumentedTypeNonArray): Update.
15147
15148 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
15149
15150         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
15151         * parameters.cs (ComputeAndDefineParameters): Remove.
15152         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
15153         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
15154         Use GetParameterInfo.
15155
15156 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
15157
15158         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
15159
15160 2005-03-02  Raja R Harinath  <rharinath@novell.com>
15161
15162         Unify DeclSpace.LookupType and DeclSpace.FindType.
15163         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
15164         is in charge of defining nested types on demand.
15165         (DeclSpace.LookupType): Use it when the current_type is a
15166         TypeBuilder.  Use LookupTypeDirect for reflected types.
15167         (DeclSpace.FindType): Remove.
15168         (DeclSpace.LookupInterfaceOrClass): Likewise.
15169         (DeclSpace.DefineTypeAndParents): Likewise.
15170         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
15171         DeclSpace.LookupType.
15172         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
15173         * typemanager.cs (LookupType): Simplify.
15174         (AddUserType): Remove type from negative_hits.
15175         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
15176         * class.cs (TypeContainer.FindMembers): Move handling of nested
15177         types ...
15178         (TypeContainer.FindMembers_NestedTypes): ... here.
15179         (TypeContainer.FindNestedType): Implement override.
15180         (ClassPart.FindNestedType): Delegate to PartialContainer.
15181         (ClassPart.PartFindNestedType): Looks up the nested types of the
15182         part alone.
15183
15184 2005-03-02  Martin Baulig  <martin@ximian.com>
15185
15186         * class.cs (TypeContainer.DoDefineMembers): We also need a default
15187         static constructor in static classes.
15188
15189 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
15190
15191         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
15192         sizeParamIndex is not specified.
15193
15194 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
15195
15196         Fix #73117
15197         * report.cs (WarningMessage.IsEnabled): Missing null check.
15198
15199 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15200
15201         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
15202         in the fields and not in the properties.
15203
15204 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
15205
15206         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
15207         fields as well.
15208
15209 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15210
15211         * attribute.cs: Small refactoring (improved robustness).
15212         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
15213         (ValidateGuid): Removed.
15214         (Resolve): Removed referenced to above mentioned.
15215         (GetAttributeUsage): Made private and changed to work without
15216         class assistance.
15217         (GetIndexerAttributeValue): Don't crash.
15218         (GetConditionalAttributeValue): Ditto.
15219         (GetClsCompliantAttributeValue): Ditto.
15220         (ExtractSecurityPermissionSet): All attributes exceptions are
15221         error 648.
15222         (GetPropertyValue): New helper.
15223         (GetMethodImplOptions): New method.
15224         (DefinePInvokeMethod): Reuse common code. Implemented handling of
15225         some missing properties.
15226         
15227         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
15228         (Method.ApplyAttributeBuilder): Updated.
15229         
15230         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
15231         exception.
15232
15233 2005-02-28  Raja R Harinath  <rharinath@novell.com>
15234
15235         Fix #73052.
15236         * report.cs (Report.SymbolRelatedToPreviousError): Handle
15237         non-simple types (array, pointer, reference).
15238
15239 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15240
15241         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
15242
15243         * class.cs (MethodCore.IsDuplicateImplementation): Special error
15244         for operators.
15245         (Method.CheckBase): Catch wrong destructor here.
15246         (MethodData.Define): Add errors 550, 668.
15247
15248         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
15249
15250         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
15251
15252         * pending.cs (VerifyPendingMethods): Add error 551.
15253
15254         * typemanager.cs (CSharpName): Next error report helper.
15255
15256 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
15257
15258         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
15259         attributes. Removed useless attribute double check.
15260         It saves almost 2MBs for corlib.
15261
15262 2005-02-25  Raja R Harinath  <rharinath@novell.com>
15263
15264         Fix #72924.
15265         * statement.cs (ExpressionStatement.Resolve): Make robust to being
15266         called twice in case of error.
15267
15268 2005-02-23  Chris Toshok  <toshok@ximian.com>
15269
15270         Fix compiler portions of #72827.
15271         * statement.cs (Block.Emit): call Begin/EndScope on the
15272         EmitContext instead of the ILGenerator.
15273
15274         * codegen.cs (EmitContext.BeginScope): new method, call
15275         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
15276         we have one.)
15277         (EmitContext.BeginScope): same, but EndScope and CloseScope
15278
15279         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
15280         offset and call the superclass's OpenScope(int) with it.
15281         (SymbolWriter.CloseScope): get the current il
15282         offset and call superclass's CloseScope(int) with it.
15283
15284 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
15285
15286         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
15287         CS1677 for out and ref as well.
15288
15289         * class.cs (Method.Define): Add error CS1599 detection.
15290         
15291         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
15292         
15293         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
15294         
15295         * delegate.cs (Delegate.Define): Add error CS1599 detection.
15296         
15297         * support.cs.cs (ModifierDesc): New helper method.
15298
15299 2005-02-23  Raja R Harinath  <rharinath@novell.com>
15300             Abin Thomas  <projectmonokochi@rediffmail.com>
15301             Anoob V E  <projectmonokochi@rediffmail.com>
15302             Harilal P R  <projectmonokochi@rediffmail.com>
15303
15304         Fix #57851, #72718.
15305         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
15306         MemberLookup (used for error reporting) actually returns a result.
15307         Fix error report number (122, not 112).
15308
15309 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
15310             Anoob V E  <projectmonokochi@rediffmail.com>
15311             Harilal P R  <projectmonokochi@rediffmail.com>
15312
15313         Fix #71134.
15314         * pending.cs (PendingImplementation.GetAbstractMethods):
15315         Find NonPublic members too.
15316
15317 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
15318
15319         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
15320         Fixed error 217.
15321         
15322         * class.cs (MethodCore.CheckMethodAgainstBase):
15323         Add error 239 report.
15324
15325 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15326
15327         Fix #68955.
15328         * expression.cs (Invocation.IsApplicable): Make public.
15329         (Invocation.IsParamsMethodApplicable): Likewise.
15330         * delegate.cs (Delegate.VerifyApplicability): Don't use
15331         Invocation.VerifyArgumentCompat for parameter applicability
15332         testing.  Use Invocation.IsApplicable and
15333         Invocation.IsParamsMethodApplicable.
15334
15335 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15336
15337         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
15338         
15339         * class.cs (Operator.Define): Add error 217 report.
15340         
15341 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15342
15343         * namespace.cs (UsingEntry.Resolve): Undo change below.
15344
15345 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15346
15347         Fix #72756.
15348         * ecore.cs (Expression.MemberLookupFailed): Add argument to
15349         disable the error message when the extended MemberLookup also
15350         fails.
15351         (Expression.MemberLookupFinal): Update.
15352         (SimpleName.DoSimpleNameResolve): Update.
15353         * expression.cs (MemberAccess.ResolveNamespaceOrType):
15354         Don't use MemberLookupFinal.
15355         (New.DoResolve): Update.
15356         (BaseAccess.CommonResolve): Update.
15357
15358 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15359
15360         Fix #72732.
15361         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
15362         occured previously, don't resolve again.
15363
15364 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15365
15366         Fix #69949
15367         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
15368         argument. Call ResolveAttributeUsage for unresolved.
15369         when types doesn't match ctor arguments.
15370         
15371         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
15372         for nested attribute classes.
15373         (Class.attribute_usage): Removed.
15374         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
15375         for attribute class.
15376         
15377         * ecore.cs (IsAttribute): Removed.
15378         
15379         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
15380         
15381         * rootcontext.cs (RegisterAttribute): Removed, attributes are
15382         now normal types.
15383         (attribute_types): Removed.
15384         (EmitCode): Global attributes are emited as the latest.
15385
15386 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
15387
15388         * class.cs (EmitFieldInitializers): Don't emit field initializer
15389         for default values when optimilization is on.
15390         
15391         * constant.cs (Constant.IsDefaultValue): New property.
15392         
15393         * driver.cs: Add /optimize handling.
15394         
15395         * constant.cs,
15396         * ecore.cs,
15397         * literal.cs: Implement new IsDefaultValue property.
15398         
15399         * rootcontext.cs (Optimize): New field, holds /optimize option.
15400
15401 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15402
15403         Fix crasher in re-opened #72347.
15404         * namespace.cs (Namespace.Lookup): Return null if
15405         DeclSpace.DefineType returns null.
15406
15407         Fix #72678.
15408         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
15409
15410 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15411
15412         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
15413         now returns null if it cannot resolve to an lvalue.
15414         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
15415         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
15416         returned null.  Remove check for SimpleName.
15417         (EventExpr.DoResolveLValue): New.
15418         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15419         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15420         error from ...
15421         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15422         avoid CS0131 error.
15423         (Unary.ResolveOperator): Move CS0211 check ...
15424         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15425         CS0131 error.
15426         (Unary.DoResolveLValue): Simplify.
15427         (AddressOf.DoResolveLValue): New.
15428         (ArrayAccess.DoResolveLValue): New.
15429
15430 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15431
15432         * attribute.cs (Attribute.Resolve): Add arguments casting for
15433         when types doesn't match ctor arguments.
15434
15435 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15436
15437         Fix parts of #63202.
15438         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15439         lookup of operator in base type.  Ensure that all checks happen
15440         when the operator resolves to an "op_..." method.
15441
15442 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15443
15444         Fix #71992.
15445         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15446         'ignore_cs0104' parameter.  Pass it to ...
15447         (NamespaceEntry.Lookup): ... this.
15448         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15449         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15450         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15451         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15452         Update.  Request that cs0104 errors be ignored.
15453         (ComposedCast.ResolveAsTypeStep): Update.
15454
15455 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15456
15457         Fix #59209.
15458         * expression.cs (Invocation.BetterFunction): Remove support for
15459         comparing virtual functions and their overrides.
15460         (Invocation.IsOverride): New.
15461         (Invocation.OverloadResolve): Don't consider 'override' functions
15462         during candidate selection.  Store them in a lookaside list.
15463         If the selected method is a 'virtual' function, use the list to
15464         find any overrides that are closer to the LHS type.
15465
15466 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15467
15468         * expression.cs (New.DoResolve): Add complex core type reduction.
15469         (New.Constantify): Converts complex core type syntax like 'new int ()'
15470         to simple constant.
15471         
15472 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15473
15474         * decl.cs (EntryType.EntryType): New constructor to create an
15475         updated copy of a cache entry.
15476         (MemberCache.AddMethods): Use it.
15477         (MemberCache.ClearDeclaredOnly): Remove.
15478         (MemberCache.MemberCache): Update.
15479
15480 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15481
15482         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15483         variable.  This one is represents the actual low-level declaration
15484         of the method, as opposed to the semantic level `IsStatic'.   
15485
15486         An anonymous method which is hosted into a static method might be
15487         actually an instance method.  IsStatic would reflect the
15488         container, while MethodIsStatic represents the actual code
15489         generated.
15490
15491         * expression.cs (ParameterReference): Use the new MethodIsStatic
15492         instead of IsStatic.
15493
15494         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15495         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15496         set on the current EmitContext. 
15497
15498         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15499         resolve our casted expression as an LValue.  This triggers the
15500         proper LValue processing that is later required by Assign.
15501
15502         This fixes 72347.
15503
15504         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15505
15506 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15507
15508         C# 2.0 Fixed buffer implementation
15509
15510         * anonymous.cs: Update after RegisterHelperClass renaming.
15511
15512         * attribute.cs (AttributeTester.fixed_buffer_cache):
15513         Cache of external fixed buffers.
15514         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15515         implementation if field is fixed buffer else null.
15516
15517         * class.cs
15518         (TypeContainer.AddField): Accept FieldMember instead of Field.
15519         (FieldBase.IsFieldClsCompliant): Extracted code from
15520         VerifyClsCompliance descendant customization.
15521         (FixedField): New class handles fixed buffer fields.
15522         (FixedFieldExternal): Keeps information about imported fixed
15523         buffer.
15524         (IFixedField): Make access to internal or external fixed buffer
15525         same.
15526
15527         * cs-parser.jay: Add fixed buffer parsing.
15528
15529         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15530         buffer.
15531
15532         * expression.cs (Indirection): Extended implementation to accept
15533         fixed buffer field.
15534         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15535         (ElementAccess.MakePointerAccess): Get type as parameter.
15536         (DoResolve): Add fixed buffer field expression conversion.
15537         (DoResolveLValue): Ditto.
15538         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15539         (ArrayPtr): Derives from FixedBufferPtr.
15540         (ArrayPtr.Emit): Add extra emit for array elements.
15541
15542         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15543
15544         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15545         for compiler generated types.
15546         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15547
15548         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15549         and consume less memory.
15550         (Fixed.Resolve): Add fixed buffer case.
15551
15552         * typemanager.cs (compiler_generated_attr_ctor,
15553         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15554         (HasElementType): Add our own implementation to work on every
15555         runtime.
15556
15557 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15558
15559         * anonymous.cs (CaptureContext): Track whether `this' has been
15560         referenced.   
15561
15562         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15563         only captured `this' if it was implicitly done (instance
15564         methods/variables were used). 
15565
15566         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15567         `this' must be captured.
15568
15569 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15570  
15571         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15572         is null it means that there has been no need to capture anything,
15573         so we just create a sibling.
15574
15575         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15576
15577         Just a partial fix.  The other half is fairly elusive.
15578         
15579 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15580
15581         Fix #52586, cs0121-4.cs.
15582         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15583         and return a hashtable.
15584         (MemberCache.ClearDeclaredOnly): New.
15585         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15586         the method_hash of a base type too.
15587         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15588         type methods.  Overwrite entries with the same MethodHandle so
15589         that the ReflectedType is correct.  The process leaves in base
15590         virtual functions and their overrides as distinct entries.
15591         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15592         matters since it was boxed in a ArrayList before.
15593         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15594         modifier.
15595         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15596         case of a virtual function and its override (choose the overload
15597         as better).
15598         (Invocation.OverloadResolve): Avoid 'override' members during
15599         'applicable_type' calculation.
15600
15601 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15602
15603         Combine two near-redundant caches.
15604         * typemanager.cs (method_params): Rename from method_internal_params.
15605         (TypeManager.GetParameterData): New.  Replace
15606         Invocation.GetParameterData.
15607         (TypeManager.LookupParametersByBuilder): Remove.
15608         * expression.cs (Invocation.method_parameter_cache): Remove.
15609         (Invocation.GetParameterData): Remove.
15610         Update to changes.
15611         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15612         Update to changes.
15613
15614 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15615
15616         Fix #72015.
15617         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15618         TypeManager.multicast_delegate_type is null, resolve it by looking
15619         up "System.MulticastDelegate".
15620         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15621
15622 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15623             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15624             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15625
15626         Fix cs0164.cs.
15627         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15628         (LabeledStatement.AddReference): New.  Set 'referenced'.
15629         (Goto.Resolve): Use it.
15630
15631 2005-02-05  John Luke  <john.luke@gmail.com>
15632
15633         * driver.cs: remove duplicate -doc line in Usage ()
15634
15635 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15636
15637         * location.cs (Location.AddFile): Fix CS2002 error report.
15638
15639 2005-02-02  Martin Baulig  <martin@ximian.com>
15640
15641         * delegate.cs (Delegate.DefineType): Report an internal error if
15642         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15643         details.        
15644
15645 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15646
15647         Fix a crasher in a variant of #31984.
15648         * const.cs (Constant.CheckBase): New override that defers the
15649         new-or-override check in case the base type hasn't been populated
15650         yet.
15651         (Constant.Define): Ensure the new-or-override check is performed.
15652
15653 2005-02-01  Duncan Mak  <duncan@ximian.com>
15654
15655         * const.cs (LookupConstantValue): Check that `ce' is not null
15656         before calling GetValue ().
15657
15658 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15659
15660         Fix test-334.cs (#69519).
15661         * cs-parser.jay (using_alias_directive): Pass in an expression to
15662         NamespaceEntry.UsingAlias.
15663         (using_namespace_directive): Pass in an expression to
15664         NamespaceEntry.Using.
15665         (namespace_name): Don't flatten to a string.
15666         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15667         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15668         ResolveAsTypeStep.
15669         (NamespaceEntry.UsingEntry): Likewise.
15670         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15671         changes.
15672         (NamespaceEntry.LookupForUsing): Remove.
15673         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15674         names.
15675         (NamespaceEntry.Lookup): Remove support for dotted names.
15676
15677 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15678
15679         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15680         split into two.
15681         (NamespaceEntry.ImplicitParent): Compute on demand.
15682         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15683         parallels the current.
15684         (NamespaceEntry.LookupForUsing): Use it.
15685         (NamespaceEntry.Lookup): If the current namespace-entry is
15686         implicit, don't search aliases and using tables.
15687
15688 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15689
15690         Fix #31984.
15691         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15692         BaseCache here.
15693         (TypeContainer.BaseCache): Compute on demand.
15694         (TypeContainer.FindMembers): Define constants and types if they're
15695         not already created.
15696         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15697         check.
15698         * const.cs (Constant.Define): Make idempotent.
15699
15700 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15701
15702         * pending.cs: Produce better code (no nops produced by using Ldarg
15703         + value).
15704         
15705         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15706         i - 1' it should be arg + 1.
15707
15708         Fixes bug #71819.
15709
15710 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15711
15712         * attribute.cs (Attribute.CheckAttributeType): Make private
15713         non-virtual.
15714         (Attribute.ResolveType): Make virtual.
15715         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15716         handling of RootContext.Tree.Types.
15717
15718 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15719
15720         Update attribute-handling to use the SimpleName/MemberAccess
15721         mechanisms.
15722         * cs-parser.jay (attribute): Pass in an expression to the
15723         constructors of Attribute and GlobalAttribute.
15724         * attribute.cs (Attribute): Take an expression for the name.
15725         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15726         passed in attribute name expression.
15727         (Attribute.CheckAttributeType): Use it.
15728         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15729         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15730         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15731         argument to prevent error messages if the lookup fails.
15732
15733 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15734
15735         * expression.cs (Indirection): Implemented IVariable interface
15736         to support indirection in AddressOf operator.
15737         (PointerArithmetic.Emit): Add optimalization for case where
15738         result can be precomputed.
15739
15740 2005-01-26  Martin Baulig  <martin@ximian.com>
15741
15742         * class.cs (TypeContainer.AttributeTargets): Return the correct
15743         AttributeTargets depending on our `Kind' instead of throwing an
15744         exception; fixes #71632.
15745
15746 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15747
15748         Fix #71257
15749         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15750         constant members.
15751
15752 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15753
15754         Fix #71602.
15755         * expression.cs (MemberAccess.DoResolve): Don't complain with
15756         cs0572 when the LHS of a member access has identical name and type
15757         name.
15758
15759 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15760
15761         Fix #71651, #71675
15762         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15763         CreatePermission.
15764         Create custom PermissionSet only for PermissionSetAttribute.
15765
15766 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15767
15768         Fix #71649
15769         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15770         delegates in static class.
15771
15772 2005-01-24  Martin Baulig  <martin@ximian.com>
15773
15774         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15775         merging an implicit block, just use its reachability.
15776
15777         * statement.cs (Block.Resolve): Make the unreachable code check
15778         work wrt. implicit blocks; see test-337 from #63842.
15779
15780 2005-01-21  Alp Toker  <alp@atoker.com>
15781  
15782         * cs-parser.jay: destructor_declaration's container is PartialContainer
15783         not Class when partial types are used, so use Kind prop instead of
15784         'is'.
15785         
15786 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15787
15788         * cs-parser.jay: Improve error reporting when an interface
15789         declares new types.
15790
15791 2005-01-20  Dick Porter  <dick@ximian.com>
15792
15793         * support.cs: SeekableStreamReader fix from Sandor Dobos
15794         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15795         chars are read.  Fixes bug 70369.
15796
15797 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15798
15799         * cs-parser.jay (catch_clause): Simplify current_block handling
15800         somewhat.
15801
15802 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15803
15804         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15805         code with ImplicitStandardConversion to handle the implicit
15806         conversion of method groups into valid delegate invocations. 
15807
15808         The problem is that in parameter handling we were using this code
15809         path.  Fixes bug #64698
15810
15811 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15812
15813         * cs-parser.jay: Fix several infelicities.
15814         - Avoid assigning to the parser value stack.  Code like 
15815           '$3 = null' is unclean.  Synthesize a value for the code block
15816           instead. 
15817         - Avoid using oob_stack for storing location information.  Use ...
15818         (_mark_): ... this.  New (empty) rule.  Saves the current location
15819         in $$.
15820         (foreach_statement): Avoid using oob_stack for current_block
15821         handling.  Use technique used in for_statement and
15822         using_statement.  Synthesize a value for the code block to store
15823         additional intermediate information.
15824
15825 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15826
15827         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15828         of a different type is only allowed to private fields of a
15829         containing type, not on fields of a base class.
15830
15831         See test-174.cs and error cs0122-9.cs
15832
15833 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15834
15835         Fix test-335.cs (bug #58126).
15836         * cs-parser.jay (argument): Split out non-expression parts of the
15837         rule into 'non_simple_argument'.
15838         (invocation_expression): Support parenthesized invocations with
15839         multiple arguments, and with single non-simple arguments.
15840
15841 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15842
15843         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15844         places.
15845
15846 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15847
15848         Fix cs0038-1.cs, cs1640-6.cs.
15849         * ecore.cs (Expression.Resolve): Remove special-case for
15850         SimpleName in error-handling.
15851         (Expression.almostMatchedMembers): Relax access permission to
15852         protected.
15853         (Expression.MemberLookupFailed): Handle duplicates in
15854         almostMatchedMembers list.
15855         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15856         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15857         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15858         overload if the passed in MemberInfo is a MethodBase.
15859
15860 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15861
15862         Fix #70749
15863         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15864         for non-CAS & merge permission sets properly.
15865
15866 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15867
15868         Improve standard-compliance of simple name and member access 
15869         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15870         * ecore.cs (FullNamedExpression): New abstract base class 
15871         for Namespaces and TypeExpressions.
15872         (ResolveFlags.SimpleName): Remove.
15873         (SimpleName): Remove support for dotted names.
15874         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15875         DeclSpace.FindType and DeclSpace.LookupType.
15876         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15877         (Expression.ExprClassName): Make member function.
15878         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15879         a namespace.  Remove creation of dotted "SimpleName"s.
15880         (MemberAccess.DoResolve): Likewise.
15881         * decl.cs (DeclSpace.Cache): Make private.
15882         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15883         (DeclSpace.FindType): Update.
15884         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15885         FullNamedExpression.
15886         * namespace.cs (Namespace): Derive from FullNamedExpression
15887         so that it can be part of expression resolution.
15888         (Namespace.Lookup): Return an FullNamedExpression.
15889         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15890         namespace.
15891         * rootcontext.cs (NamespaceLookup): Remove.
15892         (LookupType): Move to DeclSpace.
15893         * attribute.cs (CheckAttributeType): Update.
15894         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15895         (FindDocumentedTypeNonArray): Likewise.
15896
15897 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15898
15899         Fix cs0509.cs, cs1632.cs.
15900         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15901         is the same as IsInterface.
15902         (TypeContainer.GetClassBases): Likewise.
15903         * statement.cs (LabeledStatement.ig): New field.
15904         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15905         label.
15906         (LabeledStatement.DoEmit): Check that the label was created with
15907         the same ILGenerator.
15908
15909 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15910
15911         Fix #71058
15912         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15913         accessors to its properties.
15914
15915         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15916         from accessors to property.
15917         
15918 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15919
15920         Fix #70722
15921         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15922         only for overrides.
15923         
15924 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15925
15926         * attribute.cs: Check for null and empty strings.  
15927
15928         I have lost another battle to Paolo.
15929
15930 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15931
15932         Fix #70942
15933         * class.cs (PropertyMethod): Set Parent field in ctors.
15934         (SetMethod.InternalParameters): Add unsafe switch hack.
15935         Override MarkForDuplicationCheck where it is appropriate.
15936
15937         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15938         It says whether container allows members with the same name.
15939         Base default is no.
15940         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15941         Removed is_method parameter.
15942
15943 2005-01-06  Duncan Mak  <duncan@ximian.com>
15944
15945         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15946         because the previous change led to incorrect reporting of CS1032
15947         ("Cannot define/undefine preprocessor symbols after first token in
15948         file"). Instead of using `tokens_seen' as the only flag that
15949         triggers CS1040, introduce `comments_seen'. This new flag is used
15950         to signify having seen comments on the current line, so it is
15951         unset after a newline.
15952
15953 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15954
15955         * doc.cs : When searching for a type, find nested type too.
15956           This fixes bug #71040.
15957
15958 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15959
15960         * doc.cs :
15961           - Warn missing member comment on those classes which also does not
15962             have doc comments. Fixed bug #71041.
15963           - Don't warn missing doc comment on default constructor.
15964             Fixed bug #71042.
15965
15966 2005-01-06  Duncan Mak  <duncan@ximian.com>
15967
15968         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15969         comments, set `tokens_seen' to true. This allows us to detect
15970         misplaced preprocessor directives (i.e. not at the beginning of
15971         the a line, nor after whitespaces). In that case, report error
15972         CS1040. This fixes bug #56460.
15973
15974         * cs-parser.jay (interface_member_declaration): Add checks for
15975         IsExplicitImpl, and report CS0541 error if an interface member is
15976         defined as an explicit interface declaration.
15977
15978 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15979
15980         Fix #70817
15981         * class.cs (PropertyMethod): Set Parent field in ctors.
15982         (SetMethod.InternalParameters): Add unsafe switch hack.
15983         
15984         * decl.cs (MemberCore.Parent): Cannot be readonly.
15985
15986 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15987
15988         * decl.cs (DeclSpace.ResolveType): Remove.
15989         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15990         Merge in code from ...
15991         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15992         * class.cs, enum.cs: Update to changes.
15993
15994 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15995
15996         * anonymous.cs: Ensure that we init the scope of our parent if it
15997         has not been initialized yet.
15998
15999 2004-12-30  Duncan Mak  <duncan@ximian.com>
16000
16001         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
16002         if field.FieldBuilder is null. Fixes #70758.
16003
16004         * convert.cs: Fixed some typos and updated some of the comments.
16005         (ImplicitStandardConversionExists):
16006         (TryImplicitIntConversion): If `target_type' is an interface and
16007         the type of `ic' implements this interface, return true or a new
16008         BoxedCast instead of null. This fixes #70468.
16009
16010 2004-12-29  Duncan Mak  <duncan@ximian.com>
16011
16012         * expression.cs (Argument.Emit): Check that Expr is
16013         IMemoryLocation before casting to it, and report CS1510 otherwise.
16014
16015         This fixes #70402.
16016
16017 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
16018
16019         * statement.cs (Block.ThisVariable): remove the recursion here, to
16020         make the --profile more sane.
16021
16022 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
16023
16024         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
16025         assembly, by JB Evain.
16026
16027 2004-12-17  Raja R Harinath  <rharinath@novell.com>
16028
16029         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
16030           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
16031         "parent" refers to enclosing type/class.  "base" refers to superclass.
16032
16033 2004-12-17  Raja R Harinath  <rharinath@novell.com>
16034
16035         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
16036         Ensure that we only have GlobalAttributes.
16037         * attribute.cs (Attribute.Emit): Make non-virtual.
16038         (GlobalAttribute.Emit): Remove.
16039         (Attribute.Resolve): Make virtual.
16040         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
16041         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
16042         the argument. Don't create one.
16043         (Attribute.GetObsoleteAttribute): Likewise.
16044         (Attribute.GetClsCompliantAttributeValue): Likewise.
16045         * class.cs, decl.cs: Update to changes.
16046
16047 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
16048
16049         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
16050         
16051         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
16052         
16053         * statement.cs (Foreach.Resolve): Add error 186 report.
16054
16055 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
16056
16057         * expression.cs (Conditional.DoResolve): Add warning 429.
16058         
16059         * statement.cs (If.Resolve): Add warning 665.
16060
16061 2004-12-16  Raja R Harinath  <rharinath@novell.com>
16062
16063         New invariant: RootContext.Tree.Types.NamespaceEntry == null
16064         except when in the parser, and in GlobalAttribute.
16065         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
16066         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
16067         RootContext.Tree.Types.NamespaceEntry once work is done.
16068         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
16069         and resets RootContext.Tree.Types.NamespaceEntry.
16070
16071 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
16072
16073         * cs-parser.jay: Don't create a block for every variable.
16074
16075 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
16076
16077         * location.cs: Provide extra information.
16078
16079         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
16080         variables from the captured environment, it is the ldarg_0.
16081
16082 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
16083
16084         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
16085         find a conclusion.
16086         
16087         * class.cs: Changed warning level for 169 to avoid developer
16088         displeasure from warning flooding. It will be changed back when they
16089         fix most of current BCL warnings.
16090         
16091         * RootContext.cs: Pushed default WarningLevel to 3.
16092         
16093         * statement.cs: Removed unused variable.
16094
16095 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
16096
16097         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
16098         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
16099         Add error 502 report.
16100         (StaticClass.DefineType): Add error 441 report.
16101         (Class.AllowedModifiersProp): New virtual property as temporary
16102         extension to AllowedModifiers.
16103         (Class.DefineType): Add error 418 report. Moved ModFlags check here
16104         to share implementation with StaticClass and don't call virtual
16105         methods from ctor.
16106         
16107         * driver.cs (MainDriver): Add error 1558 test.
16108
16109         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
16110         report. Moved error 36 test here.
16111
16112         * statement.cs (Throw.Resolve): Add error 724 report.
16113
16114         * typemanager.cs: Add out_attribute_type core type.
16115         
16116 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
16117
16118         * class.cs (TypeContainer.VerifyClsCompliance): Add error
16119         3018 report.
16120         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
16121
16122         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
16123         3017 report.
16124         
16125         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
16126
16127         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
16128         Add error 3023 report.
16129         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
16130
16131         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
16132         implementation.
16133
16134 2004-12-12  John Luke  <john.luke@gmail.com>
16135
16136         * driver.cs (AddArgs): take -- into account when
16137         adding arguments, fixes bug 65710 
16138
16139 2004-12-12  Martin Baulig  <martin@ximian.com>
16140
16141         * expression.cs (Unary.TryReduceNegative): Added support for
16142         SByteConstant and ByteConstant.
16143         (Unary.Reduce): Check error values from TryReduceNegative().
16144
16145 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
16146
16147         * attributes.cs (Attribute.Resolve): Avoid multiple error report
16148         and report exception as error 182.
16149
16150 2004-12-10  Raja R Harinath  <rharinath@novell.com>
16151
16152         * driver.cs (Main): Fix message when there are warnings.
16153
16154 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
16155
16156         * delegate.cs: Fixed my fix from yesterday, sorry about that.
16157
16158 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
16159
16160         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
16161         Reduced number of warnings.
16162         
16163         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
16164
16165 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
16166
16167         * driver.cs: Removed message.
16168
16169         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
16170
16171 2004-12-08    <vargaz@freemail.hu>
16172
16173         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
16174
16175 2004-12-08  Martin Baulig  <martin@ximian.com>
16176
16177         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
16178         instead of a CS3002 for properties and indexer.
16179
16180 2004-12-08  Martin Baulig  <martin@ximian.com>
16181
16182         * decl.cs (MemberName.ToString): Make this work again.
16183
16184 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
16185
16186         * attribute.cs (Resolve): Add error 591 detection.
16187
16188         * class.cs (FieldMember.Define): Add error 1547 detection.
16189         (Indexer.Define): Add error 620 detection.
16190         (Operator.Define): Add error 590 detection.
16191
16192         * ecore.cs: Missing argument for error 79.
16193
16194         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
16195         detection.
16196
16197 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
16198
16199         Fix #70106
16200         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
16201         only.
16202
16203 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
16204
16205         * cs-parser.jay : handle doc comments on implicit/explicit operators.
16206           Some operator comments were suppressed.
16207         * doc.cs : Implicit/explicit operator name in doc comments are like
16208           "op_Explicit(type)~returnType", so added suffix handling.
16209
16210 2004-12-07  Martin Baulig  <martin@ximian.com>
16211
16212         * decl.cs
16213         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
16214         (MemberCore.GetClsCompliantAttributeValue): Likewise.
16215         (DeclSpace.ec): New protected field; store the EmitContext here.
16216         (DeclSpace.EmitContext): New public property; moved here from
16217         `TypeContainer'.
16218         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
16219         EmitContext.
16220
16221         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
16222         (Enum.Emit): Don't create a new EmitContext.
16223
16224         * delegate.cs (Delegate.DefineType): Always create the
16225         EmitContext.
16226
16227         * iterators.cs (Iterators.DefineIterator): Create a new
16228         EmitContext and store it in `ec'.
16229
16230 2004-08-24  Martin Baulig  <martin@ximian.com>
16231
16232         * typemanager.cs
16233         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
16234         this for accessibility checks.
16235         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
16236         IsNestedFamilyAccessible.
16237         (TypeManager.IsSubclassOf): New method, do what the name actually
16238         says.   
16239
16240 2004-12-06  Raja R Harinath  <rharinath@novell.com>
16241
16242         Fix crash on cs0657-17.cs.
16243         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
16244         Use RootContext.Tree.Types, not 'new RootTypes ()'.
16245         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
16246         the case where the NamespaceEntry gets overwritten.
16247
16248 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
16249
16250         Fixed #69195, #56821
16251         * ecore.cs (ResolveBoolean): Tiny refactoring.
16252
16253         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
16254         of right expression resolving when left is false constant and
16255         operator is LogicalAnd OR true constant and operator is LogicalOr.
16256
16257         * statement.cs (ResolveUnreachable): Always reports warning.
16258
16259 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
16260
16261         * class.cs: Distinguish between 1721 and 1722 (just a little help
16262         for the programmer).
16263
16264 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
16265
16266         * delegate.cs: Only allow this on new versions of the language. 
16267
16268 2004-12-02  Duncan Mak  <duncan@ximian.com>
16269
16270         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
16271         Expression class.
16272         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
16273         here as a static method. Take an additional bool out parameter
16274         `must_do_cs1540_check' for signaling to InstanceResolve.
16275         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
16276         member field from PropertyExpr class and made it an argument of
16277         the method instead.
16278         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
16279         check for MarshalByRefObject, and report CS0122 instead of CS1540.
16280         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
16281         and `remove_accessor' as well as InstanceResolve: report CS0122
16282         where applicable.
16283
16284         Fixes #70129.
16285
16286 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16287
16288         Fix test-327.cs, test-328.cs, and put in early infrastructure
16289         for eventually fixing #52697.
16290         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
16291         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
16292         from other methods.
16293         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
16294         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
16295         (VerifyUsing, error246): Update.
16296         * rootcontext.cs (RootContext.NamespaceLookup): Just use
16297         'NamespaceEntry.LookupNamespaceOrType'.
16298
16299 2004-12-03  Martin Baulig  <martin@ximian.com>
16300
16301         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16302         method as our child, call AnonymousMethod.Compatible() on it.
16303
16304 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16305
16306         Disable XML documentation support in 'basic' profile.
16307         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
16308         Redirect XmlElement to System.Object.
16309         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
16310         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
16311         * mcs.exe.sources: Add doc-bootstrap.cs.
16312         * doc-bootstrap.cs: New file.  Contains empty stub implementation
16313         of doc.cs.
16314
16315 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
16316
16317         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
16318           comments are allowed.
16319
16320 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16321
16322         * delegate.cs: Add checks for subtypes in paramaters and return values
16323         in VerifyMethod () to add support for Covariance/Contravariance
16324         in delegates.
16325         
16326 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
16327
16328         * report.cs: Remove extra closing parenthesis.
16329
16330         * convert.cs (Error_CannotImplicitConversion): If the name of the
16331         types are the same, provide some extra information.
16332
16333         * class.cs (FieldBase): Use an unused bit field from the field to
16334         encode the `has_offset' property from the FieldMember.  This saves
16335         a couple of Ks on bootstrap compilation.
16336
16337         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16338         method as our child, return the AnonymousMethod resolved
16339         expression.
16340
16341         * expression.cs (New.DoResolve): Allow return values from
16342         NewDelegate to also include AnonymousMethods.
16343
16344         Fixes #70150.
16345
16346 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
16347
16348         Fix bug #70102
16349         * attribute.cs (Resolve): Improved implementation of params
16350         attribute arguments.
16351
16352         * support.cs (ParameterData): Add HasParams to be faster.
16353
16354 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
16355
16356         all things are for /doc support:
16357
16358         * doc.cs: new file that supports XML documentation generation.
16359         * mcs.exe.sources: added doc.cs.
16360         * driver.cs:
16361           Handle /doc command line option.
16362           Report error 2006 instead of 5 for missing file name for /doc.
16363           Generate XML documentation when required, after type resolution.
16364         * cs-tokenizer.cs:
16365           Added support for picking up documentation (/// and /** ... */),
16366           including a new XmlCommentState enumeration.
16367         * cs-parser.jay:
16368           Added lines to fill Documentation element for field, constant,
16369           property, indexer, method, constructor, destructor, operator, event
16370           and class, struct, interface, delegate, enum.
16371           Added lines to warn incorrect comment.
16372         * rootcontext.cs :
16373           Added Documentation field (passed only when /doc was specified).
16374         * decl.cs:
16375           Added DocComment, DocCommentHeader, GenerateDocComment() and
16376           OnGenerateDocComment() and some supporting private members for
16377           /doc feature to MemberCore.
16378         * class.cs:
16379           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
16380         * delegate.cs:
16381           Added overriden DocCommentHeader.
16382         * enum.cs:
16383           Added overriden DocCommentHeader and GenerateDocComment().
16384
16385 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
16386
16387         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
16388         unwrapping the enumeration values, chain to
16389         DoConstantNumericPromotions again, so we can promote things to the
16390         fundamental types (takes care of enums that are bytes, sbytes).
16391
16392         Fixes bug #62054.
16393
16394 2004-12-01  Raja R Harinath  <rharinath@novell.com>
16395
16396         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
16397         Fix long-standing bug in type-lookup.  Use FindType instead of
16398         LookupType when ec.ResolvingTypeTree.
16399         (Attribute.ResolveType, Attribute.Resolve)
16400         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
16401         Update to changes.
16402         (Attributes.Search): Remove internal version.  Update.
16403         (Attributes.SearchMulti): Update.
16404         (Attributes.GetClsCompliantAttribute): Remove.
16405         (Attributes.GetIndexerNameAttribute): Remove.
16406         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
16407         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
16408         * class.cs (Indexer.Define): Likewise.
16409
16410 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
16411
16412         Fix bug #68790
16413         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
16414         MarshallByReference members access.
16415
16416         * expression.cs: Use CheckMarshallByRefAccess;
16417         Better error CS0197 message.
16418
16419         * report.cs: Print whole related error message.
16420
16421 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16422
16423         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16424         the current directory to help debugging.
16425
16426 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16427
16428         * class (GetClassBases): Better error 60 report.
16429         (EventProperty): Disabled warning 67 detection.
16430
16431 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16432
16433         Fix bug #60324
16434         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16435
16436         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16437         precise values.
16438
16439 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16440
16441         Fix bug #49488
16442         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16443
16444         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16445
16446 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16447
16448         * attribute.cs (Attribute.Resolve): Refine error reporting and
16449         report a cs0117 if the identifier does not exist, to distinguish
16450         from 0617 which is a miss-use of the actual identifier.
16451
16452         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16453         between cs0070 and cs0079.
16454
16455         * class.cs (MemberBase.DoDefine): When reporting a wrong
16456         accessibility level, we use MethodCore to compare instead of
16457         Method (this was a regression in some refactoring effort).
16458
16459         So now we correctly report cs0056 again.
16460
16461         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16462         testing the target_type (which was known to be object_type) and
16463         not the source type (which is anonymous_method).
16464
16465         Fixed reporting of error cs1660.
16466
16467         * expression.cs (UserCast.Source): Expose the underlying cast.
16468
16469         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16470         allowed types to find a match to int32 first (most common).
16471
16472         In addition, it ignores any ImplicitUserConversions that did an
16473         internal implicit conversion (as the switch statement allows only
16474         one integral conversion to exist).
16475
16476         * class.cs (PartialContainer.Create): rename `name' to
16477         `member_name' for clarity.  Then replace the string calls with a
16478         call to MemberName.GetPartialName, as now using
16479         MemberName.ToString is an error (this is due to the side effects
16480         it had, that were fixed in the past).
16481
16482         This will restore the error reporting on a number of partial class
16483         errors that were missusing this (and getting an exception as a
16484         results, which is now just a plain textual warning, because
16485         yyparse debug output would crash otherwise).
16486
16487 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16488
16489         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16490
16491 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16492
16493         * rootcontext.cs (LookupType): Make sure to cache lookups that
16494         don't give us a negative result. This saves about 5% of corlib
16495         compilation time.
16496
16497 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16498
16499         * report.cs (AbstractMessage.Print): messages are sent to stderr
16500
16501         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16502         non-interface in the list of interfaces (at this point, either
16503         parent was properly set, or a base class is being listed in the
16504         interfaces section).
16505
16506         This flags error 1722, and resolves the crash from bug 69259.
16507
16508 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16509
16510         * statement.cs (Using.EmitExpressionFinally): make this work right
16511         for valuetypes. Fixes 69926.
16512
16513 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16514
16515         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16516         converted to an enum" here, before we try to change the underlying
16517         type.  This code exists, but it is a different code path than the
16518         one used while encoding constants.
16519
16520         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16521         old bug: when converting from the null literal to a pointer,
16522         return an EmptyCast, not the NullLiteral.
16523
16524         This fixes #69921, the recent null_type changes probably made this
16525         bug more prominent.
16526
16527         (ImplicitReferenceConversionExists): In addition, resynchronized
16528         the code here, so it matches the same code in
16529         ImplicitReferenceConversionExists for the `from any class-type S
16530         to any interface-type T'.
16531         
16532
16533 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16534
16535         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16536
16537 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16538
16539         * cs-parser.jay: Use verbosity accordingly. 
16540
16541 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16542
16543         * expression.cs (Unary.ResolveOperator): Do not report warning;
16544         AddressOf reads from variable.
16545         
16546         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16547
16548 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16549
16550         Fix bug #69462
16551
16552         * attribute.cs (Attributable): Removed CheckTargets.
16553         (Attributes.Emit): Explicit attribute targets are tested here.
16554
16555         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16556         not enabled for interfaces.
16557
16558         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16559         (GetAssemblyName): Ouch next bug there.
16560
16561 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16562
16563         * expression.cs: Error 275 added.
16564         
16565 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16566
16567         Fix bug #69177 (Implemented decimal constant support)
16568
16569         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16570         (BinaryFold): Add DecimalConstant.
16571
16572         * const.cs (Define): Decimal constant 
16573         (is not constant.
16574         (ChangeType): Add decimal type handling.
16575         (LookupConstantValue): Don't set value for decimal type but
16576         emit DecimalConstantAttribute. Needed for constant optimization.
16577
16578         * constant.cs (ToDecimal): New method.
16579         (ConvertToDecimal): New method.
16580         (IntConstant): Implemented ConvertToDecimal.
16581         (DecimalConstant.Emit): Emit optimized version for decimals in
16582         int range.
16583
16584         * expression.cs (ResolveOperator): Changed order of constant
16585         reduction to work correctly with native types which have
16586         overloaded operators.
16587         (ResolveMemberAccess): Extract constant value from attribute
16588         for decimal type.
16589
16590         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16591
16592         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16593         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16594         (ChangeType): Decimal is special.
16595         (TypeToCoreType): Add decimal type.
16596
16597 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16598
16599         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16600         decimal types.
16601
16602 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16603
16604         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16605         test cs1667-5.cs.
16606
16607 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16608
16609         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16610
16611         * pending.cs (PendingImplementation): Grab only interfaces.
16612
16613 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16614
16615         * statement.cs (ForeachHelperMethods): Add location member and
16616         error 202 detection.
16617
16618 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16619
16620         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16621         automatically handled by executable.make.
16622         (PROGRAM): Make profile-specific.
16623
16624 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16625
16626         * expression.cs (DoResolveBase): Fixed wrong warning for out
16627         variables.
16628
16629 2004-11-18  Martin Baulig  <martin@ximian.com>
16630
16631         Merged latest changes into gmcs.  Please keep this comment in
16632         here, it makes it easier for me to see what changed in MCS since
16633         the last time I merged.
16634
16635 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16636
16637         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16638         (TypeHandle.GetMemberCache): New.
16639         (TypeHandle.TypeHandle): Update.
16640         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16641         (TypeManager.LookupParentInterfacesCache):
16642         Rename from LookupInterfaceCache.  Optimize slightly.
16643         (TypeManager.MemberLookup_FindMembers): Update.
16644         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16645         multi-type variant.
16646         (AddCacheContents): Rename from AddHashtable.
16647         * class.cs (TypeContainer.parent_container): Remove.
16648         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16649         (TypeContainer.DoDefineMembers): Don't initialize it.
16650         Update to name changes.
16651         
16652 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16653
16654         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16655         that factors the code to check access modifiers on override.  
16656
16657         (PropertyBase): Use the code here.
16658
16659         Patch from Lluis S'anchez, fixes bug #69361.
16660
16661 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16662
16663         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16664         routine that is used to report the use of a captured variable
16665         whose address has been taken.
16666
16667         There are two checks: one when variables are being captured and
16668         the other check is when the address of a variable is taken. 
16669         
16670         (because an anonymous methods might be resolved before *or* after
16671         the address has been taken) and 
16672
16673         * expression.cs (Conditional.DoResolve): Remove the special
16674         casing that Martin added to trueExpr and falseExpr being both
16675         NullLiteral.  We get the right behavior now just by introducing
16676         the null_type into the compiler. 
16677
16678         * convert.cs (ExplicitConversion): Change the code to use
16679         null_type instead of testing `expr is NullLiteral'.
16680         (ImplicitConversionStandard): use null_type too.
16681         (ImplicitReferenceConversionExists): use null_type too.
16682         (ImplicitReferenceConversion): use null_type too.
16683
16684         * literal.cs: The type of `NullLiteral' is now null_type instead
16685         of object_type. 
16686         (Resolve): Set the type here.
16687
16688         * typemanager.cs: Introduce null_type.
16689
16690 2004-11-17  Martin Baulig  <martin@ximian.com>
16691
16692         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16693         direction, like FindMembers() does.  Fixes #69546, testcase is in
16694         test-315.cs.    
16695
16696 2004-11-16  Martin Baulig  <martin@ximian.com>
16697
16698         This is based on a patch from Marek Safar, see bug #69082.
16699         Fixes bugs #63705 and #67130.
16700
16701         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16702         method; create a MemberCache for an interface type and cache the
16703         result.
16704
16705         * decl.cs (IMemberContainer.ParentContainer): Removed.
16706         (IMemberContainer.ParentCache): New property.
16707         (MemberCache.SetupCacheForInterface): Removed.
16708         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16709         to create a cache for an interface's "parent".
16710
16711         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16712         interfaces too.
16713
16714 2004-11-16  Martin Baulig  <martin@ximian.com>
16715
16716         Merged back from gmcs; these changes already went into gmcs a
16717         couple of weeks ago.
16718
16719         * typemanager.cs
16720         (TypeManager.AddUserType): Removed the `ifaces' argument.
16721         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16722         `TypeExpr []'.
16723         (TypeManager.AddUserInterface): Removed.
16724         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16725         `TypeExpr []'.
16726         (TypeManager.GetInterfaces): Likewise.
16727         (TypeManager.GetExplicitInterfaces): Likewise.
16728
16729         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16730
16731         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16732         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16733
16734 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16735
16736         * statement.cs: Avoid adding bools to a hashtable.
16737
16738 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16739
16740         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16741         calling an unsafe method from a safe location.
16742
16743 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16744
16745         Fix #69167
16746         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16747
16748 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16749
16750         * namespace.cs (VerifyUsing): use GetPartialName instead of
16751         ToString. 
16752
16753 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16754
16755         * statement.cs (Return.Resolve): Fix regression in typo: if
16756         `in_exc', we have to request a NeedReturnLabel, this was a typo
16757         introduced in the anonymous method check-in.  Fixes #69131.
16758
16759         * Indexers were using the ShortName when defining themselves,
16760         causing a regression in the compiler bootstrap when applying the
16761         patch from 2004-11-02 (first part), now they use their full name
16762         and the bug is gone.
16763
16764 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16765
16766         * driver.cs: Strip the path from the names of embedded resources. Fixes
16767         #68519.
16768
16769 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16770
16771         Fix error message regression: cs0104-2.cs.
16772         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16773         (AliasEntry.Resolve): Update.
16774         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16775         'silent' flag.
16776         (RootContext.LookupType): Update.
16777
16778 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16779
16780         * cs-parser.jay: Add support for handling accessor modifiers
16781         * class: Add support port accessor modifiers and error checking,
16782         define PropertyMethod.Define as virtual (not abstract anymore)
16783         * ecore.cs: Add checking for proeprties access with access modifiers
16784         * iterators.cs: Modify Accessor constructor call based in the modified
16785         constructor
16786 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16787
16788         * expression.cs (StringConcat): Handle being called twice,
16789         as when we have a concat in a field init with more than two
16790         ctors in the class
16791
16792 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16793
16794         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16795         special case explicit implementations, we should always produce
16796         the .property or .event declaration.
16797         
16798         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16799         since it will not return correct data if people use this
16800         unresolved in the presence of using statements (see test-313).
16801
16802         * class.cs (MethodData.Define): If we are an explicit interface
16803         implementation, set the method name to the full name of the
16804         interface plus the name of the method.  
16805
16806         Notice that using the method.MethodName.GetFullName() does not
16807         work, as it will only contain the name as declared on the source
16808         file (it can be a shorthand in the presence of using statements)
16809         and not the fully qualifed type name, for example:
16810
16811         using System;
16812
16813         class D : ICloneable {
16814                 object ICloneable.Clone ()  {
16815                 }
16816         }
16817
16818         Would produce a method called `ICloneable.Clone' instead of
16819         `System.ICloneable.Clone'.
16820
16821         * namespace.cs (Alias.Resolve): Use GetPartialName.
16822         
16823 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16824
16825         * cs-parser.jay: Add error 1055 report.
16826
16827 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16828
16829         * assign.cs (Assign.DoResolve): Only do the transform of
16830         assignment into a New if the types are compatible, if not, fall
16831         through and let the implicit code deal with the errors and with
16832         the necessary conversions. 
16833
16834 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16835
16836         * cs-parser.jay: Add error 1031 report.
16837
16838         * cs-tokenizer.cs: Add location for error 1038.
16839
16840 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16841
16842         * cs-parser.jay: Add error 1016 report.
16843
16844 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16845
16846         * cs-parser.jay: Add errors 1575,1611 report.
16847
16848 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16849
16850         * cs-parser.jay: Add error 1001 report.
16851
16852 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16853
16854         Fix #68850
16855         * attribute.cs (GetMarshal): Add method argument for
16856         caller identification.
16857
16858         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16859         agument for GetMarshal and RuntimeMissingSupport.
16860
16861 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16862
16863         * attribute.cs (ExtractSecurityPermissionSet): Removed
16864         TypeManager.code_access_permission_type.
16865
16866         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16867
16868 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16869
16870         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16871         for obsolete use of a variable here.   Fixes regression on errors
16872         cs0619-25 and cs0619-26.
16873
16874 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16875
16876         Fix #62358, implemented security attribute encoding.
16877
16878         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16879         Tests permitted SecurityAction for assembly or other types.
16880         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16881         data from SecurityPermissionAttribute to PermisionSet class.
16882
16883         * class.cs (ApplyAttributeBuilder): Added special handling
16884         for System.Security.Permissions.SecurityAttribute based types.
16885
16886         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16887         special handling for System.Security.Permissions.SecurityAttribute
16888         based types.
16889
16890         * enum.cs (ApplyAttributeBuilder): Added special handling
16891         for System.Security.Permissions.SecurityAttribute based types.
16892
16893         * parameter.cs (ApplyAttributeBuilder): Added special handling
16894         for System.Security.Permissions.SecurityAttribute based types.
16895
16896         * rootcontext.cs: Next 2 core types.
16897
16898         * typemanager.cs (TypeManager.security_permission_attr_type):
16899         Built in type for the SecurityPermission Attribute.
16900         (code_access_permission_type): Build in type.
16901
16902 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16903
16904         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16905         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16906         all of this information into
16907         EmitContext.EmitCapturedVariableInstance.
16908         
16909         * codegen.cs (EmitCapturedVariableInstance): move here the
16910         funcionality of emitting an ldarg.0 in the presence of a
16911         remapping.   This centralizes the instance emit code.
16912
16913         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16914         then emit a load of this: it means that we have reached the
16915         topmost ScopeInfo: the one that contains the pointer to the
16916         instance of the class hosting the anonymous method.
16917
16918         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16919         captures to the topmost CaptureContext.
16920
16921 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16922
16923         * expression.cs (LocalVariableReference): Move the knowledge about
16924         the iterators into codegen's EmitCapturedVariableInstance.
16925
16926 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16927
16928         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16929         all code paths return a value from an anonymous method (it is the
16930         same as the 161 error, but for anonymous methods).
16931
16932 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16933
16934         The introduction of anonymous methods in the compiler changed
16935         various ways of doing things in the compiler.  The most
16936         significant one is the hard split between the resolution phase
16937         and the emission phases of the compiler.
16938
16939         For instance, routines that referenced local variables no
16940         longer can safely create temporary variables during the
16941         resolution phase: they must do so from the emission phase,
16942         since the variable might have been "captured", hence access to
16943         it can not be done with the local-variable operations from the runtime.
16944         
16945         * statement.cs 
16946
16947         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16948         is a toplevel block.
16949
16950         (ToplevelBlock): A new kind of Block, these are the blocks that
16951         are created by the parser for all toplevel method bodies.  These
16952         include methods, accessors and anonymous methods.
16953
16954         These contain some extra information not found in regular blocks:
16955         A pointer to an optional CaptureContext (for tracking captured
16956         local variables and parameters).  A pointer to the parent
16957         ToplevelBlock.
16958         
16959         (Return.Resolve): Catch missmatches when returning a value from an
16960         anonymous method (error 1662).
16961         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16962         phase.
16963
16964         (Break.Resolve): ditto.
16965
16966         (SwitchLabel): instead of defining the labels during the
16967         resolution phase, we now turned the public ILLabel and ILLabelCode
16968         labels into methods called GetILLabelCode() and GetILLabel() that
16969         only define the label during the Emit phase.
16970
16971         (GotoCase): Track the SwitchLabel instead of the computed label
16972         (its contained therein).  Emit the code by using
16973         SwitchLabel.GetILLabelCode ().
16974
16975         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16976         whether the Local has been captured or not.
16977
16978         (LocalInfo.IsCaptured): New property, used to tell whether the
16979         local has been captured.
16980         
16981         * anonymous.cs: Vastly updated to contain the anonymous method
16982         support.
16983
16984         The main classes here are: CaptureContext which tracks any
16985         captured information for a toplevel block and ScopeInfo used to
16986         track the activation frames for various local variables.   
16987
16988         Each toplevel block has an optional capture context associated
16989         with it.  When a method contains an anonymous method both the
16990         toplevel method and the anonymous method will create a capture
16991         context.   When variables or parameters are captured, they are
16992         recorded on the CaptureContext that owns them, for example:
16993
16994         void Demo () {
16995              int a;
16996              MyDelegate d = delegate {
16997                  a = 1;
16998              }
16999         }
17000
17001         Here `a' will be recorded as captured on the toplevel
17002         CapturedContext, the inner captured context will not have anything
17003         (it will only have data if local variables or parameters from it
17004         are captured in a nested anonymous method.
17005
17006         The ScopeInfo is used to track the activation frames for local
17007         variables, for example:
17008
17009         for (int i = 0; i < 10; i++)
17010                 for (int j = 0; j < 10; j++){
17011                    MyDelegate d = delegate {
17012                         call (i, j);
17013                    }
17014                 }
17015
17016         At runtime this captures a single captured variable `i', but it
17017         captures 10 different versions of the variable `j'.  The variable
17018         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
17019         recorded on a child.  
17020
17021         The toplevel ScopeInfo will also track information like the `this'
17022         pointer if instance variables were referenced (this is necessary
17023         as the anonymous method lives inside a nested class in the host
17024         type of the method). 
17025
17026         (AnonymousMethod): Expanded to track the Toplevel, implement
17027         `AnonymousMethod.Compatible' to tell whether an anonymous method
17028         can be converted to a target delegate type. 
17029
17030         The routine now also produces the anonymous method content
17031
17032         (AnonymousDelegate): A helper class that derives from
17033         DelegateCreation, this is used to generate the code necessary to
17034         produce the delegate for the anonymous method that was created. 
17035
17036         * assign.cs: API adjustments for new changes in
17037         Convert.ImplicitStandardConversionExists.
17038
17039         * class.cs: Adjustments to cope with the fact that now toplevel
17040         blocks are of type `ToplevelBlock'. 
17041
17042         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
17043         insteda of standard blocks.
17044
17045         Flag errors if params arguments are passed to anonymous methods.
17046
17047         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
17048         `CurrentAnonymousMethod' which points to the current Anonymous
17049         Method.  The variable points to the AnonymousMethod class that
17050         holds the code being compiled.  It is set in the new EmitContext
17051         created for the anonymous method.
17052
17053         (EmitContext.Phase): Introduce a variable and an enumeration to
17054         assist in enforcing some rules about when and where we are allowed
17055         to invoke certain methods (EmitContext.NeedsReturnLabel is the
17056         only one that enfonces this right now).
17057
17058         (EmitContext.HaveCaptureInfo): new helper method that returns
17059         whether we have a CapturedContext initialized.
17060
17061         (EmitContext.CaptureVariable): New method used to register that a
17062         LocalInfo must be flagged for capturing. 
17063
17064         (EmitContext.CapturedParameter): New method used to register that a
17065         parameters must be flagged for capturing. 
17066         
17067         (EmitContext.CapturedField): New method used to register that a
17068         field must be flagged for capturing. 
17069
17070         (EmitContext.HaveCapturedVariables,
17071         EmitContext.HaveCapturedFields): Return whether there are captured
17072         variables or fields. 
17073
17074         (EmitContext.EmitMethodHostInstance): This is used to emit the
17075         instance for the anonymous method.  The instance might be null
17076         (static methods), this (for anonymous methods that capture nothing
17077         and happen to live side-by-side with the current method body) or a
17078         more complicated expression if the method has a CaptureContext.
17079
17080         (EmitContext.EmitTopBlock): Routine that drives the emission of
17081         code: it will first resolve the top block, then emit any metadata
17082         and then emit the code.  The split is done so that we can extract
17083         any anonymous methods and flag any captured variables/parameters.
17084         
17085         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
17086         during this phase, the ILGenerator should not be used as labels
17087         and local variables declared here might not be accessible to any
17088         code that is part of an anonymous method.  
17089
17090         Exceptions to this include the temporary variables that are
17091         created by some statements internally for holding temporary
17092         variables. 
17093         
17094         (EmitContext.EmitMeta): New routine, in charge of emitting all the
17095         metadata for a cb
17096
17097         (EmitContext.TemporaryReturn): This method is typically called
17098         from the Emit phase, and its the only place where we allow the
17099         ReturnLabel to be defined other than the EmitMeta.  The reason is
17100         that otherwise we would have to duplicate a lot of logic in the
17101         Resolve phases of various methods that today is on the Emit
17102         phase. 
17103
17104         (EmitContext.NeedReturnLabel): This no longer creates the label,
17105         as the ILGenerator is not valid during the resolve phase.
17106
17107         (EmitContext.EmitThis): Extended the knowledge in this class to
17108         work in anonymous methods in addition to iterators. 
17109
17110         (EmitContext.EmitCapturedVariableInstance): This emits whatever
17111         code is necessary on the stack to access the instance to a local
17112         variable (the variable will be accessed as a field).
17113
17114         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
17115         EmitContext.EmitAddressOfParameter): Routines to support
17116         parameters (not completed at this point). 
17117         
17118         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
17119         will also remove the parameters.
17120
17121         * convert.cs (Convert): Define a `ConstantEC' which points to a
17122         null.  This is just to prefity some code that uses
17123         ImplicitStandardConversion code and do not have an EmitContext
17124         handy.
17125
17126         The idea is to flag explicitly that at that point in time, it is
17127         known that the conversion will not trigger the delegate checking
17128         code in implicit conversions (which requires a valid
17129         EmitContext). 
17130
17131         Everywhere: pass new EmitContext parameter since
17132         ImplicitStandardConversionExists now requires it to check for
17133         anonymous method conversions. 
17134
17135         (Convert.ImplicitStandardConversionExists): If the type of an
17136         expression is the anonymous_method_type, and the type is a
17137         delegate, we invoke the AnonymousMethod.Compatible method to check
17138         whether an implicit conversion is possible. 
17139
17140         (Convert.ImplicitConversionStandard): Only do implicit method
17141         group conversions if the language level is not ISO_1.
17142
17143         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
17144         MethodInfo for the Invoke method.  used by Delegate and
17145         AnonymousDelegate.
17146
17147         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
17148         method conversions if the target type is a delegate.
17149
17150         Removed extra debugging nops.
17151
17152         (LocalVariableReference): Turn the `local_info' into a public
17153         field. 
17154
17155         Add `prepared' field, the same hack used for FieldExprs to cope
17156         with composed assignments, as Local variables do not necessarily
17157         operate purely on the stack as they used to: they can be captured
17158         fields. 
17159
17160         Add `temp' for a temporary result, like fields.
17161
17162         Refactor DoResolve and DoResolveLValue into DoResolveBase.
17163
17164         It now copes with Local variables that are captured and emits the
17165         proper instance variable to load it from a field in the captured
17166         case. 
17167
17168         (ParameterReference.DoResolveBase): During the resolve phase,
17169         capture parameters if we are in an anonymous method.
17170
17171         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
17172         anonymous method, use the EmitContext helper routines to emit the
17173         parameter reference.
17174
17175         * iterators.cs: Set RemapToProxy to true/false during the
17176         EmitDispose class.
17177
17178         * parameters.cs (GetParameterByName): New helper method. 
17179
17180         * typemanager.cs (anonymous_method_type) a new type that
17181         represents an anonyous method.  This is always an internal type,
17182         used as a fencepost to test against the anonymous-methodness of an
17183         expression. 
17184         
17185 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
17186
17187         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
17188         561 report.
17189         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
17190
17191 2004-10-18  Martin Baulig  <martin@ximian.com>
17192
17193         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
17194         `Type' directly, but call ResolveType() on it.
17195         (Catch.Resolve): Likewise.
17196         (Foreach.Resolve): Likewise.
17197
17198 2004-10-18  Martin Baulig  <martin@ximian.com>
17199
17200         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
17201         `Type' directly, but call ResolveType() on it.
17202         (Probe.DoResolve): Likewise.
17203         (ArrayCreation.LookupType): Likewise.
17204         (TypeOf.DoResolve): Likewise.
17205         (SizeOf.DoResolve): Likewise.
17206
17207 2004-10-18  Martin Baulig  <martin@ximian.com>
17208
17209         * expression.cs (Invocation.BetterFunction): Put back
17210         TypeManager.TypeToCoreType().
17211
17212 2004-10-18  Raja R Harinath  <rharinath@novell.com>
17213
17214         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
17215         the ResolveType.
17216
17217 2004-10-18  Martin Baulig  <martin@ximian.com>
17218
17219         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
17220         `Type' directly, but call ResolveType() on it.
17221
17222 2004-10-18  Martin Baulig  <martin@ximian.com>
17223
17224         * class.cs (FieldMember.Define): Don't access the TypeExpr's
17225         `Type' directly, but call ResolveType() on it.
17226         (MemberBase.DoDefine): Likewise.
17227
17228         * expression.cs (New.DoResolve): Don't access the TypeExpr's
17229         `Type' directly, but call ResolveType() on it.
17230         (ComposedCast.DoResolveAsTypeStep): Likewise.
17231
17232         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
17233         `Type' directly, but call ResolveType() on it.
17234
17235 2004-10-17  John Luke  <john.luke@gmail.com>
17236
17237         * class.cs (Operator.GetSignatureForError): use CSharpName
17238
17239         * parameter.cs (Parameter.GetSignatureForError): Returns
17240         correct name even if was not defined.
17241
17242 2004-10-13  Raja R Harinath  <rharinath@novell.com>
17243
17244         Fix #65816.
17245         * class.cs (TypeContainer.EmitContext): New property.
17246         (DefineNestedTypes): Create an emitcontext for each part.
17247         (MethodCore.DoDefineParameters): Use container's emitcontext.
17248         Pass type array to InternalParameters.
17249         (MemberBase.DoDefine): Use container's emitcontext.
17250         (FieldMember.Define): Likewise.
17251         (Event.Define): Likewise.
17252         (SetMethod.GetParameterInfo): Change argument to EmitContext.
17253         Pass type array to InternalParameters.
17254         (SetIndexerMethod.GetParameterInfo): Likewise.
17255         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
17256         * delegate.cs (Define): Pass emitcontext to
17257         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
17258         array to InternalParameters.
17259         * expression.cs (ParameterReference.DoResolveBase): Pass
17260         emitcontext to GetParameterInfo.
17261         (ComposedCast.DoResolveAsTypeStep): Remove check on
17262         ec.ResolvingTypeTree.
17263         * parameter.cs (Parameter.Resolve): Change argument to
17264         EmitContext.  Use ResolveAsTypeTerminal.
17265         (Parameter.GetSignature): Change argument to EmitContext.
17266         (Parameters.ComputeSignature): Likewise.
17267         (Parameters.ComputeParameterTypes): Likewise.
17268         (Parameters.GetParameterInfo): Likewise.
17269         (Parameters.ComputeAndDefineParameterTypes): Likewise.
17270         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
17271         * support.cs (InternalParameters..ctor): Remove variant that takes
17272         a DeclSpace.
17273         * typemanager.cs (system_intptr_expr): New.
17274         (InitExpressionTypes): Initialize it.
17275
17276 2004-10-12  Chris Toshok  <toshok@ximian.com>
17277
17278         * cs-parser.jay: fix location for try_statement and catch_clause.
17279
17280 2004-10-11  Martin Baulig  <martin@ximian.com>
17281
17282         * report.cs: Don't make --fatal abort on warnings, we have
17283         -warnaserror for that.
17284
17285 2004-10-07  Raja R Harinath  <rharinath@novell.com>
17286
17287         More DeclSpace.ResolveType avoidance.
17288         * decl.cs (MemberCore.InUnsafe): New property.
17289         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
17290         with newly created EmitContext.
17291         (FieldMember.Define): Likewise.
17292         * delegate.cs (Delegate.Define): Likewise.
17293         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
17294         only if normal name-lookup fails.
17295         (TypeExpr.DoResolve): Enable error-checking.
17296         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
17297         (SizeOf.DoResolve): Likewise.
17298         (ComposedCast.DoResolveAsTypeStep): Likewise.
17299         (StackAlloc.DoResolve): Likewise.
17300         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
17301         (Block.Unsafe): New property.
17302         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
17303         (Unsafe): Set 'unsafe' flag of contained block.
17304         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
17305         (Fixed.Resolve): Likewise.
17306         (Catch.Resolve): Likewise.
17307         (Using.ResolveLocalVariableDecls): Likewise.
17308         (Foreach.Resolve): Likewise.
17309
17310 2004-10-05  John Luke <john.luke@gmail.com>
17311
17312         * cs-parser.jay: add location to error CS0175
17313
17314 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
17315
17316         * ecore.cs (Expression.Constantity): Add support for turning null
17317         into a constant.
17318
17319         * const.cs (Const.Define): Allow constants to be reference types
17320         as long as the value is Null.
17321
17322 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
17323
17324         * namespace.cs (NamespaceEntry.Using): No matter which warning
17325         level is set, check if this namespace name has already been added.
17326
17327 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
17328
17329         * expression.cs: reftype [!=]= null should always use br[true,false].
17330         # 67410
17331
17332 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
17333
17334         Fix #67108
17335         * attribute.cs: Enum conversion moved to 
17336         GetAttributeArgumentExpression to be applied to the all
17337         expressions.
17338
17339 2004-10-01  Raja R Harinath  <rharinath@novell.com>
17340
17341         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
17342         * class.c (TypeContainer.DefineType): Flag error if
17343         base types aren't accessible due to access permissions.
17344         * decl.cs (DeclSpace.ResolveType): Move logic to
17345         Expression.ResolveAsTypeTerminal.
17346         (DeclSpace.ResolveTypeExpr): Thin layer over
17347         Expression.ResolveAsTypeTerminal.
17348         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
17349         Refactor code into NestedAccess.  Use it.
17350         (DeclSpace.NestedAccess): New.
17351         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
17352         argument to silence errors.  Check access permissions.
17353         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
17354         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
17355         (Cast.DoResolve): Likewise.
17356         (New.DoResolve): Likewise.
17357         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
17358         (TypeOf.DoResolve): Likewise.
17359
17360         * expression.cs (Invocation.BetterConversion): Return the Type of
17361         the better conversion.  Implement section 14.4.2.3 more faithfully.
17362         (Invocation.BetterFunction): Make boolean.  Make correspondence to
17363         section 14.4.2.2 explicit.
17364         (Invocation.OverloadResolve): Update.
17365         (Invocation): Remove is_base field.
17366         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
17367         (Invocation.Emit): Likewise.
17368
17369 2004-09-27  Raja R Harinath  <rharinath@novell.com>
17370
17371         * README: Update to changes.
17372
17373 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
17374
17375         * cs-parser.jay: Reverted 642 warning fix.
17376
17377 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17378
17379         Fix bug #66615
17380         * decl.cs (FindMemberWithSameName): Indexer can have more than
17381         1 argument.
17382
17383 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17384
17385         * expression.cs (LocalVariableReference.DoResolveLValue):
17386         Do not report warning 219 for out values.
17387         (EmptyExpression.Null): New member to avoid extra allocations.
17388
17389 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17390
17391         * cs-parser.jay: Fix wrong warning 642 report.
17392
17393         * cs-tokenizer.cs (CheckNextToken): New helper;
17394         Inspect next character if is same as expected.
17395
17396 2004-09-23  Martin Baulig  <martin@ximian.com>
17397
17398         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
17399         (Convert.ImplicitReferenceConversionExists): Likewise.
17400
17401 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17402
17403         * class.cs (Operator.Define): Add error 448 and 559 report.
17404
17405 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17406
17407         * class.cs (MemberBase.IsTypePermitted): New protected
17408         method for checking error CS0610.
17409
17410 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17411
17412         * class.cs (TypeContainer.HasExplicitLayout): New property
17413         Returns whether container has StructLayout attribute set Explicit.
17414         (FieldMember): New abstract class for consts and fields.
17415         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
17416         (Field): Reuse FieldMember.
17417
17418         * const.cs (Const): Reuse FieldMember.
17419
17420         * rootcontext.cs: EmitConstants call moved to class.
17421
17422 2004-09-22  Martin Baulig  <martin@ximian.com>
17423
17424         Thanks to Peter Sestoft for this bug report.
17425
17426         * expression.cs (Conditional): If both the `trueExpr' and the
17427         `falseExpr' is a NullLiteral, return a NullLiteral.
17428
17429 2004-09-22  Martin Baulig  <martin@ximian.com>
17430
17431         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17432         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17433         for the "get_Current" call.
17434
17435 2004-09-22  Martin Baulig  <martin@ximian.com>
17436
17437         Marek and me just fixed one of our oldest bugs: #28562 :-)
17438
17439         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17440
17441         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17442         we're an EnumConstant, just return that.
17443         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17444         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17445         to get the value which'll actually be written into the attribute.
17446         However, we have to use GetValue() to access the attribute's value
17447         in the compiler.        
17448
17449 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17450
17451         * constant.cs (Constant.IsNegative): New abstract property
17452         IsNegative.
17453
17454         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17455         (StackAlloc.DoResolve): Reused IsNegative.
17456
17457 2004-09-21  Martin Baulig  <martin@ximian.com>
17458
17459         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17460         if we're used in an iterator, we may be called from different
17461         methods.
17462
17463         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17464         we actually have an exception block.
17465
17466 2004-09-20  John Luke <jluke@cfl.rr.com>
17467
17468         * class.cs, cs-parser.jay: Improve the error report for 1520:
17469         report the actual line where the error happens, not where the
17470         class was declared.
17471
17472         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17473         Pass location information that was available elsewhere.
17474
17475 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17476
17477         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17478         runtime to delay sign assemblies.
17479
17480 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17481
17482         * cs-parser.jay: Do not report the stack trace, this is barely
17483         used nowadays.
17484
17485 2004-08-22  John Luke  <john.luke@gmail.com>
17486  
17487         * driver.cs : check that a resource id is not already used
17488         before adding it, report CS1508 if it is, bug #63637
17489
17490 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17491
17492         * ecore.cs: Removed dead code.
17493
17494 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17495
17496         * class.cs: Do not report warning CS0067 on the interfaces.
17497
17498 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17499
17500         * cs-parser.jay: Add error 504 report.
17501
17502 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17503
17504         * rootcontext.cs: WarningLevel is 4 by default now.
17505
17506         * statement.cs (Fixed.Resolve): Do not null
17507         VariableInfo.
17508
17509 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17510
17511         Fixed bug #55780
17512         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17513         deep search when property is not virtual.
17514         (PropertyExpr.ResolveAccessors): Make one call for both
17515         accessors.
17516
17517 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17518
17519         Fixed bug #65766
17520         * statement.cs: Error 152 report constains also location.
17521
17522 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17523
17524         Fixed bug #65766
17525         * const.cs: Explicitly set constant as static.
17526
17527 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17528
17529         Fixed bug #64226
17530         * cs-parser.jay: Add error 1017 report.
17531
17532 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17533
17534         Fixed bug #59980, #64224
17535         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17536
17537         * typemanager.cs (IsSpecialMethod): Simplified
17538
17539 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17540
17541         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17542         condition with better params.
17543
17544 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17545
17546         Fixed bug #65238
17547         * attribute.cs (Resolve): Property has to have both
17548         accessors.
17549
17550 2004-09-14  Martin Baulig  <martin@ximian.com>
17551
17552         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17553
17554 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17555
17556         Fixed bug #61902
17557         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17558         called and is obsolete then this member suppress message
17559         when call is inside next [Obsolete] method or type.
17560
17561         * expression.cs: Use TestObsoleteMethodUsage member.
17562
17563 2004-09-14  Martin Baulig  <martin@ximian.com>
17564
17565         * cs-parser.jay: Sync a bit with the GMCS version.
17566
17567 2004-09-14  Martin Baulig  <martin@ximian.com>
17568
17569         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17570         (CSharpParser.yacc_verbose_flag): New public field.
17571
17572         * genericparser.cs: Removed.
17573
17574 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17575
17576         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17577
17578 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17579
17580         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17581
17582 2004-09-10  Martin Baulig  <martin@ximian.com>
17583
17584         Backported my MemberName changes from GMCS into MCS.
17585
17586         - we are now using a special `MemberName' class instead of using
17587         strings; in GMCS, the `MemberName' also contains the type
17588         arguments.
17589
17590         - changed the grammar rules a bit:
17591           * the old `member_name' is now a `namespace_or_type_name':
17592             The rule is that we use `namespace_or_type_name' everywhere
17593             where we expect either a "member name" (GetEnumerator) or a
17594             "member name" with an explicit interface name
17595             (IEnumerable.GetEnumerator).
17596             In GMCS, the explicit interface name may include type arguments
17597             (IEnumerable<T>.GetEnumerator).
17598           * we use `member_name' instead of just `IDENTIFIER' for
17599             "member names":
17600             The rule is that we use `member_name' wherever a member may
17601             have type parameters in GMCS.       
17602
17603         * decl.cs (MemberName): New public class.
17604         (MemberCore.MemberName): New public readonly field.
17605         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17606         (DeclSpace): Likewise.
17607
17608         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17609         * enum.cs (Enum.ctor): Likewise.
17610
17611         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17612         MemberName.     
17613         (AliasEntry.ctor): Take a MemberName, not an Expression.
17614         (AliasEntry.UsingAlias): Likewise.
17615
17616         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17617         (IMethodData.MemberName): Changed type from string to MemberName.
17618         (MemberBase.ExplicitInterfaceName): Likewise.
17619         (AbstractPropertyEventMethod.SetupName): Make this private.
17620         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17621         argument; compute the member name here.
17622         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17623         on the `member.MemberName' and the `prefix'.
17624
17625         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17626         not `type_name'.
17627         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17628         thus, we get a `MemberName' instead of a `string'.  These
17629         declarations may have type parameters in GMCS.
17630         (interface_method_declaration, delegate_declaration): Likewise.
17631         (class_declaration, interface_declaration): Likewise.
17632         (method_header): Use `namespace_or_type_name' instead of
17633         `member_name'.  We may be an explicit interface implementation.
17634         (property_declaration, event_declaration): Likewise.
17635         (member_name): This is now just an `IDENTIFIER', not a
17636         `namespace_or_type_name'.
17637         (type_name, interface_type): Removed.
17638         (namespace_or_type_name): Return a MemberName, not an Expression.
17639         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17640         call GetTypeExpression() on the MemberName to get an expression.
17641         (IndexerDeclaration.interface_type): Changed type from string to
17642         MemberName.
17643         (MakeName): Operate on MemberName's instead of string's.
17644
17645 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17646
17647         Fix bug #55770.
17648         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17649         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17650         lookup to avoid symbols introduced by 'using'.
17651         * rootcontext.cs (NamespaceLookup): Update.
17652
17653 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17654
17655         * class.cs (TypeContainer.DoDefineMembers): Do not call
17656         DefineDefaultConstructor for static classes.
17657
17658 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17659
17660         * attribute.cs (Attribute.Resolve): Add error 653 report.
17661
17662         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17663         report.
17664         (Method.ApplyAttributeBuilder): Add error 685 report.
17665         (Operator.Define): Add error 564 report.
17666
17667         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17668
17669         * expression.cs (Invocation.DoResolve): Add error
17670         245 and 250 report.
17671
17672         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17673         error 674 report.
17674
17675 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17676
17677         * class.cs (ConstructorInitializer.Resolve):
17678         Wrong error number (515->516).
17679
17680 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17681
17682         * class.cs (Indexer.Define): Add error 631 report.
17683
17684 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17685
17686         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17687
17688 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17689
17690         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17691
17692 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17693
17694         * cs-parser.jay: Added error CS0241 report.
17695
17696 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17697
17698         * cs-parser.jay (fixed_statement): Introduce a scope for the
17699         declaration in the 'fixed' statement.
17700
17701 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17702
17703         * cs-parser.jay: Added CS0230 error report.
17704
17705 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17706
17707         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17708
17709 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17710
17711         * expression.cs (Argument.Resolve): Added error CS0192 and
17712         CS0199 report.
17713
17714 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17715
17716         C# 2.0 #pragma warning feature
17717
17718         * cs-tokenizer.cs (PreProcessPragma): New method; 
17719         Handles #pragma directive.
17720
17721         * report.cs (WarningRegions): New class; Support
17722         class for #pragma warning directive. It tests whether
17723         warning is enabled for a given line.
17724
17725 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17726
17727         * const.cs: Add more descriptive error report, tahnks to
17728         Sebastien. 
17729
17730 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17731
17732         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17733
17734 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17735
17736         * expression.cs: Apply patch from Ben: Remove dead code from
17737         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17738         as that code just threw an exception anwyays.
17739
17740         * const.cs: Remove the call to the turnintoconstant, for details
17741         see bug: #63144
17742         
17743         * literal.cs: The type of the null-literal is the null type;  So
17744         we use a placeholder type (literal.cs:System.Null, defined here)
17745         for it.
17746
17747         * expression.cs (Conditional.DoResolve): Remove some old code that
17748         is no longer needed, conversions have been fixed.
17749
17750         (ArrayCreationExpression.DoResolve): Return false if we fail to
17751         resolve the inner expression.
17752
17753 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17754
17755         Fix test-290.cs.
17756         * cs-parser.jay (delegate_declaration): Record a delegate
17757         declaration as a type declaration.
17758         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17759
17760 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17761
17762         * parameter.cs: Do not crash if the type can not be resolved. 
17763
17764         * expression.cs: Report errors with unsafe pointers, fixes #64896
17765
17766 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17767
17768         * expression.cs: Pointer arith always needs to do a conv.i
17769         if the operand is a long. fix 65320
17770
17771 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17772
17773         Fixed cs0619-37.cs, cs0619-38.cs
17774
17775         * enum.cs (GetObsoleteAttribute): Removed.
17776
17777         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17778         on Enum member is double staged. The first is tested member
17779         and then enum.
17780
17781 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17782
17783         Fixed #56986, #63631, #65231
17784
17785         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17786         adds member to name container.
17787         (TypeContainer.AddToTypeContainer): New method, adds type to
17788         name container.
17789         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17790         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17791         AddOperator): Simplified by reusing AddToMemberContainer.
17792         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17793         instead of field.
17794         (Method.CheckForDuplications): Fixed implementation to test all
17795         possibilities.
17796         (MemberBase): Detection whether member is explicit interface
17797         implementation is now in constructor.
17798         (MemberBase.UpdateMemberName): Handles IndexerName.
17799         (Accessor): Changed to keep also location information.
17800         (AbstractPropertyEventMethod): Is derived from MemberCore.
17801         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17802         will be emited or not.
17803         (PropertyBase.AreAccessorsDuplicateImplementation):
17804         Tests whether accessors are not in collision with some method.
17805         (Operator): Is derived from MethodCore to simplify common
17806         operations.
17807
17808         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17809         must be performed.
17810         (DeclSpace.AddToContainer): Adds the member to defined_names
17811         table. It tests for duplications and enclosing name conflicts.
17812
17813         * enum.cs (EnumMember): Clean up to reuse the base structures
17814
17815 2004-09-03  Martin Baulig  <martin@ximian.com>
17816
17817         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17818         into TypeContainer, to make partial classes work again.
17819
17820 2004-09-03  Martin Baulig  <martin@ximian.com>
17821
17822         * rootcontext.cs (RootContext.V2): Removed.
17823
17824 2004-03-23  Martin Baulig  <martin@ximian.com>
17825
17826         * expression.cs (Invocation.OverloadResolve): Added `bool
17827         may_fail' argument and use it instead of the Location.IsNull() hack.
17828
17829 2004-09-03  Martin Baulig  <martin@ximian.com>
17830
17831         Merged latest changes into gmcs.  Please keep this comment in
17832         here, it makes it easier for me to see what changed in MCS since
17833         the last time I merged.
17834
17835 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17836
17837         Fix #61128.
17838         * expression.cs (BetterConversion): Don't allow either conversion 
17839         to be null.  Remove redundant implicit conversion test when 'q ==
17840         null' -- when this function is invoked, we already know that the
17841         implicit conversion exists.
17842         (BetterFunction): Assume that 'best' is non-null.  Remove
17843         redundant reimplementation of IsApplicable when 'best' is null.
17844         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17845         number of arguments.
17846         (IsAncestralType): Extract from OverloadResolve.
17847         (OverloadResolve): Make robust to the MethodGroupExpr being
17848         unsorted.  Implement all the logic of Section 14.5.5.1, and
17849         support overloading of methods from multiple applicable types.
17850         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17851
17852         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17853         (RealError, Warning): Append type of report to related symbol.
17854
17855 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17856
17857         * enum.cs: Fixed CLS-Compliance checks for enum members.
17858         Error tests cs3008-8.cs, cs3014-8.cs
17859
17860 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17861
17862         Fixed bug #62342, #63102
17863         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17864         like ImplementMethod.
17865
17866 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17867
17868         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17869         Fixed bug #65170.
17870
17871 2004-09-02  Martin Baulig  <martin@ximian.com>
17872
17873         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17874         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17875         on the MethodBase.
17876
17877 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17878
17879         C# 2.0 Static classes implemented
17880
17881         * class.cs (TypeContainer): instance_constructors,
17882         initialized_fields, initialized_static_fields,
17883         default_constructor, base_inteface_types are protected to be
17884         accessible from StaticClass.
17885         (TypeContainer.DefineDefaultConstructor): New virtual method
17886         for custom default constructor generating
17887         (StaticClass): New class to handle "Static classes" feature.
17888
17889         * cs-parser.jay: Handle static keyword on class like instance
17890         of StaticClass.
17891
17892         * driver.cs: Added "/langversion" command line switch with two
17893         options (iso-1, default).
17894
17895 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17896
17897         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17898
17899 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17900
17901         * delegate.cs: Style.
17902
17903 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17904
17905         * delegate.cs: Add seperate instance expr field for miguel.
17906
17907 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17908
17909         * PointerArithmetic (Resolve): make sure we are not doing
17910         pointer arith on void*. Also, make sure we are resolved
17911         by not setting eclass until resolve.
17912
17913         All callers: Make sure that PointerArithmetic gets resolved.
17914
17915 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17916
17917         * ArrayCreation (LookupType): If the type does not resolve 
17918         to an array, give an error.
17919
17920 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17921
17922         * statement.cs (Try.Resolve): Fixed bug #64222
17923
17924 2004-08-27  Martin Baulig  <martin@ximian.com>
17925
17926         * class.cs
17927         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17928         crash here.     
17929
17930 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17931
17932         * ecore.cs (Constantify): Get underlying type via
17933         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17934         Windows in special cases.
17935
17936 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17937
17938         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17939         for obtaining also private methods.
17940         (GetRemoveMethod): Used GetRemoveMethod (true)
17941         for obtaining also private methods.
17942
17943 2004-08-24  Martin Baulig  <martin@ximian.com>
17944
17945         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17946         MethodAttributes.HideBySig for operators.
17947
17948 2004-08-23  Martin Baulig  <martin@ximian.com>
17949
17950         Back to the old error reporting system :-)
17951
17952         * report.cs (Message): Removed.
17953         (Report.MessageData, ErrorData, WarningData): Removed.
17954         (Report.Error, Warning): Back to the old system.
17955
17956 2004-08-23  Martin Baulig  <martin@ximian.com>
17957
17958         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17959
17960         * class.cs (TypeContainer.ParentContainer): New public virtual
17961         method; replaces the explicit interface implementation.
17962         (ClassPart.ParentContainer): Override.
17963
17964 2004-08-23  Martin Baulig  <martin@ximian.com>
17965
17966         * statement.cs (Switch): Added support for constant switches; see
17967         #59428 or test-285.cs.
17968
17969 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17970
17971         Fixed bug #62740.
17972         * statement.cs (GetEnumeratorFilter): Removed useless
17973         logic because C# specs is strict. GetEnumerator must be
17974         public.
17975
17976 2004-08-22  Martin Baulig  <martin@ximian.com>
17977
17978         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17979         a switch and may break, reset the barrier.  Fixes #59867.
17980
17981 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17982
17983         CLS-Compliance speed up (~5% for corlib)
17984
17985         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17986         New method. Tests container for CLS-Compliant names
17987
17988         * class.cs (TypeContainer.VerifyClsName): New method.
17989         Checks whether container name is CLS Compliant.
17990         (Constructor): Implements IMethodData.
17991
17992         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17993         low-case table for CLS Compliance test.
17994         (MemberCache.VerifyClsParameterConflict): New method.
17995         Checks method parameters for CS3006 error.
17996
17997         * enum.cs (EnumMember): Is derived from MemberCore.
17998         (Enum.VerifyClsName): Optimized for better performance.
17999
18000 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
18001
18002         * report.cs: Renamed Error_T to Error and changed all
18003         references.
18004
18005 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
18006
18007         * class.cs (TypeContainer.IndexerArrayList): New inner class
18008         container for indexers.
18009         (TypeContainer.DefaultIndexerName): New constant for default
18010         indexer name. Replaced all "Item" with this constant.
18011         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
18012
18013         * typemanager.cs (TypeManager.default_member_ctor): Cache here
18014         DefaultMemberAttribute constructor.
18015
18016 2004-08-05  Martin Baulig  <martin@ximian.com>
18017
18018         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
18019         Fix bug #59429.
18020
18021 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
18022
18023         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
18024         multi platforms problem.
18025
18026         * compiler.csproj: Included shared files.
18027
18028 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
18029
18030         Fix bug 60333, 55971 in the more general way
18031         * attribute.cs (Attribute.GetAttributeArgumentExpression):
18032         Added arg_type argument for constant conversion.
18033         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
18034
18035 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
18036
18037         Fix bug #59760
18038         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
18039         OperatorArrayList, MethodCoreArrayList for typecontainer
18040         containers. Changed class member types to these new types.
18041         (MethodArrayList.DefineMembers): Added test for CS0659.
18042
18043 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
18044
18045         * cfold.cs: Synchronize the folding with the code in expression.cs
18046         Binary.DoNumericPromotions for uint operands.
18047
18048         * attribute.cs: Revert patch from Raja, it introduced a regression
18049         while building Blam-1.2.1 (hard to isolate a test case).
18050
18051 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
18052
18053         Fix for #55382
18054         * class.cs:
18055         (TypeContainer.Define): Renamed to DefineContainerMembers because of
18056         name collision.
18057         (MethodCore.parent_method): New member. The method we're overriding
18058         if this is an override method.
18059         (MethodCore.CheckBase): Moved from Method class and made common.
18060         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
18061         private.
18062         (MethodCore.CheckForDuplications): New abstract method. For custom
18063         member duplication search in a container
18064         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
18065         method and its return type.
18066         (Event.conflict_symbol): New member. Symbol with same name in the
18067         parent class.
18068
18069         * decl.cs:
18070         (MemberCache.FindMemberWithSameName): New method. The method
18071         is looking for conflict with inherited symbols.
18072
18073 2004-08-04  Martin Baulig  <martin@ximian.com>
18074
18075         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
18076
18077         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
18078
18079 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
18080
18081         * report.cs (Message): New enum for better error, warning reference in
18082         the code.
18083         (MessageData): New inner abstract class. It generally handles printing of
18084         error and warning messages.
18085         Removed unused Error, Warning, Message methods.
18086
18087 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
18088
18089         Fix for cs0592-8.cs test
18090         * attribute.cs
18091         (Attributable.ValidAttributeTargets): Made public.
18092         (Attribute.ExplicitTarget): New member for explicit target value.
18093         (Attribute.CheckTargets): Now we translate explicit attribute
18094         target to Target here.
18095
18096 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
18097
18098         * ecore.cs (MethodGroupExpr): new IsBase property.
18099
18100         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
18101
18102         * delegate.cs (DelegateCreation): store a MethodGroupExpr
18103         rather than an instance expr.
18104
18105         (DelegateCreation.Emit): Use the method group rather than
18106         the instance expression. Also, if you have base.Foo as the
18107         method for a delegate, make sure to emit ldftn, not ldftnvirt.
18108
18109         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
18110
18111         (NewDelegate.DoResolve): Only check for the existance of Invoke
18112         if the method is going to be needed. Use MethodGroupExpr.
18113
18114         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
18115
18116         * expression.cs: For pointer arith., make sure to use
18117         the size of the type, not the size of the pointer to
18118         the type.
18119
18120 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
18121
18122         Fix for #60722
18123         * class.cs (Class): Added error CS0502 test.
18124
18125 2004-08-03  John Luke  <jluke@cfl.rr.com>
18126             Raja R Harinath  <rharinath@novell.com>
18127
18128         Fix for #60997.
18129         * attribute.cs (Attribute.complained_before): New flag.
18130         (Attribute.ResolveType, Attribute.Resolve),
18131         (Attribute.DefinePInvokeMethod): Set it.
18132         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
18133         
18134 2004-08-03  Martin Baulig  <martin@ximian.com>
18135
18136         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
18137         use a user-defined operator; we still need to do numeric
18138         promotions in case one argument is a builtin type and the other
18139         one has an implicit conversion to that type.  Fixes #62322.
18140
18141 2004-08-02  Martin Baulig  <martin@ximian.com>
18142
18143         * statement.cs (LocalInfo.Flags): Added `IsThis'.
18144         (LocalInfo.IsThis): New public property.
18145         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
18146
18147 2004-08-01  Martin Baulig  <martin@ximian.com>
18148
18149         * class.cs (TypeContainer.GetClassBases): Don't set the default
18150         here since we may get called from GetPartialBases().
18151         (TypeContainer.DefineType): If GetClassBases() didn't return a
18152         parent, use the default one.
18153
18154 2004-07-30  Duncan Mak  <duncan@ximian.com>
18155
18156         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
18157
18158 2004-07-30  Martin Baulig  <martin@ximian.com>
18159
18160         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
18161
18162         * class.cs (SourceMethod): New public class, derive from the
18163         symbol writer's ISourceMethod.
18164         (Method): Use the new symbol writer API.
18165
18166         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
18167         as argument and use the new symbol writer.
18168
18169         * location.cs
18170         (SourceFile): Implement the symbol writer's ISourceFile.
18171         (Location.SymbolDocument): Removed.
18172         (Location.SourceFile): New public property.
18173
18174         * symbolwriter.cs: Use the new symbol writer API.
18175
18176 2004-07-30  Raja R Harinath  <rharinath@novell.com>
18177
18178         * Makefile (install-local): Remove.  Functionality moved to
18179         executable.make.
18180
18181 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
18182
18183         * Makefile: Install mcs.exe.config file together with mcs.exe.
18184         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
18185         correct runtime version.
18186         
18187 2004-07-25  Martin Baulig  <martin@ximian.com>
18188
18189         * class.cs
18190         (TypeContainer.RegisterOrder): Removed, this was unused.
18191         (TypeContainer, interface_order): Removed.
18192         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
18193         TypeContainer as argument since we can also be called with a
18194         `PartialContainer' for a partial class/struct/interface.
18195         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
18196         of checking whether we're an `Interface' - we could be a
18197         `PartialContainer'.
18198         (PartialContainer.Register): Override; call
18199         AddClass()/AddStruct()/AddInterface() on our parent.
18200
18201         * cs-parser.jay (interface_member_declaration): Add things to the
18202         `current_container', not the `current_class'.
18203
18204         * rootcontext.cs (RegisterOrder): The overloaded version which
18205         takes an `Interface' was unused, removed.
18206
18207         * typemanager.cs (TypeManager.LookupInterface): Return a
18208         `TypeContainer', not an `Interface'.
18209         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
18210         contain a `PartialContainer' for an interface, so check it's
18211         `Kind' to figure out what it is.
18212
18213 2004-07-25  Martin Baulig  <martin@ximian.com>
18214
18215         * class.cs (Class.DefaultTypeAttributes): New public constant.
18216         (Struct.DefaultTypeAttributes): Likewise.
18217         (Interface.DefaultTypeAttributes): Likewise.
18218         (PartialContainer.TypeAttr): Override this and add the
18219         DefaultTypeAttributes.
18220
18221 2004-07-25  Martin Baulig  <martin@ximian.com>
18222
18223         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
18224         we can just use the `Parent' field instead.
18225
18226 2004-07-25  Martin Baulig  <martin@ximian.com>
18227
18228         * class.cs (TypeContainer.Emit): Renamed to EmitType().
18229
18230 2004-07-25  Martin Baulig  <martin@ximian.com>
18231
18232         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
18233         our parts before defining any methods.
18234         (TypeContainer.VerifyImplements): Make this virtual.
18235         (ClassPart.VerifyImplements): Override and call VerifyImplements()
18236         on our PartialContainer.
18237
18238 2004-07-25  Martin Baulig  <martin@ximian.com>
18239
18240         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
18241
18242         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
18243         argument, we can just use the `Parent' field instead.
18244
18245         * class.cs
18246         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
18247         (MemberBase.DoDefine): Likewise.
18248
18249 2004-07-24  Martin Baulig  <martin@ximian.com>
18250
18251         * decl.cs (MemberCore.Parent): New public field.
18252         (DeclSpace.Parent): Moved to MemberCore.
18253
18254         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
18255         (MemberBase.ctor): Added TypeContainer argument, pass it to our
18256         parent's .ctor.
18257         (FieldBase, Field, Operator): Likewise.
18258         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
18259         (EventField, Event): Likewise.
18260
18261 2004-07-23  Martin Baulig  <martin@ximian.com>
18262
18263         * class.cs (PartialContainer): New public class.
18264         (ClassPart): New public class.
18265         (TypeContainer): Added support for partial classes.
18266         (TypeContainer.GetClassBases): Splitted some of the functionality
18267         out into GetNormalBases() and GetPartialBases().
18268
18269         * cs-tokenizer.cs (Token.PARTIAL): New token.
18270         (Tokenizer.consume_identifier): Added some hacks to recognize
18271         `partial', but only if it's immediately followed by `class',
18272         `struct' or `interface'.
18273
18274         * cs-parser.jay: Added support for partial clases.
18275
18276 2004-07-23  Martin Baulig  <martin@ximian.com>
18277
18278         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
18279         a `DeclSpace' and also made it readonly.
18280         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
18281         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
18282         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
18283
18284         * cs-parser.jay: Pass the `current_class', not the
18285         `current_container' (at the moment, this is still the same thing)
18286         to a new Method, Property, Event, Indexer or Constructor.
18287
18288 2004-07-23  Martin Baulig  <martin@ximian.com>
18289
18290         * cs-parser.jay (CSharpParser): Added a new `current_class' field
18291         and removed the `current_interface' one.
18292         (struct_declaration, class_declaration, interface_declaration):
18293         Set `current_class' to the newly created class/struct/interface;
18294         set their `Bases' and call Register() before parsing their body.
18295
18296 2004-07-23  Martin Baulig  <martin@ximian.com>
18297
18298         * class.cs (Kind): New public enum.
18299         (TypeContainer): Made this class abstract.
18300         (TypeContainer.Kind): New public readonly field.
18301         (TypeContainer.CheckDef): New public method; moved here from
18302         cs-parser.jay.
18303         (TypeContainer.Register): New public abstract method.
18304         (TypeContainer.GetPendingImplementations): New public abstract
18305         method.
18306         (TypeContainer.GetClassBases): Removed the `is_class' and
18307         `is_iface' parameters.
18308         (TypeContainer.DefineNestedTypes): Formerly known as
18309         DoDefineType().
18310         (ClassOrStruct): Made this class abstract.
18311
18312         * tree.cs (RootTypes): New public type. 
18313
18314 2004-07-20  Martin Baulig  <martin@ximian.com>
18315
18316         * tree.cs (Tree.RecordNamespace): Removed.
18317         (Tree.Namespaces): Removed.
18318
18319         * rootcontext.cs (RootContext.IsNamespace): Removed.
18320
18321         * cs-parser.jay (namespace_declaration): Just create a new
18322         NamespaceEntry here.
18323
18324 2004-07-20  Martin Baulig  <martin@ximian.com>
18325
18326         * statement.cs (ExceptionStatement): New abstract class.  This is
18327         now used as a base class for everyone who's using `finally'.
18328         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
18329         our local variables before using them.
18330
18331         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
18332         virtual method.  This is used by Yield.Resolve() to "steal" an
18333         outer block's `finally' clauses.
18334         (FlowBranchingException): The .ctor now takes an ExceptionStatement
18335         argument.
18336
18337         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
18338         version which takes an ExceptionStatement.  This version must be
18339         used to create exception branchings.
18340
18341         * iterator.cs
18342         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
18343         (Iterator.EmitMoveNext): Added exception support; protect the
18344         block with a `fault' clause, properly handle 'finally' clauses.
18345         (Iterator.EmitDispose): Run all the `finally' clauses here.
18346
18347 2004-07-20  Martin Baulig  <martin@ximian.com>
18348
18349         * iterator.cs: This is the first of a set of changes in the
18350         iterator code.  Match the spec more closely: if we're an
18351         IEnumerable, then GetEnumerator() must be called.  The first time
18352         GetEnumerator() is called, it returns the current instance; all
18353         subsequent invocations (if any) must create a copy.
18354
18355 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
18356
18357         * expression.cs: Resolve the constant expression before returning
18358         it. 
18359
18360 2004-07-19  Martin Baulig  <martin@ximian.com>
18361
18362         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
18363         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
18364         the return type of the new EmitContext.
18365
18366 2004-07-18  Martin Baulig  <martin@ximian.com>
18367
18368         * class.cs (Property.Define): Fix iterators.
18369
18370         * iterators.cs (Iterator.Define): Moved the
18371         `container.AddInterator (this)' call here from the .ctor; only do
18372         it if we resolved successfully.
18373
18374 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
18375
18376         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
18377         `true' for preprocessing directives that we parse.  The return
18378         value indicates whether we should return to regular tokenizing or
18379         not, not whether it was parsed successfully.
18380
18381         In the past if we were in: #if false ... #line #endif, we would
18382         resume parsing after `#line'.  See bug 61604.
18383
18384         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
18385         building: IsEnumType should return true only for enums, not for
18386         enums or System.Enum itself.  This fixes #61593.
18387
18388         Likely what happened is that corlib was wrong: mcs depended on
18389         this bug in some places.  The bug got fixed, we had to add the
18390         hack, which caused bug 61593.
18391
18392         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
18393         that was a workaround for the older conditions.
18394
18395 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
18396
18397         * assign.cs: IAssignMethod has a new interface, as documented
18398         inline. All assignment code now uses this new api.
18399
18400         * ecore.cs, expression.cs: All classes which implement
18401         IAssignMethod now use the new interface.
18402
18403         * expression.cs (Invocation): add a hack to EmitCall so that
18404         IndexerAccess can be the target of a compound assignment without
18405         evaluating its arguments twice.
18406
18407         * statement.cs: Handle changes in Invocation api.
18408
18409 2004-07-16  Martin Baulig  <martin@ximian.com>
18410
18411         * iterators.cs: Rewrote this.  We're now using one single Proxy
18412         class for both the IEnumerable and the IEnumerator interface and
18413         `Iterator' derives from Class so we can use the high-level API.
18414
18415         * class.cs (TypeContainer.AddIterator): New method.
18416         (TypeContainer.DoDefineType): New protected virtual method, which
18417         is called from DefineType().
18418         (TypeContainer.DoDefineMembers): Call DefineType() and
18419         DefineMembers() on all our iterators.
18420         (TypeContainer.Emit): Call Emit() on all our iterators.
18421         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18422
18423         * codegen.cs (EmitContext.CurrentIterator): New public field.
18424
18425 2004-07-15  Martin Baulig  <martin@ximian.com>
18426
18427         * typemanager.cs
18428         (TypeManager.not_supported_exception_type): New type.   
18429
18430 2004-07-14  Martin Baulig  <martin@ximian.com>
18431
18432         * iterators.cs: Use real error numbers.
18433
18434 2004-07-14  Martin Baulig  <martin@ximian.com>
18435
18436         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18437         requires this to be a System.Collection.IEnumerable and not a
18438         class implementing that interface.
18439         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18440
18441 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18442
18443         * class.cs: Fixed previous fix, it broke some error tests.
18444
18445 2004-07-12  Martin Baulig  <martin@ximian.com>
18446
18447         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18448         Fixes #61293.
18449
18450 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18451
18452         * assign.cs (LocalTemporary): Add new argument: is_address,If
18453         `is_address' is true, then the value that we store is the address
18454         to the real value, and not the value itself.
18455         
18456         * ecore.cs (PropertyExpr): use the new local temporary
18457         stuff to allow us to handle X.Y += z (where X is a struct)
18458
18459 2004-07-08  Martin Baulig  <martin@ximian.com>
18460
18461         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18462         not always return, just like we're doing in Using.Resolve().
18463
18464 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18465
18466         * cs-parser.jay (fixed_statement): flag this as Pinned.
18467
18468 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18469
18470         * typemanager.cs (TypeManager): Removed MakePinned method, this
18471         mechanism is replaced with the .NET 2.x compatible mechanism of
18472         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18473
18474         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18475         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18476         `IsFixed' property which has a different meaning.
18477
18478 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18479
18480         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18481         visible from inside a nested class, not just the names of the
18482         immediately enclosing class.
18483         Fix for bug #60730.
18484
18485 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18486
18487         * expression.cs (BetterConversion): Remove buggy special-case
18488         handling of "implicit constant expression conversions".  At this
18489         point, we already know that the conversion is possible -- we're
18490         only checking to see which is better.
18491
18492 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18493
18494         * cs-parser.jay: Added error CS0210 test.
18495
18496 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18497
18498         * cs-parser.jay: Added error CS0134 test.
18499
18500 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18501
18502         Fix bug #52507
18503         * cs-parser.jay: Added error CS0145 test.
18504
18505 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18506
18507         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18508
18509 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18510         
18511         * expression.cs (StackAlloc.Resolve): The argument may not
18512         be a constant; deal with this case.
18513         
18514 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18515
18516         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18517         GetIndexerAttributeValue.
18518         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18519
18520         * class.cs (Indexer.Define): Added error tests for CS0415,
18521         CS0609.
18522
18523 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18524
18525         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18526         property code.
18527
18528 2004-06-23  Martin Baulig  <martin@ximian.com>
18529
18530         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18531         neither return nor throw, reset the barrier as well.  Fixes #60457.
18532
18533 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18534
18535         * class.cs : EventAttributes is now set to None by default.
18536           This fixes bug #60459.
18537
18538 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18539
18540         Fix bug #60219
18541         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18542         Don't throw exception but return null (it's sufficient now).
18543
18544 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18545
18546         * typemanager.cs (GetArgumentTypes): Faster implementation.
18547
18548 2004-06-18  Martin Baulig  <martin@ximian.com>
18549
18550         * attribute.cs (Attribute.Resolve): Check whether we're an
18551         EmptyCast which a Constant child.  Fixes #60333.
18552
18553 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18554
18555         * statement.cs (EmitCollectionForeach): Account for the fact that
18556         not all valuetypes are in areas which we can take the address of.
18557         For these variables, we store to a temporary variable. Also, make
18558         sure that we dont emit a `callvirt' on a valuetype method.
18559
18560 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18561
18562         * expression.cs (StackAlloc.DoReSolve): Added test for
18563         negative parameter (CS0247).
18564
18565 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18566
18567         Fix bug #59792
18568         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18569
18570 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18571
18572         Fix bug #59781
18573         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18574         ulong.
18575
18576 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18577
18578         Fix bug #58254 & cs1555.cs, cs1556.cs
18579         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18580
18581 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18582
18583         * cs-parser.jay: Added error CS1669 test for indexers.
18584
18585 2004-06-11  Martin Baulig  <martin@ximian.com>
18586
18587         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18588         call this twice: for params and varargs methods.
18589
18590 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18591
18592         * class.cs:
18593         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18594
18595 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18596
18597         * attribute.cs (Attribute.GetValidTargets): Made public.
18598
18599         * class.cs: 
18600         (AbstractPropertyEventMethod): New class for better code sharing.
18601         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18602         CS1667 report.
18603         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18604
18605 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18606
18607         Fix bug #59477.
18608         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18609         that the call to Resolve is part of a MemberAccess.
18610         (Expression.Resolve): Use it for SimpleName resolution.
18611         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18612         Add 'intermediate' boolean argument.
18613         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18614         error message when the SimpleName can be resolved ambiguously
18615         between an expression and a type.
18616         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18617         public.
18618         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18619         call on the left-side.
18620
18621 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18622
18623         * class.cs:
18624         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18625
18626 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18627
18628         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18629
18630 2004-06-11  Martin Baulig  <martin@ximian.com>
18631
18632         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18633         varargs methods if applicable.
18634
18635 2004-06-11  Martin Baulig  <martin@ximian.com>
18636
18637         * expression.cs (Invocation.EmitCall): Don't use
18638         `method.CallingConvention == CallingConventions.VarArgs' since the
18639         method could also have `CallingConventions.HasThis'.
18640
18641 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18642
18643         * class.cs (Event.GetSignatureForError): Implemented.
18644         Fixed crash in error test cs3010.cs
18645
18646 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18647
18648         * cs-tokenizer.cs: Change the way we track __arglist to be
18649         consistent with the other keywords.
18650
18651 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18652
18653         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18654         tomorrow.
18655
18656 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18657
18658         * codegen.cs: Check that all referenced assemblies have a strongname
18659         before strongnaming the compiled assembly. If not report error CS1577.
18660         Fix bug #56563. Patch by Jackson Harper.
18661         * typemanager.cs: Added a method to return all referenced assemblies.
18662         Fix bug #56563. Patch by Jackson Harper.
18663
18664 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18665
18666         * class.cs:
18667         (Method.ApplyAttributeBuilder): Moved and added conditional
18668         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18669
18670         * delegate.cs:
18671         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18672
18673 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18674
18675         Fixed #59640
18676         * class.cs: (EventField.attribute_targets): Changed default target.
18677
18678 2004-06-08  Martin Baulig  <martin@ximian.com>
18679
18680         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18681
18682 2004-06-08  Martin Baulig  <martin@ximian.com>
18683
18684         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18685
18686 2004-06-07  Martin Baulig  <martin@ximian.com>
18687
18688         Added support for varargs methods.
18689
18690         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18691         keyword.
18692
18693         * cs-parser.jay: Added support for `__arglist'.
18694
18695         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18696
18697         * expression.cs (Argument.AType): Added `ArgList'.
18698         (Invocation): Added support for varargs methods.
18699         (ArglistAccess): New public class.
18700         (Arglist): New public class.
18701
18702         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18703
18704         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18705         a method's top-level block if the method has varargs.
18706
18707         * support.cs (ReflectionParameters, InternalParameters): Added
18708         support for varargs methods.    
18709
18710 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18711
18712         * class.cs: Provide location in indexer error report.
18713
18714         * driver.cs: Use standard names.
18715
18716         * namespace.cs: Catch the use of using after a namespace has been
18717         declared also on using aliases.
18718
18719 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18720
18721         Bug #50820.
18722         * typemanager.cs (closure_private_ok, closure_invocation_type)
18723         (closure_qualifier_type, closure_invocation_assembly)
18724         (FilterWithClosure): Move to ...
18725         (Closure): New internal nested class.
18726         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18727         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18728         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18729         (MemberLookup, MemberLookupFailed): Use it.
18730         * expression.cs (New.DoResolve): Treat the lookup for the
18731         constructor as being qualified by the 'new'ed type.
18732         (Indexers.GetIndexersForTypeOrInterface): Update.
18733
18734 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18735
18736         * attribute.cs
18737         (GetConditionalAttributeValue): New method. Returns
18738         condition of ConditionalAttribute.
18739         (SearchMulti): New method.  Returns all attributes of type 't'.
18740         Use it when attribute is AllowMultiple = true.
18741         (IsConditionalMethodExcluded): New method.
18742
18743         * class.cs
18744         (Method.IsExcluded): Implemented. Returns true if method has conditional
18745         attribute and the conditions is not defined (method is excluded).
18746         (IMethodData): Extended interface for ConditionalAttribute support.
18747         (PropertyMethod.IsExcluded): Implemented.
18748
18749         * decl.cs
18750         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18751
18752         * expression.cs
18753         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18754         on the method.
18755
18756 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18757
18758         * expression.cs (ArrayCreationExpression): Make this just an
18759         `expression'. It can't be a statement, so the code here was
18760         dead.
18761
18762 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18763
18764         Fixed #59072
18765         * typemanager.cs (GetFullNameSignature): New method for
18766         MethodBase types.
18767
18768 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18769
18770         Fixed #56452
18771         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18772         Use this method when MethodBuilder is null.
18773         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18774         Added test for error CS0626 (MONO reports error for this situation).
18775         (IMethodData.GetSignatureForError): Extended interface.
18776
18777 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18778
18779         * attribute.cs
18780         (AttributeTester.GetObsoleteAttribute): Returns instance of
18781         ObsoleteAttribute when type is obsolete.
18782
18783         * class.cs
18784         (TypeContainer.VerifyObsoleteAttribute): Override.
18785         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18786         (MethodCode.VerifyObsoleteAttribute): Override.
18787         (MemberBase.VerifyObsoleteAttribute): Override.
18788
18789         * decl.cs
18790         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18791         and report proper error.
18792
18793         *delegate.cs
18794         Delegate.VerifyObsoleteAttribute): Override.
18795
18796         * ecore.cs
18797         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18798         and report proper error.
18799         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18800
18801         * enum.cs
18802         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18803         and enum member.
18804
18805         * expression.cs
18806         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18807         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18808         Added test for ObsoleteAttribute.
18809
18810         * statement.cs
18811         (Catch): Derived from Statement.
18812
18813 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18814  
18815         Fixed bug #59071 & cs0160.cs
18816  
18817         * statement.cs (Try.Resolve): Check here whether order of catch
18818         clauses matches their dependencies.
18819
18820 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18821
18822         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18823         caused a regression: #59343.  Referencing nested classes from an
18824         assembly stopped working.
18825
18826 2004-05-31  Martin Baulig  <martin@ximian.com>
18827
18828         MCS is now frozen for beta 2.
18829
18830 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18831
18832         * convert.cs: add a trivial cache for overload operator resolution.
18833
18834 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18835
18836         * decl.cs: If possible, use lookuptypedirect here. We can only do
18837         this if there is no `.' after the namespace. Avoids using
18838         LookupType, which does lots of slow processing.
18839         (FindNestedType) New method, does what it says :-).
18840         * namespace.cs: use LookupTypeDirect.
18841         * rootcontext.cs: use membercache, if possible.
18842         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18843
18844 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18845
18846         * expression.cs:
18847         According to the spec, 
18848
18849         In a member access of the form E.I, if E is a single identifier,
18850         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18851         field, property, localvariable, or parameter with the same type as
18852         the meaning of E as a type-name (§3.8), then both possible
18853         meanings of E are permitted.
18854
18855         We did not check that E as a simple-name had the same type as E as
18856         a type name.
18857
18858         This trivial check gives us 5-7% on bootstrap time.
18859
18860 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18861
18862         * expression.cs (Invocation.OverloadResolve): Avoid the
18863         use of hashtables and boxing here by allocating on demand.
18864
18865 2004-05-30  Martin Baulig  <martin@ximian.com>
18866
18867         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18868         we're doing a silent lookup.  Don't try to lookup nested types in
18869         TypeManager.object_type (thanks to Ben Maurer).
18870
18871 2004-05-30  Martin Baulig  <martin@ximian.com>
18872
18873         Committing a patch from Ben Maurer.
18874
18875         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18876
18877 2004-05-29  Martin Baulig  <martin@ximian.com>
18878
18879         * class.cs (IMethodData.ShouldIgnore): New method.
18880
18881         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18882         `Location' argument, we don't need it anywhere.  Use
18883         `IMethodData.ShouldIgnore ()' instead of
18884         `MethodData.GetMethodFlags ()'.
18885         (TypeManager.AddMethod): Removed.
18886         (TypeManager.AddMethod2): Renamed to AddMethod.
18887
18888 2004-05-29  Martin Baulig  <martin@ximian.com>
18889
18890         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18891
18892         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18893         converting from a class type S to an interface type and we already
18894         have an object on the stack, don't box it again.  Fixes #52578.
18895
18896 2004-05-29  Martin Baulig  <martin@ximian.com>
18897
18898         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18899         Added support for `params' parameters.  Fixes #59267.
18900
18901 2004-05-29  Martin Baulig  <martin@ximian.com>
18902
18903         * literal.cs (NullPointer): Provide a private .ctor which sets
18904         `type' to TypeManager.object_type.  Fixes #59048.
18905
18906 2004-05-29  Martin Baulig  <martin@ximian.com>
18907
18908         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18909         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18910
18911         * ecore.cs (EventExpr.instance_expr): Make the field private.
18912
18913 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18914
18915         Fixed bug #50080 & cs0214-2.cs
18916         * expression.cs (Cast.DoResolve): Check unsafe context here.
18917         
18918         * statement.cs (Resolve.DoResolve): Likewise.
18919
18920 2004-05-26  Martin Baulig  <martin@ximian.com>
18921
18922         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18923
18924         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18925         (RootContext.LookupType): Pass down the `silent' flag.
18926
18927 2004-05-25  Martin Baulig  <martin@ximian.com>
18928
18929         * expression.cs
18930         (MethodGroupExpr.IdenticalTypeName): New public property.
18931         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18932         expression actually refers to a type.
18933
18934 2004-05-25  Martin Baulig  <martin@ximian.com>
18935
18936         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18937         for #56176 and made it actually work.
18938
18939 2004-05-25  Martin Baulig  <martin@ximian.com>
18940
18941         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18942         (FieldExpr, PropertyExpr): Override and implement
18943         CacheTemporaries.  Fixes #52279.
18944
18945 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18946
18947         * location.cs: In the new compiler listing a file twice is a
18948         warning, not an error.
18949
18950 2004-05-24  Martin Baulig  <martin@ximian.com>
18951
18952         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18953         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18954
18955 2004-05-24  Martin Baulig  <martin@ximian.com>
18956
18957         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18958         walking the `using' list.  Fixes #53921.
18959
18960 2004-05-24  Martin Baulig  <martin@ximian.com>
18961
18962         * const.cs (Const.LookupConstantValue): Added support for
18963         EmptyCast's; fixes #55251.
18964
18965 2004-05-24  Martin Baulig  <martin@ximian.com>
18966
18967         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18968         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18969         which does the CS0135 check.  The reason is that we first need to
18970         check whether the variable actually exists.
18971
18972 2004-05-24  Martin Baulig  <martin@ximian.com>
18973
18974         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18975         than RootContext.LookupType() to find the explicit interface
18976         type.  Fixes #58584.
18977
18978 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18979
18980         * Makefile: Simplify.  Use executable.make.
18981         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18982
18983 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18984
18985         * decl.cs:
18986         * enum.cs:
18987         Use the invariant culture when doing String.Compare for CLS case
18988         sensitivity.
18989         
18990 2004-05-23  Martin Baulig  <martin@ximian.com>
18991
18992         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18993         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18994
18995         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18996         
18997 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18998
18999         * class.cs (MemberBase.Define): Reuse MemberType member for 
19000         resolved type. Other methods can use it too.
19001
19002 2004-05-23  Martin Baulig  <martin@ximian.com>
19003
19004         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
19005         the variable also exists in the current block (otherwise, we need
19006         to report a CS0103).  Fixes #58670.
19007
19008 2004-05-23  Martin Baulig  <martin@ximian.com>
19009
19010         * flowanalysis.cs (Reachability.Reachable): Compute this
19011         on-the-fly rather than storing it as a field.
19012
19013 2004-05-23  Martin Baulig  <martin@ximian.com>
19014
19015         * flowanalysis.cs (Reachability.And): Manually compute the
19016         resulting `barrier' from the reachability.      
19017        
19018 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
19019
19020         Fix bug #57835
19021         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
19022         instance of ObsoleteAttribute when symbol is obsolete.
19023
19024         * class.cs
19025         (IMethodData): Extended interface for ObsoleteAttribute support.
19026
19027 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
19028
19029         * attribute.cs: Fix bug #55970
19030
19031 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
19032
19033         Fix bug #52705
19034         * attribute.cs
19035         (GetObsoleteAttribute): New method. Creates the instance of
19036         ObsoleteAttribute.
19037         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
19038         ObsoleteAttribute when member is obsolete.
19039         (AttributeTester.Report_ObsoleteMessage): Common method for
19040         Obsolete error/warning reporting.
19041
19042         * class.cs
19043         (TypeContainer.base_classs_type): New member for storing parent type.
19044
19045         * decl.cs
19046         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
19047         for this MemberCore.
19048
19049 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
19050
19051         * attribute.cs, const.cs: Fix bug #58590
19052
19053 2004-05-21  Martin Baulig  <martin@ximian.com>
19054
19055         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
19056         out parameters if the end of the method is unreachable.  Fixes
19057         #58098. 
19058
19059 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
19060
19061         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
19062         Hari was right, why extra method.
19063
19064 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
19065
19066         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
19067
19068 2004-05-20  Martin Baulig  <martin@ximian.com>
19069
19070         Merged this back from gmcs to keep the differences to a minumum.
19071
19072         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
19073         instead of a Declspace.
19074         (Attribute.ResolveType): Likewise.
19075         (Attributes.Search): Likewise.
19076         (Attributes.Contains): Likewise.
19077         (Attributes.GetClsCompliantAttribute): Likewise.
19078
19079         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
19080         argument.
19081         (MethodData.ApplyAttributes): Take an EmitContext instead of a
19082         DeclSpace.
19083
19084 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
19085
19086         Fix bug #58688 (MCS does not report error when the same attribute
19087         is assigned twice)
19088
19089         * attribute.cs (Attribute.Emit): Distinction between null and default.
19090
19091 2004-05-19  Raja R Harinath  <rharinath@novell.com>
19092
19093         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
19094         of a top-level attribute without an attribute target.
19095         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
19096         Make non-static.
19097         (Attribute.Conditional_GetConditionName), 
19098         (Attribute.Obsolete_GetObsoleteMessage): Update.
19099         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
19100         part of ScanForIndexerName.
19101         (Attribute.CanIgnoreInvalidAttribute): New function.
19102         (Attribute.ScanForIndexerName): Move to ...
19103         (Attributes.ScanForIndexerName): ... here.
19104         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
19105         (Attributes.Search): New internal variant that can choose not to
19106         complain if types aren't resolved.  The original signature now
19107         complains.
19108         (Attributes.GetClsCompliantAttribute): Use internal variant, with
19109         complaints suppressed.
19110         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
19111         only if it not useful.
19112         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
19113         top-level for attributes that are shared between the assembly
19114         and a top-level class.
19115         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
19116         * class.cs: Update to reflect changes.
19117         (DefineIndexers): Fuse loops.
19118         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
19119         a couple more variants of attribute names.
19120
19121 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
19122
19123         Fix bug #52585 (Implemented explicit attribute declaration)
19124
19125         * attribute.cs:
19126         (Attributable.ValidAttributeTargets): New abstract method. It gets
19127         list of valid attribute targets for explicit target declaration.
19128         (Attribute.Target): It holds target itself.
19129         (AttributeSection): Removed.
19130         (Attribute.CheckTargets): New method. It checks whether attribute
19131         target is valid for the current element.
19132
19133         * class.cs:
19134         (EventProperty): New class. For events that are declared like
19135         property (with add and remove accessors).
19136         (EventField): New class. For events that are declared like field.
19137         class.cs
19138
19139         * cs-parser.jay: Implemented explicit attribute target declaration.
19140
19141         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
19142         Override ValidAttributeTargets.
19143
19144         * parameter.cs:
19145         (ReturnParameter): Class for applying custom attributes on 
19146         the return type.
19147         (ParameterAtribute): New class. Class for applying custom
19148         attributes on the parameter type.
19149
19150 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
19151
19152         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
19153         definitions. 
19154
19155         (Method): Allow UNSAFE here.
19156
19157         * modifiers.cs: Support unsafe reporting.
19158
19159 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
19160
19161         * decl.cs: Fix bug #58478.
19162
19163 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19164
19165         * statement.cs: When checking for unreachable code on an EmptyStatement,
19166         set the location. Fixes bug #58488.
19167
19168 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
19169
19170         * driver.cs: Add -pkg handling.
19171
19172         From Gonzalo: UseShelLExecute=false
19173
19174 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
19175
19176         * attribute.cs:
19177         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
19178         for attribute.
19179         (Attribute.IsClsCompliaceRequired): Moved to base for better
19180         accesibility.
19181         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
19182         when attribute is AttributeUsageAttribute.
19183         (Attribute.GetValidTargets): Simplified.
19184         (Attribute.GetAttributeUsage): New method returns AttributeUsage
19185         attribute for this type.
19186         (Attribute.ApplyAttributes): Method renamed to Emit and make
19187         non-static.
19188         (GlobalAttributeSection): New class for special handling of global
19189         attributes (assembly, module).
19190         (AttributeSection.Emit): New method.
19191
19192         * class.cs: Implemented Attributable abstract methods.
19193         (MethodCore.LabelParameters): Moved to Parameter class.
19194         (Accessor): Is back simple class.
19195         (PropertyMethod): Implemented Attributable abstract class.
19196         (DelegateMethod): Implemented Attributable abstract class.
19197         (Event): New constructor for disctintion between normal Event
19198         and Event with accessors.
19199
19200         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
19201
19202         * codegen.cs, const.cs, decl.cs, delegate.cs:
19203         (CommonAssemblyModulClass): Implemented Attributable abstract class
19204         and simplified.
19205
19206         * enum.cs: Implement IAttributeSupport interface.
19207         (EnumMember): New class for emum members. Implemented Attributable
19208         abstract class
19209
19210         * parameter.cs:
19211         (ParameterBase): Is abstract.
19212         (ReturnParameter): New class for easier [return:] attribute handling.
19213
19214         * typemanager.cs: Removed builder_to_attr.
19215
19216 2004-05-11  Raja R Harinath  <rharinath@novell.com>
19217
19218         Fix bug #57151.
19219         * attribute.cs (Attribute.GetPositionalValue): New function.
19220         * class.cs (TypeContainer.VerifyMembers): New function.
19221         (TypeContainer.Emit): Use it.
19222         (ClassOrStruct): New base class for Class and Struct.
19223         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
19224         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
19225         class.
19226         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
19227         then each non-static field should have a FieldOffset attribute.
19228         Otherwise, none of the fields should have a FieldOffset attribute.
19229         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
19230         and FieldOffset attributes.
19231         * typemanager.cs (TypeManager.struct_layout_attribute_type)
19232         (TypeManager.field_offset_attribute_type): New core types.
19233         (TypeManager.InitCoreTypes): Initialize them.
19234
19235 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
19236
19237         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
19238         Return correct type.
19239         From bug #58270.
19240
19241 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
19242
19243         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
19244         be implicitly converted to ulong.
19245         
19246         * expression.cs: The logic for allowing operator &, | and ^ worked
19247         was wrong, it worked before because we did not report an error in
19248         an else branch.  Fixes 57895.
19249
19250         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
19251         allow volatile fields to be reference types.
19252
19253 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
19254
19255         * driver.cs: Add support for /debug-
19256
19257 2004-05-07  Raja R Harinath  <rharinath@novell.com>
19258
19259         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
19260         Add a 'complain' parameter to silence errors.
19261         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
19262         silently overlooked type-resolutions.
19263         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
19264         to reflect changes.
19265         (Attributes.Search): New function.
19266         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
19267         (Attributes.GetAttributeFullName): Remove hack.
19268         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
19269         Update to reflect changes.
19270         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
19271         Use Attributes.Search instead of nested loops.
19272
19273 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
19274
19275         * decl.cs:
19276         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
19277         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
19278         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
19279
19280         * report.cs: (Report.Warning): Renamed to Warning_T because of
19281         parameter collision.
19282
19283 2004-05-05  Raja R Harinath  <rharinath@novell.com>
19284
19285         * expression.cs (MemberAccess.ResolveMemberAccess):
19286         Exit with non-zero status after Report.Error.
19287         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
19288         Likewise.
19289         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
19290
19291 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19292
19293         * support.cs: Don't hang when the file is empty.
19294
19295 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19296
19297         * support.cs: In SeekableStreamReader, compute the preamble size of the
19298           underlying stream. Position changes should take into account that initial
19299           count of bytes.
19300
19301 2004-05-03  Todd Berman  <tberman@sevenl.net>
19302
19303         * driver.cs: remove unused GetSysVersion function.
19304
19305 2004-05-03  Todd Berman  <tberman@sevenl.net>
19306
19307         * driver.cs: Remove the hack from saturday, as well as the hack
19308         from jackson (LoadAssemblyFromGac), also adds the CWD to the
19309         link_paths to get that bit proper.
19310
19311 2004-05-01  Todd Berman  <tberman@sevenl.net>
19312
19313         * driver.cs: Try a LoadFrom before a Load, this checks the current
19314         path. This is currently a bug in mono that is be fixed, however, this
19315         provides a workaround for now. This will be removed when the bug
19316         is fixed.
19317
19318 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
19319
19320         * CryptoConvert.cs: Updated to latest version. Fix issue with 
19321         incomplete key pairs (#57941).
19322
19323 2004-05-01  Todd Berman  <tberman@sevenl.net>
19324
19325         * driver.cs: Remove '.' from path_chars, now System.* loads properly
19326         from the GAC
19327
19328 2004-04-30  Jackson Harper  <jackson@ximian.com>
19329
19330         * codegen.cs: Open keys readonly.
19331         
19332 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19333
19334         * typemanager.cs: don't report cyclic struct layout when a struct
19335         contains 2 or more fields of the same type. Failed for Pango.AttrShape
19336         which has 2 Pango.Rectangle fields.
19337
19338 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19339
19340         * expression.cs: Handle IntPtr comparisons with IL code
19341         rather than a method call.
19342
19343 2004-04-29  Martin Baulig  <martin@ximian.com>
19344
19345         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
19346         the list of PropertyInfo's in class hierarchy and find the
19347         accessor.  Fixes #56013.
19348
19349 2004-04-29  Martin Baulig  <martin@ximian.com>
19350
19351         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
19352
19353 2004-04-29  Martin Baulig  <martin@ximian.com>
19354
19355         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19356
19357         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
19358
19359 2004-04-29  Martin Baulig  <martin@ximian.com>
19360
19361         * class.cs (ConstructorInitializer.Resolve): Check whether the
19362         parent .ctor is accessible.  Fixes #52146.
19363
19364 2004-04-29  Martin Baulig  <martin@ximian.com>
19365
19366         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19367
19368         * statement.cs (Using.EmitLocalVariableDecls): Use
19369         TypeManager.idisposable_type, not typeof (IDisposable).
19370         (Foreach.EmitCollectionForeach): Added support for valuetypes.
19371
19372 2004-04-29  Martin Baulig  <martin@ximian.com>
19373
19374         * class.cs (Event.Define): Don't emit the field and don't set
19375         RTSpecialName and SpecialName for events on interfaces.  Fixes
19376         #57703. 
19377
19378 2004-04-29  Raja R Harinath  <rharinath@novell.com>
19379
19380         Refactor Attribute.ApplyAttributes.
19381         * attribute.cs (Attributable): New base class for objects that can
19382         have Attributes applied on them.
19383         (Attribute): Make AttributeUsage fields public.
19384         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
19385         (Attribute.IsInternalCall): New property.
19386         (Attribute.UsageAttr): Convert to a public read-only property.
19387         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
19388         (Attribute.ResolveType, Attribute.Resolve)
19389         (Attribute.ScanForIndexerName): Update to reflect changes.
19390         (Attribute.CheckAttributeTarget): Re-format.
19391         (Attribute.ApplyAttributes): Refactor, to various
19392         Attributable.ApplyAttributeBuilder methods.
19393         * decl.cs (MemberCore): Make Attributable.
19394         * class.cs (Accessor): Make Attributable.
19395         (MethodData.ApplyAttributes): Use proper attribute types, not
19396         attribute names.
19397         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
19398         (TypeContainer.ApplyAttributeBuilder)
19399         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
19400         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
19401         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
19402         (Operator.ApplyAttributeBuilder): New factored-out methods.
19403         * const.cs (Const.ApplyAttributeBuilder): Likewise.
19404         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
19405         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
19406         * parameter.cs (ParameterBase): New Attributable base class
19407         that can also represent Return types.
19408         (Parameter): Update to the changes.
19409
19410 2004-04-29  Jackson Harper  <jackson@ximian.com>
19411
19412         * driver.cs: Prefer the corlib system version when looking for
19413         assemblies in the GAC. This is still a hack, but its a better hack
19414         now.
19415         
19416 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19417
19418         * decl.cs, enum.cs: Improved error 3005 reporting.
19419   
19420         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19421         (related_symbols): New private member for list of symbols
19422         related to reported error/warning.
19423         
19424         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19425
19426 2004-04-29  Martin Baulig  <martin@ximian.com>
19427
19428         * ecore.cs (Expression.Constantify): If we're an enum and
19429         TypeManager.TypeToCoreType() doesn't give us another type, use
19430         t.UnderlyingSystemType.  Fixes #56178.  
19431
19432 2004-04-29  Martin Baulig  <martin@ximian.com>
19433
19434         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19435         interfaces and for each interface, only add members directly
19436         declared in that interface.  Fixes #53255.
19437
19438 2004-04-28  Martin Baulig  <martin@ximian.com>
19439
19440         * expression.cs (ConditionalLogicalOperator): Use a temporary
19441         variable for `left' to avoid that we evaluate it more than once;
19442         bug #52588.
19443
19444 2004-04-28  Martin Baulig  <martin@ximian.com>
19445
19446         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19447         `void[]' (CS1547).
19448
19449 2004-04-28  Martin Baulig  <martin@ximian.com>
19450
19451         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19452         void (CS1547).
19453
19454         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19455         whether the type is not void (CS1547).
19456
19457 2004-04-28  Martin Baulig  <martin@ximian.com>
19458
19459         * expression.cs (Unary.DoResolveLValue): Override this and report
19460         CS0131 for anything but Operator.Indirection.
19461
19462 2004-04-28  Martin Baulig  <martin@ximian.com>
19463
19464         Committing a patch from Ben Maurer; see bug #50820.
19465
19466         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19467         check for classes.
19468
19469         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19470         classes.        
19471
19472 2004-04-28  Martin Baulig  <martin@ximian.com>
19473
19474         Committing a patch from Ben Maurer; see bug #50820.
19475
19476         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19477         check for classes.
19478
19479         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19480         classes.        
19481
19482 2004-04-28  Martin Baulig  <martin@ximian.com>
19483
19484         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19485         (Block.AddLabel): Call DoLookupLabel() to only search in the
19486         current block.
19487
19488 2004-04-28  Martin Baulig  <martin@ximian.com>
19489
19490         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19491         comparing StringConstants and NullLiterals in Equality and Inequality.
19492
19493 2004-04-28  Jackson Harper  <jackson@ximian.com>
19494
19495         * driver.cs: Attempt to load referenced assemblies from the
19496         GAC. This is the quick and dirty version of this method that
19497         doesnt take into account versions and just takes the first
19498         canidate found. Will be good enough for now as we will not have more
19499         then one version installed into the GAC until I update this method.
19500
19501 2004-04-28  Martin Baulig  <martin@ximian.com>
19502
19503         * typemanager.cs (TypeManager.CheckStructCycles): New public
19504         static method to check for cycles in the struct layout.
19505
19506         * rootcontext.cs (RootContext.PopulateTypes): Call
19507         TypeManager.CheckStructCycles() for each TypeContainer.
19508         [Note: We only need to visit each type once.]
19509
19510 2004-04-28  Martin Baulig  <martin@ximian.com>
19511
19512         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19513
19514         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19515         success and added `out object value'.  Use a `bool resolved' field
19516         to check whether we've already been called rather than
19517         `ConstantValue != null' since this breaks for NullLiterals.
19518
19519 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19520
19521         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19522         setting of this flag, since the 'set' method may be non-public.
19523
19524 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19525
19526         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19527         check on current_vector.Block.
19528
19529 2004-04-27  Martin Baulig  <martin@ximian.com>
19530
19531         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19532         a field initializer.  Fixes #56459.
19533
19534 2004-04-27  Martin Baulig  <martin@ximian.com>
19535
19536         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19537         we're not attempting to use an indexer.  Fixes #52154.
19538
19539 2004-04-27  Martin Baulig  <martin@ximian.com>
19540
19541         * statement.cs (Return): Don't create a return label if we don't
19542         need it; reverts my change from January 20th.  Thanks to Ben
19543         Maurer for this.
19544
19545 2004-04-27  Martin Baulig  <martin@ximian.com>
19546
19547         According to the spec, `goto' can only leave a nested scope, but
19548         never enter it.
19549
19550         * statement.cs (Block.LookupLabel): Only lookup in the current
19551         block, don't recurse into parent or child blocks.
19552         (Block.AddLabel): Check in parent and child blocks, report
19553         CS0140/CS0158 if we find a duplicate.
19554         (Block): Removed this indexer for label lookups.
19555         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19556         this already does the error reporting for us.
19557
19558         * flowanalysis.cs
19559         (FlowBranching.UsageVector.Block): New public variable; may be null.
19560         (FlowBranching.CreateSibling): Added `Block' argument.
19561         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19562         label for the target of a `goto' and check whether we're not
19563         leaving a `finally'.
19564
19565 2004-04-27  Martin Baulig  <martin@ximian.com>
19566
19567         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19568         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19569         just for returns).
19570
19571 2004-04-27  Martin Baulig  <martin@ximian.com>
19572
19573         * statement.cs (Block.AddLabel): Also check for implicit blocks
19574         and added a CS0158 check.
19575
19576 2004-04-27  Martin Baulig  <martin@ximian.com>
19577
19578         * flowanalysis.cs (FlowBranchingLoop): New class.
19579         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19580         UsageVector's instead of an ArrayList.
19581         (FlowBranching.Label): Likewise.
19582         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19583         (FlowBranching.AddBreakVector): New method.
19584
19585 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19586
19587         * attribute.cs: Small regression fix: only convert the type if we
19588         the type is different, fixes System.Drawing build.
19589
19590 2004-04-27  Martin Baulig  <martin@ximian.com>
19591
19592         * attribute.cs (Attribute.Resolve): If we have a constant value
19593         for a named field or property, implicity convert it to the correct
19594         type.
19595
19596 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19597
19598         * statement.cs (Block.Block): Implicit blocks share
19599         'child_variable_names' fields with parent blocks.
19600         (Block.AddChildVariableNames): Remove.
19601         (Block.AddVariable): Mark variable as "used by a child block" in
19602         every surrounding block.
19603         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19604         been used in a child block, complain about violation of "Invariant
19605         meaning in blocks" rule.
19606         * cs-parser.jay (declare_local_variables): Don't use
19607         AddChildVariableNames.
19608         (foreach_statement): Don't create an implicit block: 'foreach'
19609         introduces a scope.
19610
19611 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19612
19613         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19614         converting from 0L to ulong.  Fixes 57522.
19615
19616 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19617
19618         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19619         derived class hides via 'new' keyword field from base class (test-242.cs).
19620         TODO: Handle this in the more general way.
19621         
19622         * class.cs (CheckBase): Ditto.
19623
19624 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19625
19626         * decl.cs (caching_flags): New member for storing cached values
19627         as bit flags.
19628         (MemberCore.Flags): New enum where bit flags for caching_flags
19629         are defined.
19630         (MemberCore.cls_compliance): Moved to caching_flags.
19631         (DeclSpace.Created): Moved to caching_flags.
19632
19633         * class.cs: Use caching_flags instead of DeclSpace.Created
19634         
19635 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19636
19637         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19638         if we are only a derived class, not a nested class.
19639
19640         * typemanager.cs: Same as above, but do this at the MemberLookup
19641         level (used by field and methods, properties are handled in
19642         PropertyExpr).   Allow for the qualified access if we are a nested
19643         method. 
19644
19645 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19646
19647         * class.cs: Refactoring.
19648         (IMethodData): New inteface; Holds links to parent members
19649         to avoid member duplication (reduced memory allocation).
19650         (Method): Implemented IMethodData interface.
19651         (PropertyBase): New inner classes for get/set methods.
19652         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19653         (Event): New inner classes for add/remove methods.
19654         (Event.DelegateMethod): Implemented IMethodData interface.
19655
19656         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19657         EmitContext (related to class.cs refactoring).
19658
19659 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19660
19661         * delegate.cs (Delegate.VerifyApplicability): If the number of
19662         arguments are the same as the number of parameters, first try to
19663         verify applicability ignoring  any 'params' modifier on the last
19664         parameter.
19665         Fixes #56442.
19666
19667 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19668
19669         * class.cs (TypeContainer.AddIndexer): Use
19670         'ExplicitInterfaceName' to determine if interface name was
19671         explicitly specified.  'InterfaceType' is not initialized at this time.
19672         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19673         Indexers array is already in the required order.  Initialize
19674         'IndexerName' only if there are normal indexers.
19675         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19676         (TypeContainer.Emit): Emit DefaultMember attribute only if
19677         IndexerName is initialized.
19678         Fixes #56300.
19679
19680 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19681
19682         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19683         Fixes #57007
19684
19685 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19686
19687         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19688         attributes.
19689         Fix for #56456.
19690
19691         * attribute.cs (Attribute.Resolve): Check for duplicate named
19692         attributes.
19693         Fix for #56463.
19694
19695 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19696
19697         * iterators.cs (MarkYield): track whether we are in an exception,
19698         and generate code accordingly.  Use a temporary value to store the
19699         result for our state.
19700
19701         I had ignored a bit the interaction of try/catch with iterators
19702         since their behavior was not entirely obvious, but now it is
19703         possible to verify that our behavior is the same as MS .NET 2.0
19704
19705         Fixes 54814
19706
19707 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19708
19709         * iterators.cs: Avoid creating temporaries if there is no work to
19710         do. 
19711
19712         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19713         Enumerations, use TypeManager.EnumToUnderlying and call
19714         recursively. 
19715
19716         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19717         bug #57013
19718
19719         (This.Emit): Use EmitContext.EmitThis to emit our
19720         instance variable.
19721
19722         (This.EmitAssign): Ditto.
19723
19724         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19725         codepaths, we will move all the functionality into
19726         Mono.CSharp.This 
19727
19728         (FieldExpr.EmitAssign): Ditto.
19729
19730         This fixes several hidden bugs that I uncovered while doing a code
19731         review of this today.
19732
19733         * codegen.cs (EmitThis): reworked so the semantics are more clear
19734         and also support value types "this" instances.
19735
19736         * iterators.cs: Changed so that for iterators in value types, we
19737         do not pass the value type as a parameter.  
19738
19739         Initialization of the enumerator helpers is now done in the caller
19740         instead of passing the parameters to the constructors and having
19741         the constructor set the fields.
19742
19743         The fields have now `assembly' visibility instead of private.
19744
19745 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19746
19747         * expression.cs (Argument.Resolve): Check if fields passed as ref
19748         or out are contained in a MarshalByRefObject.
19749
19750         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19751         another compiler type.
19752
19753 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19754
19755         * class.cs (Indexer.Define): use the new name checking method.
19756         Also, return false on an error.
19757         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19758         (is_identifier_[start/part]_character): make static.
19759
19760 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19761
19762         * expression.cs (Binary.ResolveOperator): Do no append strings
19763         twice: since we can be invoked more than once (array evaluation)
19764         on the same concatenation, take care of this here.  Based on a fix
19765         from Ben (bug #56454)
19766
19767 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19768
19769         * codegen.cs: Fix another case where CS1548 must be reported (when 
19770         delay-sign isn't specified and no private is available #56564). Fix
19771         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19772         error when MCS is used on the MS runtime and we need to delay-sign 
19773         (which seems unsupported by AssemblyBuilder - see #56621).
19774
19775 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19776
19777         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19778         (TypeManager.ComputeNamespaces): Faster implementation for
19779         Microsoft runtime.
19780
19781         * compiler.csproj: Updated AssemblyName to mcs.
19782
19783 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19784
19785         * rootcontext.cs: Add new types to the boot resolution.
19786
19787         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19788         MulticastDelegate is not allowed.
19789
19790         * typemanager.cs: Add new types to lookup: System.TypedReference
19791         and ArgIterator.
19792
19793         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19794         check for TypedReference or ArgIterator, they are not allowed. 
19795
19796         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19797         makes us properly catch 1510 in some conditions (see bug 56016 for
19798         details). 
19799
19800 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19801
19802         * CryptoConvert.cs: update from corlib version
19803         with endian fixes.
19804
19805 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19806
19807         * class.cs (Indexer.Define): Check indexername declaration
19808
19809 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19810
19811         * attribute.cs (IsClsCompliant): Fixed problem with handling
19812         all three states (compliant, not-compliant, undetected).
19813
19814 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19815
19816         * attribute.cs (Attribute): Location is now public.
19817         (Resolve): Store resolved arguments (pos_values) in attribute class.
19818         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19819         (GetClsCompliantAttributeValue): New method that gets
19820         CLSCompliantAttribute value.
19821         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19822         if exists else null.
19823         (AttributeTester): New class for CLS-Compliant verification routines.
19824
19825         * class.cs (Emit): Add CLS-Compliant verification.
19826         (Method.GetSignatureForError): Implemented.
19827         (Constructor.GetSignatureForError): Implemented
19828         (Constructor.HasCompliantArgs): Returns if constructor has
19829         CLS-Compliant arguments.
19830         (Constructor.Emit): Override.
19831         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19832         is needed to test only parameters.
19833         (FieldBase.GetSignatureForError): Implemented.
19834         (TypeContainer): New member for storing base interfaces.
19835         (TypeContainer.FindMembers): Search in base interfaces too.
19836
19837         * codegen.cs (GetClsComplianceAttribute): New method that gets
19838         assembly or module CLSCompliantAttribute value.
19839         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19840         for assembly.
19841         (ModuleClass.Emit): Add error 3012 test.
19842
19843         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19844
19845         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19846         state for all decl types.
19847         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19848         if CLS-Compliant tests are required.
19849         (IsClsCompliaceRequired): New method. Analyze whether code
19850         must be CLS-Compliant.
19851         (IsExposedFromAssembly): New method. Returns true when MemberCore
19852         is exposed from assembly.
19853         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19854         value or gets cached value.
19855         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19856         is explicitly marked with CLSCompliantAttribute.
19857         (IsIdentifierClsCompliant): New abstract method. This method is
19858         used to testing error 3005.
19859         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19860         for identifier and parameters CLS-Compliant testing.
19861         (VerifyClsCompliance): New method. The main virtual method for
19862         CLS-Compliant verifications.
19863         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19864         null. I don't know why is null (too many public members !).
19865         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19866         and get value of first CLSCompliantAttribute that found.
19867
19868         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19869         (VerifyClsCompliance): Override and add extra tests.
19870
19871         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19872         clscheck- disable CLS-Compliant verification event if assembly is has
19873         CLSCompliantAttribute(true).
19874
19875         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19876         ApllyAttribute is now called in emit section as in the other cases.
19877         Possible future Emit integration.
19878         (IsIdentifierClsCompliant): New override.
19879         (VerifyClsCompliance): New override.
19880         (GetEnumeratorName): Returns full enum name.
19881
19882         * parameter.cs (GetSignatureForError): Implemented.
19883
19884         * report.cs (WarningData): New struct for Warning message information.
19885         (LocationOfPreviousError): New method.
19886         (Warning): New method. Reports warning based on the warning table.
19887         (Error_T): New method. Reports error based on the error table.
19888
19889         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19890         verifications are done here.
19891
19892         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19893
19894         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19895         CLSCompliantAttribute.
19896         (all_imported_types): New member holds all imported types from other
19897         assemblies.
19898         (LoadAllImportedTypes): New method fills static table with exported types
19899         from all referenced assemblies.
19900         (Modules): New property returns all assembly modules.
19901
19902 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19903
19904         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19905         throwing a parser error.
19906
19907         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19908         which removes the hardcoded get_/set_ prefixes for properties, as
19909         IL allows for the properties to be named something else.  
19910
19911         Bug #56013
19912
19913         * expression.cs: Do not override operand before we know if it is
19914         non-null.  Fix 56207
19915
19916 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19917
19918         * typemanager.cs: support for pinned variables.
19919
19920 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19921
19922         * decl.cs, typemanager.cs: Avoid using an arraylist
19923         as a buffer if there is only one result set.
19924
19925 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19926
19927         * expression.cs: Make sure you cant call a static method
19928         with an instance expression, bug #56174.
19929
19930 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19931
19932         * class.cs (IsDuplicateImplementation): Improve error reporting to
19933         flag 663 (method only differs in parameter modifier).
19934
19935         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19936         in preprocessor directives.
19937
19938         * location.cs (LookupFile): Allow for the empty path.
19939
19940         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19941         better approach for some of that patch, but its failing with the
19942         CharSet enumeration.  For now try/catch will do.
19943
19944         * typemanager.cs: Do not crash if a struct does not have fields.
19945         Fixes 56150.
19946
19947 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19948
19949         * expression.cs: cs0213, cant fix a fixed expression.
19950         fixes 50231.
19951
19952 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19953
19954         * cs-parser.jay: detect invalid embeded statements gracefully.
19955         bug #51113.
19956
19957 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19958
19959         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19960         As a regex:
19961         s/
19962         the invocation type may not be a subclass of the tye of the item/
19963         The type of the item must be a subclass of the invocation item.
19964         /g
19965
19966         Fixes bug #50820.
19967
19968 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19969
19970         * attribute.cs: Added methods to get a string and a bool from an
19971         attribute. Required to information from AssemblyKeyFileAttribute,
19972         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19973         * codegen.cs: Modified AssemblyName creation to include support for
19974         strongnames. Catch additional exceptions to report them as CS1548.
19975         * compiler.csproj: Updated include CryptoConvert.cs.
19976         * compiler.csproj.user: Removed file - user specific configuration.
19977         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19978         Mono.Security assembly. The original class is maintained and tested in
19979         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19980         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19981         like CSC 8.0 (C# v2) supports.
19982         * Makefile: Added CryptoConvert.cs to mcs sources.
19983         * rootcontext.cs: Added new options for strongnames.
19984
19985 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19986
19987         * driver.cs: For --expect-error, report error code `2'
19988         if the program compiled with no errors, error code `1' if
19989         it compiled with an error other than the one expected.
19990
19991 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19992
19993         * compiler.csproj: Updated for Visual Studio .NET 2003.
19994         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19995         * compiler.sln: Updated for Visual Studio .NET 2003.
19996
19997 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19998
19999         * expression.cs: Fix bug #47234. We basically need to apply the
20000         rule that we prefer the conversion of null to a reference type
20001         when faced with a conversion to 'object' (csc behaviour).
20002
20003 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20004
20005         * statement.cs: Shorter form for foreach, eliminates
20006         a local variable. r=Martin.
20007
20008 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20009
20010         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
20011         checks if we can use brtrue/brfalse to test for 0.
20012         * expression.cs: use the above in the test for using brtrue/brfalse.
20013         cleanup code a bit.
20014
20015 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20016
20017         * expression.cs: Rewrite string concat stuff. Benefits:
20018
20019         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
20020         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
20021         rather than a concat chain.
20022
20023         * typemanager.cs: Add lookups for more concat overloads.
20024
20025 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20026
20027         * expression.cs: Emit shorter il code for array init.
20028
20029         newarr
20030         dup
20031         // set 1
20032
20033         // set 2
20034
20035         newarr
20036         stloc.x
20037
20038         ldloc.x
20039         // set 1
20040
20041         ldloc.x
20042         // set 2
20043
20044 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
20045
20046         * statement.cs: Before, two switch blocks would be merged if the
20047         total size of the blocks (end_item - begin_item + 1) was less than
20048         two times the combined sizes of the blocks.
20049
20050         Now, it will only merge if after the merge at least half of the
20051         slots are filled.
20052
20053         fixes 55885.
20054
20055 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
20056
20057         * class.cs : csc build fix for GetMethods(). See bug #52503.
20058
20059 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
20060
20061         * expression.cs: Make sure fp comparisons work with NaN.
20062         This fixes bug #54303. Mig approved this patch a long
20063         time ago, but we were not able to test b/c the runtime
20064         had a related bug.
20065
20066 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
20067
20068         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
20069
20070 2004-03-19  Martin Baulig  <martin@ximian.com>
20071
20072         * class.cs (MemberCore.IsDuplicateImplementation): Report the
20073         error here and not in our caller.
20074
20075 2004-03-19  Martin Baulig  <martin@ximian.com>
20076
20077         * interface.cs: Completely killed this file.
20078         (Interface): We're now a TypeContainer and live in class.cs.
20079
20080         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
20081         argument; we're now also called for interfaces.
20082         (TypeContainer.DefineMembers): Allow this method being called
20083         multiple times.
20084         (TypeContainer.GetMethods): New public method; formerly known as
20085         Interface.GetMethod().  This is used by PendingImplementation.
20086         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
20087         it's now private and non-static.
20088         (Interface): Moved this here; it's now implemented similar to
20089         Class and Struct.
20090         (Method, Property, Event, Indexer): Added `bool is_interface'
20091         argument to their .ctor's.
20092         (MemberBase.IsInterface): New public field.
20093
20094         * cs-parser.jay: Create normal Method, Property, Event, Indexer
20095         instances instead of InterfaceMethod, InterfaceProperty, etc.
20096         (opt_interface_base): Removed; we now use `opt_class_base' instead.
20097         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
20098
20099 2004-03-19  Martin Baulig  <martin@ximian.com>
20100
20101         * class.cs (MethodCore.IsDuplicateImplementation): New private
20102         method which does the CS0111 checking.
20103         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
20104         Use IsDuplicateImplementation().
20105
20106 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
20107
20108         * decl.cs (FindMemberToOverride): New method to find the correct
20109         method or property to override in the base class.
20110         * class.cs
20111             - Make Method/Property use the above method to find the
20112               version in the base class.
20113             - Remove the InheritableMemberSignatureCompare as it is now
20114               dead code.
20115
20116         This patch makes large code bases much faster to compile, as it is
20117         O(n) rather than O(n^2) to do this validation.
20118
20119         Also, it fixes bug 52458 which is that nested classes are not
20120         taken into account when finding the base class member.
20121
20122         Reviewed/Approved by Martin.
20123
20124 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
20125
20126         * interface.cs: In all interface classes removed redundant
20127         member initialization.
20128
20129 2004-03-16  Martin Baulig  <martin@ximian.com>
20130
20131         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
20132
20133 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
20134
20135         * decl.cs (DefineTypeAndParents): New helper method to define a
20136         type's containers before the type itself is defined;  This is a
20137         bug exposed by the recent changes to Windows.Forms when an
20138         implemented interface was defined inside a class that had not been
20139         built yet.   
20140
20141         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
20142
20143         (Check): Loop correctly to report errors modifiers
20144         (UNSAFE was not in the loop, since it was the same as TOP).
20145
20146         * interface.cs: Every interface member now takes a ModFlags,
20147         instead of a "is_new" bool, which we set on the base MemberCore. 
20148
20149         Every place where we called "UnsafeOk" in the interface, now we
20150         call the proper member (InterfaceMethod.UnsafeOK) instead to get
20151         the unsafe settings from the member declaration instead of the
20152         container interface. 
20153
20154         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
20155
20156         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
20157         `set_indexer_name' to the pending bits (one per type).
20158
20159         We fixed a bug today that was picking the wrong method to
20160         override, since for properties the existing InterfaceMethod code
20161         basically ignored the method name.  Now we make sure that the
20162         method name is one of the valid indexer names.
20163
20164 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
20165  
20166         * support.cs (SeekableStreamReader): Keep track of stream byte
20167         positions and don't mix them with character offsets to the buffer.
20168
20169         Patch from Gustavo Giráldez
20170
20171 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
20172
20173         * interface.cs (InterfaceSetGetBase): Removed double member
20174         initialization, base class does it as well.
20175
20176 2004-03-13  Martin Baulig  <martin@ximian.com>
20177
20178         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
20179         when compiling corlib.
20180
20181 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
20182
20183         * convert.cs (ExplicitConversion): We were reporting an error on
20184         certain conversions (object_type source to a value type, when the
20185         expression was `null') before we had a chance to pass it through
20186         the user defined conversions.
20187
20188         * driver.cs: Replace / and \ in resource specifications to dots.
20189         Fixes 50752
20190
20191         * class.cs: Add check for duplicate operators.  Fixes 52477
20192
20193 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
20194
20195         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
20196         that are in the middle of the statements, not only at the end.
20197         Fixes #54987
20198
20199         * class.cs (TypeContainer.AddField): No longer set the
20200         `HaveStaticConstructor' flag, now we call it
20201         `UserDefineStaticConstructor' to diferentiate the slightly
20202         semantic difference.
20203
20204         The situation is that we were not adding BeforeFieldInit (from
20205         Modifiers.TypeAttr) to classes that could have it.
20206         BeforeFieldInit should be set to classes that have no static
20207         constructor. 
20208
20209         See:
20210
20211         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
20212
20213         And most importantly Zoltan's comment:
20214
20215         http://bugzilla.ximian.com/show_bug.cgi?id=44229
20216
20217         "I think beforefieldinit means 'it's ok to initialize the type sometime 
20218          before its static fields are used', i.e. initialization does not need
20219          to be triggered by the first access to the type. Setting this flag
20220          helps the JIT to compile better code, since it can run the static
20221          constructor at JIT time, and does not need to generate code to call it
20222          (possibly lots of times) at runtime. Unfortunately, mcs does not set
20223          this flag for lots of classes like String. 
20224          
20225          csc sets this flag if the type does not have an explicit static 
20226          constructor. The reasoning seems to be that if there are only static
20227          initalizers for a type, and no static constructor, then the programmer
20228          does not care when this initialization happens, so beforefieldinit
20229          can be used.
20230          
20231          This bug prevents the AOT compiler from being usable, since it 
20232          generates so many calls to mono_runtime_class_init that the AOT code
20233          is much slower than the JITted code. The JITted code is faster, 
20234          because it does not generate these calls if the vtable is type is
20235          already initialized, which is true in the majority of cases. But the
20236          AOT compiler can't do this."
20237
20238 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
20239
20240         * class.cs (MethodData.Emit): Refactor the code so symbolic
20241         information is generated for destructors;  For some reasons we
20242         were taking a code path that did not generate symbolic information
20243         before. 
20244
20245 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20246
20247         * class.cs: Create a Constructor.CheckBase method that
20248         takes care of all validation type code. The method
20249         contains some code that was moved from Define.
20250
20251         It also includes new code that checks for duplicate ctors.
20252         This fixes bug #55148.
20253
20254 2004-03-09  Joshua Tauberer <tauberer@for.net>
20255
20256         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
20257         a { ... }-style array creation invokes EmitStaticInitializers
20258         which is not good for reference-type arrays.  String, decimal
20259         and now null constants (NullCast) are not counted toward
20260         static initializers.
20261
20262 2004-03-05  Martin Baulig  <martin@ximian.com>
20263
20264         * location.cs (SourceFile.HasLineDirective): New public field;
20265         specifies whether the file contains or is referenced by a "#line"
20266         directive.
20267         (Location.DefineSymbolDocuments): Ignore source files which
20268         either contain or are referenced by a "#line" directive.        
20269
20270 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
20271
20272         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
20273         direct access to our parent, so check the method inline there.
20274
20275 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20276
20277         * expression.cs (Invocation.EmitCall): Miguel's last commit
20278         caused a regression. If you had:
20279
20280             T t = null;
20281             t.Foo ();
20282
20283         In Foo the implict this would be null.
20284
20285 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
20286
20287         * expression.cs (Invocation.EmitCall): If the method is not
20288         virtual, do not emit a CallVirt to it, use Call.
20289
20290         * typemanager.cs (GetFullNameSignature): Improve the method to
20291         cope with ".ctor" and replace it with the type name.
20292
20293         * class.cs (ConstructorInitializer.Resolve): Now the method takes
20294         as an argument the ConstructorBuilder where it is being defined,
20295         to catch the recursive constructor invocations.
20296
20297 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
20298
20299         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
20300         routines to check if a type is an enumerable/enumerator allow
20301         classes that implement the IEnumerable or IEnumerator interfaces.
20302
20303         * class.cs (Property, Operator): Implement IIteratorContainer, and
20304         implement SetYields.
20305
20306         (Property.Define): Do the block swapping for get_methods in the
20307         context of iterators.   We need to check if Properties also
20308         include indexers or not.
20309
20310         (Operator): Assign the Block before invoking the
20311         OperatorMethod.Define, so we can trigger the Iterator code
20312         replacement. 
20313
20314         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
20315         Property and Operator classes are not created when we parse the
20316         declarator but until we have the block completed, so we use a
20317         singleton SimpleIteratorContainer.Simple to flag whether the
20318         SetYields has been invoked.
20319
20320         We propagate this setting then to the Property or the Operator to
20321         allow the `yield' to function.
20322
20323 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
20324
20325         * codegen.cs: Implemented attribute support for modules.
20326         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
20327         Assembly/Module functionality.
20328
20329         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
20330         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
20331         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
20332
20333 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
20334
20335         * interface.cs (FindMembers): The operation is performed on all base
20336         interfaces and not only on the first. It is required for future CLS Compliance patch.
20337
20338 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20339
20340         * statement.cs, codegen.cs:
20341         This patch deals with patterns such as:
20342
20343         public class List : IEnumerable {
20344
20345                 public MyEnumerator GetEnumerator () {
20346                         return new MyEnumerator(this);
20347                 }
20348
20349                 IEnumerator IEnumerable.GetEnumerator () {
20350                         ...
20351                 }
20352                 
20353                 public struct MyEnumerator : IEnumerator {
20354                         ...
20355                 }
20356         }
20357
20358         Before, there were a few things we did wrong:
20359         1) we would emit callvirt on a struct, which is illegal
20360         2) we emited ldarg when we needed to emit ldarga
20361         3) we would mistakenly call the interface methods on an enumerator
20362         type that derived from IEnumerator and was in another assembly. For example:
20363
20364         public class MyEnumerator : IEnumerator
20365
20366         Would have the interface methods called, even if there were public impls of the
20367         method. In a struct, this lead to invalid IL code.
20368
20369 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
20370
20371         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
20372           renamed to Emit.
20373
20374         * delegate.cs (Define): Fixed crash when delegate type is undefined.
20375
20376 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
20377
20378         * cs-parser.jay: Fix small regression: we were not testing V2
20379         compiler features correctly.
20380
20381         * interface.cs: If the emit context is null, then create one
20382
20383 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
20384
20385         * decl.cs (GetSignatureForError): New virtual method to get full name
20386           for error messages.
20387
20388         * attribute.cs (IAttributeSupport): New interface for attribute setting.
20389           Now it is possible to rewrite ApplyAttributes method to be less if/else.
20390
20391         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
20392           Duplicated members and code in these classes has been removed.
20393           Better encapsulation in these classes.
20394
20395 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
20396
20397         * assign.cs (Assign.DoResolve): When dealing with compound
20398         assignments, there is a new rule in ECMA C# 2.4 (might have been
20399         there before, but it is documented here) that states that in:
20400
20401         a op= b;
20402
20403         If b is of type int, and the `op' is a shift-operator, then the
20404         above is evaluated as:
20405
20406         a = (int) a op b 
20407
20408         * expression.cs (Binary.ResolveOperator): Instead of testing for
20409         int/uint/long/ulong, try to implicitly convert to any of those
20410         types and use that in pointer arithmetic.
20411
20412         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
20413         method to print information for from the type, not from the
20414         null-method we were given.
20415
20416 2004-02-01  Duncan Mak  <duncan@ximian.com>
20417
20418         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20419         parsing for cmd, fixes bug #53694.
20420
20421 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20422
20423         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20424         in the member name duplication tests. Property and operator name duplication
20425         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20426
20427 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20428
20429         * interface.cs (PopulateMethod): Fixed crash when interface method
20430         returns not existing type (error test cs0246-3.cs).
20431
20432 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20433
20434         * cs-parser.jay (interface_accessors): Re-write actions to also
20435         store attributes attached to get and set methods. Fix spelling
20436         while at it.
20437
20438         (inteface_property_declaration): Modify accordingly.
20439
20440         (InterfaceAccessorInfo): New helper class to store information to pass
20441         around between rules that use interface_accessors.
20442
20443         * interface.cs (Emit): Apply attributes on the get and set
20444         accessors of properties and indexers too.
20445
20446         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20447         right MethodBuilder when applying attributes to the get and set accessors.
20448
20449 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20450
20451         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20452
20453 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20454
20455         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20456
20457 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20458
20459         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20460         changes that treat `yield' specially when present before `break'
20461         or `return' tokens.
20462
20463         * cs-tokenizer.cs: yield is no longer a keyword.
20464
20465 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20466
20467         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20468         setting for default constructors.
20469         For default constructors are almost every time set wrong Modifier. The
20470         generated IL code has been alright. But inside mcs this values was
20471         wrong and this was reason why several of my CLS Compliance tests
20472         failed.
20473
20474 2004-01-22  Martin Baulig  <martin@ximian.com>
20475
20476         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20477         not a QualifiedIdentifier.  This is what `type_name_expression'
20478         was previously doing.
20479         (type_name_expression): Removed; the code is now in
20480         `namespace_or_type_name'.
20481         (qualified_identifier): Removed, use `namespace_or_type_name'
20482         instead.
20483         (QualifiedIdentifier): Removed this class.      
20484
20485 2004-01-22  Martin Baulig  <martin@ximian.com>
20486
20487         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20488         not a string as alias name.
20489
20490 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20491
20492         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20493         #52730 bug, and instead compute correctly the need to use a
20494         temporary variable when requesting an address based on the
20495         static/instace modified of the field and the constructor.
20496  
20497 2004-01-21  Martin Baulig  <martin@ximian.com>
20498
20499         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20500         class and namespace before looking up aliases.  Fixes #52517.
20501
20502 2004-01-21  Martin Baulig  <martin@ximian.com>
20503
20504         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20505         assinged in a 'try'; fixes exception4.cs.
20506
20507 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20508         * class.cs : Implemented parameter-less constructor for TypeContainer
20509
20510         * decl.cs: Attributes are now stored here. New property OptAttributes
20511
20512         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20513
20514         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20515
20516 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20517
20518         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20519           (CSharpSignature): New method for indexer and property signature.
20520
20521 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20522
20523         * pending.cs (IsVirtualFilter): Faster implementation.
20524
20525 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20526
20527         * typemanager.cs: Avoid inclusion of same assembly more than once.
20528
20529 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20530
20531         * cs-parser.jay: Fixed problem where the last assembly attribute
20532           has been applied also to following declaration (class, struct, etc.)
20533           
20534 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20535
20536         * class.cs: Added error CS0538, CS0539 reporting.
20537         Fixed crash on Microsoft runtime when field type is void.
20538
20539         * cs-parser.jay: Added error CS0537 reporting.
20540
20541         * pending.cs: Added error CS0535 reporting.
20542         Improved error report for errors CS0536, CS0534.
20543
20544 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20545
20546         Merge a few bits from the Anonymous Method MCS tree.
20547
20548         * statement.cs (ToplevelBlock): New class for toplevel methods,
20549         will hold anonymous methods, lifted variables.
20550
20551         * cs-parser.jay: Create toplevel blocks for delegates and for
20552         regular blocks of code. 
20553
20554 2004-01-20  Martin Baulig  <martin@ximian.com>
20555
20556         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20557         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20558         and `NeedExplicitReturn'; added `IsLastStatement'.
20559         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20560         have a `ReturnLabel' or we're not unreachable.
20561
20562         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20563         child's reachability; don't just override ours with it.  Fixes
20564         #58058 (lluis's example).
20565         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20566         InFinally(), InLoop(), InSwitch() and
20567         BreakCrossesTryCatchBoundary() methods.
20568
20569         * statement.cs (Return): Do all error checking in Resolve().
20570         Unless we are the last statement in a top-level block, always
20571         create a return label and jump to it.
20572         (Break, Continue): Do all error checking in Resolve(); also make
20573         sure we aren't leaving a `finally'.
20574         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20575         statement in a top-level block.
20576         (Block.Flags): Added `IsDestructor'.
20577         (Block.IsDestructor): New public property.
20578
20579 2004-01-20  Martin Baulig  <martin@ximian.com>
20580
20581         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20582
20583 2004-01-20  Martin Baulig  <martin@ximian.com>
20584
20585         * statement.cs (Statement.ResolveUnreachable): New public method.
20586         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20587         (Block.Resolve): Resolve unreachable statements.
20588
20589 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20590
20591         * expression.cs: We need to fix the case where we do
20592         not have a temp variable here.
20593
20594         * assign.cs: Only expression compound assignments need
20595         temporary variables.
20596
20597 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20598
20599         * flowanalysis.cs: Reduce memory allocation in a few ways:
20600           - A block with no variables should not allocate a bit
20601             vector for itself.
20602           - A method with no out parameters does not need any tracking
20603             for assignment of the parameters, so we need not allocate
20604             any data for it.
20605           - The arrays:
20606                 public readonly Type[] VariableTypes;
20607                 public readonly string[] VariableNames;
20608             Are redundant. The data is already stored in the variable
20609             map, so we need not allocate another array for it.
20610           - We need to add alot of checks for if (params | locals) == null
20611             due to the first two changes.
20612
20613 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20614
20615         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20616         implement IMemoryLocation, we store a copy on a local variable and
20617         take the address of it.  Patch from Benjamin Jemlich
20618
20619         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20620         to use a special "type_name_expression" rule which reduces the
20621         number of "QualifiedIdentifier" classes created, and instead
20622         directly creates MemberAccess expressions.
20623
20624 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20625
20626         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20627         that fixes #52853.  Null literal assignment to ValueType
20628
20629         * class.cs (MethodData.Emit): Instead of checking the name of the
20630         method to determine if its a destructor, create a new derived
20631         class from Method called Destructor, and test for that.  
20632
20633         * cs-parser.jay: Create a Destructor object instead of a Method.  
20634
20635         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20636
20637         Fixes: 52933
20638
20639 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20640
20641         * expression.cs (Binary.ResolveOperator): Perform an implicit
20642         conversion from MethodGroups to their delegate types on the
20643         Addition operation.
20644
20645         * delegate.cs: Introduce a new class DelegateCreation that is the
20646         base class for `NewDelegate' and `ImplicitDelegateCreation',
20647         factor some code in here.
20648
20649         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20650         conversion from MethodGroups to compatible delegate types. 
20651
20652         * ecore.cs (Expression.Resolve): Do not flag error 654
20653         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20654         we allow conversions from MethodGroups to delegate types now.
20655
20656         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20657         assignments in v2 either.
20658
20659 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20660
20661         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20662         static read-only fields in ctors.
20663
20664         Applied patch from Benjamin Jemlich 
20665
20666         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20667
20668 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20669
20670         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20671         here to return true, as they can be used like this:
20672
20673                 (XXX) int.MEMBER ()
20674
20675         Fixed 49836 and all the other dups
20676
20677 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20678
20679         * driver.cs: Implement /win32res and /win32icon.
20680
20681 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20682
20683         * cs-parser.jay: Add a rule to improve error handling for the
20684         common mistake of placing modifiers after the type.
20685
20686 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20687
20688         * cs-parser.jay (interface_event_declaration): Catch
20689         initialization of events on interfaces, and report cs0068
20690
20691         * cs-parser.jay (interface_event_declaration): Catch
20692         initialization of events. 
20693
20694         * ecore.cs: Better report missing constructors.
20695
20696         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20697         the error reporting done in the wrong place.  Fix.
20698
20699         * expression.cs (Binary.ResolveOperator): Catch the 
20700         operator + (E x, E y) error earlier, and later allow for implicit
20701         conversions in operator +/- (E e, U x) from U to the underlying
20702         type of E.
20703
20704         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20705         52596, if the container class is abstract, the default constructor
20706         is protected otherwise its public (before, we were always public).
20707
20708         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20709         fixed statement.
20710
20711         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20712         Jemlich that fixes bug #52597, MCS was generating invalid code for
20713         idisposable structs.   Thanks to Ben for following up with this
20714         bug as well.
20715
20716 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20717
20718         * driver.cs: Allow assemblies without code to be generated, fixes
20719         52230.
20720
20721 2004-01-07  Nick Drochak <ndrochak@gol.com>
20722
20723         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20724
20725 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20726
20727         * cs-parser.jay: Add rules to improve error reporting if fields or
20728         methods are declared at the namespace level (error 116)
20729
20730         * Add rules to catch event add/remove
20731
20732 2004-01-04  David Sheldon <dave-mono@earth.li>
20733
20734   * expression.cs: Added matching ")" to error message for 
20735   CS0077
20736
20737 2004-01-03 Todd Berman <tberman@gentoo.org>
20738
20739         * ecore.cs, attribute.cs:
20740         Applying fix from #52429.
20741
20742 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20743
20744         * ecore.cs, expression.cs, statement.cs:
20745         Total rewrite of how we handle branching. We
20746         now handle complex boolean expressions with fewer
20747         jumps. As well if (x == 0) no longer emits a ceq.
20748
20749         if (x is Foo) is much faster now, because we generate
20750         better code.
20751
20752         Overall, we get a pretty big improvement on our benchmark
20753         tests. The code we generate is smaller and more readable.
20754
20755         I did a full two-stage bootstrap. The patch was reviewed
20756         by Martin and Miguel.
20757
20758 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20759
20760         * cs-parser.jay: Make primary_expression not take a QI.
20761         we dont need this because the member_access rule covers
20762         us here. So we replace the rule with just IDENTIFIER.
20763
20764         This has two good effects. First, we remove a s/r conflict.
20765         Second, we allocate many fewer QualifiedIdentifier objects.
20766
20767 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20768
20769         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20770         set the correct information via SRE. This prevents
20771         hanging on the MS runtime. Fixes #29374.
20772
20773 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20774
20775         * convert.cs: correctly handle conversions to value types
20776         from Enum and ValueType as unboxing conversions.
20777
20778         Fixes bug #52569. Patch by Benjamin Jemlich.
20779
20780 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20781
20782         * expression.cs (BetterConversion): Prefer int -> uint
20783         over int -> ulong (csc's behaviour). This fixed bug #52046.
20784
20785 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20786
20787         * decl.cs (MemberCache.FindMembers): now returns a
20788         MemberInfo [].
20789
20790         * typemanager.cs: In general, go with with ^^.
20791         (CopyNewMethods): take an IList.
20792         (RealMemberLookup): Only allocate an arraylist
20793         if we copy from two sets of methods.
20794
20795         This change basically does two things:
20796         1) Fewer array lists allocated due to CopyNewMethods.
20797         2) the explicit cast in MemberList costed ALOT.
20798
20799 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20800
20801         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20802         a hashtable to avoid needless string allocations when an identifier is
20803         used more than once (the common case).
20804
20805 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20806
20807         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20808         is broken, it will not return anything. So, we
20809         have to use the information we have in mcs to
20810         do the task.
20811
20812         * typemanager.cs: Add a cache for GetInterfaces,
20813         since this will now be used more often (due to ^^)
20814
20815         (GetExplicitInterfaces) New method that gets the
20816         declared, not effective, interfaces on a type
20817         builder (eg, if you have interface IFoo, interface
20818         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20819         { IBar }.
20820
20821         This patch makes MCS able to bootstrap itself on
20822         Windows again.
20823
20824 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20825
20826         * expression.cs: Remove the Nop's that Miguel put
20827         in by mistake.
20828
20829 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20830
20831         * report.cs, codegen.cs: Give the real stack trace to
20832         the error when an exception is thrown.
20833
20834 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20835
20836         * decl.cs: only allocate hashtables for ifaces if 
20837         it is an iface!
20838
20839 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20840
20841         * expression.cs: fix the error from cs0121-2.cs
20842         (a parent interface has two child interfaces that
20843         have a function with the same name and 0 params
20844         and the function is called through the parent).
20845
20846 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20847
20848         * class.cs, rootcontext.cs, typmanager.cs: do not
20849         leak pointers.
20850
20851 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20852
20853         * codegen.cs: remove stack for the ec flow branching.
20854         It is already a linked list, so no need.
20855
20856 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20857
20858         * Makefile: Allow custom profiler here.
20859
20860 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20861
20862         * typemanager.cs (LookupType):
20863           - Use a static char [], because split takes
20864             a param array for args, so it was allocating
20865             every time.
20866           - Do not store true in a hashtable, it boxes.
20867
20868 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20869
20870         * flowanalysis.cs: bytify common enums.
20871
20872 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20873
20874         * modifiers.cs: Add a new set of flags for the
20875         flags allowed on explicit interface impls.
20876         * cs-parser.jay: catch the use of modifiers in
20877         interfaces correctly.
20878         * class.cs: catch private void IFoo.Blah ().
20879
20880         All related to bug #50572.
20881
20882 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20883
20884         * decl.cs: Rewrite the consistant accessability checking.
20885         Accessability is not linear, it must be implemented in
20886         a tableish way. Fixes #49704.
20887
20888 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20889
20890         * expression.cs: Handle negation in a checked context.
20891         We must use subtraction from zero. Fixes #38674.
20892
20893 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20894
20895         * class.cs: Ignore static void main in DLLs.
20896         * rootcontext.cs: Handle the target type here,
20897         since we are have to access it from class.cs
20898         * driver.cs: account for the above.
20899
20900 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20901
20902         * report.cs: Give line numbers and files if available.
20903
20904 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20905
20906         * driver.cs: Implement /addmodule.
20907
20908         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20909         ModuleBuilders.
20910
20911 2003-12-20  Martin Baulig  <martin@ximian.com>
20912
20913         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20914         (FieldBase.IsAssigned): Removed this field.
20915         (FieldBase.SetAssigned): New public method.
20916         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20917
20918 2003-12-20  Martin Baulig  <martin@ximian.com>
20919
20920         * expression.cs (LocalVariableReference.DoResolve): Don't set
20921         `vi.Used' if we're called from DoResolveLValue().
20922
20923         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20924         returns the usage vector it just merged into the current one -
20925         pass this one to UsageWarning().
20926         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20927         of the `EmitContext', don't call this recursively on our children.
20928
20929 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20930
20931         * driver.cs: Implement /target:module.
20932
20933 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20934
20935         * support.cs (CharArrayHashtable): New helper class.
20936
20937         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20938         char arrays, not strings, so we can avoid creating a string in
20939         consume_identifier if the identifier is a keyword.
20940
20941 2003-12-16  Martin Baulig  <martin@ximian.com>
20942
20943         * statement.cs (LocalInfo.Assigned): Removed this property.
20944         (LocalInfo.Flags): Removed `Assigned'.
20945         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20946         and uses flow analysis.
20947         (Block.UsageWarning): Made this method private.
20948         (Block.Resolve): Call UsageWarning() if appropriate.
20949
20950         * expression.cs (LocalVariableReference.DoResolve): Always set
20951         LocalInfo.Used here.
20952
20953 2003-12-13  Martin Baulig  <martin@ximian.com>
20954
20955         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20956         any value here; we're now using flow analysis to figure out
20957         whether a statement/block returns a value.
20958
20959 2003-12-13  Martin Baulig  <martin@ximian.com>
20960
20961         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20962         working again.
20963         (FlowBranching.MergeFinally): Don't call
20964         `branching.CheckOutParameters()' here, this is called in
20965         MergeTopBlock().
20966         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20967         when adding the `finally' vector.       
20968
20969 2003-12-13  Martin Baulig  <martin@ximian.com>
20970
20971         * flowanalysis.cs
20972         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20973         actually work and also fix #48962.
20974
20975 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20976
20977         * decl.cs: Do not check System.Object for nested types,
20978         since we know it does not have any. Big bang for buck:
20979
20980         BEFORE:
20981            Run 1:   8.35 seconds
20982            Run 2:   8.32 seconds
20983            corlib:  17.99 seconds
20984         AFTER:
20985            Run 1:   8.17 seconds
20986            Run 2:   8.17 seconds
20987            corlib:  17.39 seconds
20988
20989 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20990
20991         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20992         time we are returning 0 members, so we save alot here.
20993
20994 2003-12-11  Martin Baulig  <martin@ximian.com>
20995
20996         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20997         `MergeChild()', also just take the `FlowBranching' as argument;
20998         call Merge() on it and return the result.
20999         (FlowBranching.Merge): We don't need to do anything if we just
21000         have one sibling.
21001
21002 2003-12-11  Martin Baulig  <martin@ximian.com>
21003
21004         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
21005         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
21006         Maurer for this idea.
21007
21008 2003-12-11  Martin Baulig  <martin@ximian.com>
21009
21010         * flowanalysis.cs (MergeResult): This class is now gone; we now
21011         use the `UsageVector' for this.  The reason for this is that if a
21012         branching just has one sibling, we don't need to "merge" them at
21013         all - that's the next step to do.
21014         (FlowBranching.Merge): We now return a `UsageVector' instead of a
21015         `MergeResult'.
21016
21017 2003-12-11  Martin Baulig  <martin@ximian.com>
21018
21019         Reworked flow analyis and made it more precise and bug-free.  The
21020         most important change is that we're now using a special `Reachability'
21021         class instead of having "magic" meanings of `FlowReturns'.  I'll
21022         do some more cleanups and optimizations and also add some more
21023         documentation this week.
21024
21025         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
21026         largely reworked this class.
21027         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
21028         the new `Reachability' class instead of having "magic" values here.
21029         (FlowBranching): We're now using an instance of `Reachability'
21030         instead of having separate `Returns', `Breaks' etc. fields.
21031
21032         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
21033         based on flow analysis; ignore the return value of block.Emit ().
21034
21035 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
21036
21037         * driver.cs typemanager.cs: Find the mono extensions to corlib even
21038         if they are private.
21039
21040 2003-12-09  Martin Baulig  <martin@ximian.com>
21041
21042         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
21043         call them directly on the UsageVector.
21044
21045 2003-12-09  Martin Baulig  <martin@ximian.com>
21046
21047         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
21048         Changed return type from `FlowReturns' to `Reachability'.
21049
21050 2003-12-09  Martin Baulig  <martin@ximian.com>
21051
21052         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
21053         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
21054         `Reachable' fields with a single `Reachability' one.
21055
21056 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21057
21058         * class.cs (FindMembers): Remove foreach's.
21059
21060         Bootstrap times:
21061
21062         BEFORE
21063                 Run 1:   8.74 seconds
21064                 Run 2:   8.71 seconds
21065
21066         AFTER
21067                 Run 1:   8.64 seconds
21068                 Run 2:   8.58 seconds
21069
21070
21071 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21072
21073         * cs-parser.jay:
21074         * gen-treedump.cs:
21075         * statement.cs:
21076         This patch does a few things:
21077                 1. EmptyStatement is now a singleton, so it is never reallocated.
21078                 2. All blah is EmptyStatement constructs have been changed to
21079                    blah == EmptyStatement.Value, which is much faster and valid
21080                    now that EmptyStatement is a singleton.
21081                 3. When resolving a block, rather than allocating a new array for
21082                    the non-empty statements, empty statements are replaced with
21083                    EmptyStatement.Value
21084                 4. Some recursive functions have been made non-recursive.
21085         Mainly the performance impact is from (3), however (1) and (2) are needed for
21086         this to work. (4) does not make a big difference in normal situations, however
21087         it makes the profile look saner.
21088
21089         Bootstrap times:
21090
21091         BEFORE
21092         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
21093         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
21094         Total memory allocated: 56397 KB
21095
21096         AFTER
21097         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
21098         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
21099         Total memory allocated: 55666 KB
21100
21101 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21102
21103         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
21104         than the hashtable in a hashtable version
21105
21106         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
21107         we always end up concating a string. This results in a huge perf
21108         loss, because many strings have to be tracked by the GC. In this
21109         patch, we first use a hashtable that works with two keys, so that
21110         the strings do not need to be concat'ed.
21111
21112         Bootstrap times:
21113         BEFORE
21114                 Run 1:   8.74 seconds
21115                 Run 2:   8.71 seconds
21116
21117         AFTER
21118                 Run 1:   8.65 seconds
21119                 Run 2:   8.56 seconds
21120
21121 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21122
21123         * Makefile: Add a new target `do-time' that does a quick and simple
21124         profile, leaving easy to parse output.
21125
21126 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
21127
21128         * codegen.cs (Init): Create the dynamic assembly with 
21129         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
21130
21131 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
21132
21133         * support.cs: Make the PtrHashtable use only one
21134         instance of its comparer.
21135
21136 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
21137
21138         * typemanager.cs: Fix lookup of GetNamespaces.
21139
21140 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
21141
21142         * expression.cs: Removed redundant line.
21143
21144         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
21145         ArrayLists, use for loops with bounds.  
21146
21147         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
21148         arraylist.
21149
21150         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
21151         arraylists, use for loop with bounds.
21152
21153         The above three changes give us a 0.071 second performance
21154         improvement out of 3.294 seconds down to 3.223.  On my machine
21155         the above changes reduced the memory usage by 1,387 KB during
21156         compiler bootstrap.
21157
21158         * cs-parser.jay (QualifiedIdentifier): New class used to represent
21159         QualifiedIdentifiers.  Before we created a new string through
21160         concatenation, and mostly later on, the result would be
21161         manipulated by DecomposeQI through string manipulation.
21162
21163         This reduced the compiler memory usage for bootstrapping from
21164         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
21165         compile times in 0.05 seconds.
21166
21167 2003-11-28  Dick Porter  <dick@ximian.com>
21168
21169         * support.cs: Do string compares with the Invariant culture.
21170
21171         * rootcontext.cs: 
21172         * gen-treedump.cs: 
21173         * expression.cs: 
21174         * driver.cs: 
21175         * decl.cs: 
21176         * codegen.cs: 
21177         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
21178         the comparison is done with the Invariant culture.
21179
21180 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
21181
21182         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
21183         GetEnumerator method.
21184
21185         (ProbeCollectionType): Iterate starting at the most specific type
21186         upwards looking for a GetEnumerator
21187
21188         * expression.cs: Shift count can be up to 31 for int/uint and 63
21189         for long/ulong.
21190
21191 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
21192
21193         * statement.cs (Block.LookupLabel): Also look for the label on the
21194         children blocks.  Use a hash table to keep track of visited
21195         nodes. 
21196
21197         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
21198         we actually did transform the other operand, otherwise fall back
21199         to the common codepath that casts to long.
21200
21201         * cs-tokenizer.cs: Use the same code pattern as the int case.
21202         Maybe I should do the parsing myself, and avoid depending on the
21203         Parse routines to get this done.
21204
21205 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
21206
21207         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
21208         which fixes bug 51347.  This time test it.
21209
21210         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
21211         attributes for example can not tell the difference between these.
21212         The difference was only a syntax feature of the language. 
21213
21214         * attribute.cs: Apply attributes to delegates.
21215
21216         * delegate.cs: Call the apply attributes method.
21217
21218 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
21219
21220         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
21221         comparing 0 vs Byte.MinValue, not the value
21222
21223         (ImplicitConversionRequired): When reporting a conversion error,
21224         use error 31 to print out the constant error instead of the
21225         simpler 29.
21226
21227         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
21228         which fixes bug 51347.
21229
21230 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
21231
21232         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
21233         which fixes the -warnaserror command line option.
21234
21235 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
21236
21237         * cfold.cs (DoNumericPromotions): During constant folding of
21238         additions on UIntConstant, special case intconstants with
21239         IntConstants like we do on the expression binary operator. 
21240
21241 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
21242
21243         * convert.cs (ImplicitReferenceConversion): We were missing a case
21244         (System.Enum are not value types or class types, so we need to
21245         classify them separatedly).
21246
21247         * driver.cs: We do not support error 2007.
21248
21249 2003-11-12 Jackson Harper <jackson@ximian.com>
21250
21251         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
21252         system directory. Also use the full file name so users can
21253         libraries names mscorlib-o-tron.dll in a non system dir.
21254
21255 2003-11-10  Martin Baulig  <martin@ximian.com>
21256
21257         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
21258         (TypeManager.InitCoreTypes): Initialize them here, but instead of
21259         calling `ResolveType()' on them, directly assign their `Type'.
21260
21261 2003-11-08  Martin Baulig  <martin@ximian.com>
21262
21263         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
21264         return value and the `out parent' parameter.
21265         (TypeContainer.DefineType): Moved the CS0644 check into
21266         GetClassBases().  Don't pass the interface types to the
21267         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
21268         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
21269
21270         * ecore.cs (TypeExpr.IsAttribute): New property.
21271         (TypeExpr.GetInterfaces): New method.
21272
21273         * interface.cs (Interface.GetInterfaceTypeByName): Return a
21274         TypeExpr instead of a Type.
21275         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
21276         (Interface.DefineType): Don't pass the interface types to the
21277         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
21278         them later and then call `TypeBulider.AddInterfaceImplementation()'.
21279
21280         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
21281         instead of a `Type[]'.
21282         (TypeManager.RegisterBuilder): Likewise.
21283         (TypeManager.AddUserInterface): Likewise.
21284         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
21285         `Type[]' and also return a `TypeExpr[]'.
21286         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
21287
21288 2003-11-08  Martin Baulig  <martin@ximian.com>
21289
21290         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
21291         Expression.     
21292
21293 2003-11-08  Martin Baulig  <martin@ximian.com>
21294
21295         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
21296         TypeManager.ResolveExpressionTypes().
21297
21298         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
21299         instead of an Expression.
21300         (TypeExpr): This is now an abstract base class for `TypeExpression'.
21301         (TypeExpression): New public class; formerly known as `TypeExpr'.
21302
21303         * expression.cs (ComposedCast): Derive from TypeExpr.
21304
21305         * typemanager.cs (TypeManager.system_*_expr): These are now
21306         TypExpr's instead of Expression's.
21307         (TypeManager.ResolveExpressionTypes): New public static function;
21308         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
21309         of them.        
21310
21311 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
21312
21313         * expression.cs (New.DoResolve): Do not dereference value that
21314         might be a null return.
21315
21316         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
21317         sure that the constant value has the right type.  Fixes an
21318         unreported bug, similar to 50425.
21319
21320         * const.cs (Const.LookupConstantValue): Call
21321         ImplicitStandardConversionExists before doing a conversion to
21322         avoid havng the TypeManager.ChangeType do conversions.
21323
21324         Reduced the number of casts used
21325
21326         (Const.ChangeType): New routine to enable reuse of the constant
21327         type changing code from statement.
21328
21329         * typemanager.cs (ChangeType): Move common initialization to
21330         static global variables.
21331
21332         Fixes #50425.
21333
21334         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
21335         every value type to go through, even if it was void.  Fix that. 
21336
21337         * cs-tokenizer.cs: Use is_identifier_start_character on the start
21338         character of the define, and the is_identifier_part_character for
21339         the rest of the string.
21340
21341 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
21342
21343         * expression.cs (UnaryMutator.EmitCode): When I updated
21344         LocalVariableReference.DoResolve, I overdid it, and dropped an
21345         optimization done on local variable references.
21346
21347 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
21348
21349         * ecore.cs: Convert the return from Ldlen into an int.
21350
21351 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
21352
21353         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
21354         the accessibility, this is a special case for toplevel non-public
21355         classes (internal for instance).
21356
21357 2003-10-20  Nick Drochak <ndrochak@gol.com>
21358
21359         * ecore.cs: Fix typo and build.  Needed another right paren.
21360
21361 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
21362
21363         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
21364         `internal' case regular and protected, but not allowing protected
21365         to be evaluated later.  Bug 49840
21366
21367 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
21368
21369         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
21370         to kb.Nlast, and not the kb.nFirst to isolate the switch
21371         statement.
21372
21373         Extract the underlying type, so enumerations of long/ulong are
21374         treated like long/ulong.
21375
21376 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
21377
21378         * expression.cs (New): Overload the meaning of RequestedType to
21379         track the possible creation of the NewDelegate type, since
21380         DoResolve is invoked more than once for new constructors on field
21381         initialization.
21382
21383         See bugs: #48800 and #37014
21384
21385         * cs-parser.jay (declare_local_constants): Take an arraylist
21386         instead of a single constant.
21387
21388         (local_constant_declaration): It should take a
21389         constant_declarators, not a constant_declarator.  Fixes 49487
21390
21391         * convert.cs: Fix error report.
21392
21393 2003-10-13 Jackson Harper <jackson@ximian.com>
21394
21395         * typemanager.cs (TypeToCoreType): Add float and double this fixes
21396         bug #49611
21397
21398 2003-10-09  Martin Baulig  <martin@ximian.com>
21399
21400         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
21401         to the .ctor.
21402         (MethodCore.DoDefineParameters): Removed the TypeContainer
21403         argument; use the DeclSpace which was passed to the .ctor instead.
21404         (MethodCore.CheckParameter): Take a DeclSpace instead of a
21405         TypeContainer; we only need a DeclSpace here.
21406
21407 2003-10-09  Martin Baulig  <martin@ximian.com>
21408
21409         * class.cs (MethodData): Added additional `DeclSpace ds' argument
21410         to the .ctor.
21411         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
21412         EmitContext's .ctor.    
21413
21414 2003-10-09  Martin Baulig  <martin@ximian.com>
21415
21416         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21417         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21418         AsAccessible(), moved them as well.
21419
21420         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21421
21422 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21423
21424         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21425
21426 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21427
21428         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21429         generation for >=, as spotted by Paolo, bug 48679.  
21430         Patch from David Waite.
21431
21432         * cs-tokenizer.cs: Add handling for #pragma.
21433
21434         * cs-parser.jay: Allow for both yield and yield return in the
21435         syntax.  The anti-cobolization of C# fight will go on!
21436
21437         * class.cs (TypeBuilder.DefineType): Catch error condition here
21438         (Parent.DefineType erroring out and returning null).
21439
21440         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21441         coping with enumerations variables, we were mistakenly processing
21442         them as a regular value type instead of built-in types.  Fixes the
21443         bug #48063
21444
21445         * typemanager.cs (IsBuiltinOrEnum): New method.
21446
21447 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21448
21449         * cs-parser.jay: Upgrade: yield now needs the return clause.
21450
21451 2003-09-19  Martin Baulig  <martin@ximian.com>
21452
21453         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21454         `MemberCache parent' argument.  Normally, an interface doesn't
21455         have a parent type except System.Object, but we use this in gmcs
21456         for generic type parameters.
21457
21458 2003-09-18  Martin Baulig  <martin@ximian.com>
21459
21460         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21461         on `type.IsInterface'; don't check whether the type has a parent
21462         to determine whether it's an interface.
21463
21464 2003-09-15  Martin Baulig  <martin@ximian.com>
21465
21466         * class.cs (TypeContainer.DefineType): Added an error flag to
21467         avoid reporting duplicate CS0146's ("class definition is
21468         circular.").
21469
21470         * driver.cs (Driver.MainDriver): Abort if
21471         RootContext.ResolveTree() reported any errors.
21472
21473 2003-09-07  Martin Baulig  <martin@ximian.com>
21474
21475         * report.cs (Error, Warning): Added overloaded versions which take
21476         a `params object[] args' and call String.Format().
21477
21478 2003-09-07  Martin Baulig  <martin@ximian.com>
21479
21480         * decl.cs (DeclSpace..ctor): Don't call
21481         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21482         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21483         (DeclSpace.RecordDecl): New method.
21484
21485         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21486
21487 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21488
21489         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21490         value attributes to be applied to ParameterBuilders.
21491
21492         * class.cs (MethodCore.LabelParameters): Make static and more
21493         generic so that it can be used from other places - like interface
21494         methods, for instance.
21495
21496         * interface.cs (Interface.Emit): Call LabelParameters before
21497         emitting attributes on the InterfaceMethod.
21498
21499 2003-08-26  Martin Baulig  <martin@ximian.com>
21500
21501         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21502         resolving aliases; fixes #47927.
21503
21504 2003-08-26  Martin Baulig  <martin@ximian.com>
21505
21506         * statement.cs (Using.DoResolve): This is internally emitting a
21507         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21508         do not always return.  Fixes #47681.
21509
21510 2003-08-26  Martin Baulig  <martin@ximian.com>
21511
21512         * decl.cs (MemberCore): Moved WarningNotHiding(),
21513         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21514         into MemberBase.
21515         (AdditionResult): Make this nested in DeclSpace.
21516         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21517         argument; call NamespaceEntry.Define() unless we're nested in a
21518         class or struct.
21519
21520         * namespace.cs (Namespace.DefineName): New public function.  This
21521         is called from DeclSpace's .ctor to add 
21522         (Namespace.Lookup): Include DeclSpaces in the lookup.
21523
21524         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21525
21526         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21527
21528 2003-08-25  Martin Baulig  <martin@ximian.com>
21529
21530         * convert.cs (Convert.ExplicitReferenceConversion): When
21531         converting from an interface type to a class, unbox if the target
21532         type is a struct type.  Fixes #47822.
21533
21534 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21535
21536         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21537         #47854.
21538
21539 2003-08-22  Martin Baulig  <martin@ximian.com>
21540
21541         * class.cs (TypeManager.DefineType): When defining a nested type,
21542         call DefineType() on our parent; fixes #47801.
21543
21544 2003-08-22  Martin Baulig  <martin@ximian.com>
21545
21546         * class.cs (MethodData.Define): While checking if a method is an
21547         interface implementation, improve the test a bit more to fix #47654.
21548
21549 2003-08-22  Martin Baulig  <martin@ximian.com>
21550
21551         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21552         correctly; fixes #47722.
21553
21554 2003-08-22  Martin Baulig  <martin@ximian.com>
21555
21556         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21557         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21558
21559         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21560
21561 2003-08-22  Martin Baulig  <martin@ximian.com>
21562
21563         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21564         can only be assigned in static constructors.  Fixes #47161.
21565
21566 2003-08-22  Martin Baulig  <martin@ximian.com>
21567
21568         Rewrote and improved the flow analysis code.
21569
21570         * flowbranching.cs (FlowBranching): Make this class abstract.
21571         (FlowBranching.CreateBranching): New static function to create a
21572         new flow branching.
21573         (FlowBranchingBlock, FlowBranchingException): New classes.
21574         (FlowBranching.UsageVector.Type): New public readonly field.
21575         (FlowBranching.UsageVector.Breaks): Removed the setter.
21576         (FlowBranching.UsageVector.Returns): Removed the setter.
21577         (FlowBranching.UsageVector): Added Break(), Return(),
21578         NeverReachable() and Throw() methods to modify the reachability.
21579         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21580         done by FlowBranching.Merge().
21581         (FlowBranching.UsageVector.MergeChild): New method; merges the
21582         merge result into the current vector.
21583         (FlowBranching.Merge): New abstract method to merge a branching.
21584
21585 2003-08-12  Martin Baulig  <martin@ximian.com>
21586
21587         * expression.cs (Indirection.CacheTemporaries): Create the
21588         LocalTemporary with the pointer type, not its element type.
21589
21590 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21591
21592         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21593         token was a keyword or not.
21594
21595         Add `error' options where an IDENTIFIER was expected;  Provide
21596         CheckToken and CheckIdentifierToken convenience error reporting
21597         functions. 
21598
21599         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21600
21601         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21602         NameSpaceEntry NameSpaceEntry.
21603
21604         (LookupInterfaceOrClass): Avoid creating a full qualified name
21605         from namespace and name: avoid doing lookups when we know the
21606         namespace is non-existant.   Use new Tree.LookupByNamespace which
21607         looks up DeclSpaces based on their namespace, name pair.
21608
21609         * driver.cs: Provide a new `parser verbose' to display the
21610         exception thrown during parsing.  This is turned off by default
21611         now, so the output of a failure from mcs is more graceful.
21612
21613         * namespace.cs: Track all the namespaces defined in a hashtable
21614         for quick lookup.
21615
21616         (IsNamespace): New method
21617
21618 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21619
21620         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21621         we know that we need to concatenate (full typename can never be
21622         null). 
21623
21624         * class.cs: ditto.
21625
21626         * statement.cs: Use a bitfield;  Do not initialize to null things
21627         which are done by the constructor by default.
21628
21629         * cs-parser.jay: bug fix, parameter was 4, not 3.
21630
21631         * expression.cs: Just use the property;
21632
21633         * statement.cs: No need for GetVariableInfo method.
21634
21635 2003-08-08  Martin Baulig  <martin@ximian.com>
21636
21637         * flowanalysis.cs (FlowReturns): This is now nested in the
21638         `FlowBranching' class.
21639         (MyBitVector): Moved this here from statement.cs.
21640         (FlowBranching.SiblingType): New enum type.
21641         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21642
21643 2003-08-07  Martin Baulig  <martin@ximian.com>
21644
21645         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21646         `FlowBranching' class and called `BranchingType'.
21647
21648 2003-08-07  Martin Baulig  <martin@ximian.com>
21649
21650         * flowanalysis.cs: Moved all the control flow analysis code into
21651         its own file.
21652
21653 2003-08-07  Martin Baulig  <martin@ximian.com>
21654
21655         * assign.cs (Assign.DoResolve): `target' must either be an
21656         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21657         #37319.
21658
21659 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21660
21661         * expression.cs (BinaryMethod): This kind of expression is created by the
21662         Binary class if it determines that the operator has to be handled
21663         by a method.
21664
21665         (BinaryDelegate): This kind of expression is created if we are
21666         dealing with a + or - operator on delegates.
21667
21668         (Binary): remove method, argumetns, and DelegateOperator: when
21669         dealing with methods, 
21670
21671         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21672
21673         * statement.cs (Block): use bitfields for the three extra booleans
21674         we had in use.   Remove unused topblock parameter.
21675
21676         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21677
21678         * assign.cs: Drop extra unneeded tests.
21679
21680 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21681
21682         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21683
21684         * statement.cs (Foreach): Use VariableStorage instead of
21685         LocalBuilders.   
21686
21687         * codegen.cs (VariableStorage): New class used by clients that
21688         require a variable stored: locals or fields for variables that
21689         need to live across yield.
21690
21691         Maybe provide a convenience api for EmitThis+EmitLoad?
21692
21693         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21694         these bad boys.
21695
21696 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21697
21698         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21699         RemapParameterLValue): New methods that are used to turn a
21700         precomputed FieldInfo into an expression like this:
21701
21702                 instance.FieldInfo
21703
21704         The idea is to use this instead of making LocalVariableReference
21705         have more than one meaning.
21706
21707         * cs-parser.jay: Add error production to BASE.
21708
21709         * ecore.cs: Deal with TypeManager.GetField returning null, which
21710         is now a valid return value.
21711
21712         (FieldExprNoAddress): New expression for Fields whose address can
21713         not be taken.
21714
21715         * expression.cs (LocalVariableReference): During the resolve
21716         phases, create new expressions if we are in a remapping context.
21717         Remove code that dealt with remapping here.
21718
21719         (ParameterReference): same.
21720
21721         (ProxyInstance): New expression, like the `This' expression, but
21722         it is born fully resolved.  We know what we are doing, so remove
21723         the errors that are targeted to user-provided uses of `this'.
21724
21725         * statement.cs (Foreach): our variable is now stored as an
21726         Expression;  During resolution, follow the protocol, dont just
21727         assume it will return this.
21728
21729 2003-08-06  Martin Baulig  <martin@ximian.com>
21730
21731         * support.cs (SeekableStreamReader.cs): New public class.
21732
21733         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21734         SeekableStreamReader instead of the normal StreamReader.
21735
21736 2003-08-04  Martin Baulig  <martin@ximian.com>
21737
21738         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21739         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21740         deambiguate casts and delegate invocations.
21741         (parenthesized_expression): Use the new tokens to ensure this is
21742         not a cast of method invocation.
21743
21744         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21745         when reading a `)' and Deambiguate_CloseParens () was previously
21746         called.
21747
21748         * expression.cs (ParenthesizedExpression): New class.  This is
21749         just used for the CS0075 test.
21750         (Binary.DoResolve): Check for CS0075.   
21751
21752 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21753
21754         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21755         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21756         reference comparison.
21757
21758         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21759         examine the ReturnType for equality - this is necessary in the
21760         cases of implicit and explicit operators whose signature also
21761         includes the return type.
21762
21763 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21764
21765         * namespace.cs: Cache the result of the namespace computation,
21766         instead of computing it every time.
21767
21768 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21769
21770         * decl.cs: Use a global arraylist that we reuse over invocations
21771         to avoid excesive memory consumption.  Reduces memory usage on an
21772         mcs compile by one meg (45 average).
21773
21774         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21775         private, work around that.
21776
21777 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21778
21779         * literal.cs (IntLiteral): Define Zero and One static literals. 
21780
21781         * cs-parser.jay (integer_literal): use static literals to reduce
21782         memory usage for the most used literals (0, 1 and -1).  211kb
21783         reduced in memory usage.
21784
21785         Replace all calls to `new ArrayList' with `new
21786         ArrayList(4)' which is a good average number for most allocations,
21787         and also requires only 16 bytes of memory for its buffer by
21788         default. 
21789
21790         This reduced MCS memory usage in seven megabytes for the RSS after
21791         bootstrapping.
21792
21793 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21794
21795         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21796         handle params methods the correct way by forming only one
21797         applicable set with params and normal methods in them. Earlier we
21798         were looking at params methods only if we found no normal methods
21799         which was not the correct thing to do.
21800
21801         (Invocation.BetterFunction): Take separate arguments indicating
21802         when candidate and the best method are params methods in their
21803         expanded form.
21804
21805         This fixes bugs #43367 and #46199.
21806
21807         * attribute.cs: Documentation updates.
21808
21809         (CheckAttribute): Rename to CheckAttributeTarget.
21810         (GetValidPlaces): Rename to GetValidTargets.
21811
21812         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21813         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21814
21815         Fixes bug #44468.
21816
21817 2003-07-28  Martin Baulig  <martin@ximian.com>
21818
21819         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21820         name when looking up the base class of a nested class.  Fixes #46977.
21821
21822 2003-07-26  Martin Baulig  <martin@ximian.com>
21823
21824         * expression.cs (Indexers.Indexer): New nested struct; contains
21825         getter, setter and the indexer's type.
21826         (Indexers.Properties): This is now an ArrayList of
21827         Indexers.Indexer's.
21828         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21829         indexer doesn't have any getters.
21830
21831         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21832         for embedded property and indexer assignments.
21833
21834 2003-07-26  Martin Baulig  <martin@ximian.com>
21835
21836         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21837         preprocessor directive is not the first non-whitespace character
21838         on a line.
21839
21840 2003-07-26  Martin Baulig  <martin@ximian.com>
21841
21842         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21843         namespace parsing, follow the spec more closely.
21844
21845         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21846         NamespaceEntry.Lookup().
21847
21848 2003-07-25  Martin Baulig  <martin@ximian.com>
21849
21850         * MethodCore.cs (OverridesSomething): New public field; it's set
21851         from TypeContainer.DefineMembers if this method overrides
21852         something (which doesn't need to be a method).  Fix #39462.
21853
21854 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21855
21856         * typemanager.cs (GetMembers): Ensure that the list of members is
21857         reversed. This keeps things in sync.
21858
21859         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21860         find an AttributeUsage attribute.
21861
21862         * expression.cs (Invocation.OverloadResolve): Perform the check
21863         which disallows Invoke to be directly called on a Delegate.
21864
21865         (Error_InvokeOnDelegate): Report error cs1533.
21866
21867 2003-07-25  Martin Baulig  <martin@ximian.com>
21868
21869         * expression.cs (Indexers.GetIndexersForType): Only look in the
21870         interface hierarchy if the requested type is already an
21871         interface.  Fixes #46788 while keeping #46502 fixed.
21872
21873 2003-07-25  Martin Baulig  <martin@ximian.com>
21874
21875         * class.cs (TypeContainer.DefineMembers): Check whether all
21876         readonly fields have been assigned and report warning CS0649 if
21877         not.
21878
21879         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21880         a valuetype.
21881
21882 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21883
21884         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21885         returned from GetMethods to make things consistent with the
21886         assumptions MCS makes about ordering of methods.
21887
21888         This should comprehensively fix bug #45127 and it does :-)
21889
21890         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21891         ordering is actually reverse.
21892
21893         * Clean up some debug messages I left lying around.
21894
21895         * interface.cs (Populate*): Get rid of code which emits attributes
21896         since the stage in which we emit attributes is the 'Emit' stage,
21897         not the define stage.
21898
21899         (Emit): Move attribute emission for interface members here.
21900
21901 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21902
21903         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21904         closely: we eliminate methods in base types when we have an
21905         applicable method in a top-level type.
21906
21907         Please see section 14.5.5.1 for an exact description of what goes
21908         on. 
21909
21910         This fixes bug #45127 and a host of other related to corlib compilation.
21911
21912         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21913         array is the method corresponding to the top-level type (this is
21914         because of the changes made to icall.c) so we change this
21915         accordingly.
21916
21917         (MethodGroupExpr.Name): This too.
21918
21919         * typemanager.cs (GetElementType): New method which does the right
21920         thing when compiling corlib. 
21921
21922         * everywhere: Make use of the above in the relevant places.
21923
21924 2003-07-22  Martin Baulig  <martin@ximian.com>
21925
21926         * cs-parser.jay (invocation_expression): Moved
21927         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21928         `cast_expression', but create a InvocationOrCast which later
21929         resolves to either an Invocation or a Cast.
21930
21931         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21932         method; call this before EmitStatement() to make sure that this
21933         expression can be used as a statement.
21934
21935         * expression.cs (InvocationOrCast): New class; resolves to either
21936         an Invocation or a Cast.
21937
21938         * statement.cs (StatementExpression): Call ResolveStatement() on
21939         the ExpressionStatement before emitting it.
21940
21941 2003-07-21  Martin Baulig  <martin@ximian.com>
21942
21943         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21944         `ref' and `out' attributes match; fixes #46220.
21945         (MemberAccess.ResolveMemberAccess): You can't reference a type
21946         through an expression; fixes #33180.
21947         (Indexers.GetIndexersForType): Don't return the indexers from
21948         interfaces the class implements; fixes #46502.
21949
21950 2003-07-21  Martin Baulig  <martin@ximian.com>
21951
21952         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21953         CS0661 checks; fixes bug #30442.
21954
21955 2003-07-21  Martin Baulig  <martin@ximian.com>
21956
21957         * decl.cs (AdditionResult): Added `Error'.
21958
21959         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21960
21961         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21962         makes cs0031.cs actually work.
21963
21964 2003-07-20  Martin Baulig  <martin@ximian.com>
21965
21966         * namespace.cs: Fixed that bug which caused a crash when compiling
21967         the debugger's GUI.
21968
21969 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21970
21971         * typemanager.cs (LookupTypeReflection): Never expose types which
21972         are NotPublic, NestedPrivate, NestedAssembly, or
21973         NestedFamANDAssem.  We used to return these, and later do a check
21974         that would report a meaningful error, but the problem is that we
21975         would not get the real match, if there was a name override.
21976
21977 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21978
21979         * namespace.cs (Namespace, Name): Do not compute the namespace
21980         name dynamically, compute it in the constructor.  This reduced
21981         memory usage by 1697 KB.
21982
21983         * driver.cs: Use --pause to pause at the end.
21984
21985 2003-07-17  Peter Williams  <peter@newton.cx>
21986
21987         * Makefile: Change the name of the test target so that it doesn't
21988         conflict with the recursive test target.
21989
21990 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21991
21992         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21993         AddressOf): Do not use EmitThis, that was wrong, use the actual
21994         this pointer.
21995
21996 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21997
21998         * class.cs (MethodData.Define): While checking if a method is an
21999         interface implementation, improve the test: If we are not public
22000         (use new test here: use the computed MethodAttributes directly,
22001         instead of the parsed modifier flags) check if the `implementing'
22002         method comes from an interface or not.
22003
22004         * pending.cs (VerifyPendingMethods): Slightly better error
22005         message.
22006
22007         * makefile: add test target that does the mcs bootstrap.
22008
22009 2003-07-16  Ravi Pratap  <ravi@ximian.com>
22010
22011         * interface.cs (Define): Do nothing here since there are no
22012         members to populate etc. Move the attribute emission out of here
22013         since this was just totally the wrong place to put it. Attribute
22014         application happens during the 'Emit' phase, not in the 'Define'
22015         phase.
22016
22017         (Emit): Add this method and move the attribute emission here
22018
22019         * rootcontext.cs (EmitCode): Call the Emit method on interface
22020         types too.
22021
22022 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
22023
22024         * expression.cs (OverloadResolve): Report error only if Location
22025         is not 'Null' which means that there was a probe going on.
22026
22027 2003-07-14  Martin Baulig  <martin@ximian.com>
22028
22029         * expression.cs (ConditionalLogicalOperator): New public class to
22030         implement user defined conditional logical operators.
22031         This is section 14.11.2 in the spec and bug #40505.
22032
22033 2003-07-14  Martin Baulig  <martin@ximian.com>
22034
22035         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
22036
22037 2003-07-14  Martin Baulig  <martin@ximian.com>
22038
22039         * codegen.cs (EmitContext.InFixedInitializer): New public field.
22040
22041         * ecore.cs (IVariable.VerifyFixed): New interface method.
22042
22043         * expression.cs (Unary.ResolveOperator): When resolving the `&'
22044         operator, check whether the variable is actually fixed.  Fixes bug
22045         #36055.  Set a variable definitely assigned when taking its
22046         address as required by the spec.
22047
22048         * statement.cs (LocalInfo.IsFixed): New field.
22049         (LocalInfo.MakePinned): Set `IsFixed' to true.
22050
22051 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
22052
22053         * attribute.cs (Attribute.Resolve): While doing a Member lookup
22054         for .ctors, ensure that we only ask for members declared in the
22055         attribute type (BindingFlags.DeclaredOnly).
22056
22057         Fixes bug #43632.
22058
22059         * expression.cs (Error_WrongNumArguments): Report error 1501
22060         correctly the way CSC does.
22061
22062 2003-07-13  Martin Baulig  <martin@ximian.com>
22063
22064         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
22065         lookup on the fully qualified name, to make things like "X.X" work
22066         where "X.X" is a fully qualified type name, but we also have a
22067         namespace "X" in the using list.  Fixes #41975.
22068
22069 2003-07-13  Martin Baulig  <martin@ximian.com>
22070
22071         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
22072         function. If we're a CompoundAssign, we need to create an embedded
22073         CompoundAssign, not an embedded Assign.
22074         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
22075         Fixes #45854.
22076
22077 2003-07-13  Martin Baulig  <martin@ximian.com>
22078
22079         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
22080         work to fix bug #46088.
22081
22082 2003-07-13  Ravi Pratap <ravi@ximian.com>
22083
22084         * class.cs (Operator.Emit): Do not emit attributes here - it is
22085         taken care of by the Method class that we delegate too. This takes
22086         care of bug #45876.
22087
22088 2003-07-10  Martin Baulig  <martin@ximian.com>
22089
22090         * expression.cs (TypeOfVoid): New class.
22091         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
22092
22093 2003-07-10  Martin Baulig  <martin@ximian.com>
22094
22095         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
22096         bug #35957.
22097
22098 2003-07-10  Martin Baulig  <martin@ximian.com>
22099
22100         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
22101         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
22102
22103         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
22104
22105         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
22106
22107 2003-07-10  Martin Baulig  <martin@ximian.com>
22108
22109         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
22110         of decimal.  Fixes #42850.
22111
22112         NOTE: I also fixed the created byte blob, but this doesn't work on
22113         the MS runtime and csc never produces any byte blobs for decimal
22114         arrays.
22115
22116 2003-07-10  Martin Baulig  <martin@ximian.com>
22117
22118         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
22119         structs; fixes #32068.
22120         (Block.AddChildVariableNames): Fixed #44302.
22121
22122 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22123
22124         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
22125
22126 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
22127
22128         * attribute.cs: And this test is onger needed.
22129
22130 2003-07-08  Martin Baulig  <martin@ximian.com>
22131
22132         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
22133         inaccessible types.  Fixes #36313.
22134
22135         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
22136
22137         * namespace.cs (NamespaceEntry): Create implicit entries for all
22138         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
22139         implicit entries for N1.N2 and N1.
22140
22141 2003-07-08  Martin Baulig  <martin@ximian.com>
22142
22143         Rewrote the handling of namespaces to fix a lot of the issues
22144         wrt. `using' aliases etc.
22145
22146         * namespace.cs (Namespace): Splitted this class into a
22147         per-assembly `Namespace' and a per-file `NamespaceEntry'.
22148
22149         * typemanager.cs (TypeManager.IsNamespace): Removed.
22150         (TypeManager.ComputeNamespaces): Only compute namespaces from
22151         loaded assemblies here, not the namespaces from the assembly we're
22152         currently compiling.
22153
22154 2003-07-08  Martin Baulig  <martin@ximian.com>
22155
22156         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
22157
22158 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
22159
22160         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
22161         already fixed it.  
22162
22163         I thought about the memory savings here, but LookupTypeReflection
22164         is used under already very constrained scenarios.  Compiling
22165         corlib or mcs only exposes one hit, so it would not really reduce
22166         any memory consumption.
22167
22168 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22169
22170         * typemanager.cs: fixes bug #45889 by only adding public types from
22171         other assemblies to the list of known types.
22172
22173 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
22174
22175         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
22176         on the type we resolved.
22177
22178 2003-07-05  Martin Baulig  <martin@ximian.com>
22179
22180         * pending.cs (PendingImplementation.ParentImplements): Don't
22181         create the proxy if the parent is abstract.
22182
22183         * class.cs (TypeContainer.DefineIndexers): Process explicit
22184         interface implementations first.  Fixes #37714.
22185
22186 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
22187
22188         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
22189         defined recursively;  but since we modify the input parameters
22190         (left is set to `this' temporarily), we reset this value if the
22191         left_is_explicit is false, which gives the original semantics to
22192         the code.  
22193
22194         * literal.cs (NullPointer): new class used to represent a null
22195         literal in a pointer context.
22196
22197         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
22198         type is a pointer, use a NullPointer object instead of a
22199         NullLiteral.   Closes 43687
22200
22201         (ExplicitConversion): Convert pointer values using
22202         the conv opcode to the proper type.
22203
22204         * ecore.cs (New): change ValueTypeVariable property into a method,
22205         that returns whether the valuetype is suitable for being used.
22206
22207         * expression.cs (Binary.DoNumericPromotions): Only return if we
22208         the int constant was a valid uint, and we can return both left and
22209         right as uints.  If not, we continue processing, to trigger the
22210         type conversion.  This fixes 39018.
22211
22212         * statement.cs (Block.EmitMeta): During constant resolution, set
22213         the CurrentBlock property on the emitcontext, so that we resolve
22214         constants propertly.
22215
22216 2003-07-02  Martin Baulig  <martin@ximian.com>
22217
22218         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
22219         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
22220
22221         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
22222         than emitting it here.
22223
22224         * statement.cs: Fixed some more flow analysis bugs.
22225
22226 2003-07-02  Martin Baulig  <martin@ximian.com>
22227
22228         * class.cs (MethodData.Define): When implementing interface
22229         methods, set Final unless we're Virtual.
22230
22231         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
22232         check work for interface methods.
22233
22234 2003-07-01  Martin Baulig  <martin@ximian.com>
22235
22236         * ecore.cs (EmitContext.This): Replaced this property with a
22237         GetThis() method which takes a Location argument.  This ensures
22238         that we get the correct error location for a CS0188.
22239
22240 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
22241
22242         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
22243         ImplicitStandardConversion.
22244
22245         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
22246
22247 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
22248
22249         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
22250         optimization.
22251
22252 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
22253
22254         * class.cs (Constructor.Define): Turn off initlocals for unsafe
22255         constructors.
22256
22257         (MethodData.Define): Turn off initlocals for unsafe methods.
22258
22259 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
22260
22261         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
22262         complete;  Fixes #37521.
22263
22264         * delegate.cs: Use Modifiers.TypeAttr to compute the
22265         TypeAttributes, instead of rolling our own.  This makes the flags
22266         correct for the delegates.
22267
22268 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
22269
22270         * class.cs (Constructor.Define): Set the private flag for static
22271         constructors as well.
22272
22273         * cs-parser.jay (statement_expression): Set the return value to
22274         null, to avoid a crash when we catch an error.
22275
22276 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
22277
22278         * cs-parser.jay: Applied patch from Jackson that adds support for
22279         extern and unsafe modifiers to destructor declarations.
22280
22281         * expression.cs: Report error 21 if the user is trying to index a
22282         System.Array.
22283
22284         * driver.cs: Add an error message, suggested by the bug report.
22285
22286         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
22287         if we do not have a ": this ()" constructor initializer.  Fixes 45149
22288
22289 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
22290
22291         * namespace.cs: Add some information to reduce FAQs.
22292
22293 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
22294
22295         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
22296         underlying enumeration types.  Fixes #43915.
22297
22298         * expression.cs: Treat ushort/short as legal values to be used in
22299         bitwise operations.
22300
22301 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22302
22303         * delegate.cs: transfer custom attributes for paramenters from
22304         the delegate declaration to Invoke and BeginInvoke.
22305
22306 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22307
22308         * attribute.cs: handle custom marshalers and emit marshal info
22309         for fields, too.
22310
22311 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
22312
22313         * makefile.gnu: Added anonymous.cs to the compiler sources.
22314
22315 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
22316
22317         * iterators.cs: Change the name of the proxy class to include two
22318         underscores.
22319
22320         * cs-parser.jay: Update grammar to include anonymous methods.
22321
22322         * anonymous.cs: new file.
22323
22324 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
22325
22326         * class.cs (Field.Define): Add missing test for pointers and
22327         safety. 
22328
22329 2003-05-27  Ravi Pratap  <ravi@ximian.com>
22330
22331         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
22332         we use the stobj opcode.
22333
22334         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
22335         since it wasn't the correct fix. 
22336
22337         It still is puzzling that we are required to use stobj for IntPtr
22338         which seems to be a ValueType.
22339
22340 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
22341
22342         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
22343         during regular simple name resolution.   Now, the trick is that
22344         instead of returning for processing the simplename, we do a
22345         TypeManager.LookupType (ie, a rooted lookup as opposed to a
22346         contextual lookup type).   If a match is found, return that, if
22347         not, return for further composition.
22348
22349         This fixes long-standing 30485.
22350
22351         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
22352         using the address to initialize an object, do an Stobj instead of
22353         using the regular Stelem.
22354
22355         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
22356         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
22357         Because if we are a BaseIndexerAccess that value will be true.
22358         Fixes 43643.
22359
22360         * statement.cs (GotoCase.Resolve): Return after reporting an
22361         error, do not attempt to continue. 
22362
22363         * expression.cs (PointerArithmetic.Emit): If our operand is a
22364         long, convert our constants to match the operand before
22365         multiplying.  Convert to I type before adding.   Fixes 43670.
22366
22367 2003-05-14  Ravi Pratap  <ravi@ximian.com>
22368
22369         * enum.cs (ImplicitConversionExists) : Rename to
22370         ImplicitEnumConversionExists to remove ambiguity. 
22371
22372         * ecore.cs (NullCast): New type of cast expression class which
22373         basically is very similar to EmptyCast with the difference being
22374         it still is a constant since it is used only to cast a null to
22375         something else
22376         (eg. (string) null)
22377
22378         * convert.cs (ImplicitReferenceConversion): When casting a null
22379         literal, we return a NullCast.
22380
22381         * literal.cs (NullLiteralTyped): Remove - I don't see why this
22382         should be around anymore.
22383
22384         The renaming (reported was slightly wrong). Corrections:
22385
22386         ConvertImplicitStandard -> ImplicitConversionStandard
22387         ConvertExplicitStandard -> ExplicitConversionStandard
22388
22389         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
22390         before passing them in !
22391
22392         * convert.cs (ImplicitConversionStandard): When comparing for
22393         equal expr and target types, ensure that expr is not a
22394         NullLiteral.
22395
22396         In general, we must not be checking (expr_type ==
22397         target_type) in the top level conversion methods
22398         (ImplicitConversion, ExplicitConversion etc). This checking is
22399         done in the methods that they delegate to.
22400
22401 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
22402
22403         * convert.cs: Move Error_CannotConvertType,
22404         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
22405         ImplicitNumericConversion, ImplicitConversionExists,
22406         ImplicitUserConversionExists, StandardConversionExists,
22407         FindMostEncompassedType, FindMostSpecificSource,
22408         FindMostSpecificTarget, ImplicitUserConversion,
22409         ExplicitUserConversion, GetConversionOperators,
22410         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
22411         TryImplicitIntConversion, Error_CannotConvertImplicit,
22412         ConvertImplicitRequired, ConvertNumericExplicit,
22413         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
22414         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
22415         its own file.
22416
22417         Perform the following renames:
22418
22419         StandardConversionExists -> ImplicitStandardConversionExists
22420         ConvertImplicit -> ImplicitConversion
22421         ConvertImplicitStandard -> ImplicitStandardConversion
22422         TryImplicitIntConversion -> ImplicitIntConversion
22423         ConvertImplicitRequired -> ImplicitConversionRequired
22424         ConvertNumericExplicit -> ExplicitNumericConversion
22425         ConvertReferenceExplicit -> ExplicitReferenceConversion
22426         ConvertExplicit -> ExplicitConversion
22427         ConvertExplicitStandard -> ExplicitStandardConversion
22428
22429 2003-05-19  Martin Baulig  <martin@ximian.com>
22430
22431         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22432         (TypeInfo): Added support for structs having structs as fields.
22433
22434         * ecore.cs (FieldExpr): Implement IVariable.
22435         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22436         VariableInfo for the field.
22437
22438 2003-05-18  Martin Baulig  <martin@ximian.com>
22439
22440         * expression.cs (This.DoResolve): Report a CS0027 if we're
22441         emitting a field initializer.
22442
22443 2003-05-18  Martin Baulig  <martin@ximian.com>
22444
22445         * expression.cs (This.ResolveBase): New public function.
22446         (This.DoResolve): Check for CS0188.
22447
22448         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22449         This.Resolve().
22450
22451         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22452         `instance_expression' to null if we don't have any non-static
22453         methods.
22454
22455 2003-05-18  Martin Baulig  <martin@ximian.com>
22456
22457         Reworked the way how local variables and parameters are handled by
22458         the flow analysis code.
22459
22460         * statement.cs (TypeInfo, VariableMap): New public classes.
22461         (VariableInfo): New public class.  This is now responsible for
22462         checking whether a variable has been assigned.  It is used for
22463         parameters and local variables.
22464         (Block.EmitMeta): Take the InternalParameters as argument; compute
22465         the layout of the flow vectors here.
22466         (Block.LocalMap, Block.ParameterMap): New public properties.
22467         (FlowBranching): The .ctor doesn't get the InternalParameters
22468         anymore since Block.EmitMeta() now computes the layout of the flow
22469         vector.
22470         (MyStructInfo): This class is now known as `StructInfo' and nested
22471         in `TypeInfo'; we don't access this directly anymore.
22472
22473         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22474         property and removed IsAssigned(), IsFieldAssigned(),
22475         SetAssigned() and SetFieldAssigned(); we now call them on the
22476         VariableInfo so we don't need to duplicate this code everywhere.
22477
22478         * expression.cs (ParameterReference): Added `Block block' argument
22479         to the .ctor.
22480         (LocalVariableReference, ParameterReference, This): The new
22481         VariableInfo class is now responsible for all the definite
22482         assignment stuff.
22483
22484         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22485         IsParameterAssigned, SetParameterAssigned): Removed.
22486
22487 2003-05-18  Martin Baulig  <martin@ximian.com>
22488
22489         * typemanager.cs (InitCoreTypes): Try calling
22490         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22491         the 3-args-version.  Corlib now also needs our `void_type'.
22492         (GetMethod): Added overloaded version which takes an optional
22493         `bool report_errors' to allow lookups of optional methods.
22494
22495 2003-05-12  Martin Baulig  <martin@ximian.com>
22496
22497         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22498         only used for locals and not for parameters.
22499
22500 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22501
22502         * support.cs (InternalParameters.ParameterType): Return the
22503         ExternalType of the parameter.
22504
22505         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22506         they were unused.
22507
22508 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22509
22510         * class.cs (MethodData.Define): Do not set the `newslot' on
22511         interface members, if they are also flagged as "override".
22512
22513         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22514         better code for ++i and i++.  This only works for static fields
22515         and local variables.
22516
22517         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22518         want to pull the DeclSpace out of the builder_to_declspace instead
22519         of the TypeBuilder (like in TypeContainer.FindMembers).
22520
22521         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22522         instead of LookupTypeContainer.  Fixes the crash on .NET for
22523         looking up interface members.
22524
22525         * const.cs: Create our own emit context during the Definition
22526         stage, so that constants are evaluated in the proper context, when
22527         a recursive definition happens.
22528
22529 2003-05-11  Martin Baulig  <martin@ximian.com>
22530
22531         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22532         new block for a switch section.
22533         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22534         the adding/lookup in the switch block.  Fixes #39828.
22535
22536 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22537
22538         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22539         functionality: I needed to convert the data after I had performed
22540         the add/sub operation into the operands type size.
22541
22542         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22543         pass the type for the box operation, otherwise the resulting
22544         object would have been of type object.
22545
22546         (BoxedCast): Add constructor to specify the type to box as.
22547
22548 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22549
22550         * iterators.cs: I was reusing the `count' variable inadvertently,
22551         take steps to not allow this to happen.
22552
22553 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22554
22555         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22556         by creating an array at the point where the params starts and
22557         putting all those arguments there, then adjusting the size of the
22558         array.
22559
22560 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22561
22562         * expression.cs (New.AddressOf): Implement interface
22563         IMemoryLocation.  This is used when the `new' operator is used in
22564         the context of an invocation to a method on a value type.
22565
22566         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22567         example. 
22568
22569         * namespace.cs: Also check the using aliases here.
22570
22571         * driver.cs: Move the test for using validity after the types have
22572         been entered, so we do a single pass that also includes the using
22573         aliases. 
22574
22575         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22576         in the regular case.   CreateSiblingForFinally is doing extra
22577         error checking.
22578
22579         * attribute.cs (GetAttributeArgumentExpression): Store the result
22580         on an out value, and use the return value to indicate failure
22581         instead of using null (which is a valid return for Constant.GetValue).
22582
22583         * statement.cs: Perform the analysis flow for the increment
22584         portion after the statement, because this will be the real flow of
22585         execution.  Fixes #42385
22586
22587         * codegen.cs (EmitContext.EmitArgument,
22588         EmitContext.EmitStoreArgument): New helper functions when the
22589         RemapToProxy flag is set.
22590
22591         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22592         function.
22593
22594         Add support for remapping parameters. 
22595
22596         * iterators.cs: Propagate parameter values;  Store parameter
22597         values in the proxy classes.
22598
22599 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22600
22601         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22602         need a proxy reference;  I do not know what I was thinking
22603
22604         * cs-parser.jay (constructor_initializer): catch another error,
22605         and display nice message.
22606
22607         (field_declaration): catch void field declaration
22608         to flag a better error. 
22609
22610         * class.cs (MemberBase.CheckBase): Report an error instead of a
22611         warning if a new protected member is declared in a struct. 
22612         (Field.Define): catch the error of readonly/volatile.
22613
22614         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22615
22616         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22617         volatile variable is taken
22618
22619 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22620
22621         * statement.cs (Fixed.Resolve): Report an error if we are not in
22622         an unsafe context.
22623
22624 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22625
22626         * typemanager.cs: reuse the code that handles type clashes for
22627         delegates and enumerations.
22628
22629         * class.cs (Report28): Always report.
22630
22631         * expression.cs (EncodeAsAttribute): Allow nulls here.
22632
22633 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22634
22635         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22636         the functionality for testing whether an expression is valid for
22637         an attribute here.  Also handle the case of arrays of elements
22638         being stored. 
22639
22640         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22641         encoding a linear array into an array of objects that are suitable
22642         to be passed to an CustomAttributeBuilder.
22643
22644         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22645
22646         * ecore.cs: (FieldExpr): Handle field remapping here.
22647
22648         * iteratators.cs: Pass the instance variable (if the method is an
22649         instance method) to the constructors, so we can access the field
22650         variables on the class.
22651
22652         TODO: Test this with structs.  I think the THIS variable on
22653         structs might have to be a pointer, and not a refenrece
22654
22655 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22656
22657         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22658         local variables to fields in a proxy class.
22659
22660         * iterators.cs (PopulateProxy): Rename our internal fields to
22661         <XXX>.  
22662         Create a <THIS> field if we are an instance method, so we can
22663         reference our parent container variables.
22664         (MapVariable): Called back from the EmitContext code to enter a
22665         new variable to field mapping into the proxy class (we just create
22666         a FieldBuilder).
22667
22668         * expression.cs
22669         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22670         for using the remapped locals to fields.
22671
22672         I placed the code here, because that gives the same semantics to
22673         local variables, and only changes the Emit code.
22674
22675         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22676         statements inside iterators.
22677         (VariableInfo): Add a FieldBuilder for the cases when we are
22678         remapping local variables to fields in a proxy class
22679
22680         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22681         current_block != null.
22682
22683         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22684         not cope with strings, as it has been moved to the
22685         TableSwitchEmit.  Fixed bug in switch generation.
22686
22687         * expression.cs (New.DoResolve): Provide more context for the user
22688         when reporting an error.
22689
22690         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22691         pointers. 
22692
22693         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22694         check the permissions for it.  Note than in a type-resolution
22695         context the check was already present in DeclSpace.ResolveType,
22696         but was missing from the MemberAccess.
22697
22698         (ArrayCreation.CheckIndices): warn if the user has
22699         more nested levels of expressions, but there are no more
22700         dimensions specified.  Avoids crash on bug 41906.
22701
22702 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22703
22704         * statement.cs (Block): replace Implicit bool, for a generic
22705         flags.   
22706         New flag: `Unchecked'.  This is used during the EmitMeta phase
22707         (which is out-of-line with the regular Resolve/Emit process for a
22708         statement, as this is done ahead of time, but still gets a chance
22709         to call constant resolve).
22710
22711         (Block.Flags): new enum for adding a new flag.
22712
22713         (Block.EmitMeta): track the state of unchecked.
22714
22715         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22716         to enable constant resolution to work there as well.
22717
22718 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22719
22720         * typemanager.cs (ienumerable_type): Also look up
22721         System.Collections.IEnumerable. 
22722
22723 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22724
22725         TODO: Test more than one conditional per method.
22726
22727         * class.cs (Indexer.Define): Report the location where the user is
22728         referencing the unsupported feature.
22729
22730         (MethodData): Overload the use of `conditionals' to
22731         minimize the creation of needless ArrayLists.   This saves roughly
22732         212kb on my machine.
22733
22734         (Method): Implement the new IIteratorContainer interface.
22735         (Method.SetYields): Implement the method by setting the ModFlags
22736         to contain METHOD_YIELDS.
22737
22738         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22739         which just got set to null.
22740
22741         * iterators.cs: New file.
22742
22743         (Yield, YieldBreak): New statements.
22744
22745         * statement.cs (Return.Resolve): Flag an error if we are used in
22746         an iterator method.
22747
22748         * codegen.cs (InIterator): New flag set if the code is being
22749         compiled in an iterator method.
22750
22751         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22752         internal modifier, and we just use it to avoid adding extra
22753         fields, as this is seldom used.  
22754
22755         * cs-parser.jay: Add yield_statement (yield and yield break).
22756
22757         * driver.cs: New flag -v2 to turn on version 2 features. 
22758
22759         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22760         hashtable when v2 is enabled.
22761
22762 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22763
22764         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22765         there is already a namespace defined with this name.
22766
22767         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22768         people upgraded their corlibs.
22769
22770         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22771         always use fully qualified types, no need to use the compiler
22772         front end.
22773
22774         (TypeManager.IsNamespace): Use binarysearch.
22775
22776         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22777         AddDelegate): I did not quite use the new IsValid API properly: I
22778         have to pass the short-name and the fullname.  I was passing only
22779         the basename instead of the fullname sometimes. 
22780
22781         (TypeContainer.DefineType): call NamespaceClash.
22782
22783         * interface.cs (Interface.DefineType): use NamespaceClash before
22784         defining the type.
22785
22786         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22787         defining the type.
22788
22789         * enum.cs: (Enum.DefineType): use NamespaceClash before
22790         defining the type.
22791
22792         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22793         speed increase.  First, use the negative_hits cache when we get a
22794         negative.  Second, add the type with its full original name
22795         instead of the new . and + encoded name (reflection uses + to
22796         separate type from a nested type).  Use LookupTypeReflection
22797         directly which bypasses the type->name hashtable (that we already
22798         know does not contain the type.
22799
22800         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22801         location/container type. 
22802
22803         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22804
22805 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22806
22807         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22808
22809         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22810         method is being referenced in the method group from a static
22811         context, and report error 120 if so.
22812
22813         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22814         Error118. 
22815
22816         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22817         is created, we create the A namespace).
22818
22819         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22820         Fixes #41591
22821
22822 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22823
22824         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22825         invocation to ModuleBuilder.GetType with the same values will
22826         return a new type instance, so we need to cache its return
22827         values. 
22828
22829         * expression.cs (Binary.ResolveOperator): Only allow the compare
22830         operators on enums if they are of the same type.
22831
22832         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22833         types of ValueType on their own case.  Before we were giving them
22834         the same treatment as objects.
22835
22836         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22837         fullname.  Short name is used to compare against container name.
22838         Fullname is used to check against defined namespace names.
22839
22840         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22841         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22842
22843         (Method.CheckBase): Call parent.
22844         (MemberBase.CheckBase): Check for protected members on sealed
22845         classes.
22846         (PropertyBase.CheckBase): Call parent.
22847         (Field.Define): Call parent.
22848
22849         * report.cs: Negative error codes are now mapped to 8000 - code,
22850         so that the display is render more nicely.
22851
22852         * typemanager.cs: Do not use try/catch, instead report a regular
22853         error. 
22854
22855         (GetPointerType, GetReferenceType): These methods provide
22856         mechanisms to obtain the T* and T& from a T.  We had the code
22857         previously scattered around the code base, and it also used
22858         TypeManager.LookupType that would go through plenty of caches.
22859         This one goes directly to the type source.
22860
22861         In some places we did the Type.GetType followed by
22862         ModuleBuilder.GetType, but not in others, so this unifies the
22863         processing as well.
22864
22865         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22866         statements now that we have namespace information.
22867
22868         * typemanager.cs (IsNamespace): New method, returns whether the
22869         string presented is a namespace or not.
22870
22871         (ComputeNamespaces): New public entry point, computes the list of
22872         available namespaces, using the GetNamespaces API call in Mono, or
22873         the slower version in MS.NET.   
22874
22875         Now before we start the semantic analysis phase, we have a
22876         complete list of namespaces including everything that the user has
22877         provided.
22878
22879         Deleted old code to cache namespaces in .nsc files.
22880
22881 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22882
22883         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22884         class/struct location definition Location for the implicit
22885         constructor location.
22886
22887         (Operator.Define): Use the location of the operator for the
22888         implicit Method definition.
22889
22890         (Constructor.Emit): use the constructor location for the implicit
22891         base initializer constructor.
22892
22893         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22894         and the Expression class now contains two new methods:
22895
22896         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22897         isolate type lookup from the rest of the resolution process.
22898
22899         Since we use Expressions to hold type definitions due to the way
22900         we parse the input we have historically overloaded Resolve to
22901         perform the Type lookups if a special flag is passed.  Now this is
22902         eliminated and two methods take their place. 
22903
22904         The differences in the two methods between xStep and xTerminal is
22905         that xStep is involved in our current lookup system that uses
22906         SimpleNames to compose a name, while xTerminal is used just to
22907         catch the case where the simplename lookup failed.
22908
22909 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22910
22911         * expression.cs (ResolveMemberAccess): Remove redundant code.
22912         TypeExpr expressions are always born fully resolved.
22913
22914         * interface.cs (PopulateMethod): Do not lookup the types twice.
22915         We were doing it once during SemanticAnalysis and once during
22916         PopulateMethod.
22917
22918         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22919         in local variable type definitions, were being returned as a
22920         SimpleName (we decomposed everything into a string), that is
22921         because primary_expression was being used instead of a type in the
22922         grammar (reduce/reduce conflicts).
22923
22924         The part that was wrong is that we converted the expression into a
22925         string (an oversimplification in one hand, compounded with primary
22926         expressions doing string concatenation).
22927
22928         So things like:
22929
22930         A.B.C [] x;
22931
22932         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22933         using clauses from working on this particular context.  And a type
22934         was being matched directly against "A.B.C[]".
22935
22936         We now use the correct approach, and allow for ComposedCast to be
22937         part of the unary expression.  So the "A.B.C []" become a composed
22938         cast of "A.B.C" (as a nested group of MemberAccess with a
22939         SimpleName at the end) plus the rank composition "[]". 
22940
22941         Also fixes 35567
22942
22943 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22944
22945         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22946         for the access level checking.
22947
22948         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22949         `TypeContainer container', because I kept getting confused when I
22950         was debugging this code.
22951
22952         * expression.cs (Indexers): Instead of tracking getters/setters,
22953         we now track them in parallel.  We create one arraylist less, but
22954         most importantly it is possible now for the LValue code to find a
22955         matching get for a set.
22956
22957         (IndexerAccess.DoResolveLValue): Update the code.
22958         GetIndexersForType has been modified already to extract all the
22959         indexers from a type.  The code assumed it did not.
22960
22961         Also make the code set the correct return type for the indexer.
22962         This was fixed a long time ago for properties, but was missing for
22963         indexers.  It used to be void_type.
22964
22965         (Binary.Emit): Test first for doubles instead of
22966         floats, as they are more common.
22967
22968         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22969         when dealing with floats and the <=, >= operators.  This fixes bug
22970         #39314 
22971
22972         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22973         to load the array value by emitting a load on the foreach variable
22974         type.  This was incorrect.  
22975
22976         We now emit the code to load an element using the the array
22977         variable type, and then we emit the conversion operator.
22978
22979         Fixed #40176
22980
22981 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22982
22983         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22984
22985 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22986
22987         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22988         test for protection before we test for signatures. 
22989
22990         (MethodSignature.ToString): implement.
22991
22992         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22993         to the case where we reduced into a LongConstant.
22994
22995         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22996         depend on whether the information is acurrate, because the
22997         Microsoft runtime will always claim that the array type is public,
22998         regardless of the real state.
22999
23000         If the type is a pointer, another problem happens: the type is
23001         reported as non-public in Microsoft.  
23002
23003         In both cases we have to call CheckAccessLevel recursively with
23004         the underlying type as the argument to be tested.
23005
23006 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
23007
23008         * assign.cs (Assign.Emit): If we are dealing with a compound
23009         assignment expression, we should use the code path that stores the
23010         intermediate result in a temporary value.  This fixes #40903.
23011
23012         *expression.cs (Indirection.ToString): Provide ToString method for
23013         debugging. 
23014
23015 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
23016
23017         * class.cs: Null out fields holding references to Block objects so
23018         they can be garbage collected.
23019
23020         * expression.cs (OverloadResolve): Remove unused local.
23021
23022 2003-04-07  Martin Baulig  <martin@ximian.com>
23023
23024         * codegen.cs (EmitContext.CurrentFile): New public field.
23025         (EmitContext.Mark): Use the CurrentFile to check whether the
23026         location is in the correct file.
23027         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
23028
23029 2003-04-07  Martin Baulig  <martin@ximian.com>
23030
23031         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
23032
23033         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
23034         location.  [FIXME: The location argument which gets passed to this
23035         method is sometimes wrong!]
23036
23037 2003-04-07  Nick Drochak <ndrochak@gol.com>
23038
23039         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
23040
23041 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
23042
23043         * expression.cs (Indirection.EmitAssign): We were using the
23044         temporary, but returning immediately instead of continuing the
23045         EmitAssing flow.
23046
23047 2003-04-06  Martin Baulig  <martin@ximian.com>
23048
23049         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
23050         if it's a nested child, but also deriving from the outer class.
23051         See test 190.cs.
23052
23053         * typemanager.cs (IsNestedChildOf): Make this work if it's a
23054         nested child, but also deriving from the outer class.  See
23055         test-190.cs.
23056         (FilterWithClosure): We may access private members of the outer
23057         class if we're a nested child and deriving from the outer class.
23058         (RealMemberLookup): Only set `closure_private_ok' if the
23059         `original_bf' contained BindingFlags.NonPublic.
23060
23061 2003-04-05  Martin Baulig  <martin@ximian.com>
23062
23063         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
23064
23065 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
23066
23067         * class.cs (Event.Define): Do not allow abstract events to have
23068         initializers. 
23069
23070 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
23071
23072         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
23073         block in event declarations.
23074
23075         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
23076         value type, get its address.
23077
23078         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
23079         leaving a class on the stack instead of a boolean value (int
23080         0/1).  Change the code so we compare against null, and then the
23081         result against zero.
23082
23083         * class.cs (TypeContainer.GetClassBases): We were checking for the
23084         parent class being sealed too late.
23085
23086         * expression.cs (Binary.Emit): For <= and >= when dealing with
23087         floating point values, use cgt.un and clt.un instead of cgt and
23088         clt alone.
23089
23090 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
23091
23092         * statement.cs: Apply the same optimization as MS: skip the 
23093         GetEnumerator returning an IEnumerator, and use the one returning a 
23094         CharEnumerator instead. This allows us to avoid the try-finally block 
23095         and the boxing.
23096
23097 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
23098
23099         * cs-parser.jay: Attributes cannot be applied to
23100                          namespaces. Fixes #40473
23101
23102 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23103
23104         * class.cs:
23105         (Add*): check if the name is valid using the full name for constants,
23106         fields, properties and events.
23107
23108 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
23109
23110         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
23111         char constants to be part of the enumeration.
23112
23113         * expression.cs (Conditional.DoResolve): Add support for operator
23114         true. Implements the missing functionality from 14.12
23115
23116         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
23117         operator true/false as required by the spec.
23118
23119         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
23120         implicit conversion to boolean.
23121
23122         * statement.cs (Statement.ResolveBoolean): A boolean expression is
23123         also one where the type implements `operator true'. 
23124
23125         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
23126         get an expression that will invoke operator true based on an
23127         expression.  
23128
23129         (GetConversionOperators): Removed the hack that called op_True
23130         here.  
23131
23132         (Expression.ResolveBoolean): Move this from Statement.
23133
23134 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
23135
23136         * ecore.cs (FieldExpr): do not allow initialization of initonly
23137         fields on derived classes
23138
23139 2003-03-13  Martin Baulig  <martin@ximian.com>
23140
23141         * statement.cs (Block.Emit): Call ig.BeginScope() and
23142         ig.EndScope() when compiling with debugging info; call
23143         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
23144
23145 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
23146
23147         * expression.cs (Indexers): Do not construct immediately, allow
23148         for new members to be appended as we go.  Fixes 38143
23149
23150 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23151
23152         * expression.cs: save/restore context when resolving an unchecked
23153         expression.
23154
23155 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
23156
23157         * cfold.cs: Catch division by zero in modulus operator during
23158         constant folding.
23159
23160 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
23161
23162         * interface.cs (Interface.DefineMembers): Avoid defining members
23163         twice. 
23164
23165 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
23166
23167         * driver.cs: handle the +/- options for -noconfig
23168
23169         * statement.cs (Unckeched.Resolve): Also track the state of
23170         unchecked in the Resolve phase.
23171
23172 2003-02-27  Martin Baulig  <martin@ximian.com>
23173
23174         * ecore.cs (Expression.MemberLookup): Don't create a
23175         MethodGroupExpr for something which is not a method.  Fixes #38291.
23176
23177 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
23178
23179         * class.cs (MemberBase.CheckParameters): Also check that the type
23180         is unmanaged if it is a pointer.
23181
23182         * expression.cs (SizeOf.Resolve): Add location information.
23183
23184         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
23185         a managed type is declared.
23186
23187         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
23188         parameter modifiers as well.  Fixes bug 38606
23189
23190         * class.cs: Very sad.  Am backing out the speed up changes
23191         introduced by the ArrayList -> Array in the TypeContainer, as they
23192         were not actually that much faster, and introduced a bug (no error
23193         reports on duplicated methods).
23194
23195         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
23196         source first, this will guarantee that we have a valid expression
23197         before calling in lower levels functions that will require a
23198         resolved object.  Then use this original_source in the
23199         target.ResolveLValue instead of the original source that was
23200         passed to us.
23201
23202         Another change.  Use target.Resolve instead of LValueResolve.
23203         Although we are resolving for LValues, we will let the Assign code
23204         take care of that (it will be called again from Resolve).  This
23205         basically allows code like this:
23206
23207         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
23208         class Y { void A (X x) { x [0] += o; }
23209
23210         The problem was that the indexer was trying to resolve for
23211         set_Item (idx, object o) and never finding one.  The real set_Item
23212         was set_Item (idx, X).  By delaying the process we get the right
23213         semantics. 
23214
23215         Fixes bug 36505
23216
23217 2003-02-23  Martin Baulig  <martin@ximian.com>
23218
23219         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
23220         while calling DoEmit ().
23221
23222         * codegen.cs (EmitContext.Mark): Don't mark locations in other
23223         source files; if you use the #line directive inside a method, the
23224         compiler stops emitting line numbers for the debugger until it
23225         reaches the end of the method or another #line directive which
23226         restores the original file.
23227
23228 2003-02-23  Martin Baulig  <martin@ximian.com>
23229
23230         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
23231
23232 2003-02-23  Martin Baulig  <martin@ximian.com>
23233
23234         * statement.cs (Block.AddChildVariableNames): We need to call this
23235         recursively, not just for our immediate children.
23236
23237 2003-02-23  Martin Baulig  <martin@ximian.com>
23238
23239         * class.cs (Event.Define): Always make the field private, like csc does.
23240
23241         * typemanager.cs (TypeManager.RealMemberLookup): Make events
23242         actually work, fixes bug #37521.
23243
23244 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
23245
23246         * delegate.cs: When creating the various temporary "Parameters"
23247         classes, make sure that we call the ComputeAndDefineParameterTypes
23248         on those new parameters (just like we do with the formal ones), to
23249         allow them to be resolved in the context of the DeclSpace.
23250
23251         This fixes the bug that Dick observed in Bugzilla #38530.
23252
23253 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
23254
23255         * expression.cs (ResolveMemberAccess): When resolving a constant,
23256         do not attempt to pull a constant if the value was not able to
23257         generate a valid constant.
23258
23259         * const.cs (LookupConstantValue): Do not report more errors than required.
23260
23261 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23262
23263         * expression.cs: fixes bug #38328.
23264
23265 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23266
23267         * class.cs: Changed all the various members that can be part of a
23268         class from being an ArrayList to be an Array of the right type.
23269         During the DefineType type_list, interface_list, delegate_list and
23270         enum_list are turned into types, interfaces, delegates and enums
23271         arrays.  
23272
23273         And during the member population, indexer_list, event_list,
23274         constant_list, field_list, instance_constructor_list, method_list,
23275         operator_list and property_list are turned into their real arrays.
23276
23277         Although we could probably perform this operation earlier, for
23278         good error reporting we need to keep the lists and remove the
23279         lists for longer than required.
23280
23281         This optimization was triggered by Paolo profiling the compiler
23282         speed on the output of `gen-sample-program.pl' perl script. 
23283
23284         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
23285         not crash in methods like MemberLookupFailed that use this field.  
23286
23287         This problem arises when the compiler fails to resolve a type
23288         during interface type definition for example.
23289
23290 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23291
23292         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
23293         inherit from System.Object, so we have to stop at null, not only
23294         when reaching System.Object.
23295
23296 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
23297
23298         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
23299         DeclaredOnly because the parent indexer might have had a different
23300         name, but did not loop until the top of the hierarchy was reached.
23301
23302         The problem this one fixes is 35492: when a class implemented an
23303         indexer from an interface, we were getting the interface method
23304         (which was abstract) and we were flagging an error (can not invoke
23305         abstract method).
23306
23307         This also keeps bug 33089 functioning, and test-148 functioning.
23308
23309         * typemanager.cs (IsSpecialMethod): The correct way of figuring
23310         out if a method is special is to see if it is declared in a
23311         property or event, or whether it is one of the predefined operator
23312         names.   This should fix correctly #36804.
23313
23314 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
23315
23316         The goal here is to remove the dependency on EmptyCast.Peel ().
23317         Killing it completely.
23318
23319         The problem is that currently in a number of places where
23320         constants are expected, we have to "probe" for an EmptyCast, and
23321         Peel, which is not the correct thing to do, as this will be
23322         repetitive and will likely lead to errors. 
23323
23324         The idea is to remove any EmptyCasts that are used in casts that
23325         can be reduced to constants, so we only have to cope with
23326         constants. 
23327
23328         This bug hunt was triggered by Bug 37363 and the desire to remove
23329         the duplicate pattern where we were "peeling" emptycasts to check
23330         whether they were constants.  Now constants will always be
23331         constants.
23332
23333         * ecore.cs: Use an enumconstant here instead of wrapping with
23334         EmptyCast.  
23335
23336         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
23337         throwing me off.  By handling this we can get rid of a few hacks.
23338
23339         * statement.cs (Switch): Removed Peel() code.
23340
23341 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
23342
23343         * class.cs: Location information for error 508
23344
23345         * expression.cs (New.DoResolve): Add a guard against double
23346         resolution of an expression.  
23347
23348         The New DoResolve might be called twice when initializing field
23349         expressions (see EmitFieldInitializers, the call to
23350         GetInitializerExpression will perform a resolve on the expression,
23351         and later the assign will trigger another resolution
23352
23353         This leads to bugs (#37014)
23354
23355         * delegate.cs: The signature for EndInvoke should contain any ref
23356         or out parameters as well.  We were not doing this in the past. 
23357
23358         * class.cs (Field.Define): Do not overwrite the type definition
23359         inside the `volatile' group.  Turns out that volatile enumerations
23360         were changing the type here to perform a validity test, which
23361         broke conversions. 
23362
23363 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
23364
23365         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
23366         and structs, we do not want to load the instance variable
23367
23368         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
23369         enum_type has to be handled like an object reference (implicit
23370         conversions exists from this to object), but the regular IsClass
23371         and IsValueType tests will never return true for this one.
23372
23373         Also we use TypeManager.IsValueType instead of type.IsValueType,
23374         just for consistency with the rest of the code (this is only
23375         needed if we ever use the construct exposed by test-180.cs inside
23376         corlib, which we dont today).
23377
23378 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
23379
23380         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
23381         just InternalCall.
23382
23383 2003-02-09  Martin Baulig  <martin@ximian.com>
23384
23385         * namespace.cs (Namespace..ctor): Added SourceFile argument.
23386         (Namespace.DefineNamespaces): New static public method; this is
23387         called when we're compiling with debugging to add all namespaces
23388         to the symbol file.
23389
23390         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
23391         pass it to the Namespace's .ctor.
23392
23393         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
23394         and MethodBase arguments; pass the namespace ID to the symwriter;
23395         pass the MethodBase instead of the token to the symwriter.
23396         (SymbolWriter.DefineNamespace): New method to add a namespace to
23397         the symbol file.
23398
23399 2003-02-09  Martin Baulig  <martin@ximian.com>
23400
23401         * symbolwriter.cs: New file.  This is a wrapper around
23402         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
23403         methods here in near future.
23404
23405 2003-02-09  Martin Baulig  <martin@ximian.com>
23406
23407         * codegen.cs (EmitContext.Mark): Just pass the arguments to
23408         ILGenerator.MarkSequencePoint() which are actually used by the
23409         symbol writer.
23410
23411 2003-02-09  Martin Baulig  <martin@ximian.com>
23412
23413         * location.cs (SourceFile): New public sealed class.  This
23414         contains the name and an index which is used in the location's token.
23415         (Location): Reserve an appropriate number of bits in the token for
23416         the source file instead of walking over that list, this gives us a
23417         really huge performance improvement when compiling with debugging.
23418
23419         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23420         `SourceFile' argument instead of a string.
23421         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23422         but don't parse/tokenize here, we need to generate the list of all
23423         source files before we do that.
23424         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23425         the files.
23426
23427         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23428         instead of a string.
23429
23430         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23431         of a string.
23432
23433 2003-02-09  Martin Baulig  <martin@ximian.com>
23434
23435         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23436         filename on `#line default'.
23437
23438 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23439
23440         * statement.cs: don't clear the pinned var when the fixed statement
23441         returns from the method (fixes bug#37752).
23442
23443 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23444
23445         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23446         to IsValueType.
23447
23448 2003-02-07  Martin Baulig  <martin@ximian.com>
23449
23450         * driver.cs: Removed the `--debug-args' command line argument.
23451
23452         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23453         automatically by the AsssemblyBuilder.
23454         (CodeGen.InitializeSymbolWriter): We don't need to call any
23455         initialization function on the symbol writer anymore.  This method
23456         doesn't take any arguments.
23457
23458 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23459
23460         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23461         from referenced assemblies as well.
23462
23463 2003-02-02  Martin Baulig  <martin@ximian.com>
23464
23465         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23466
23467 2003-02-02  Martin Baulig  <martin@ximian.com>
23468
23469         * class.cs (Constructor.Emit): Open the symbol writer before
23470         emitting the constructor initializer.
23471         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23472         single-stepping through constructor initializers.
23473
23474 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23475
23476         * class.cs: Handle error 549: do not allow virtual methods in
23477         sealed classes. 
23478
23479 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23480
23481         * decl.cs: Check access levels when resolving types
23482
23483 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23484
23485         * statement.cs: Add parameters and locals set in catch blocks that might 
23486         return to set vector
23487
23488 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23489
23490         * class.cs (Operator): Set the SpecialName flags for operators.
23491
23492         * expression.cs (Invocation.DoResolve): Only block calls to
23493         accessors and operators on SpecialName methods.
23494
23495         (Cast.TryReduce): Handle conversions from char constants.
23496
23497
23498 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23499
23500         * statement.cs: small memory and time optimization in FlowBranching.
23501
23502 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23503
23504         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23505         problem that the last fix but in the other sid (Set).
23506
23507         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23508         access when there is no indexer in the hierarchy.
23509
23510 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23511
23512         * class.cs: Combine some if statements.
23513
23514 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23515
23516         * driver.cs: fixed bug #37187.
23517
23518 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23519
23520         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23521         any indexer, it's needed to build a list with all the indexers in the
23522         hierarchy (AllGetters), else we have problems. Fixes #35653.
23523
23524 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23525
23526         * class.cs (MethodData.Define): It is wrong for an interface
23527         implementation to be static in both cases: explicit and implicit.
23528         We were only handling this in one case.
23529
23530         Improve the if situation there to not have negations.
23531
23532         * class.cs (Field.Define): Turns out that we do not need to check
23533         the unsafe bit on field definition, only on usage.  Remove the test.
23534
23535 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23536
23537         * driver.cs: use assembly.Location instead of Codebase (the latest
23538         patch made mcs fail when using MS assemblies).
23539
23540 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23541
23542         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23543         get the path to *corlib.dll.
23544
23545 2003-01-21  Nick Drochak <ndrochak@gol.com>
23546
23547         * cs-tokenizer.cs:
23548         * pending.cs:
23549         * typemanager.cs: Remove compiler warnings
23550
23551 2003-01-20  Duncan Mak  <duncan@ximian.com>
23552
23553         * AssemblyInfo.cs: Bump the version number to 0.19.
23554
23555 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23556
23557         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23558
23559 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23560
23561         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23562
23563 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23564
23565         * cs-parser.jay: Small fix: we were not comparing the constructor
23566         name correctly.   Thanks to Zoltan for the initial pointer.
23567
23568 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23569
23570         * cs-tokenizer.cs: Set file name when specified with #line
23571
23572 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23573
23574         * cs-parser.jay: Only perform the constructor checks here if we
23575         are named like the class;  This will help provider a better
23576         error.  The constructor path is taken when a type definition is
23577         not found, but most likely the user forgot to add the type, so
23578         report that rather than the constructor error.
23579
23580 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23581
23582         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23583         allocations.
23584
23585 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23586
23587         * cs-parser.jay: Add cleanup call.
23588
23589 2003-01-13  Duncan Mak  <duncan@ximian.com>
23590
23591         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23592         consistent with other methods.
23593
23594 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23595
23596         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23597
23598 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23599
23600         * attribute.cs: only set GuidAttr to true when we have a
23601         GuidAttribute.
23602
23603 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23604
23605         * ecore.cs:
23606         * expression.cs:
23607         * typemanager.cs: fixes to allow mcs compile corlib with the new
23608         Type.IsSubclassOf fix.
23609
23610 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23611
23612         * expression.cs (LocalVariableReference.DoResolve): Classify a
23613         constant as a value, not as a variable.   Also, set the type for
23614         the variable.
23615
23616         * cs-parser.jay (fixed_statement): take a type instead of a
23617         pointer_type, so we can produce a better error message later.
23618
23619         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23620         as an error.  
23621
23622         (For.DoEmit): Make inifinite loops have a
23623         non-conditional branch back.
23624
23625         (Fixed.DoEmit): First populate the pinned variables, then emit the
23626         statement, then clear the variables.  Before I was emitting the
23627         code once for each fixed piece.
23628
23629
23630 2003-01-08  Martin Baulig  <martin@ximian.com>
23631
23632         * statement.cs (FlowBranching.MergeChild): A break in a
23633         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23634
23635 2003-01-08  Martin Baulig  <martin@ximian.com>
23636
23637         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23638         lives in the same number space than `param_map'.  Fixes #36154.
23639
23640 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23641
23642         * cs-parser.jay (constructor_declaration): Set the
23643         Constructor.ModFlags before probing for it.  This makes the
23644         compiler report 514, 515 and 132 (the code was there, but got
23645         broken). 
23646
23647         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23648         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23649         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23650
23651 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23652
23653         * enum.cs: create the enum static fields using the enum type.
23654
23655 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23656
23657         * class.cs: don't try to create the ParamBuilder for the return
23658         type if it's not needed (and handle it breaking for the ms runtime
23659         anyway).
23660
23661 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23662
23663         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23664
23665 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23666
23667         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23668         the command.   This showed up while compiling the JANET source
23669         code, which used \r as its only newline separator.
23670
23671 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23672
23673         * class.cs (Method.Define): If we are an operator (because it
23674         reuses our code), then set the SpecialName and HideBySig.  #36128
23675
23676 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23677
23678         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23679         exception, report error 120 `object reference required'.
23680
23681         * driver.cs: Add --pause option, used during to measure the size
23682         of the process as it goes with --timestamp.
23683
23684         * expression.cs (Invocation.DoResolve): Do not allow methods with
23685         SpecialName to be invoked.
23686
23687 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23688
23689         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23690         number before adding it.
23691
23692 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23693
23694         * ecore.cs (StandardImplicitConversion): When in an unsafe
23695         context, we allow conversion between void * to any other pointer
23696         type. This fixes bug #35973.
23697
23698 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23699
23700         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23701         is not thrown when extensionless outputs are used 
23702
23703 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23704
23705         * rootcontext.cs: fixed compilation of corlib.
23706
23707 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23708
23709         * attribute.cs (Attributes.Contains): Add new method.
23710
23711         * class.cs (MethodCore.LabelParameters): if the parameter is an
23712         `out' parameter, check that no attribute `[In]' has been passed.
23713
23714         * enum.cs: Handle the `value__' name in an enumeration.
23715
23716 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23717
23718         * decl.cs: Added special case to allow overrides on "protected
23719         internal" methods
23720
23721 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23722
23723         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23724         since it makes much more sense.
23725
23726         (Attributes.ctor): Don't require a Location parameter.
23727
23728         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23729
23730         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23731         since we already have that information per attribute.
23732
23733         * everywhere : make appropriate changes.
23734
23735         * class.cs (LabelParameters): Write the code which actually
23736         applies attributes to the return type. We can't do this on the MS
23737         .NET runtime so we flag a warning in the case an exception is
23738         thrown.
23739
23740 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23741
23742         * const.cs: Handle implicit null conversions here too.
23743
23744 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23745
23746         * class.cs (MethodCore.LabelParameters): Remove the extra
23747         Type [] parameter since it is completely unnecessary. Instead
23748         pass in the method's attributes so that we can extract
23749         the "return" attribute.
23750
23751 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23752
23753         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23754         of ignoring it and letting the compile continue.
23755
23756         * typemanager.cs (ChangeType): use an extra argument to return an
23757         error condition instead of throwing an exception.
23758
23759 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23760
23761         * expression.cs (Unary.TryReduce): mimic the code for the regular
23762         code path.  Perform an implicit cast in the cases where we can
23763         implicitly convert to one of the integral types, and then reduce
23764         based on that constant.   This fixes bug #35483.
23765
23766 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23767
23768         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23769
23770 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23771
23772         * namespace.cs: fixed bug #35489.
23773
23774 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23775
23776         * class.cs: Remove some dead code.
23777
23778         * cs-parser.jay: Estimate the number of methods needed
23779         (RootContext.MethodCount);
23780
23781         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23782         numbers instead of StringBuilders.
23783
23784         * support.cs (PtrHashtable): Add constructor with initial size;
23785         We can now reduce reallocations of the method table.
23786
23787 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23788
23789         * attribute.cs (ApplyAttributes): Keep track of the emitted
23790         attributes on a per-target basis. This fixes bug #35413.
23791
23792 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23793
23794         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23795         default to the Windows 1252 encoding.
23796
23797         (UnixParseOption): Support version, thanks to Alp for the missing
23798         pointer. 
23799
23800         * AssemblyInfo.cs: Add nice assembly information.
23801
23802         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23803         (bug 35169).
23804
23805         * cs-parser.jay: Allow a trailing comma before the close bracked
23806         in the attribute_section production.
23807
23808         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23809         address of the instance was being taken, I will take this out,
23810         because we take the address of the object immediately here.
23811
23812 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23813
23814         * typemanager.cs (AreMultipleAllowed): Take care of the most
23815         obvious case where attribute type is not in the current assembly -
23816         stupid me ;-)
23817
23818 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23819
23820         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23821         definitions, instead of doing that afterwards.  
23822
23823         Also we use a nice little hack, depending on the constructor, we
23824         know if we are a "composed" name or a simple name.  Hence, we
23825         avoid the IndexOf test, and we avoid 
23826
23827         * codegen.cs: Add code to assist in a bug reporter to track down
23828         the source of a compiler crash. 
23829
23830 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23831
23832         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23833         types have been emitted for a given element and flag an error
23834         if something which does not have AllowMultiple set is used more
23835         than once.
23836
23837         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23838         attribute types and their corresponding AllowMultiple properties
23839
23840         (AreMultipleAllowed): Check the property for a given type.
23841
23842         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23843         property in the case we have a TypeContainer.
23844
23845         (Attributes.AddAttribute): Detect duplicates and just skip on
23846         adding them. This trivial fix catches a pretty gross error in our
23847         attribute emission - global attributes were being emitted twice!
23848
23849         Bugzilla bug #33187 is now fixed.
23850
23851 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23852
23853         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23854         instead of pp_and).
23855
23856         * expression.cs (Binary.ResolveOperator): I can only use the
23857         Concat (string, string, string) and Concat (string, string,
23858         string, string) if the child is actually a concatenation of
23859         strings. 
23860
23861 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23862
23863         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23864         context where we need a 2-character lookahead.
23865
23866         * pending.cs (PendingImplementation): Rework so we can keep track
23867         of interface types all the time, and flag those which were
23868         implemented by parents as optional.
23869
23870 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23871
23872         * expression.cs (Binary.ResolveOperator): Use
23873         String.Concat(string,string,string) or
23874         String.Concat(string,string,string,string) when possible. 
23875
23876         * typemanager: More helper methods.
23877
23878
23879 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23880
23881         * pending.cs: remove the bogus return from GetMissingInterfaces()
23882         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23883
23884 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23885
23886         * namespace.cs: avoid duplicated 'using xxx' being added to
23887         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23888         when we get more than one 'using' statement for the same namespace.
23889         Report a CS0105 warning for it.
23890
23891 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23892
23893         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23894         of calling getChar/putback, uses internal knowledge of it.    
23895
23896         (xtoken): Reorder tokenizer so most common patterns are checked
23897         first.  This reduces the compilation time in another 5% (from 8.11s
23898         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23899
23900         The parsing time is 22% of the compilation in mcs, and from that
23901         64% is spent on the tokenization process.  
23902
23903         I tried using a binary search for keywords, but this is slower
23904         than the hashtable.  Another option would be to do a couple of
23905         things:
23906
23907                 * Not use a StringBuilder, instead use an array of chars,
23908                   with a set value.  Notice that this way we could catch
23909                   the 645 error without having to do it *afterwards*.
23910
23911                 * We could write a hand-parser to avoid the hashtable
23912                   compares altogether.
23913
23914         The identifier consumption process takes 37% of the tokenization
23915         time.  Another 15% is spent on is_number.  56% of the time spent
23916         on is_number is spent on Int64.Parse:
23917
23918                 * We could probably choose based on the string length to
23919                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23920                   computations. 
23921
23922         Another 3% is spend on wrapping `xtoken' in the `token' function.
23923
23924         Handle 0xa0 as whitespace (#34752)
23925
23926 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23927
23928         * typemanager.cs (IsCLRType): New routine to tell whether a type
23929         is one of the builtin types.  
23930
23931         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23932         typecode in more places instead of doing pointer comparissions.
23933         We could leverage some knowledge about the way the typecodes are
23934         laid out.
23935
23936         New code to cache namespaces in assemblies, it is currently not
23937         invoked, to be used soon.
23938
23939         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23940
23941         * expression.cs (Binary.ResolveOperator): specially handle
23942         strings, and do not perform user-defined operator overloading for
23943         built-in types.
23944
23945 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23946
23947         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23948         internalcall as it is a pretty simple operation;  Avoid whenever
23949         possible to call Char.IsLetter.
23950
23951         (consume_identifier): Cut by half the number of
23952         hashtable calls by merging the is_keyword and GetKeyword behavior.
23953
23954         Do not short-circuit, because if we do, we
23955         report errors (ie, #if false && true would produce an invalid
23956         directive error);
23957
23958
23959 2002-11-24  Martin Baulig  <martin@ximian.com>
23960
23961         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23962         check constant ranges and report a CS0221.  Fixes #33186.
23963
23964 2002-11-24  Martin Baulig  <martin@ximian.com>
23965
23966         * cs-parser.jay: Make this work for uninitialized variable
23967         declarations in the `for' initializer.  Fixes #32416.
23968
23969 2002-11-24  Martin Baulig  <martin@ximian.com>
23970
23971         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23972         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23973
23974 2002-11-24  Martin Baulig  <martin@ximian.com>
23975
23976         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23977         argument; if true, we also check for user-defined conversions.
23978         This is only needed if both arguments are of a user-defined type.
23979         Fixes #30443, added test-175.cs.
23980         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23981
23982         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23983
23984 2002-11-24  Martin Baulig  <martin@ximian.com>
23985
23986         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23987         function to get the store opcode.
23988         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23989         only emit the Ldelema if the store opcode is Stobj.  You must run
23990         both test-34 and test-167 to test this.  Fixes #34529.
23991
23992 2002-11-23  Martin Baulig  <martin@ximian.com>
23993
23994         * ecore.cs (Expression.MemberLookup): Added additional
23995         `qualifier_type' argument which is used when we're being called
23996         from MemberAccess.DoResolve() and null if we're called from a
23997         SimpleName lookup.
23998         (Expression.MemberLookupFailed): New method to report errors; this
23999         does the CS1540 check and reports the correct error message.
24000
24001         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
24002         argument for the CS1540 check and redone the way how we're dealing
24003         with private members.  See the comment in the source code for details.
24004         (FilterWithClosure): Reverted this back to revision 1.197; renamed
24005         `closure_start_type' to `closure_qualifier_type' and check whether
24006         it's not null.  It was not this filter being broken, it was just
24007         being called with the wrong arguments.
24008
24009         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
24010         and pass it the correct `qualifier_type'; this also does the error
24011         handling for us.
24012
24013 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
24014
24015         * expression.cs (Invocation.EmitParams): If the we are dealing
24016         with a non-built-in value type, load its address as well.
24017
24018         (ArrayCreation): Use a a pretty constant instead
24019         of the hardcoded value 2.   Use 6 instead of 2 for the number of
24020         static initializers.  
24021
24022         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
24023         because they are not really value types, just glorified integers. 
24024
24025         * driver.cs: Do not append .exe, the CSC compiler does not do it.
24026
24027         * ecore.cs: Remove redundant code for enumerations, make them use
24028         the same code path as everything else, fixes the casting issue
24029         with enumerations in Windows.Forms.
24030
24031         * attribute.cs: Do only cast to string if it is a string, the
24032         validation happens later.
24033
24034         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
24035         people upgrade their corlibs.
24036
24037         * ecore.cs: Oops, enumerations were not following the entire code path
24038
24039 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
24040
24041         * typemanager.cs (FilterWithClosure): Commented out the test for
24042         1540 in typemanager.cs, as it has problems when accessing
24043         protected methods from a parent class (see test-174.cs). 
24044
24045         * attribute.cs (Attribute.ValidateGuid): new method.
24046         (Attribute.Resolve): Use above.
24047
24048 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
24049
24050         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
24051
24052         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
24053         handling for enumerations, as we only needed the TypeContainer
24054         functionality to begin with (this is required for the fix below to
24055         work for enums that reference constants in a container class for
24056         example). 
24057
24058         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
24059
24060         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
24061         a valid TypeBuilder to perform lookups on.o
24062
24063         * class.cs (InheritableMemberSignatureCompare): Use true in the
24064         call to GetGetMethod and GetSetMethod, because we are comparing
24065         the signature, and we need to get the methods *even* if they are
24066         private. 
24067
24068         (PropertyBase.CheckBase): ditto.
24069
24070         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
24071         GotoCase.Resolve): Use Peel on EmpytCasts.
24072
24073         * ecore.cs (EmptyCast): drop child, add Peel method.
24074
24075 2002-11-17  Martin Baulig  <martin@ximian.com>
24076
24077         * ecore.cs (EmptyCast.Child): New public property.
24078
24079         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
24080         label resolved to an EmptyCast.  Fixes #34162.
24081         (GotoCase.Resolve): Likewise.
24082         (Block.EmitMeta): Likewise.
24083
24084 2002-11-17  Martin Baulig  <martin@ximian.com>
24085
24086         * expression.cs (Invocation.BetterConversion): Prefer int over
24087         uint; short over ushort; long over ulong for integer literals.
24088         Use ImplicitConversionExists instead of StandardConversionExists
24089         since we also need to check for user-defined implicit conversions.
24090         Fixes #34165.  Added test-173.cs.
24091
24092 2002-11-16  Martin Baulig  <martin@ximian.com>
24093
24094         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
24095         with the `true' and `false' literals.  Fixes #33151.
24096
24097 2002-11-16  Martin Baulig  <martin@ximian.com>
24098
24099         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
24100         October 22nd; don't do the cs1540 check for static members.
24101
24102         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
24103         now using our own filter here and doing the cs1540 check again.
24104
24105 2002-11-16  Martin Baulig  <martin@ximian.com>
24106
24107         * support.cs (InternalParameters): Don't crash if we don't have
24108         any fixed parameters.  Fixes #33532.
24109
24110 2002-11-16  Martin Baulig  <martin@ximian.com>
24111
24112         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
24113         when looking up static methods to make this work on Windows.
24114         Fixes #33773.
24115
24116 2002-11-16  Martin Baulig  <martin@ximian.com>
24117
24118         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
24119         a setter rather than using PropertyInfo.CanWrite.
24120
24121 2002-11-15  Nick Drochak  <ndrochak@gol.com>
24122
24123         * class.cs: Allow acces to block member by subclasses. Fixes build
24124         breaker.
24125
24126 2002-11-14  Martin Baulig  <martin@ximian.com>
24127
24128         * class.cs (Constructor.Emit): Added the extern/block check.
24129         Fixes bug #33678.
24130
24131 2002-11-14  Martin Baulig  <martin@ximian.com>
24132
24133         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
24134         iteration while looking for indexers, this is needed because the
24135         indexer may have a different name in our base classes.  Fixed the
24136         error reporting (no indexers at all, not get accessor, no
24137         overloaded match).  Fixes bug #33089.
24138         (IndexerAccess.DoResolveLValue): Likewise.
24139
24140 2002-11-14  Martin Baulig  <martin@ximian.com>
24141
24142         * class.cs (PropertyBase.CheckBase): Make this work for multiple
24143         indexers.  Fixes the first part of bug #33089.
24144         (MethodSignature.InheritableMemberSignatureCompare): Added support
24145         for properties.
24146
24147 2002-11-13  Ravi Pratap  <ravi@ximian.com>
24148
24149         * attribute.cs (Attribute.Resolve): Catch the
24150         NullReferenceException and report it since it isn't supposed to
24151         happen. 
24152
24153 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
24154
24155         * expression.cs (Binary.EmitBranchable): Also handle the cases for
24156         LogicalOr and LogicalAnd that can benefit from recursively
24157         handling EmitBranchable.  The code now should be nice for Paolo.
24158
24159 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
24160
24161         * typemanager.cs (LookupType): Added a negative-hit hashtable for
24162         the Type lookups, as we perform quite a number of lookups on
24163         non-Types.  This can be removed once we can deterministically tell
24164         whether we have a type or a namespace in advance.
24165
24166         But this might require special hacks from our corlib.
24167
24168         * TODO: updated.
24169
24170         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
24171         and double which avoids a conversion from an integer to a double.
24172
24173         * expression.cs: tiny optimization, avoid calling IsConstant,
24174         because it effectively performs the lookup twice.
24175
24176 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
24177
24178         But a bogus return here to keep the semantics of the old code
24179         until the Mono runtime is fixed.
24180
24181         * pending.cs (GetMissingInterfaces): New method used to remove all
24182         the interfaces that are already implemented by our parent
24183         classes from the list of pending methods. 
24184
24185         * interface.cs: Add checks for calls after ResolveTypeExpr.
24186
24187 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
24188
24189         * class.cs (Class.Emit): Report warning 67: event not used if the
24190         warning level is beyond 3.
24191
24192         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
24193         being a NullLiteral.
24194
24195         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
24196         specifiers. 
24197
24198         * class.cs (TypeContainer.GetClassBases): Cover a missing code
24199         path that might fail if a type can not be resolved.
24200
24201         * expression.cs (Binary.Emit): Emit unsigned versions of the
24202         operators. 
24203
24204         * driver.cs: use error 5.
24205
24206 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
24207
24208         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
24209
24210 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
24211
24212         * cs-parser.jay (switch_section): A beautiful patch from Martin
24213         Baulig that fixed 33094.
24214
24215 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
24216
24217         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
24218         Check whether the base is abstract and report an error if so.
24219
24220         * expression.cs (IndexerAccess.DoResolveLValue,
24221         IndexerAccess.DoResolve): ditto. 
24222
24223         (Invocation.DoResolve): ditto.
24224
24225         (Invocation.FullMethodDesc): Improve the report string.
24226
24227         * statement.cs (Block): Eliminate IsVariableDefined as it is
24228         basically just a wrapper for GetVariableInfo.
24229
24230         * ecore.cs (SimpleName): Use new 
24231
24232         * support.cs (ReflectionParamter.ParameterType): We unwrap the
24233         type, as we return the actual parameter ref/unref state on a
24234         different call.
24235
24236 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
24237
24238         * support.cs: Return proper flags REF/OUT fixing the previous
24239         commit.  
24240
24241         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
24242         not used to mean `ref' but `ref or out' in ParameterReference
24243
24244         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
24245         full type signature instead of calling TypeManger.CSharpName
24246         ourselves. 
24247
24248         * support.cs (InternalParameters.ParameterDesc): Do not compare
24249         directly to the modflags, because REF/OUT will actually be bitsets
24250         if set. 
24251
24252         * delegate.cs (VerifyMethod): Check also the modifiers.
24253
24254         * cs-tokenizer.cs: Fix bug where floating point values with an
24255         exponent where a sign was missing was ignored.
24256
24257         * driver.cs: Allow multiple assemblies to be specified in a single
24258         /r: argument
24259
24260 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
24261
24262         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
24263         because identifiers after a parenthesis would end up in this kind
24264         of production, and we needed to desamiguate it for having casts
24265         like:
24266
24267                 (UserDefinedType *) xxx
24268
24269 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
24270
24271         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
24272         we should set on the Bindingflags.NonPublic, but not turn on
24273         private_ok.  private_ok controls whether a Private member is
24274         returned (this is chekced on the filter routine), while the
24275         BindingFlags.NonPublic just controls whether private/protected
24276         will be allowed.   This fixes the problem part of the problem of
24277         private properties being allowed to be used in derived classes.
24278
24279         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
24280         so we can call the children DoResolveLValue method (this will
24281         properly signal errors on lvalue assignments to base properties)
24282
24283         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
24284         getter are null, and we have a property info, we know that this
24285         happened because the lookup failed, so we report an error 122 for
24286         protection level violation.
24287
24288         We also silently return if setter and getter are null in the
24289         resolve functions, this condition only happens if we have flagged
24290         the error before.  This is the other half of the problem. 
24291
24292         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
24293         not have accessibility information, that is why we were returning
24294         true in the filter function in typemanager.cs.
24295
24296         To properly report 122 (property is inaccessible because of its
24297         protection level) correctly, we report this error in ResolveAccess
24298         by failing if both the setter and the getter are lacking (ie, the
24299         lookup failed). 
24300
24301         DoResolve and DoLResolve have been modified to check for both
24302         setter/getter being null and returning silently, the reason being
24303         that I did not want to put the knowledge about this error in upper
24304         layers, like:
24305
24306         int old = Report.Errors;
24307         x = new PropertyExpr (...);
24308         if (old != Report.Errors)
24309                 return null;
24310         else
24311                 return x;
24312
24313         So the property expr is returned, but it is invalid, so the error
24314         will be flagged during the resolve process. 
24315
24316         * class.cs: Remove InheritablePropertySignatureCompare from the
24317         class, as we no longer depend on the property signature to compute
24318         whether it is possible to implement a method or not.
24319
24320         The reason is that calling PropertyInfo.GetGetMethod will return
24321         null (in .NET, in Mono it works, and we should change this), in
24322         cases where the Get Method does not exist in that particular
24323         class.
24324
24325         So this code:
24326
24327         class X { public virtual int A { get { return 1; } } }
24328         class Y : X { }
24329         class Z : Y { public override int A { get { return 2; } } }
24330
24331         Would fail in Z because the parent (Y) would not have the property
24332         defined.  So we avoid this completely now (because the alternative
24333         fix was ugly and slow), and we now depend exclusively on the
24334         method names.
24335
24336         (PropertyBase.CheckBase): Use a method-base mechanism to find our
24337         reference method, instead of using the property.
24338
24339         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
24340         routines are gone now.
24341
24342         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
24343         names, they were incorrectly named.
24344
24345         * cs-tokenizer.cs: Return are more gentle token on failure. 
24346
24347         * pending.cs (PendingImplementation.InterfaceMethod): This routine
24348         had an out-of-sync index variable, which caused it to remove from
24349         the list of pending methods the wrong method sometimes.
24350
24351 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
24352
24353         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
24354         CanWrite, because those refer to this particular instance of the
24355         property, and do not take into account the fact that we can
24356         override single members of a property.
24357
24358         Constructor requires an EmitContext.  The resolution process does
24359         not happen here, but we need to compute the accessors before,
24360         because the resolution does not always happen for properties.
24361
24362         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
24363         subclass, before we did not update this flag, but we did update
24364         bindingflags. 
24365
24366         (GetAccessors): Drop this routine, as it did not work in the
24367         presence of partially overwritten set/get methods. 
24368
24369         Notice that this broke the cs1540 detection, but that will require
24370         more thinking. 
24371
24372 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24373
24374         * class.cs:
24375         * codegen.cs:
24376         * driver.cs: issue a warning instead of an error if we don't support
24377         debugging for the platform. Also ignore a couple of errors that may
24378         arise when trying to write the symbols. Undo my previous patch.
24379
24380 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24381
24382         * driver.cs: ignore /debug switch except for Unix platforms.
24383
24384 2002-10-23  Nick Drochak  <ndrochak@gol.com>
24385
24386         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
24387
24388 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
24389
24390         * driver.cs: Do not make mcs-debug conditional, so we do not break
24391         builds that use it.
24392
24393         * statement.cs (UsageVector.MergeChildren): I would like Martin to
24394         review this patch.  But basically after all the children variables
24395         have been merged, the value of "Breaks" was not being set to
24396         new_breaks for Switch blocks.  I think that it should be set after
24397         it has executed.  Currently I set this to the value of new_breaks,
24398         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
24399         conservative, but I do not understand this code very well.
24400
24401         I did not break anything in the build, so that is good ;-)
24402
24403         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
24404
24405 2002-10-20  Mark Crichton  <crichton@gimp.org>
24406
24407         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
24408
24409 2002-10-20  Nick Drochak  <ndrochak@gol.com>
24410
24411         * cfold.cs: Fixed compile blocker.
24412
24413 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
24414
24415         * driver.cs: I was chekcing the key, not the file.
24416
24417 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24418
24419         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24420         message that we were generating - we just need to silently return
24421         a null.
24422
24423 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24424
24425         * class.cs (Event.Define): Change my previous commit, as this
24426         breaks the debugger.  This is a temporary hack, as it seems like
24427         the compiler is generating events incorrectly to begin with.
24428
24429         * expression.cs (Binary.ResolveOperator): Added support for 
24430         "U operator - (E x, E y)"
24431
24432         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24433         y)".
24434
24435         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24436         init-only variables, but this path did not take into account that
24437         there might be also instance readonly variables.  Correct this
24438         problem. 
24439
24440         This fixes bug 32253
24441
24442         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24443         delegates as well.
24444
24445         * driver.cs: Change the extension for modules to `netmodule'
24446
24447         * cs-parser.jay: Improved slightly the location tracking for
24448         the debugger symbols.
24449
24450         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24451         modifiers that were specified instead of the hardcoded value
24452         (FamAndAssem).  This was basically ignoring the static modifier,
24453         and others.  Fixes 32429.
24454
24455         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24456         fixed a bug in the process (32476)
24457
24458         * expression.cs (ArrayAccess.EmitAssign): Patch from
24459         hwang_rob@yahoo.ca that fixes bug 31834.3
24460
24461 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24462
24463         * driver.cs: Make the module extension .netmodule.
24464
24465 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24466
24467         * driver.cs: Report an error if the resource file is not found
24468         instead of crashing.
24469
24470         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24471         false, like Emit does.
24472
24473 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24474
24475         * typemanager.cs: Remove unused private member.  Also reported mcs
24476         bug to report this as a warning like csc.
24477
24478 2002-10-15  Martin Baulig  <martin@gnome.org>
24479
24480         * statement.cs (Statement.Emit): Made this a virtual method; emits
24481         the line number info and calls DoEmit().
24482         (Statement.DoEmit): New protected abstract method, formerly knows
24483         as Statement.Emit().
24484
24485         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24486
24487 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24488
24489         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24490         have fixed a remaining problem: not every AddXXXX was adding a
24491         fully qualified name.  
24492
24493         Now everyone registers a fully qualified name in the DeclSpace as
24494         being defined instead of the partial name.  
24495
24496         Downsides: we are slower than we need to be due to the excess
24497         copies and the names being registered this way.  
24498
24499         The reason for this is that we currently depend (on the corlib
24500         bootstrap for instance) that types are fully qualified, because
24501         we dump all the types in the namespace, and we should really have
24502         types inserted into the proper namespace, so we can only store the
24503         basenames in the defined_names array.
24504
24505 2002-10-10  Martin Baulig  <martin@gnome.org>
24506
24507         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24508         from bug #31834, see the bug report for a testcase which is
24509         miscompiled.
24510
24511 2002-10-10  Martin Baulig  <martin@gnome.org>
24512
24513         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24514         flow analysis code for this.
24515
24516         * statement.cs (Do, While, For): Tell the flow analysis code about
24517         infinite loops.
24518         (FlowBranching.UsageVector): Added support for infinite loops.
24519         (Block.Resolve): Moved the dead code elimination here and use flow
24520         analysis to do it.
24521
24522 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24523
24524         * class.cs (Field.Define): Catch cycles on struct type
24525         definitions. 
24526
24527         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24528         fields if the fields are static.  We only need to check instance
24529         fields. 
24530
24531         * expression.cs (As.DoResolve): Test for reference type.
24532
24533         * statement.cs (Using.ResolveExpression): Use
24534         ConvertImplicitRequired, not ConvertImplicit which reports an
24535         error on failture
24536         (Using.ResolveLocalVariableDecls): ditto.
24537
24538         * expression.cs (Binary.ResolveOperator): Report errors in a few
24539         places where we had to.
24540
24541         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24542
24543 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24544
24545         * expression.cs: Use StoreFromPtr instead of extracting the type
24546         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24547
24548         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24549         an enumeration value to a System.Enum, but System.Enum is not a
24550         value type, but an class type, so we need to box.
24551
24552         (Expression.ConvertExplicit): One codepath could return
24553         errors but not flag them.  Fix this.  Fixes #31853
24554
24555         * parameter.cs (Resolve): Do not allow void as a parameter type.
24556
24557 2002-10-06  Martin Baulig  <martin@gnome.org>
24558
24559         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24560         if it's a class type and not a struct.  Fixes #31815.
24561
24562 2002-10-06  Martin Baulig  <martin@gnome.org>
24563
24564         * statement.cs: Reworked the flow analysis code a bit to make it
24565         usable for dead code elimination.
24566
24567 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24568
24569         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24570
24571 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24572
24573         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24574         to fix the test 165, will investigate deeper.
24575
24576 2002-10-04  Martin Baulig  <martin@gnome.org>
24577
24578         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24579         finally blocks actually work.
24580         (Try.Resolve): We don't need to create a sibling for `finally' if
24581         there is no finally block.
24582
24583 2002-10-04  Martin Baulig  <martin@gnome.org>
24584
24585         * class.cs (Constructor.Define): The default accessibility for a
24586         non-default constructor is private, not public.
24587
24588 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24589
24590         * class.cs (Constructor): Make AllowedModifiers public, add
24591         EXTERN.
24592
24593         * cs-parser.jay: Perform the modifiers test here, as the
24594         constructor for the Constructor class usually receives a zero
24595         because of the way we create it (first we create, later we
24596         customize, and we were never checking the modifiers).
24597
24598         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24599         is a version of LookupTypeReflection that includes the type-name
24600         cache.  This can be used as a fast path for functions that know
24601         the fully qualified name and are only calling into *.GetType() to
24602         obtain a composed type.
24603
24604         This is also used by TypeManager.LookupType during its type
24605         composition.
24606
24607         (LookupType): We now also track the real type name, as sometimes
24608         we can get a quey for the real type name from things like
24609         ComposedCast.  This fixes bug 31422.
24610
24611         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24612         complete type fullname, it does not have to go through the type
24613         resolution system to obtain the composed version of the type (for
24614         obtaining arrays or pointers).
24615
24616         (Conditional.Emit): Use the EmitBoolExpression to
24617         generate nicer code, as requested by Paolo.
24618
24619         (ArrayCreation.CheckIndices): Use the patch from
24620         hwang_rob@yahoo.ca to validate the array initializers. 
24621
24622 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24623
24624         * class.cs (ConstructorInitializer.Emit): simplify code by using
24625         Invocation.EmitCall, and at the same time, fix the bugs in calling
24626         parent constructors that took variable arguments. 
24627
24628         * ecore.cs (Expression.ConvertNumericExplicit,
24629         Expression.ImplicitNumericConversion): Remove the code that
24630         manually wrapped decimal (InternalTypeConstructor call is now gone
24631         as well).
24632
24633         * expression.cs (Cast.TryReduce): Also handle decimal types when
24634         trying to perform a constant fold on the type.
24635
24636         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24637
24638         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24639         that only turned off an error report, and did nothing else. 
24640
24641 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24642
24643         * driver.cs: Handle and ignore /fullpaths
24644
24645 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24646
24647         * expression.cs (Binary.ResolveOperator): Catch the case where
24648         DoNumericPromotions returns true, 
24649
24650         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24651
24652 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24653
24654         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24655         report error 70.
24656
24657 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24658
24659         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24660         conversion exists, but it is also required that the conversion be
24661         performed.  This manifested in "(Type64Enum) 2".  
24662
24663         * class.cs (TypeManager.AddMethod): The fix is not to change
24664         AddEnum, because that one was using a fully qualified name (every
24665         DeclSpace derivative does), but to change the AddMethod routine
24666         that was using an un-namespaced name.  This now correctly reports
24667         the duplicated name.
24668
24669         Revert patch until I can properly fix it.  The issue
24670         is that we have a shared Type space across all namespaces
24671         currently, which is wrong.
24672
24673         Options include making the Namespace a DeclSpace, and merge
24674         current_namespace/current_container in the parser.
24675
24676 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24677
24678         * cs-parser.jay: Improve error reporting when we get a different
24679         kind of expression in local_variable_type and
24680         local_variable_pointer_type. 
24681
24682         Propagate this to avoid missleading errors being reported.
24683
24684         * ecore.cs (ImplicitReferenceConversion): treat
24685         TypeManager.value_type as a target just like object_type.   As
24686         code like this:
24687
24688         ValueType v = 1;
24689
24690         Is valid, and needs to result in the int 1 being boxed before it
24691         is assigned to the value type v.
24692
24693         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24694         to validate the enumeration name.
24695
24696         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24697         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24698         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24699
24700         * ecore.cs (TryImplicitIntConversion): When doing an
24701         implicit-enumeration-conversion, check if the type is 64-bits and
24702         perform a conversion before passing to EnumConstant.
24703
24704 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24705
24706         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24707         report ambiguous type references.  Unlike the MS version, we
24708         report what the ambiguity is.   Innovation at work ;-)
24709
24710         (DeclSpace.FindType): Require a location argument to
24711         display when we display an ambiguous error.
24712
24713         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24714
24715         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24716
24717         * expression.cs (EmitDynamicInitializers): Apply patch from
24718         hwang_rob@yahoo.ca that fixes the order in which we emit our
24719         initializers. 
24720
24721 2002-09-21  Martin Baulig  <martin@gnome.org>
24722
24723         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24724         delegate takes no arguments.
24725
24726 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24727
24728         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24729         from integers.
24730
24731         * expression.cs: Extract the underlying type.
24732
24733         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24734
24735         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24736
24737 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24738
24739         * class.cs (TypeContainer.DefineType): We can not use the nice
24740         PackingSize with the size set to 1 DefineType method, because it
24741         will not allow us to define the interfaces that the struct
24742         implements.
24743
24744         This completes the fixing of bug 27287
24745
24746         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24747         means also structs.  This fixes part of the problem. 
24748         (Expresion.ImplicitReferenceConversionExists): ditto.
24749
24750         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24751         error if there were no errors reported during the type lookup
24752         process, to avoid duplicates or redundant errors.  Without this
24753         you would get an ambiguous errors plus a type not found.  We have
24754         beaten the user enough with the first error.  
24755
24756         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24757         reference. 
24758
24759         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24760         during the resolution process, stop the lookup, this avoids
24761         repeated error reports (same error twice).
24762
24763         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24764
24765         * typemanager.cs (LookupType): Redo the type lookup code to match
24766         the needs of System.Reflection.  
24767
24768         The issue is that System.Reflection requires references to nested
24769         types to begin with a "+" sign instead of a dot.  So toplevel
24770         types look like: "NameSpace.TopLevelClass", and nested ones look
24771         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24772         levels. 
24773
24774 2002-09-19  Martin Baulig  <martin@gnome.org>
24775
24776         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24777         says that a method always returns or always throws an exception,
24778         don't report the CS0161.
24779
24780         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24781         set `Returns = new_returns'.
24782
24783 2002-09-19  Martin Baulig  <martin@gnome.org>
24784
24785         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24786         to an enum constant, check for a CS0176.
24787
24788 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24789
24790         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24791         for operators that must be in pairs and report errors.
24792
24793         * ecore.cs (SimpleName.DoResolveType): During the initial type
24794         resolution process, when we define types recursively, we must
24795         check first for types in our current scope before we perform
24796         lookups in the enclosing scopes.
24797
24798         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24799
24800         (Invocation.VerifyArgumentsCompat): Call
24801         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24802         I thought we were supposed to always call this, but there are a
24803         few places in the code where we dont do it.
24804
24805 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24806
24807         * driver.cs: Add support in -linkres and -resource to specify the
24808         name of the identifier.
24809
24810 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24811
24812         * ecore.cs (StandardConversionExists): Sync with the conversion
24813         code: allow anything-* to void* conversions.
24814
24815         (FindMostSpecificSource): Use an Expression argument
24816         instead of a Type, because we might be handed over a Literal which
24817         gets a few more implicit conversions that plain types do not.  So
24818         this information was being lost.
24819
24820         Also, we drop the temporary type-holder expression when not
24821         required.
24822
24823 2002-09-17  Martin Baulig  <martin@gnome.org>
24824
24825         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24826         this is an explicit interface implementation.
24827
24828 2002-09-17  Martin Baulig  <martin@gnome.org>
24829
24830         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24831         different `IndexerName' attributes.
24832
24833         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24834         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24835         virtual CommonResolve().
24836
24837 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24838
24839         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24840         and convert that to the UnderlyingType.
24841
24842         * statement.cs (Foreach.Resolve): Indexers are just like variables
24843         or PropertyAccesses.
24844
24845         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24846         inside quoted strings, we were not doing this before.
24847
24848 2002-09-16  Martin Baulig  <martin@gnome.org>
24849
24850         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24851         resolve it.  This is needed for the definite assignment check of the
24852         instance expression, fixes bug #29846.
24853         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24854
24855 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24856
24857         * parameter.cs: Fix compile error.  Cannot reference static member
24858         from an instance object.  Is this an mcs bug?
24859
24860 2002-09-14  Martin Baulig  <martin@gnome.org>
24861
24862         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24863         multiple times.  Fixes bug #30295, added test-166.cs.
24864
24865 2002-09-14  Martin Baulig  <martin@gnome.org>
24866
24867         * statement.cs (Block.Emit): Don't emit unreachable code.
24868         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24869         `break' statements.
24870         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24871
24872 2002-09-14  Martin Baulig  <martin@gnome.org>
24873
24874         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24875         is set.
24876
24877 2002-09-14  Martin Baulig  <martin@gnome.org>
24878
24879         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24880         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24881         be false on the ms runtime.
24882
24883 2002-09-13  Martin Baulig  <martin@gnome.org>
24884
24885         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24886         the CS0038 error message.
24887
24888 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24889
24890         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24891         constant inside, return it.
24892
24893 2002-09-12  Martin Baulig  <martin@gnome.org>
24894
24895         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24896         implicit conversion can be done between enum types.
24897
24898         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24899         check whether an implicit conversion to the current enum's UnderlyingType
24900         exists and report an error if not.
24901
24902         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24903         without debugging support.
24904
24905         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24906         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24907
24908 2002-09-12  Martin Baulig  <martin@gnome.org>
24909
24910         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24911
24912         * ecore.cs (IMemberExpr.DeclaringType): New property.
24913         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24914         nonstatic member of an outer type (CS0038).
24915
24916 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24917
24918         * driver.cs: Activate the using-error detector at warning level
24919         4 (at least for MS-compatible APIs).
24920
24921         * namespace.cs (VerifyUsing): Small buglett fix.
24922
24923         * pending.cs (PendingImplementation): pass the container pointer. 
24924
24925         * interface.cs (GetMethods): Allow for recursive definition.  Long
24926         term, I would like to move every type to support recursive
24927         definitions, not the current ordering mechanism that we have right
24928         now.
24929
24930         The situation is this: Attributes are handled before interfaces,
24931         so we can apply attributes to interfaces.  But some attributes
24932         implement interfaces, we will now handle the simple cases
24933         (recursive definitions will just get an error).  
24934
24935         * parameter.cs: Only invalidate types at the end if we fail to
24936         lookup all types.  
24937
24938 2002-09-09  Martin Baulig  <martin@gnome.org>
24939
24940         * ecore.cs (PropertyExpr.Emit): Also check for
24941         TypeManager.system_int_array_get_length so this'll also work when
24942         compiling corlib.  Fixes #30003.
24943
24944 2002-09-09  Martin Baulig  <martin@gnome.org>
24945
24946         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24947         and throw an exception if we can't get the type's size.  Fixed #30040,
24948         added test-165.cs.
24949
24950 2002-09-09  Martin Baulig  <martin@gnome.org>
24951
24952         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24953
24954         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24955         context.  Fixes bug #30027.
24956
24957         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24958         virtual functions.  Fixes bug #30043, added test-164.cs.
24959
24960 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24961
24962         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24963
24964 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24965
24966         * driver.cs: Use an object to get the windows codepage since it's not a
24967         static property.
24968
24969 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24970
24971         * statement.cs (For.Emit): for infinite loops (test == null)
24972         return whether there is a break inside, not always "true".
24973
24974         * namespace.cs (UsingEntry): New struct to hold the name of the
24975         using definition, the location where it is defined, and whether it
24976         has been used in a successful type lookup.
24977
24978         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24979         strings.
24980
24981         * decl.cs: ditto.
24982
24983 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24984
24985         * attribute.cs : Fix incorrect code which relied on catching
24986         a NullReferenceException to detect a null being passed in
24987         where an object was expected.
24988
24989 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24990
24991         * statement.cs (Try): flag the catch variable as assigned
24992
24993         * expression.cs (Cast): Simplified by using ResolveType instead of
24994         manually resolving.
24995
24996         * statement.cs (Catch): Fix bug by using ResolveType.
24997
24998 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24999
25000         * expression.cs (BetterConversion): Special case for when we have
25001         a NullLiteral as the argument and we have to choose between string
25002         and object types - we choose string the way csc does.
25003
25004         * attribute.cs (Attribute.Resolve): Catch the
25005         NullReferenceException and report error #182 since the Mono
25006         runtime no more has the bug and having this exception raised means
25007         we tried to select a constructor which takes an object and is
25008         passed a null.
25009
25010 2002-09-05  Ravi Pratap  <ravi@ximian.com>
25011
25012         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
25013         message (1502, 1503) when we can't locate a method after overload
25014         resolution. This is much more informative and closes the bug
25015         Miguel reported.
25016
25017         * interface.cs (PopulateMethod): Return if there are no argument
25018         types. Fixes a NullReferenceException bug.
25019
25020         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
25021         expressions too. Previously we were checking only in one place for
25022         positional arguments leaving out named arguments.
25023
25024         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
25025         type to the enum type is not allowed. Remove code corresponding to
25026         that.
25027
25028         (ConvertNumericExplicit): Allow explicit conversions from
25029         the underlying type to enum type. This precisely follows the spec
25030         and closes a bug filed by Gonzalo.
25031
25032 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25033
25034         * compiler.csproj:
25035         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
25036
25037 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
25038
25039         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
25040         it was important that we stored the right value after the
25041         reduction in `converted'.
25042
25043 2002-09-04  Martin Baulig  <martin@gnome.org>
25044
25045         * location.cs (Location.SymbolDocument): Use full pathnames for the
25046         source files.
25047
25048 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
25049
25050         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
25051         of the expression resolve mechanism, because that will catch the
25052         SimpleName error failures.
25053
25054         (Conditional): If we can not resolve the
25055         expression, return, do not crash.
25056
25057 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25058
25059         * cs-tokenizer.cs:
25060         (location): display token name instead of its number.
25061
25062 2002-08-28  Martin Baulig  <martin@gnome.org>
25063
25064         * expression.cs (Binary.ResolveOperator): Don't silently return
25065         but return an error if an operator cannot be applied between two
25066         enum types.
25067
25068 2002-08-28  Martin Baulig  <martin@gnome.org>
25069
25070         * class.cs (Constructor.Define): Set the permission attributes
25071         correctly instead of making all constructors public.
25072
25073 2002-08-28  Martin Baulig  <martin@gnome.org>
25074
25075         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
25076         for private members before reporting a CS0103; if we find anything,
25077         it's a CS0122.
25078
25079 2002-08-28  Martin Baulig  <martin@gnome.org>
25080
25081         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
25082         to check whether `closure_start_type == closure_invocation_type',
25083         we also need to check whether `m.DeclaringType == closure_invocation_type'
25084         before bypassing the permission checks.  We might be accessing
25085         protected/private members from the base class.
25086         (TypeManager.RealMemberLookup): Only set private_ok if private
25087         members were requested via BindingFlags.NonPublic.
25088
25089         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
25090
25091         * expression.cs (MemberAccess.ResolveMemberAccess): Set
25092         MethodGroupExpr.IsExplicitImpl if appropriate.
25093         (Invocation.DoResolve): Don't report the CS0120 for explicit
25094         interface implementations.
25095
25096 2002-08-27  Martin Baulig  <martin@gnome.org>
25097
25098         * expression.cs (Invocation.DoResolve): If this is a static
25099         method and we don't have an InstanceExpression, we must report
25100         a CS0120.
25101
25102 2002-08-25  Martin Baulig  <martin@gnome.org>
25103
25104         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
25105         `==' between a valuetype and an object.
25106
25107 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
25108
25109         * ecore.cs (TypeExpr): Provide a ToString method.
25110
25111 2002-08-24  Martin Baulig  <martin@gnome.org>
25112
25113         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
25114         now called proggie.dbg and it's a binary file.
25115
25116 2002-08-23  Martin Baulig  <martin@gnome.org>
25117
25118         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
25119
25120 2002-08-23  Martin Baulig  <martin@gnome.org>
25121
25122         * struct.cs (MyStructInfo.ctor): Make this work with empty
25123         structs; it's not allowed to use foreach() on null.
25124
25125 2002-08-23  Martin Baulig  <martin@gnome.org>
25126
25127         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
25128         writer the full pathname of the generated assembly.
25129
25130 2002-08-23  Martin Baulig  <martin@gnome.org>
25131
25132         * statements.cs (FlowBranching.UsageVector.MergeChildren):
25133         A `finally' block never returns or breaks; improved handling of
25134         unreachable code.
25135
25136 2002-08-23  Martin Baulig  <martin@gnome.org>
25137
25138         * statement.cs (Throw.Resolve): Allow `throw null'.
25139
25140 2002-08-23  Martin Baulig  <martin@gnome.org>
25141
25142         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
25143         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
25144         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
25145         MemberLookup would return a wrong event if this is an explicit
25146         interface implementation and the class has an event with the same
25147         name.
25148
25149 2002-08-23  Martin Baulig  <martin@gnome.org>
25150
25151         * statement.cs (Block.AddChildVariableNames): New public method.
25152         (Block.AddChildVariableName): Likewise.
25153         (Block.IsVariableNameUsedInChildBlock): Likewise.
25154         (Block.AddVariable): Check whether a variable name has already
25155         been used in a child block.
25156
25157         * cs-parser.jay (declare_local_variables): Mark all variable names
25158         from the current block as being used in a child block in the
25159         implicit block.
25160
25161 2002-08-23  Martin Baulig  <martin@gnome.org>
25162
25163         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
25164         find the symbol writer.
25165
25166         * driver.cs: csc also allows the arguments to /define being
25167         separated by commas, not only by semicolons.
25168
25169 2002-08-23  Martin Baulig  <martin@gnome.org>
25170
25171         * interface.cs (Interface.GetMembers): Added static check for events.
25172
25173 2002-08-15  Martin Baulig  <martin@gnome.org>
25174
25175         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
25176         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
25177
25178         * ecore.cs (Expression.MemberLookup): Added documentation and explained
25179         why the MethodData.EmitDestructor() change was necessary.
25180
25181 2002-08-20  Martin Baulig  <martin@gnome.org>
25182
25183         * class.cs (TypeContainer.FindMembers): Added static check for events.
25184
25185         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
25186
25187         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
25188         use Type.GetEvents(), not Type.FindMembers().
25189
25190 2002-08-20  Martin Baulig  <martin@gnome.org>
25191
25192         * decl.cs (MemberCache): Added a special method cache which will
25193         be used for method-only searched.  This ensures that a method
25194         search will return a MethodInfo with the correct ReflectedType for
25195         inherited methods.      
25196
25197 2002-08-20  Martin Baulig  <martin@gnome.org>
25198
25199         * decl.cs (DeclSpace.FindMembers): Made this public.
25200
25201 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25202
25203         * delegate.cs: fixed build on windows.
25204         [FIXME:  Filed as bug #29150: MCS must report these errors.]
25205
25206 2002-08-19  Ravi Pratap  <ravi@ximian.com>
25207
25208         * ecore.cs (StandardConversionExists): Return a false
25209         if we are trying to convert the void type to anything else
25210         since that is not allowed.
25211
25212         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
25213         we flag error 70 in the event an event is trying to be accessed
25214         directly from outside the declaring type.
25215
25216 2002-08-20  Martin Baulig  <martin@gnome.org>
25217
25218         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
25219         MemberCache from typemanager.cs to decl.cs.
25220
25221 2002-08-19  Martin Baulig  <martin@gnome.org>
25222
25223         * class.cs (TypeContainer): Implement IMemberContainer.
25224         (TypeContainer.DefineMembers): Create the MemberCache.
25225         (TypeContainer.FindMembers): Do better BindingFlags checking; only
25226         return public members if BindingFlags.Public was given, check
25227         whether members are static.
25228
25229 2002-08-16  Martin Baulig  <martin@gnome.org>
25230
25231         * decl.cs (DeclSpace.Define): Splitted this in Define and
25232         DefineMembers.  DefineMembers is called first and initializes the
25233         MemberCache.
25234
25235         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
25236         DefineMembers() on all our DeclSpaces.
25237
25238         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
25239         but call DefineMembers() on all nested interfaces.  We call their
25240         Define() in our new Define() function.
25241
25242         * interface.cs (Interface): Implement IMemberContainer.
25243         (Interface.Define): Moved all code except the attribute stuf to
25244         DefineMembers().
25245         (Interface.DefineMembers): Initialize the member cache.
25246
25247         * typemanager.cs (IMemberFinder): Removed this interface, we don't
25248         need this anymore since we can use MemberCache.FindMembers directly.
25249
25250 2002-08-19  Martin Baulig  <martin@gnome.org>
25251
25252         * typemanager.cs (MemberCache): When creating the cache for an
25253         interface type, add all inherited members.
25254         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
25255         to `out bool used_cache' and documented it.
25256         (TypeManager.MemberLookup): If we already used the cache in the first
25257         iteration, we don't need to do the interfaces check.
25258
25259 2002-08-19  Martin Baulig  <martin@gnome.org>
25260
25261         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
25262         here from IMemberFinder and don't implement this interface anymore.
25263         (DeclSpace.MemberCache): Moved here from IMemberFinder.
25264
25265         * typemanager.cs (IMemberFinder): This interface is now only used by
25266         classes which actually support the member cache.
25267         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
25268         since we only put DeclSpaces into this Hashtable.
25269         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
25270         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
25271
25272 2002-08-16  Martin Baulig  <martin@gnome.org>
25273
25274         * typemanager.cs (ICachingMemberFinder): Removed.
25275         (IMemberFinder.MemberCache): New property.
25276         (TypeManager.FindMembers): Merged this with RealFindMembers().
25277         This function will never be called from TypeManager.MemberLookup()
25278         so we can't use the cache here, just the IMemberFinder.
25279         (TypeManager.MemberLookup_FindMembers): Check whether the
25280         IMemberFinder has a MemberCache and call the cache's FindMembers
25281         function.
25282         (MemberCache): Rewrote larger parts of this yet another time and
25283         cleaned it up a bit.
25284
25285 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
25286
25287         * driver.cs (LoadArgs): Support quoting.
25288
25289         (Usage): Show the CSC-like command line arguments.
25290
25291         Improved a few error messages.
25292
25293 2002-08-15  Martin Baulig  <martin@gnome.org>
25294
25295         * typemanager.cs (IMemberContainer.Type): New property.
25296         (IMemberContainer.IsInterface): New property.
25297
25298         The following changes are conditional to BROKEN_RUNTIME, which is
25299         defined at the top of the file.
25300
25301         * typemanager.cs (MemberCache.MemberCache): Don't add the base
25302         class'es members, but add all members from TypeHandle.ObjectType
25303         if we're an interface.
25304         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
25305         is the current type.
25306         (MemberCache.CacheEntry.Container): Removed this field.
25307         (TypeHandle.GetMembers): Include inherited members.
25308
25309 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25310
25311         * typemanager.cs: fixed compilation and added a comment on a field that
25312         is never used.
25313
25314 2002-08-15  Martin Baulig  <martin@gnome.org>
25315
25316         * class.cs (ConstructorInitializer.Resolve): In the
25317         Expression.MemberLookup call, use the queried_type as
25318         invocation_type.
25319
25320         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
25321         declared' attribute, it's always true.
25322         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
25323         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
25324         temporary wrapper for FindMembers which tells MemberLookup whether
25325         members from the base classes are included in the return value.
25326         This will go away soon.
25327         (TypeManager.MemberLookup): Use this temporary hack here; once the
25328         new MemberCache is completed, we don't need to do the DeclaredOnly
25329         looping here anymore since the MemberCache will take care of this.
25330         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
25331         (MemberCache): When creating the MemberCache for a class, get
25332         members from the current class and all its base classes.
25333         (MemberCache.CacheEntry.Container): New field.  This is a
25334         temporary hack until the Mono runtime is fixed to distinguish
25335         between ReflectedType and DeclaringType.  It allows us to use MCS
25336         with both the MS runtime and the unfixed Mono runtime without
25337         problems and without accecting performance.
25338         (MemberCache.SearchMembers): The DeclaredOnly looping from
25339         TypeManager.MemberLookup is now done here.      
25340
25341 2002-08-14  Martin Baulig  <martin@gnome.org>
25342
25343         * statement.cs (MyStructInfo.MyStructInfo): Don't call
25344         Type.GetFields on dynamic types but get the fields from the
25345         corresponding TypeContainer.
25346         (MyStructInfo.GetStructInfo): Added check for enum types.
25347
25348         * typemanager.cs (MemberList.IsSynchronized): Implemented.
25349         (MemberList.SyncRoot): Implemented.
25350         (TypeManager.FilterWithClosure): No need to check permissions if
25351         closure_start_type == closure_invocation_type, don't crash if
25352         closure_invocation_type is null.
25353
25354 2002-08-13  Martin Baulig  <martin@gnome.org>
25355
25356         Rewrote TypeContainer.FindMembers to use a member cache.  This
25357         gives us a speed increase of about 35% for the self-hosting MCS
25358         build and of about 15-20% for the class libs (both on GNU/Linux).
25359
25360         * report.cs (Timer): New class to get enhanced profiling.  This
25361         whole class is "TIMER" conditional since it remarkably slows down
25362         compilation speed.
25363
25364         * class.cs (MemberList): New class.  This is an IList wrapper
25365         which we're now using instead of passing MemberInfo[]'s around to
25366         avoid copying this array unnecessarily.
25367         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
25368         (ICachingMemberFinder, IMemberContainer): New interface.
25369         (TypeManager.FilterWithClosure): If `criteria' is null, the name
25370         has already been checked, otherwise use it for the name comparision.
25371         (TypeManager.FindMembers): Renamed to RealMemberFinder and
25372         provided wrapper which tries to use ICachingMemberFinder.FindMembers
25373         if possible.  Returns a MemberList, not a MemberInfo [].
25374         (TypeHandle): New class, implements IMemberContainer.  We create
25375         one instance of this class per type, it contains a MemberCache
25376         which is used to do the member lookups.
25377         (MemberCache): New class.  Each instance of this class contains
25378         all members of a type and a name-based hash table.
25379         (MemberCache.FindMembers): This is our new member lookup
25380         function.  First, it looks up all members of the requested name in
25381         the hash table.  Then, it walks this list and sorts out all
25382         applicable members and returns them.
25383
25384 2002-08-13  Martin Baulig  <martin@gnome.org>
25385
25386         In addition to a nice code cleanup, this gives us a performance
25387         increase of about 1.4% on GNU/Linux - not much, but it's already
25388         half a second for the self-hosting MCS compilation.
25389
25390         * typemanager.cs (IMemberFinder): New interface.  It is used by
25391         TypeManager.FindMembers to call FindMembers on a TypeContainer,
25392         Enum, Delegate or Interface.
25393         (TypeManager.finder_to_member_finder): New PtrHashtable.
25394         (TypeManager.finder_to_container): Removed.
25395         (TypeManager.finder_to_delegate): Removed.
25396         (TypeManager.finder_to_interface): Removed.
25397         (TypeManager.finder_to_enum): Removed.
25398
25399         * interface.cs (Interface): Implement IMemberFinder.
25400
25401         * delegate.cs (Delegate): Implement IMemberFinder.
25402
25403         * enum.cs (Enum): Implement IMemberFinder.
25404
25405         * class.cs (TypeContainer): Implement IMemberFinder.
25406
25407 2002-08-12  Martin Baulig  <martin@gnome.org>
25408
25409         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
25410
25411 2002-08-12  Martin Baulig  <martin@gnome.org>
25412
25413         * ecore.cs (ITypeExpression): New interface for expressions which
25414         resolve to a type.
25415         (TypeExpression): Renamed to TypeLookupExpression.
25416         (Expression.DoResolve): If we're doing a types-only lookup, the
25417         expression must implement the ITypeExpression interface and we
25418         call DoResolveType() on it.
25419         (SimpleName): Implement the new ITypeExpression interface.
25420         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25421         hack, the situation that we're only looking up types can't happen
25422         anymore when this method is called.  Moved the type lookup code to
25423         DoResolveType() and call it.
25424         (SimpleName.DoResolveType): This ITypeExpression interface method
25425         is now doing the types-only lookup.
25426         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25427         (ResolveFlags): Added MaskExprClass.
25428
25429         * expression.cs (MemberAccess): Implement the ITypeExpression
25430         interface.
25431         (MemberAccess.DoResolve): Added support for a types-only lookup
25432         when we're called via ITypeExpression.DoResolveType().
25433         (ComposedCast): Implement the ITypeExpression interface.
25434
25435         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25436         Expression.Resolve() with ResolveFlags.Type instead.
25437
25438 2002-08-12  Martin Baulig  <martin@gnome.org>
25439
25440         * interface.cs (Interface.Define): Apply attributes.
25441
25442         * attribute.cs (Attribute.ApplyAttributes): Added support for
25443         interface attributes.
25444
25445 2002-08-11  Martin Baulig  <martin@gnome.org>
25446
25447         * statement.cs (Block.Emit): Only check the "this" variable if we
25448         do not always throw an exception.
25449
25450         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25451         whether the property has a set accessor.
25452
25453 2002-08-11  Martin Baulig  <martin@gnome.org>
25454
25455         Added control flow analysis support for structs.
25456
25457         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25458         with control flow analysis turned off.
25459         (IVariable): New interface.
25460         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25461         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25462         (FieldExpr.DoResolve): Resolve the instance expression with flow
25463         analysis turned off and do the definite assignment check after the
25464         resolving when we know what the expression will resolve to.
25465
25466         * expression.cs (LocalVariableReference, ParameterReference):
25467         Implement the new IVariable interface, only call the flow analysis
25468         code if ec.DoFlowAnalysis is true.
25469         (This): Added constructor which takes a Block argument.  Implement
25470         the new IVariable interface.
25471         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25472         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25473         This does the definite assignment checks for struct members.
25474
25475         * class.cs (Constructor.Emit): If this is a non-static `struct'
25476         constructor which doesn't have any initializer, call
25477         Block.AddThisVariable() to tell the flow analysis code that all
25478         struct elements must be initialized before control returns from
25479         the constructor.
25480
25481         * statement.cs (MyStructInfo): New public class.
25482         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25483         argument to this indexer.  If non-zero, check an individual struct
25484         member, not the whole struct.
25485         (FlowBranching.CheckOutParameters): Check struct members.
25486         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25487         overloaded versions of these methods which take an additional
25488         `int field_idx' argument to check struct members.
25489         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25490         overloaded versions of these methods which take an additional
25491         `string field_name' argument to check struct member.s
25492         (VariableInfo): Implement the IVariable interface.
25493         (VariableInfo.StructInfo): New public property.  Returns the
25494         MyStructInfo instance of the variable if it's a struct or null.
25495         (Block.AddThisVariable): New public method.  This is called from
25496         Constructor.Emit() for non-static `struct' constructor which do
25497         not have any initializer.  It creates a special variable for the
25498         "this" instance variable which will be checked by the flow
25499         analysis code to ensure that all of the struct's fields are
25500         initialized before control returns from the constructor.
25501         (UsageVector): Added support for struct members.  If a
25502         variable/parameter is a struct with N members, we reserve a slot
25503         in the usage vector for each member.  A struct is considered fully
25504         initialized if either the struct itself (slot 0) or all its
25505         members are initialized.
25506
25507 2002-08-08  Martin Baulig  <martin@gnome.org>
25508
25509         * driver.cs (Driver.MainDriver): Only report an error CS5001
25510         if there were no compilation errors.
25511
25512         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25513         `UnsafeContext' property to determine whether the parent is in
25514         unsafe context rather than checking the parent's ModFlags:
25515         classes nested in an unsafe class are unsafe as well.
25516
25517 2002-08-08  Martin Baulig  <martin@gnome.org>
25518
25519         * statement.cs (UsageVector.MergeChildren): Distinguish between
25520         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25521         we return.  Added test17() and test18() to test-154.cs.
25522
25523 2002-08-08  Martin Baulig  <martin@gnome.org>
25524
25525         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25526         Family access, make sure the invoking type isn't a subclass of the
25527         queried type (that'd be a CS1540).
25528
25529         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25530         this method which takes an additional `Type invocation_type'.
25531
25532         * expression.cs (BaseAccess.DoResolve): Use the base type as
25533         invocation and query type.
25534         (MemberAccess.DoResolve): If the lookup failed and we're about to
25535         report a CS0122, try a lookup with the ec.ContainerType - if this
25536         succeeds, we must report a CS1540.
25537
25538 2002-08-08  Martin Baulig  <martin@gnome.org>
25539
25540         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25541         (MethodGroupExpr): Implement the IMemberExpr interface.
25542
25543         * expression (MemberAccess.ResolveMemberAccess): No need to have
25544         any special code for MethodGroupExprs anymore, they're now
25545         IMemberExprs.   
25546
25547 2002-08-08  Martin Baulig  <martin@gnome.org>
25548
25549         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25550         Family, FamANDAssem and FamORAssem permissions.
25551         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25552
25553 2002-08-08  Martin Baulig  <martin@gnome.org>
25554
25555         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25556         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25557         or loop block.
25558
25559 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25560
25561         * driver.cs: implemented /resource option to embed managed resources.
25562
25563 2002-08-07  Martin Baulig  <martin@gnome.org>
25564
25565         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25566         (FieldBase.HasFieldInitializer): New public property.
25567         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25568         returns the field initializer and makes sure it is only resolved once.
25569         (TypeContainer.EmitFieldInitializers): Call
25570         FieldBase.GetInitializerExpression to get the initializer, this ensures
25571         that it isn't resolved multiple times.
25572
25573         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25574         the resolving process (SimpleName/MemberLookup) that we're currently
25575         emitting a field initializer (which must not access any instance members,
25576         this is an error CS0236).
25577
25578         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25579         argument, if the `IsFieldInitializer' flag is set, we must report and
25580         error CS0236 and not an error CS0120.   
25581
25582 2002-08-07  Martin Baulig  <martin@gnome.org>
25583
25584         * ecore.cs (IMemberExpr): New public interface.
25585         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25586         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25587         if the expression is an IMemberExpr.
25588
25589         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25590         to be null, implicitly default to `this' if we're non-static in
25591         this case.  Simplified the code a lot by using the new IMemberExpr
25592         interface.  Also fixed bug #28176 here.
25593
25594 2002-08-06  Martin Baulig  <martin@gnome.org>
25595
25596         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25597         ParameterReferences during semantic analysis so that we can do a
25598         type-only search when resolving Cast, TypeOf and SizeOf.
25599         (block): Pass the `current_local_parameters' to the Block's
25600         constructor.
25601
25602         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25603         argument to the constructor.
25604         (ConstructorInitializer.Resolve): Create a temporary implicit
25605         block with the parameters.
25606
25607         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25608         references here if we aren't doing a type-only search.
25609
25610         * statement.cs (Block): Added constructor which takes a
25611         `Parameters parameters' argument.
25612         (Block.Parameters): New public property.
25613
25614         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25615         to `Parameters' and made it public readonly.
25616
25617 2002-08-06  Martin Baulig  <martin@gnome.org>
25618
25619         * ecore.cs (Expression.Warning): Made this public as well.
25620
25621         * report.cs (Report.Debug): Print the contents of collections.
25622
25623 2002-08-06  Martin Baulig  <martin@gnome.org>
25624
25625         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25626         used to tell Resolve() which kinds of expressions it may return.
25627         (Expression.Resolve): Added overloaded version of this method which
25628         takes a `ResolveFlags flags' argument.  This can be used to tell
25629         Resolve() which kinds of expressions it may return.  Reports a
25630         CS0118 on error.
25631         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25632         ResolveFlags.SimpleName.
25633         (Expression.Error118): Added overloaded version of this method which
25634         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25635         which kinds of expressions are allowed.
25636
25637         * expression.cs (Argument.ResolveMethodGroup): New public method.
25638         Resolves an argument, but allows a MethodGroup to be returned.
25639         This is used when invoking a delegate.
25640
25641         * TODO: Updated a bit.
25642
25643 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25644
25645         Fixed compilation with csc.
25646
25647         * ecore.cs: Expression.Error made public. Is this correct? Should
25648         Warning be made public too?
25649
25650         * expression.cs: use ea.Location instead of ea.loc.
25651         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25652
25653 2002-08-06  Martin Baulig  <martin@gnome.org>
25654
25655         * ecore.cs (Expression.loc): Moved the location here instead of
25656         duplicating it in all derived classes.
25657         (Expression.Location): New public property.
25658         (Expression.Error, Expression.Warning): Made them non-static and
25659         removed the location argument.
25660         (Expression.Warning): Added overloaded version which takes an
25661         `int level' argument.
25662         (Expression.Error118): Make this non-static and removed the
25663         expression and location arguments.
25664         (TypeExpr): Added location argument to the constructor.
25665
25666         * expression.cs (StaticCallExpr): Added location argument to
25667         the constructor.
25668         (Indirection, PointerArithmetic): Likewise.
25669         (CheckedExpr, UnCheckedExpr): Likewise.
25670         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25671         (StringPtr): Likewise.
25672
25673
25674 2002-08-05  Martin Baulig  <martin@gnome.org>
25675
25676         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25677
25678         * assign.cs (Assign.DoResolve): Check whether the source
25679         expression is a value or variable.
25680
25681         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25682         while resolving the corresponding blocks.
25683
25684         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25685         an error, don't silently return null.
25686
25687         * statement.cs (Block.AddVariable): Do the error reporting here
25688         and distinguish between CS0128 and CS0136.
25689         (Block.DoResolve): Report all unused labels (warning CS0164).
25690         (LabeledStatement): Pass the location to the constructor.
25691         (LabeledStatement.HasBeenReferenced): New property.
25692         (LabeledStatement.Resolve): Set it to true here.
25693
25694         * statement.cs (Return.Emit): Return success even after reporting
25695         a type mismatch error (CS0126 or CS0127), this is what csc does and
25696         it avoids confusing the users with any consecutive errors.
25697
25698 2002-08-05  Martin Baulig  <martin@gnome.org>
25699
25700         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25701
25702         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25703
25704         * expression.cs (MemberAccess.DoResolve): Silently return if an
25705         error has already been reported.
25706
25707         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25708         error has already been reported.
25709
25710 2002-08-05  Martin Baulig  <martin@gnome.org>
25711
25712         * statement.cs (UsageVector): Only initialize the `parameters'
25713         vector if we actually have any "out" parameters.
25714
25715 2002-08-05  Martin Baulig  <martin@gnome.org>
25716
25717         * expression.cs (Binary.ResolveOperator): When combining delegates,
25718         they must have the same type.
25719
25720 2002-08-05  Martin Baulig  <martin@gnome.org>
25721
25722         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25723         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25724         work with the ms runtime and we also don't need it: if we're a
25725         PropertyBuilder and not in the `indexer_arguments' hash, then we
25726         are a property and not an indexer.
25727
25728         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25729         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25730         since the latter one doesn't work with the ms runtime.
25731
25732 2002-08-03  Martin Baulig  <martin@gnome.org>
25733
25734         Fixed bugs #27998 and #22735.
25735
25736         * class.cs (Method.IsOperator): New public field.
25737         (Method.CheckBase): Report CS0111 if there's already a method
25738         with the same parameters in the current class.  Report CS0508 when
25739         attempting to change the return type of an inherited method.
25740         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25741         and it's not marked abstract or extern.
25742         (PropertyBase): New abstract base class for Property and Indexer.
25743         (PropertyBase.CheckBase): Moved here from Property and made it work
25744         for indexers.
25745         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25746         the same so we can reuse it there.
25747         (Property, Indexer): Derive from PropertyBase.
25748         (MethodSignature.inheritable_property_signature_filter): New delegate
25749         to find properties and indexers.
25750
25751         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25752         argument and improved error reporting.
25753
25754         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25755         EmptyReadOnlyParameters and made it a property.
25756
25757         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25758         version of this method which takes a `PropertyInfo indexer'.
25759         (TypeManager.RegisterIndexer): New method.
25760
25761         * class.cs: Added myself as author of this file :-)
25762
25763 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25764
25765         * class.cs: fixed compilation on windoze.
25766
25767 2002-08-03  Martin Baulig  <martin@gnome.org>
25768
25769         * interface.cs (Interface.GetInterfaceBases): Check whether all
25770         base interfaces are at least as accessible than the current one.
25771
25772         * class.cs (TypeContainer.GetClassBases): Check whether base types
25773         are at least as accessible than the current type.
25774         (TypeContainer.AsAccessible): Implemented and made non-static.
25775         (MemberBase.CheckParameters): Report errors if the accessibility
25776         checks fail.
25777
25778         * delegate.cs (Delegate.Delegate): The default visibility is
25779         internal for top-level types and private for nested types.
25780         (Delegate.Define): Report errors if the accessibility checks fail.
25781
25782         * enum.cs (Enum.Enum): The default visibility is internal for
25783         top-level types and private for nested types.
25784         (Enum.DefineType): Compute the correct visibility.
25785
25786         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25787         function which takes a `bool is_toplevel' instead of a TypeContainer.
25788
25789         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25790         builtin type.
25791
25792 2002-08-02  Martin Baulig  <martin@gnome.org>
25793
25794         * expression.cs (LocalVariableReferenc): Added constructor which
25795         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25796         (LocalVariableReference.IsReadOnly): New property.
25797         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25798         variable is readonly, use our own readonly flag to do this; you can
25799         use the new constructor to get a writable reference to a read-only
25800         variable.
25801
25802         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25803         reference to the local variable.
25804
25805 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25806
25807         * rootcontext.cs (ResolveCore): Also include System.Exception
25808
25809         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25810         we reach an EmptyStatement.
25811
25812         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25813         is also fine.
25814
25815         * expression.cs (Binary.ResolveOperator): Check error result in
25816         two places.
25817
25818         use brtrue/brfalse directly and avoid compares to null.
25819
25820 2002-08-02  Martin Baulig  <martin@gnome.org>
25821
25822         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25823         Fixes bug #28407, added test-155.cs.
25824
25825 2002-08-01  Martin Baulig  <martin@gnome.org>
25826
25827         * class.cs (Event.EmitDefaultMethod): Make this work with static
25828         events.  Fixes #28311, added verify-3.cs.
25829
25830 2002-08-01  Martin Baulig  <martin@gnome.org>
25831
25832         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25833         `is_disposable' fields.
25834         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25835         `hm.is_disposable' if we're using the collection pattern.
25836         (Foreach.EmitCollectionForeach): Use the correct type for the
25837         enumerator's local variable, only emit the try/finally block if
25838         necessary (fixes #27713).
25839
25840 2002-08-01  Martin Baulig  <martin@gnome.org>
25841
25842         * ecore.cs (Expression.report118): Renamed to Error118 and made
25843         it public static.
25844
25845         * statement.cs (Throw.Resolve): Check whether the expression is of
25846         the correct type (CS0118) and whether the type derives from
25847         System.Exception (CS0155).
25848         (Catch.Resolve): New method.  Do the type lookup here and check
25849         whether it derives from System.Exception (CS0155).
25850         (Catch.CatchType, Catch.IsGeneral): New public properties.
25851
25852         * typemanager.cs (TypeManager.exception_type): Added.
25853
25854 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25855
25856         * driver.cs: Updated About function.
25857
25858 2002-07-31  Martin Baulig  <martin@gnome.org>
25859
25860         Implemented Control Flow Analysis.
25861
25862         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25863         (EmitContext.CurrentBranching): Added.
25864         (EmitContext.StartFlowBranching): Added.
25865         (EmitContext.EndFlowBranching): Added.
25866         (EmitContext.KillFlowBranching): Added.
25867         (EmitContext.IsVariableAssigned): Added.
25868         (EmitContext.SetVariableAssigned): Added.
25869         (EmitContext.IsParameterAssigned): Added.
25870         (EmitContext.SetParameterAssigned): Added.
25871         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25872         Added control flow analysis stuff here.
25873
25874         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25875         resolve the expression as lvalue.
25876         (LocalVariableReference.DoResolve): Check whether the variable has
25877         already been assigned.
25878         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25879         the parameter as assigned here.
25880         (ParameterReference.DoResolve): Check whether the parameter has already
25881         been assigned.
25882         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25883         expression as lvalue.
25884
25885         * statement.cs (FlowBranching): New class for the flow analysis code.
25886         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25887         (LabeledStatement.IsDefined): New public property.
25888         (LabeledStatement.AddUsageVector): New public method to tell flow
25889         analyis that the label may be reached via a forward jump.
25890         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25891         flow analysis.
25892         (VariableInfo.Number): New public field.  This is used by flow analysis
25893         to number all locals of a block.
25894         (Block.CountVariables): New public property.  This is the number of
25895         local variables in this block (including the locals from all parent
25896         blocks).
25897         (Block.EmitMeta): Number all the variables.
25898
25899         * statement.cs: Added flow analysis support to all classes.
25900
25901 2002-07-31  Martin Baulig  <martin@gnome.org>
25902
25903         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25904         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25905         then use this argument.
25906
25907         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25908
25909         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25910         use this to specify /define options.
25911
25912 2002-07-29  Martin Baulig  <martin@gnome.org>
25913
25914         * statement.cs (Fixed): Moved all code that does variable lookups
25915         and resolvings from Emit to Resolve.
25916
25917         * statement.cs (For): Moved all code that does variable lookups
25918         and resolvings from Emit to Resolve.
25919
25920         * statement.cs (Using): Moved all code that does variable lookups
25921         and resolvings from Emit to Resolve.
25922
25923 2002-07-29  Martin Baulig  <martin@gnome.org>
25924
25925         * attribute.cs (Attribute.Resolve): Explicitly catch a
25926         System.NullReferenceException when creating the
25927         CustromAttributeBuilder and report a different warning message.
25928
25929 2002-07-29  Martin Baulig  <martin@gnome.org>
25930
25931         * support.cs (ParameterData.ParameterName): Added method to
25932         get the name of a parameter.
25933
25934         * typemanager.cs (TypeManager.IsValueType): New public method.
25935
25936 2002-07-29  Martin Baulig  <martin@gnome.org>
25937
25938         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25939         is a flag which specifies that it's either ref or out.
25940         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25941         the out parameter to `out Parameter.Modifier mod', also set the
25942         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25943
25944         * support.cs (InternalParameters.ParameterModifier): Distinguish
25945         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25946         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25947
25948         * expression.cs (Argument.GetParameterModifier): Distinguish
25949         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25950         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25951
25952 2002-07-29  Martin Baulig  <martin@gnome.org>
25953
25954         * expression.cs (ParameterReference.ParameterReference): Added
25955         `Location loc' argument to the constructor.
25956
25957         * cs-parser.jay: Pass location to ParameterReference.
25958
25959 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25960
25961         * statement.cs (Try): Initialize the location.
25962
25963         * cs-parser.jay: pass location to Try.
25964
25965         * expression.cs (Unary.Reduce): Change the prototype to return
25966         whether a constant fold could be performed or not.  The result is
25967         returned in an out parameters.  In the case of Indirection and
25968         AddressOf, we want to perform the full tests.
25969
25970 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25971
25972         * statement.cs (Statement.Emit): Flag dead code.
25973
25974 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25975
25976         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25977
25978 2002-07-27  Martin Baulig  <martin@gnome.org>
25979
25980         * class.cs (MethodData.Define): Put back call to
25981         TypeManager.AddMethod(), accidentally commented this out.
25982
25983         * report.cs (Debug): New public method to print debugging information,
25984         this is `[Conditional ("DEBUG")]'.
25985
25986 2002-07-26  Martin Baulig  <martin@gnome.org>
25987
25988         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25989         (switch_statement): Push the current_block to the switch_stack and
25990         pop it again when we're done with the switch.
25991         (switch_section): The new block is a child of the current_block.
25992         Fixes bug #24007, added test-152.cs.
25993
25994 2002-07-27  Martin Baulig  <martin@gnome.org>
25995
25996         * expression.cs (Invocation.EmitArguments): When calling a varargs
25997         function with only its fixed arguments, we need to pass an empty
25998         array.
25999
26000 2002-07-27  Martin Baulig  <martin@gnome.org>
26001
26002         Mono 0.13 has been released.
26003
26004 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
26005
26006         * driver.cs: Rename --resource to --linkres, because that is what
26007         we do currently, we dont support --resource yet.
26008
26009         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
26010
26011 2002-07-25  Martin Baulig  <martin@gnome.org>
26012
26013         * class.cs (MethodData): New public class.  This is a `method builder'
26014         class for a method or one accessor of a Property/Indexer/Event.
26015         (MethodData.GetMethodFlags): Moved here from MemberBase.
26016         (MethodData.ApplyAttributes): Likewise.
26017         (MethodData.ApplyObsoleteAttribute): Likewise.
26018         (MethodData.ApplyConditionalAttribute): Likewise.
26019         (MethodData.ApplyDllImportAttribute): Likewise.
26020         (MethodData.CheckAbstractAndExternal): Likewise.
26021         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
26022         (MethodData.Emit): Formerly known as Method.Emit().
26023         (MemberBase): Moved everything which was specific to a single
26024         accessor/method to MethodData.
26025         (Method): Create a new MethodData and call Define() and Emit() on it.
26026         (Property, Indexer, Event): Create a new MethodData objects for each
26027         accessor and call Define() and Emit() on them.
26028
26029 2002-07-25  Martin Baulig  <martin@gnome.org>
26030
26031         Made MethodCore derive from MemberBase to reuse the code from there.
26032         MemberBase now also checks for attributes.
26033
26034         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
26035         (MemberBase.GetMethodFlags): Moved here from class Method and marked
26036         as virtual.
26037         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
26038         `CallingConventions cc' and `Attributes opt_attrs' arguments.
26039         (MemberBase.ApplyAttributes): New virtual method; applies the
26040         attributes to a method or accessor.
26041         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
26042         (MemberBase.ApplyConditionalAttribute): Likewise.
26043         (MemberBase.ApplyDllImportAttribute): Likewise.
26044         (MemberBase.CheckAbstractAndExternal): Likewise.
26045         (MethodCore.ParameterTypes): This is now a property instead of a
26046         method, it's initialized from DoDefineParameters().
26047         (MethodCore.ParameterInfo): Removed the set accessor.
26048         (MethodCore.DoDefineParameters): New protected virtual method to
26049         initialize ParameterTypes and ParameterInfo.
26050         (Method.GetReturnType): We can now simply return the MemberType.
26051         (Method.GetMethodFlags): Override the MemberBase version and add
26052         the conditional flags.
26053         (Method.CheckBase): Moved some code from Define() here, call
26054         DoDefineParameters() here.
26055         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
26056         here to avoid some larger code duplication.
26057         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
26058         ensure that abstract and external accessors don't declare a body.
26059
26060         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
26061         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
26062         lookup in the attribute's parent classes, so we need to abort as soon
26063         as we found the first match.
26064         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
26065         the attribute has no arguments.
26066
26067         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
26068         of a Method.
26069
26070 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26071
26072         * cs-parser.jay: reverted previous patch.
26073
26074 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26075
26076         * cs-parser.jay: fixed bug #22119.
26077
26078 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26079
26080         * attribute.cs: fixed compilation. The error was:
26081         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
26082         be assigned to before control leaves the current method."
26083         [FIXME:  Filed as bug #28186: MCS must report this error.]
26084
26085 2002-07-25  Martin Baulig  <martin@gnome.org>
26086
26087         * attribute.cs (Attribute.Conditional_GetConditionName): New static
26088         method to pull the condition name ouf of a Conditional attribute.
26089         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
26090         the obsolete message and error flag out of an Obsolete attribute.
26091
26092         * class.cs (Method.GetMethodFlags): New public method to get the
26093         TypeManager.MethodFlags for this method.
26094         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
26095         private methods.
26096         (Method.Define): Get and apply the Obsolete and Conditional attributes;
26097         if we're overriding a virtual function, set the new private variable
26098         `parent_method'; call the new TypeManager.AddMethod().
26099
26100         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
26101         the MethodBuilder and the Method in a PtrHashtable.
26102         (TypeManager.builder_to_method): Added for this purpose.
26103         (TypeManager.MethodFlags): Added IsObsoleteError.
26104         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
26105         Obsolete and Conditional arguments in MethodBuilders.  If we discover
26106         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
26107         the message from the attribute.
26108
26109 2002-07-24  Martin Baulig  <martin@gnome.org>
26110
26111         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
26112         preprocessor directives, ensure that the argument to #define/#undef is
26113         exactly one identifier and that it's actually an identifier.
26114
26115         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
26116         did not work ....
26117
26118 2002-07-24  Martin Baulig  <martin@gnome.org>
26119
26120         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
26121         initialize it to TypeManager.object_type in the constructor.
26122         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
26123         of the `hm.get_current' method if we're using the collection pattern.
26124         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
26125         for the explicit conversion to make it work when we're using the collection
26126         pattern and the `Current' property has a different return type than `object'.
26127         Fixes #27713.
26128
26129 2002-07-24  Martin Baulig  <martin@gnome.org>
26130
26131         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
26132         does not match, but don't report any errors.  This method is called in
26133         order for all methods in a MethodGroupExpr until a matching method is
26134         found, so we don't want to bail out if the first method doesn't match.
26135         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
26136         matches, report the 123.  Fixes #28070.
26137
26138 2002-07-24  Martin Baulig  <martin@gnome.org>
26139
26140         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
26141         TypeManager.TypeToCoreType() to the top of the method so the
26142         following equality checks will work.  Fixes #28107.
26143
26144 2002-07-24  Martin Baulig  <martin@gnome.org>
26145
26146         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
26147         operand is of type uint, and the other operand is of type sbyte,
26148         short or int, the operands are converted to type long." -
26149         Actually do what this comment already told us.  Fixes bug #28106,
26150         added test-150.cs.
26151
26152 2002-07-24  Martin Baulig  <martin@gnome.org>
26153
26154         * class.cs (MethodBase): New abstract class.  This is now a base
26155         class for Property, Indexer and Event to avoid some code duplication
26156         in their Define() and DefineMethods() methods.
26157         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
26158         generic methods for Define() and DefineMethods().
26159         (FieldBase): Derive from MemberBase, not MemberCore.
26160         (Property): Derive from MemberBase, not MemberCore.
26161         (Property.DefineMethod): Moved all the code from this method to the
26162         new MethodBase.DefineAccessor(), just call it with appropriate
26163         argumetnts.
26164         (Property.Define): Call the new Property.DoDefine(), this does some
26165         sanity checks and we don't need to duplicate the code everywhere.
26166         (Event): Derive from MemberBase, not MemberCore.
26167         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
26168         accessors, this will also make them work with interface events.
26169         (Indexer): Derive from MemberBase, not MemberCore.
26170         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
26171         (Indexer.Define): Use the new MethodBase functions.
26172
26173         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
26174         argument to the constructor.
26175         (Interface.FindMembers): Added support for interface events.
26176         (Interface.PopluateEvent): Implemented.
26177
26178         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
26179
26180 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
26181
26182         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
26183         but this is required to check for a method name being the same as
26184         the containing class.  
26185
26186         Handle this now.
26187
26188 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26189
26190         * interface.cs: initialize variable.
26191
26192 2002-07-23  Martin Baulig  <martin@gnome.org>
26193
26194         Implemented the IndexerName attribute in interfaces.
26195
26196         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
26197         name if this is an explicit interface implementation.
26198         (Indexer.InterfaceIndexerName): New public variable.  If we're
26199         implementing an interface indexer, this is the IndexerName in that
26200         interface.  Otherwise, it's the IndexerName.
26201         (Indexer.DefineMethod): If we're implementing interface indexer,
26202         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
26203         and Pending.ImplementIndexer methods.
26204         (Indexer.Define): Also define the PropertyBuilder if we're
26205         implementing an interface indexer and this is neither an explicit
26206         interface implementation nor do the IndexerName match the one in
26207         the interface.
26208
26209         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
26210         If a method is defined here, then we always need to create a proxy
26211         for it.  This is used when implementing interface indexers.
26212         (Pending.IsInterfaceIndexer): New public method.
26213         (Pending.ImplementIndexer): New public method.
26214         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
26215         This is used when implementing interface indexers to define a proxy
26216         if necessary.
26217         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
26218         define a proxy if necessary.
26219
26220         * interface.cs (Interface.IndexerName): New public variable.
26221         (Interface.PopulateIndexer): Set the IndexerName.
26222         (Interface.DefineIndexers): New private method.  Populate all the
26223         indexers and make sure their IndexerNames match.
26224
26225         * typemanager.cs (IndexerPropertyName): Added support for interface
26226         indexers.
26227
26228 2002-07-22  Martin Baulig  <martin@gnome.org>
26229
26230         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
26231         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
26232         ret if HasReturnLabel.
26233         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
26234         variables.
26235
26236         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
26237         and set the ec.LoopBeginTryCatchLevel.
26238         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
26239         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
26240         the current ec.TryCatchLevel, the branch goes out of an exception
26241         block.  In this case, we need to use Leave and not Br.
26242
26243 2002-07-22  Martin Baulig  <martin@gnome.org>
26244
26245         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
26246         block unless the block does not always return or it is contained in
26247         another try { ... } catch { ... } block.  Fixes bug #26506.
26248         Added verify-1.cs to the test suite.
26249
26250 2002-07-22  Martin Baulig  <martin@gnome.org>
26251
26252         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
26253         then we do not always return.  Fixes bug #24985.
26254
26255 2002-07-22  Martin Baulig  <martin@gnome.org>
26256
26257         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
26258         lookup on a per-class level; ie. walk up the class hierarchy until we
26259         found at least one applicable method, then choose the best among them.
26260         Fixes bug #24463 and test-29.cs.
26261
26262 2002-07-22  Martin Baulig  <martin@gnome.org>
26263
26264         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
26265         return types of the methods.  The return type is not part of the
26266         signature and we must not check it to make the `new' modifier work.
26267         Fixes bug #27999, also added test-147.cs.
26268         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
26269
26270         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
26271         on the method's return type.
26272
26273 2002-07-21  Martin Baulig  <martin@gnome.org>
26274
26275         * assign.cs: Make this work if the rightmost source is a constant and
26276         we need to do an implicit type conversion.  Also adding a few more tests
26277         to test-38.cs which should have caught this.
26278
26279         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
26280         target in the makefile for this.  The makefile.gnu is primarily intended
26281         for end-users who don't want to debug the compiler.
26282
26283 2002-07-21  Martin Baulig  <martin@gnome.org>
26284
26285         * assign.cs: Improved the Assign class so it can now handle embedded
26286         assignments (X = Y = Z = something).  As a side-effect this'll now also
26287         consume less local variables.  test-38.cs now passes with MCS, added
26288         a few new test cases to that test.
26289
26290 2002-07-20  Martin Baulig  <martin@gnome.org>
26291
26292         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
26293         instructions.  Fixes bug #27977, also added test-146.cs.
26294
26295 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26296
26297         * cs-tokenizer.cs: fixed getHex ().
26298
26299 2002-07-19  Martin Baulig  <martin@gnome.org>
26300
26301         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
26302         not Type.GetType() to lookup the array type.  This is needed when
26303         we're constructing an array of a user-defined type.
26304         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
26305         single-dimensional arrays, but also for single-dimensial arrays of
26306         type decimal.
26307
26308 2002-07-19  Martin Baulig  <martin@gnome.org>
26309
26310         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
26311         this function is called, it's not allowed to share LocalBuilders
26312         among ILGenerators.
26313
26314 2002-07-19  Martin Baulig  <martin@gnome.org>
26315
26316         * expression.cs (Argument.Resolve): Report an error 118 when trying
26317         to pass a type as argument.
26318
26319 2002-07-18  Martin Baulig  <martin@gnome.org>
26320
26321         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
26322         Conv_R_Un for the signed `long' type.
26323
26324 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
26325
26326         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
26327         `expr' for the temporary result, as that will fail if we do
26328         multiple resolves on the same expression.
26329
26330 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
26331
26332         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
26333         ec.TypeContainer for looking up aliases. 
26334
26335         * class.cs (TypeContainer): Remove LookupAlias from here.
26336
26337         * decl.cs (DeclSpace); Move here.
26338
26339 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
26340
26341         * class.cs (FindMembers): Only call filter if the constructor
26342         bulider is not null.
26343
26344         Also handle delegates in `NestedTypes' now.  Now we will perform
26345         type lookups using the standard resolution process.  This also
26346         fixes a bug.
26347
26348         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
26349         This uses Expressions (the limited kind that can be parsed by the
26350         tree) instead of strings.
26351
26352         * expression.cs (ComposedCast.ToString): Implement, used to flag
26353         errors since now we have to render expressions.
26354
26355         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
26356         FormArrayType. 
26357
26358         * ecore.cs (SimpleName.ToString): ditto.
26359
26360         * cs-parser.jay: Instead of using strings to assemble types, use
26361         Expressions to assemble the type (using SimpleName, ComposedCast,
26362         MemberAccess).  This should fix the type lookups in declarations,
26363         because we were using a different code path for this.
26364
26365         * statement.cs (Block.Resolve): Continue processing statements
26366         even when there is an error.
26367
26368 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
26369
26370         * class.cs (Event.Define): Also remove the `remove' method from
26371         the list of pending items.
26372
26373         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
26374         generate more compact code. 
26375
26376 2002-07-17  Martin Baulig  <martin@gnome.org>
26377
26378         * const.cs (Const.LookupConstantValue): Add support for constant
26379         `unchecked' and `checked' expressions.
26380         Also adding test case test-140.cs for this.
26381
26382 2002-07-17  Martin Baulig  <martin@gnome.org>
26383
26384         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
26385         check whether mi.ReturnType implements the IEnumerator interface; the
26386         `==' and the IsAssignableFrom() will fail in this situation.
26387
26388 2002-07-16  Ravi Pratap  <ravi@ximian.com>
26389
26390         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
26391         here too.
26392
26393 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26394
26395         * expression.cs: fixed bug #27811.
26396
26397 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
26398
26399         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
26400         Molaro: when we are a ref, the value already contains a pointer
26401         value, do not take the address of it.
26402
26403 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
26404         * removed mb-parser.jay and mb-tokenizer.cs
26405
26406 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26407
26408         * expression.cs: check against the building corlib void type.
26409
26410 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26411
26412         * ecore.cs: fix for valuetype static readonly fields: when 
26413         initializing them, we need their address, not the address of a copy.
26414
26415 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26416
26417         * typemanager.cs: register also enum_type in corlib.
26418
26419 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26420
26421         * class.cs: allow calling this (but not base) initializers in structs.
26422
26423 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26424
26425         * ecore.cs: make sure we compare against the building base types
26426         in GetTypeSize ().
26427
26428 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26429
26430         * typemanager.cs: fix TypeToCoreType() to handle void and object
26431         (corlib gets no more typerefs after this change).
26432
26433 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26434
26435         * expression.cs (ArrayCreation.EmitArrayArguments): use
26436         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26437
26438         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26439         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26440         array indexes, the runtime actually forbids them.
26441
26442         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26443         for array arguments here.
26444
26445         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26446         instead of the default for ValueTypes.
26447
26448         (New.DoEmit): Use IsValueType instead of
26449         IsSubclassOf (value_type)
26450         (New.DoResolve): ditto.
26451         (Invocation.EmitCall): ditto.
26452
26453         * assign.cs (Assign): ditto.
26454
26455         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26456         Statements *are* currently doing part of their resolution during
26457         Emit.  
26458
26459         Expressions do always resolve during resolve, but statements are
26460         only required to propagate resolution to their children.
26461
26462 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26463
26464         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26465
26466         (LoadAssembly): Do not add the dll if it is already specified
26467
26468         (MainDriver): Add the System directory to the link path at the end,
26469         after all the other -L arguments. 
26470
26471         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26472         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26473         ldelem.u1) and using the opposite for sbytes.
26474
26475         This fixes Digger, and we can finally run it.
26476
26477         * driver.cs (UnixParseOption): Move the option parsing here.  
26478         (CSCParseOption): Implement CSC-like parsing of options.
26479
26480         We now support both modes of operation, the old Unix way, and the
26481         new CSC-like way.  This should help those who wanted to make cross
26482         platform makefiles.
26483
26484         The only thing broken is that /r:, /reference: and /lib: are not
26485         implemented, because I want to make those have the same semantics
26486         as the CSC compiler has, and kill once and for all the confussion
26487         around this.   Will be doing this tomorrow.
26488
26489         * statement.cs (Unsafe.Resolve): The state is checked during
26490         resolve, not emit, so we have to set the flags for IsUnsfe here.
26491
26492 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26493
26494         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26495         not catch the Error_ObjectRefRequired in SimpleName (as it is
26496         possible to have a class/instance variable name that later gets
26497         deambiguated), we have to check this here.      
26498
26499 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26500
26501         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26502         make static and put into Expression.
26503
26504         (Event.Define): Register the private field of the event with the 
26505         TypeManager so that GetFieldFromEvent can get at it.
26506
26507         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26508         keep track of the private field associated with an event which
26509         has no accessors.
26510
26511         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26512         private field.
26513
26514         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26515
26516 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26517
26518         * expression.cs (Binary.EmitBranchable): this routine emits the
26519         Binary expression in a branchable context.  This basically means:
26520         we need to branch somewhere, not just get the value on the stack.
26521
26522         This works together with Statement.EmitBoolExpression.
26523
26524         * statement.cs (Statement.EmitBoolExpression): Use
26525         EmitBranchable. 
26526
26527 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26528
26529         * statement.cs (For): Reduce the number of jumps in loops.
26530
26531         (For): Implement loop inversion for the For statement.
26532
26533         (Break): We can be breaking out of a Try/Catch controlled section
26534         (foreach might have an implicit try/catch clause), so we need to
26535         use Leave instead of Br.
26536
26537         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26538         now).  If the instace expression supports IMemoryLocation, we use
26539         the AddressOf method from the IMemoryLocation to extract the
26540         address instead of emitting the instance.
26541
26542         This showed up with `This', as we were emitting the instance
26543         always (Emit) instead of the Address of This.  Particularly
26544         interesting when This is a value type, as we dont want the Emit
26545         effect (which was to load the object).
26546
26547 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26548
26549         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26550
26551         * statement.cs (Checked): Set the CheckedState during the resolve
26552         process too, as the ConvCast operations track the checked state on
26553         the resolve process, and not emit.
26554
26555         * cs-parser.jay (namespace_member_declaration): Flag that we have
26556         found a declaration when we do.  This is used to flag error 1529
26557
26558         * driver.cs: Report ok when we display the help only.
26559
26560 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26561
26562         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26563
26564 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26565
26566         * cs-tokenizer.cs (define): We also have to track locally the
26567         defines.  AllDefines is just used for the Conditional Attribute,
26568         but we also need the local defines for the current source code. 
26569
26570 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26571
26572         * statement.cs (While, For, Do): These loops can exit through a
26573         Break statement, use this information to tell whether the
26574         statement is the last piece of code.
26575
26576         (Break): Flag that we break.
26577
26578         * codegen.cs (EmitContexts): New `Breaks' state variable.
26579
26580 2002-07-03  Martin Baulig  <martin@gnome.org>
26581
26582         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26583         modifiers in method declarations in structs.  Otherwise, you won't
26584         be able to override things like Object.Equals().
26585
26586 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26587
26588         * class.cs (Method, Property, Indexer): Do not allow the public
26589         modifier to be used in explicit interface implementations.
26590
26591         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26592         override modifiers in method declarations in structs
26593
26594 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26595
26596         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26597         integer or real overflow, report an error
26598
26599 2002-07-02  Martin Baulig  <martin@gnome.org>
26600
26601         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26602         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26603         to tell the runtime about our newly created System.Object and
26604         System.ValueType types.
26605
26606 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26607
26608         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26609         struct instead of Ldarg/Starg.
26610
26611 2002-07-02  Martin Baulig  <martin@gnome.org>
26612
26613         * expression.cs (Indirection.Indirection): Call
26614         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26615
26616 2002-07-02  Martin Baulig  <martin@gnome.org>
26617
26618         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26619         ValueType, call TypeManager.TypeToCoreType() on it.
26620         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26621         the OpCodes.Newarr argument.
26622
26623 2002-07-02  Martin Baulig  <martin@gnome.org>
26624
26625         * expression.cs (Invocation.EmitCall): When compiling corlib,
26626         replace all calls to the system's System.Array type to calls to
26627         the newly created one.
26628
26629         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26630         System.Array methods.
26631         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26632         from the system's System.Array type which must be replaced.
26633
26634 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26635
26636         * typemanager.cs: load unverifiable_code_ctor so we can build
26637         corlib using the correct type. Avoid using GetTypeCode() with
26638         TypeBuilders.
26639         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26640         TypeManager.object_type to allow building corlib.
26641
26642 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26643
26644         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26645
26646 2002-07-01  Martin Baulig  <martin@gnome.org>
26647
26648         * class.cs: Make the last change actually work, we need to check
26649         whether `ifaces != null' to avoid a crash.
26650
26651 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26652
26653         * class.cs: when we build structs without fields that implement
26654         interfaces, we need to add the interfaces separately, since there is
26655         no API to both set the size and add the interfaces at type creation
26656         time.
26657
26658 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26659
26660         * expression.cs: the dimension arguments to the array constructors
26661         need to be converted if they are a long.
26662
26663 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26664
26665         * class.cs: don't emit ldarg.0 if there is no parent constructor
26666         (fixes showstopper for corlib).
26667
26668 2002-06-29  Martin Baulig  <martin@gnome.org>
26669
26670         MCS now compiles corlib on GNU/Linux :-)
26671
26672         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26673         ie. check for MethodImplOptions.InternalCall.
26674
26675         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26676         and TypeManager.attribute_type are null, so we must explicitly check
26677         whether parent is not null to find out whether it's an attribute type.
26678         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26679         and SetBuilder, not only if the property is neither abstract nor external.
26680         This is necessary to set the MethodImplOptions on the accessor methods.
26681         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26682         SetBuilder, see Property.Emit().
26683
26684         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26685         populate "System.Object", "System.ValueType" and "System.Attribute" since
26686         they've already been populated from BootCorlib_PopulateCoreTypes().
26687
26688 2002-06-29  Martin Baulig  <martin@gnome.org>
26689
26690         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26691         is the NullLiteral, we also need to make sure that target_type is not
26692         an enum type.   
26693
26694 2002-06-29  Martin Baulig  <martin@gnome.org>
26695
26696         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26697         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26698         before calling BootstrapCorlib_ResolveDelegate ().
26699
26700 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26701
26702         * statement.cs: fixed build-breaker. All tests passed ok.
26703
26704 2002-06-27  Martin Baulig  <martin@gnome.org>
26705
26706         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26707         for System.Decimal when compiling corlib.
26708
26709 2002-06-27  Martin Baulig  <martin@gnome.org>
26710
26711         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26712         switch blocks which contain nothing but a default clause.
26713
26714 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26715
26716        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26717
26718 2002-06-27  Martin Baulig  <martin@gnome.org>
26719
26720         * ecore.cs (PropertyExpr.PropertyExpr): Call
26721         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26722
26723         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26724         is already a TypeBuilder.
26725
26726 2002-06-27  Martin Baulig  <martin@gnome.org>
26727
26728         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26729         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26730         the "from an array-type to System.Array" case.  This makes it work
26731         when compiling corlib.
26732
26733 2002-06-27  Martin Baulig  <martin@gnome.org>
26734
26735         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26736         non-static PropertyExpr, set its InstanceExpression.  This makes
26737         the `ICollection.Count' property work in System/Array.cs.
26738
26739 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26740
26741         * driver.cs: Made error handling more consistent.  Errors now
26742         tracked by Report class, so many methods which used to return int
26743         now return void.  Main() now prints success/failure and 
26744         errors/warnings message.
26745
26746         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26747         the magic number return values (123 and 124).  Now, if the
26748         expected error occurs, the compiler exits with success (exit value
26749         0).  If the compilation completes without seeing that particular
26750         error, the compiler exits with failure (exit value 1).  The
26751         makefile in mcs/errors has been changed to handle the new behaviour.
26752
26753         * report.cs: Made 'expected error' number a property and renamed
26754         it from 'Probe' to 'ExpectedError'.
26755
26756         * genericparser.cs: Removed error handling support, since it is
26757         now all done by Report class.
26758
26759         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26760         class, so parse() no longer returns an int.
26761
26762         * namespace.cs: Use Report.Error instead of GenericParser.error
26763
26764 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26765
26766         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26767         TypeContainer.AddOperator): At the front of the list put the
26768         explicit implementations, so they get resolved/defined first. 
26769
26770 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26771
26772         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26773         interface type is implemented by this TypeContainer.  Used during
26774         explicit interface implementation.
26775
26776         (Property.Define, Indexer.Define, Method.Define): Validate that
26777         the given interface in the explicit implementation is one of the
26778         base classes for the containing type.
26779
26780         Also if we are explicitly implementing an interface, but there is
26781         no match in the pending implementation table, report an error.
26782
26783         (Property.Define): Only define the property if we are
26784         not explicitly implementing a property from an interface.  Use the
26785         correct name also for those properties (the same CSC uses,
26786         although that is really not needed).
26787
26788         (Property.Emit): Do not emit attributes for explicitly implemented
26789         properties, as there is no TypeBuilder.
26790
26791         (Indexer.Emit): ditto.
26792
26793         Hiding then means that we do not really *implement* a pending
26794         implementation, which makes code fail.
26795
26796 2002-06-22  Martin Baulig  <martin@gnome.org>
26797
26798         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26799         the return value of Object.GetType().  [FIXME: we need to do this whenever
26800         we get a type back from the reflection library].
26801
26802 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26803
26804         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26805
26806 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26807
26808         * attribute.cs: Return null if we can not look up the type.
26809
26810         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26811         the interface types found.
26812
26813         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26814         interface types found.
26815
26816         * typemanager.cs (GetInterfaces): Make this routine returns alll
26817         the interfaces and work around the lame differences between
26818         System.Type and System.Reflection.Emit.TypeBuilder in the results
26819         result for GetInterfaces.
26820
26821         (ExpandInterfaces): Given an array of interface types, expand and
26822         eliminate repeated ocurrences of an interface.  This expands in
26823         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26824         be IA, IB, IC.
26825
26826 2002-06-21  Martin Baulig  <martin@gnome.org>
26827
26828         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26829         on System.Enum.
26830
26831 2002-06-21  Martin Baulig  <martin@gnome.org>
26832
26833         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26834         and called with one of the core types, return the corresponding typebuilder for
26835         that type.
26836
26837         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26838         element type.
26839
26840 2002-06-21  Martin Baulig  <martin@gnome.org>
26841
26842         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26843         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26844         (Expression.ConvertReferenceExplicit): Likewise.
26845
26846         * expression.cs (ElementAccess.DoResolve): Likewise.
26847         (ElementAccess.DoResolveLValue): Likewise.
26848
26849 2002-06-10  Martin Baulig  <martin@gnome.org>
26850
26851         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26852         add the "value" parameter to the parameter list.
26853
26854         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26855         to our caller.
26856
26857 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26858
26859         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26860         the argument to an int, uint, long or ulong, per the spec.  Also
26861         catch negative constants in array creation.
26862
26863 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26864
26865         * class.cs: do not allow the same interface to appear twice in
26866         the definition list.
26867
26868 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26869
26870         * ecore.cs: don't use ldlen with System.Array.
26871
26872 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26873
26874         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26875
26876 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26877
26878         * modifiers.cs: produce correct field attributes for protected
26879         internal. Easy fix so miguel can work on ther harder stuff:-)
26880
26881 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26882
26883         * pending.cs: New file.  Move the code from class.cs here.
26884         Support clearning the pending flag for all methods (when not doing
26885         explicit interface implementation).
26886
26887 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26888
26889         * rootcontext.cs: added a couple more types needed to bootstrap.
26890
26891 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26892
26893         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26894         constructor in the type, instead of any constructor in the type
26895         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26896         a bug in the Mono runtime when applying the params attribute). 
26897
26898 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26899         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26900
26901 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26902
26903         * expression.cs (Unary.ResolveOperator): Use TypeManager
26904         to resolve the type.
26905
26906 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26907
26908         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26909         attached.
26910
26911         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26912         with each member too.
26913
26914         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26915         field builders too - this takes care of the enum member case.
26916
26917 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26918
26919         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26920         address-of operator on both value types and pointers.
26921
26922 2002-06-10  Martin Baulig  <martin@gnome.org>
26923
26924         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26925         PropertyBuilder to the `property_builders' list.
26926
26927         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26928         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26929         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26930         find any indexers which are inherited from an interface.
26931
26932 2002-06-09  Martin Baulig  <martin@gnome.org>
26933
26934         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26935         the same type as the constant if necessary.  There's also a test-130.cs
26936         for this.
26937
26938         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26939
26940         * typemanager.cs (TypeManager.ChangeType): Previously known as
26941         Enum.ChangeEnumType().
26942
26943 2002-06-09  Martin Baulig  <martin@gnome.org>
26944
26945         * expression.cs (Cast.TryReduce): Added support for consts.
26946
26947 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26948
26949         * class.cs (Accessor): Hold attributes information so we can pass
26950         it along.
26951
26952         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26953         Modify to pass in attributes attached to the methods.
26954
26955         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26956
26957         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26958         to handle the Accessor kind :-)
26959
26960         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26961
26962 2002-06-08  Martin Baulig  <martin@gnome.org>
26963
26964         * expression.cs (Unary.TryReduceNegative): Added support for
26965         ULongConstants.
26966
26967 2002-06-08  Martin Baulig  <martin@gnome.org>
26968
26969         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26970         name can't be found in the `defined_names' - the caller will do a
26971         MemberLookup in this case and thus find methods in System.Enum
26972         such as Enum.IsDefined().
26973
26974 2002-06-08  Martin Baulig  <martin@gnome.org>
26975
26976         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26977         Convert.ChangeType() which works with TypeBuilder created types.
26978         (Enum.LookupEnumValue, Enum.Define): Use it here.
26979
26980         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26981         `TypeBuilder.BaseType != null' check.
26982         (TypeContainer.FindMembers): Only lookup parent members if we
26983         actually have a parent.
26984         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26985         (ConstructorInitializer.Resolve): Likewise.
26986
26987         * interface.cs (Interface.FindMembers): Added
26988         `TypeBuilder.BaseType != null' check.
26989
26990         * rootcontext.cs (RootContext.ResolveCore): Added
26991         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26992         classes_second_stage.
26993
26994         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26995         debug_type and trace_type when compiling with --nostdlib.       
26996
26997 2002-06-07  Martin Baulig  <martin@gnome.org>
26998
26999         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
27000         (AddField): Set it to true when adding a non-static field.
27001         (DefineType): Use `have_nonstatic_fields' to find out whether we
27002         have non-static fields, not `Fields != null'.
27003
27004 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
27005
27006         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
27007         dereferencing a null on the static-field code path)
27008
27009 2002-05-30  Martin Baulig  <martin@gnome.org>
27010
27011         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
27012         to take command line arguments.  Use reflection to call the new
27013         custom `Initialize' function on the symbol writer and pass it the
27014         command line arguments.
27015
27016         * driver.cs (--debug-args): New command line argument to pass command
27017         line arguments to the symbol writer.
27018
27019 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
27020
27021         * assign.cs (DoResolve): Forgot to do the implicit conversion to
27022         the target type for indexers and properties.  Thanks to Joe for
27023         catching this.
27024
27025 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
27026
27027         * typemanager.cs (MethodFlags): returns the method flags
27028         (Obsolete/ShouldIgnore) that control warning emission and whether
27029         the invocation should be made, or ignored. 
27030
27031         * expression.cs (Invocation.Emit): Remove previous hack, we should
27032         not do this on matching a base type, we should do this based on an attribute
27033
27034         Only emit calls to System.Diagnostics.Debug and
27035         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
27036         on the command line.
27037
27038         * rootcontext.cs: Global settings for tracing and debugging.
27039
27040         * cs-tokenizer.cs (define): New utility function to track
27041         defines.   Set the global settings for TRACE and DEBUG if found.
27042
27043 2002-05-25  Ravi Pratap  <ravi@ximian.com>
27044
27045         * interface.cs (Populate*): Pass in the TypeContainer as well as
27046         the DeclSpace as parameters so that we can create EmitContexts and
27047         then use that to apply attributes etc.
27048
27049         (PopulateMethod, PopulateEvent, PopulateProperty)
27050         (PopulateIndexer): Apply attributes everywhere.
27051
27052         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
27053         etc.
27054
27055         (ApplyAttributes): Update accordingly.
27056
27057         We now apply interface attributes for all members too.
27058
27059 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
27060
27061         * class.cs (Indexer.Define); Correctly check if we are explicit
27062         implementation (instead of checking the Name for a ".", we
27063         directly look up if the InterfaceType was specified).
27064
27065         Delay the creation of the PropertyBuilder.
27066
27067         Only create the PropertyBuilder if we are not an explicit
27068         interface implementation.   This means that explicit interface
27069         implementation members do not participate in regular function
27070         lookups, and hence fixes another major ambiguity problem in
27071         overload resolution (that was the visible effect).
27072
27073         (DefineMethod): Return whether we are doing an interface
27074         implementation. 
27075
27076         * typemanager.cs: Temporary hack until we get attributes in
27077         interfaces (Ravi is working on that) and we get IndexerName
27078         support in interfaces.
27079
27080         * interface.cs: Register the indexers as properties.
27081
27082         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
27083         warning, I have verified that this is a bug in the .NET runtime
27084         (JavaScript suffers of the same problem).
27085
27086         * typemanager.cs (MemberLookup): When looking up members for
27087         interfaces, the parent of an interface is the implicit
27088         System.Object (so we succeed in searches of Object methods in an
27089         interface method invocation.  Example:  IEnumerable x;  x.ToString
27090         ()) 
27091
27092 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
27093
27094         * class.cs (Event): Events should also register if they do
27095         implement the methods that an interface requires.
27096
27097         * typemanager.cs (MemberLookup); use the new GetInterfaces
27098         method. 
27099
27100         (GetInterfaces): The code used to lookup interfaces for a type is
27101         used in more than one place, factor it here. 
27102
27103         * driver.cs: Track the errors at the bottom of the file, we kept
27104         on going.
27105
27106         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
27107         instance if the method we are calling is static!
27108
27109 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
27110
27111         * attribute.cs (ApplyAttributes): Make this function filter out
27112         the IndexerName attribute (as that attribute in reality is never
27113         applied) and return the string constant for the IndexerName
27114         attribute. 
27115
27116         * class.cs (TypeContainer.Emit): Validate that all the indexers
27117         have the same IndexerName attribute, and if so, set the
27118         DefaultName attribute on the class. 
27119
27120         * typemanager.cs: The return value might contain other stuff (not
27121         only methods).  For instance, consider a method with an "Item"
27122         property and an Item method.
27123
27124         * class.cs: If there is a problem with the parameter types,
27125         return. 
27126
27127 2002-05-24  Ravi Pratap  <ravi@ximian.com>
27128
27129         * ecore.cs (ImplicitConversionExists): Wrapper function which also
27130         looks at user defined conversion after making a call to 
27131         StandardConversionExists - we need this for overload resolution.
27132
27133         * expression.cs : Update accordingly the various method calls.
27134
27135         This fixes 2 bugs filed against implicit user defined conversions 
27136
27137 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
27138
27139         * statement.cs: Track the result of the assignment.
27140
27141 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
27142
27143         * expression.cs (MemberAccess): Improved error reporting for
27144         inaccessible members.
27145
27146 2002-05-22  Martin Baulig  <martin@gnome.org>
27147
27148         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
27149         itself with debugging support.
27150
27151 2002-05-22  Martin Baulig  <martin@gnome.org>
27152
27153         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
27154         Removed, this isn't needed anymore.
27155
27156 2002-05-20  Martin Baulig  <martin@gnome.org>
27157
27158         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
27159         be underlying type for an enum.
27160
27161 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
27162
27163         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
27164         that splits out the loading of just the core types.
27165
27166         * rootcontext.cs (ResolveCore): Split the struct resolution in
27167         two, so we can load the enumeration underlying types before any
27168         enums are used.
27169
27170         * expression.cs (Is): Bandaid until we fix properly Switch (see
27171         bug #24985 for details).
27172
27173         * typemanager.cs (ImplementsInterface): The hashtable will contain
27174         a null if there are no interfaces implemented.
27175
27176 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
27177
27178         * cs-parser.jay (indexer_declarator): It is fine to have array
27179         parameters
27180
27181 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
27182
27183         * typemanager.cs: (RegisterBuilder): New function used to register
27184         TypeBuilders that implement interfaces.  Since
27185         TypeBuilder.GetInterfaces (as usual) does not work with lame
27186         Reflection.Emit. 
27187         (AddUserType): register interfaces.
27188
27189         (ImplementsInterface): Use the builder_to_ifaces hash if we are
27190         dealing with TypeBuilder.  Also, arrays are showing up as
27191         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
27192         methods can not be invoked on them!
27193
27194         * ecore.cs (ExplicitReferenceConversionExists): Made public.
27195         (ImplicitReferenceConversionExists): Split out from
27196         StandardConversionExists. 
27197
27198         * expression.cs (As): We were only implementing one of the three
27199         cases for the as operator.  We now implement them all.
27200         (Is): Implement the various other cases for Is as well.
27201
27202         * typemanager.cs (CACHE): New define used to control if we want or
27203         not the FindMembers cache.  Seems to have a negative impact on
27204         performance currently
27205
27206         (MemberLookup): Nested types have full acess to
27207         enclosing type members
27208
27209         Remove code that coped with instance/static returns for events, we
27210         now catch this in RealFindMembers.
27211
27212         (RealFindMembers): only perform static lookup if the instance
27213         lookup did not return a type or an event.  
27214
27215 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
27216
27217         * assign.cs (CompoundAssign): We pass more semantic information
27218         now to Compound Assignments than we did before: now we have all
27219         the information at hand, and now we resolve the target *before* we
27220         do the expression expansion, which allows the "CacheValue" method
27221         to have the effect we intended (before, a [x] += 1 would generate
27222         two differen ArrayAccess expressions from the ElementAccess,
27223         during the resolution process).
27224
27225         (CompoundAssign.DoResolve): Resolve target and original_source here.
27226
27227 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
27228
27229         * expression.cs (ArrayAccess): dropped debugging information. 
27230
27231         * typemanager.cs: Small bug fix: I was always returning i_members,
27232         instead of one of i_members or s_members (depending on which had
27233         the content).
27234
27235         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
27236         method is invoked before any code generation takes place, and it
27237         is a mechanism to inform that the expression will be invoked more
27238         than once, and that the method should use temporary values to
27239         avoid having side effects
27240
27241         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
27242
27243         * ecore.cs (Expression.CacheTemporaries): Provide empty default
27244         implementation.
27245
27246         * expression.cs (Indirection, ArrayAccess): Add support for
27247         CacheTemporaries in these two bad boys. 
27248
27249         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
27250         ldobj or ldind_ref.  
27251         (StoreFromPtr): Handle stobj as well.
27252
27253         * expression.cs (UnaryMutator): Share more code.
27254
27255         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
27256         down: I was not tracking the Filter function as well, which
27257         was affecting the results of the cache.
27258
27259 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
27260
27261         * attribute.cs: Remove the hack to handle the CharSet property on
27262         StructLayouts. 
27263
27264 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
27265
27266         * attribute.cs (DoResolve): More uglyness, we now only try to
27267         resolve the attribute partially, to extract the CharSet
27268         information (only if we are a StructLayout attribute).  Otherwise 
27269
27270         (GetExtraTypeInfo): Add some code to conditionally kill in the
27271         future this.   I am more and more convinced that the .NET
27272         framework has special code to handle the attribute setting on
27273         certain elements.
27274
27275         * expression.cs (IsParamsMethodApplicable): Revert my previous
27276         foreach change here, it was wrong.
27277
27278 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
27279
27280         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
27281         (pp_expr): do not abort on unknown input, just return.
27282         (eval): abort if there are pending chars.
27283
27284         * attribute.cs (Attribute.Resolve): Positional parameters are
27285         optional.  Deal with that case.
27286
27287         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
27288         the Ansi/Unicode/Auto information for the type.
27289
27290         (TypeContainer.DefineType): instantiate the EmitContext here, as
27291         we will be using it during the type definition (to resolve
27292         attributes) and during the emit phase.
27293
27294         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
27295         to pull type information out of the attributes
27296
27297         (Attribute.Resolve): track the constructor builder, and allow for
27298         multiple invocations (structs and classes will use this).
27299
27300         * ecore.cs (MemberLookupFinal): new version with all the
27301         parameters customizable.
27302
27303         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
27304         constructors.  Return if the result value is null (as the error
27305         would have been flagged already by MemberLookupFinal)
27306
27307         Do not allow instances of abstract classes or interfaces to be
27308         created.
27309
27310         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
27311         We have to compare the assembly property here when dealing with
27312         FamANDAssem and Assembly access modifiers, because we might be
27313         creating an assembly from *modules* (that means that we are not
27314         getting TypeBuilders for types defined in other modules that are
27315         part of this assembly).
27316
27317         (Method.Emit): If the method is marked abstract and has a body,
27318         emit an error. 
27319
27320         (TypeContainer.DefineMembers): If both the defined member and the
27321         parent name match are methods, then do not emit any warnings: let
27322         the Method.Define routine take care of flagging warnings.  But if
27323         there is a mismatch (method overrides something else, or method is
27324         overriwritten by something, then emit warning).
27325
27326         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
27327         set to null, this means `do not check for the return type on the
27328         signature'. 
27329
27330         (Method.Define): set the return type for the method signature to
27331         null, so that we get methods with the same name and parameters and
27332         different return types.  This is used to flag warning 114 (you are
27333         hiding a method, and you probably want to use the new/override
27334         keywords instead).
27335
27336         * typemanager.cs (MemberLookup): Implemented proper access
27337         control, closing a long standing set of bug reports.  The problem
27338         was that the Framework only has two bits: Public and NonPublic,
27339         and NonPublic includes private and protected methods, but we need
27340         to enforce the FamANDAssem, FamOrAssem and Family. 
27341
27342 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
27343
27344         * statement.cs (GotoCase): Return true: Ammounts to giving up
27345         knowledge on whether we return or not, and letting the other case
27346         be responsible for it.
27347
27348 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
27349
27350         * driver.cs: Do not load directories for each file processed, only
27351         do it if there is a pattern.
27352
27353         * ecore.cs: Report readonly assigns here as well, as we might have
27354         been resolved only by MemberAccess.
27355
27356         (SimpleName.SimpleNameResolve): Also be useful for LValue
27357         resolution.   We need this to propagate assign to local readonly variables
27358
27359         * typemanager.cs: Use a ptrhashtable for the criteria, because we
27360         do not want to reuse potential criteria memory.
27361
27362         * class.cs (MyEventBuilder): Set reflected_type;
27363
27364         * ecore.cs (Constantify): Added support for constifying bools.
27365
27366         (RootContext.LookupType): Added a cache for values looked up in
27367         the declaration space.
27368
27369         * typemanager.cs (FindMembers): Now is a front-end to
27370         RealFindMembers, and provides a two-level hashtable-based cache to
27371         the request.  
27372
27373         15% performance improvement: from 22.5 to 19.2 seconds.
27374
27375         * expression.cs (IsParamsMethodApplicable): use foreach.
27376         (Invocation.DoResolve): ditto.
27377         (New.DoResolve): ditto.
27378         (ArrayCreation.DoResolve): ditto.
27379
27380         * ecore.cs (FindMostEncompassingType): use foreach.
27381
27382         * delegate.cs (NewDelegate.DoResolve): Use foreach
27383
27384         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
27385         (RemoveMethods): use foreach.
27386
27387         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
27388         nested foreach statements instead of for, and also break out of
27389         the inner loop once a match is found.
27390
27391         (Invocation.OverloadResolve): Use foreach, simplify the code. 
27392
27393 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
27394
27395         * cfold.cs (BinaryFold): During an enumeration evaluation context,
27396         we actually unwrap the expression to allow for extra information
27397         to be extracted. 
27398
27399         * expression.cs: Use Shr_Un on unsigned operations. 
27400
27401 2002-05-08  Ravi Pratap  <ravi@ximian.com>
27402
27403         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
27404         applicable operators was not being considered correctly. This closes
27405         the bug Miguel reported.
27406
27407 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27408
27409         * attribute.cs: check that the type derives from System.Attribute
27410         and report the correct error in that case (moved the duplicate code to
27411         its own method, too).
27412
27413 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27414
27415         * attribute.cs: lookup attribute type name as the spec says: first the
27416         bare attribute name and then name + "Attribute" (nant compiles with
27417         mcs after this fix).
27418
27419 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27420
27421         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27422         Because of the way we parse things, we should try to see if a
27423         UIntConstant can fit in an integer.
27424
27425 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27426
27427         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27428         when we are in an explicit context.
27429
27430         (ConvertReferenceExplicit): When converting from Iface type S to Class
27431         T make sure the rules are implemented as an OR.
27432
27433         * parameter.cs (ParameterType): Make it a property for now although the
27434         purpose really isn't anything immediate.
27435
27436         * expression.cs (Is*Applicable): Do better checking on the parameter type
27437         of a ref/out parameter. The ones from the system assemblies are already 
27438         marked with the correct type so we don't need to do any correction.
27439
27440         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27441         the object type is standard too so include that.
27442
27443 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27444
27445         * ecore.cs (StandardConversionExists): Augment with missing code:
27446         deal with IntConstant, LongConstants and Enumerations.
27447
27448         * assign.cs: Report the error, instead of failing silently
27449
27450         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27451         typecontainer that they are declared, because the
27452         typecontainer/namespace will have the list of using clauses that
27453         need to be applied.
27454
27455         Assembly Attributes were escaping the normal registration
27456         mechanism. 
27457
27458         (EmitCode): Apply attributes within an EmitContext that represents
27459         the container they were declared on.
27460
27461         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27462
27463 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27464
27465         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27466         Revamp completely - make much cleaner as we now operate only
27467         on a set of Types.
27468
27469         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27470         to implement the logic detailed in the spec more correctly.
27471
27472         (UserDefinedConversion): Update accordingly.
27473
27474 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27475
27476         * statement.cs: Return flow analysis information up.
27477
27478         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27479         and the default.
27480
27481         (token): Do not consume an extra character before calling
27482         decimal_digits.
27483
27484 2002-05-06  Piers Haken <piersh@friskit.com>
27485
27486         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27487
27488 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27489
27490         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27491         EmitContext during the instance constructor initializer
27492         resolution, to stop access to instance variables.
27493
27494         This is mandated by the spec, last paragraph of the `constructor
27495         initializers' section. 
27496
27497 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27498
27499         * cs-parser.jay, class.cs (Accessor): new class used to represent
27500         an accessor (get or set).  In the past we used `null' to represent
27501         a missing accessor.  But this is ambiguous because there was no
27502         way to tell in abstract indexers/properties if one of them was
27503         specified.
27504
27505         Now there is a way of addressing that.
27506
27507         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27508         instead of FindMembers.
27509
27510         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27511         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27512
27513         * attribute.cs: Treat indexers and properties as the same in terms
27514         of applying attributes
27515
27516         * ecore.cs (FindMostEncompassedType): Use statically initialized
27517         EmptyExpressions()s like we do elsewhere to avoid creating useless
27518         objects (and we take this out of the tight loop).
27519
27520         (GetConversionOperators): Move the code to extract the actual
27521         operators to a separate routine to clean things up.
27522
27523 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27524
27525         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27526         events are always registered FieldBuilders.
27527
27528         * class.cs (FieldBase): New class shared by Fields 
27529
27530         * delegate.cs: If we are a toplevel delegate, use our full name.
27531         If we are a nested delegate, then only use our tail name.
27532
27533 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27534
27535         * expression.cs (IsApplicable): Ensure that we add the "&" to
27536         ref/out types before comparing it with the type of the argument.
27537
27538         (IsParamsMethodApplicable): Ditto.
27539
27540         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27541         silly me ;-)
27542
27543         * delegate.cs : Handle the case when we have more than one applicable
27544         method. Flag an error only when we finish checking all.
27545
27546 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27547
27548         * expression.cs: Add support for boolean static initializers.
27549
27550 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27551
27552         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27553
27554         * parameter.cs (ComputeParameterTypes,
27555         ComputeAndDefineParameterTypes): Better error handling: now we
27556         clear the `types' cache if we fail during any of the type lookups.
27557         We also return the status code correctly to our caller
27558
27559         * delegate.cs: If we fail to define a delegate, abort the extra
27560         steps. 
27561
27562         * expression.cs (Binary.ResolveOperator): for
27563         operator==(object,object) and operator !=(object, object) we also
27564         have to verify that there is an implicit conversion from one to
27565         the other.
27566
27567         (ArrayAccess.DoResolve): Array Access can operate on
27568         non-variables. 
27569
27570 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27571
27572         * assign.cs (CompoundAssign): A new class used as a "flag" that
27573         the assignment actually is happening as part of a compound
27574         assignment operator.
27575
27576         During compound assignment, a few new rules exist to enable things
27577         like:
27578
27579         byte b |= 1 + 2
27580
27581         From the spec:
27582
27583         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27584         to the type of x) if y is implicitly convertible to the type of x,
27585         and the operator is a builtin operator and the return type of the
27586         operator is explicitly convertible to the type of x. 
27587
27588         * rootcontext.cs: Reset warning level to 2.  4 catches various
27589         "interesting" features in mcs, we must clean this up at some
27590         point, but currently am trying to kill other bugs ;-)
27591
27592         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27593         in container classes as well.  
27594
27595         * expression.cs (Binary.ResolveOperator): Handle string case
27596         before anything else (as operator overloading does emit an error
27597         before doing anything else).
27598
27599         This code could go away when we move to a table driven model, but
27600         i could not come up with a good plan last night.
27601
27602 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27603
27604         * typemanager.cs (CSharpName): reimplementation using regex.
27605         * class.cs: added null check for fields in Emit
27606         * rootcontext.cs: set warninglevel to 4
27607
27608 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27609
27610         * typemanager.cs (CSharpName): reimplemented with Lupus
27611         suggestion.
27612
27613 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27614
27615         * statement.cs (If): correclty implement Resolve, because we were
27616         not catching sem errors in there.  The same process is needed
27617         everywhere else. 
27618         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27619
27620
27621         (Statement.Warning_DeadCodeFound): Factorize code.
27622         (While): Report dead code here too.
27623
27624         (Statement): Added Resolve virtual method to allow
27625         for resolution split from the emit code.
27626
27627 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27628
27629         * statement.cs (EmitBoolExpression): No longer try to resolve the
27630         expression here.    
27631         (MakeBoolean): New utility function that resolve, implicitly
27632         converts to boolean and tags the expression. 
27633
27634
27635         (If, Do): Implement dead code elimination.
27636         (While): Implement loop inversion
27637
27638         (Do, While, For, If): Resolve the expression prior to calling our
27639         code generation.
27640
27641 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27642
27643         * class.cs:
27644           - added method Report28 (warning: program has more than one entry point)
27645           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27646           - modified method Method.Define, the part at the end of the method
27647
27648         * rootcontext.cs: added static public Location EntryPointLocation;
27649           
27650         * ../errors/cs0028.cs : Add test case for the above warning.              
27651
27652         * typemanager.cs:
27653           - modified method CSharpName to allow arrays of primitive type to
27654             be printed nicely (e.g. instead of System.Int32[][] it now prints
27655             int[][])
27656           - added method CSharpSignature: returns the signature of a method
27657             in string format to be used in reporting errors, warnings, etc.
27658
27659         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27660         with String.Empty.
27661
27662 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27663
27664         * delegate.cs (Define): Fix extremely silly bug where I was
27665         setting the type of the 'object' parameter of the BeginInvoke
27666         method to System.IAsyncResult instead of System.Object ;-)
27667
27668 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27669
27670         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27671         here. 
27672
27673         (Constructor.Emit): return if we fail to initialize the
27674         constructor.  Another door closed!  
27675
27676         * expression.cs (New.DoResolve): Improve error message (from -6 to
27677         1501).  Use DeclaredOnly lookup to find the exact constructor.
27678
27679         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27680         loop.  This is useful.
27681
27682         * cs-parser.jay: Adjust the default parameters so that destructors
27683         have the proper signature.
27684
27685 2002-04-26  Martin Baulig  <martin@gnome.org>
27686
27687         * driver.cs (LoadAssembly): If `assembly' contains any characters
27688         which are only valid in path names and not in assembly names
27689         (currently slash, backslash and point), use Assembly.LoadFrom ()
27690         instead of Assembly.Load () on the `assembly' (before iteration
27691         over the link_paths).
27692
27693 2002-04-26  Martin Baulig  <martin@gnome.org>
27694
27695         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27696
27697 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27698
27699         * class.cs (Property): use the new typemanager.MemberLookup
27700
27701         (TypeContainer.MemberLookup): Implement using the
27702         TypeManager.MemberLookup now. 
27703
27704         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27705         and return MemberInfos, so that these can be used without an
27706         EmitContext (what we had before).
27707
27708 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27709
27710         * expression.cs: Fix the case where the argument to params if the
27711         type of the params.  I omitted handling this before.   Fixed
27712
27713 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27714
27715         * driver.cs: Call BootCorlib_PopulateCoreType
27716
27717         * class.cs (Property.CheckBase): Check for properties only, not
27718         for all members. 
27719
27720         * interface.cs: Temporary hack: try/catch around the
27721         CustomAttributeBuilder, because I am getting an exception that I
27722         do not understand.
27723
27724         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27725         types whose definitions are required to be there (attributes are
27726         defined before standard types).
27727
27728         Compute definitions as we boot the various types, as they are used
27729         immediately (value_type class will need object_type, but if we do
27730         not initialize object_type, we will pass a null, which will let
27731         the runtime pick the System.Object from the existing corlib, which
27732         is not what we want).
27733
27734 2002-04-22  Patrik Torstensson <totte@labs2.com>
27735
27736         * cs-tokenizer.cs: fixed a number of trim() issues.
27737
27738 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27739
27740         * expression.cs (Argument.Type): Ensure that we return the correct
27741         type when we have out or ref parameters [in which case we 
27742         append a "&"].
27743
27744 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27745
27746         * class.cs (Property, Indexer): Allow extern modifier in there. 
27747
27748         * typemanager.cs (InitBaseTypes): Initializes object_type and
27749         value_type, since those will be used early on during the bootstrap
27750         process to compile corlib.
27751
27752         (InitCoreTypes): Move code from here to InitBaseTypes.
27753
27754 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27755
27756         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27757         single-dimension arrays as using the ldlen opcode.  
27758
27759         Daniel Lewis discovered this optimization.  
27760
27761         * typemanager.cs: Add signature for System.Array::get_Length
27762
27763 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27764
27765         * statement.cs: report the error when the foreach does not apply to an
27766         array nor a collection.
27767
27768 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27769
27770         * expression.cs: Add implicit conversions to the operator ~.
27771
27772         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27773
27774         * typemanager.cs: Locate the decimal constructor.
27775
27776 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27777
27778         * attribute.cs: use the new property of TypeOf.
27779         * expression.cs: added 'get' property around typearg.
27780
27781         These changes fix a build breaker reported by NickD. Is this the
27782         correct way to fix?  If not, please, revert my changes and make it
27783         work :-).
27784
27785 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27786
27787         * attribute.cs: Add support for typeof in attribute invocations.
27788         I am not sure that this is right though.
27789
27790 2002-04-14  Duncan Mak  <duncan@ximian.com>
27791
27792         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27793         Binary.Operator.Division case.
27794
27795 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27796
27797         * class.cs (DefineType): Ensure that we do a proper check on
27798         attribute types and also register it with the TypeManager.
27799
27800         (TypeContainer.Targets): The default for attribute types is
27801         AttributeTargets.All.
27802
27803         * attribute.cs (ApplyAttributes): Registering the attribute type
27804         is done elsewhere, not when we discover we have a Usage attribute.
27805
27806 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27807
27808         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27809         and get rid of is_delegate parameter.
27810
27811         * everywhere : update.
27812
27813 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27814
27815         * cs-parser.jay (compilation_unit): Revamp completely to use
27816         some new ideas that I got from Rhys' grammar to solve the problems
27817         with assembly level attributes.
27818
27819         (outer_declaration): New grammar production.
27820
27821         (attribute_sections): Add.
27822
27823         (opt_attributes): Base on attribute_sections
27824
27825         (namespace_declaration): Allow opt_attributes to tackle the case
27826         when we have assembly level attributes - we are clever in this
27827         regard now ;-)
27828
27829         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27830         attributes in the non-global context.
27831
27832         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27833         instead of SetGlobalAttributes.
27834
27835         * class.cs, rootcontext.cs : Ensure we define and generate 
27836         attribute types before anything else.
27837
27838         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27839         and flag the new error -20 for the case when the attribute type
27840         does not have valid targets specified. csc does not catch this.
27841
27842         * ../errors/errors.txt : update for error # -20
27843
27844 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27845
27846         * support.cs (InternalParameters.ParameterModifier): Do some null
27847         checking and return sane values.
27848
27849         * class.cs (Method.Define): If we are a PInvoke method, ensure
27850         that we are static and extern. Report error # 601
27851
27852         * ../errors/cs0601.cs : Add test case for the above error.
27853
27854 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27855
27856         * rootcontext.cs (attribute_types): We need to keep type of
27857         all attribute types separately and emit code for them first.
27858
27859         (RegisterAttribute) : Implement.
27860
27861         * class.cs (DefineType): Check if the current Type is a custom
27862         attribute type and register it accordingly.
27863
27864         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27865         adding the first attribute twice and rename to
27866
27867         (SetGlobalAttributes): this.
27868
27869         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27870         lookups.
27871
27872         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27873         if we are processing global arguments. Hmm, I am unsure of this.
27874
27875 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27876
27877         * expression.cs: added static array of strings to avoid calling
27878         Enum.ToString () for Operator in Binary. Significant recover of
27879         performance.
27880
27881 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27882
27883         * class.cs (FindMembers): Allow the Builders of the various
27884         members to be null.  If they are skip them.  This only happens
27885         during the PInvoke declaration.
27886
27887 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27888
27889         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27890         failure, so we do not keep going afterwards.
27891
27892         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27893         wanted to pass `false' as the `is_delegate' argument.  If this is
27894         the case, why not use delegate_type == null to mean `is_delegate =
27895         false' and anything else as is_delegate = true.
27896
27897 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27898
27899         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27900         code for the section, not the beginning of the tests.
27901
27902 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27903
27904         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27905
27906         * expression.cs (Binary): same.  Warn about errors where we have
27907         Enum/Enum in operator + as well.
27908
27909 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27910
27911         * statement.cs:
27912                 - added support for switch(bool)
27913                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27914                 - add TableSwitchEmit() to handle table-based switch statements
27915
27916 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27917
27918         * expression.cs (Invocation.OverloadResolve): Factor out code which
27919         does parameter compatibility checking with arguments so that we can 
27920         re-use the code even from Delegate.VerifyApplicability
27921
27922         (VerifyArgumentsCompat): Move above code here.
27923
27924         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27925         and instead make a call to the above method.
27926
27927 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27928
27929         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27930         We use it to keep track of classes which are attribute types.
27931
27932 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27933
27934         * delegate.cs (Delegate.Define): Correctly define the types in the
27935         presence of fixed and array parameters.
27936
27937         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27938         doing FindMembers.
27939
27940         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27941         include NonPublic after the first iteration.
27942
27943         * class.cs (Indexer.CheckBase): Only check if both parents are
27944         non-null. 
27945
27946         * cs-parser.jay (accessor_body): If empty, set to null.
27947
27948         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27949         same code path here to resolve constants names that we did have in
27950         MemberAccess.DoResolve.  There is too much code duplicated here.
27951
27952 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27953
27954         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27955
27956         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27957         to MakeUnionSet.
27958
27959         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27960         tokens, numbers and strings.
27961
27962         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27963         parenthesis.
27964
27965         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27966         asyncronous parameters and the regular parameters.  
27967
27968         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27969         specify the target directory.
27970
27971         * expression.cs: (This.DoResolve): Simplify
27972         (As.Emit): Optimize, do not generate IsInst if the expression is
27973         always of the given type.
27974
27975         (Is.DoResolve): Bug fix, we were reporting both always/never for
27976         the is expression.
27977
27978         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27979         creating too many unnecessary arrays.
27980
27981 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27982
27983         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27984         fields instead of rolling our own initializer.   Takes care of all
27985         implicit conversions, and drops unnecessary static checks/argument.
27986
27987 2002-03-31  Dick Porter  <dick@ximian.com>
27988
27989         * driver.cs: use the GetDirectories() return values properly, and
27990         use "/" as path separator.
27991
27992 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27993
27994         * expression.cs (Unary): Optimize - - expr into expr.
27995         (Binary): Optimize a + (-b) into a -b.
27996
27997         * codegen.cs (CodeGen): Made all methods static.
27998
27999 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
28000
28001         * rootcontext.cs: 
28002
28003         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
28004         TypeBuilder property.
28005
28006         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
28007         instead. 
28008
28009         * tree.cs: Removed the various RecordXXXX, and replaced with a
28010         single RecordDecl.  Removed all the accessor methods, and just
28011         left a single access point Type 
28012
28013         * enum.cs: Rename DefineEnum to DefineType.
28014
28015         * decl.cs: New abstract method `DefineType' used to unify the
28016         Defines for Enumerations, Interfaces, TypeContainers and
28017         Delegates.
28018
28019         (FindType): Moved LookupInterfaceOrClass here.  Moved the
28020         LookupBaseClasses method that used to live in class.cs and
28021         interface.cs here, and renamed to FindType.
28022
28023         * delegate.cs: Implement DefineType.  Take advantage of the
28024         refactored pattern for locating the parent builder without taking
28025         the parent_builder argument (which we know does not work if we are
28026         nested, and triggering a toplevel definition).
28027
28028 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
28029
28030         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
28031         accessibility of a member has changed during override and report
28032         an error if so.
28033
28034         * class.cs (Method.Define, Property.Define): Only complain on
28035         overrides if the method is private, any other accessibility is
28036         fine (and since we just checked the permission is the same, we are
28037         good to go).
28038
28039         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
28040         and elif are processed always.  The other pre-processing
28041         directives are only processed if we are "taking" the path
28042
28043 2002-03-29  Martin Baulig  <martin@gnome.org>
28044
28045         * class.cs (Method.Emit): Only emit symbolic debugging info if the
28046         current location is not Null.
28047
28048         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
28049         a separate method so we can profile it.
28050
28051         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
28052         `span.Seconds' are just seconds, but no minutes or hours.
28053         (MainDriver): Profile the CodeGen.SaveSymbols calls.
28054
28055 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
28056
28057         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
28058         Remove the gratuitous set of Final:
28059
28060                                 // If an interface implementation, then we can set Final.
28061                                 if (((flags & MethodAttributes.Abstract) == 0) &&
28062                                     implementing.DeclaringType.IsInterface)
28063                                         flags |= MethodAttributes.Final;
28064
28065         I do not know what I was smoking when I used that.
28066
28067
28068         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
28069         step into fixing the name resolution issues for delegates and
28070         unifying the toplevel name resolution.
28071
28072 2002-03-28  Martin Baulig  <martin@gnome.org>
28073
28074         * class.cs (Method.Emit): If we have a symbol writer, call its
28075         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
28076         tell it about the current method.
28077
28078         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
28079         writer that we're going to emit the first byte of IL code for a new
28080         statement (a new source line).
28081         (EmitContext.EmitTopBlock): If we have a symbol writer, call
28082         EmitContext.Mark() before emitting any code.
28083
28084         * location.cs (SymbolDocument): Return null when we're Null.
28085
28086         * statement.cs (Statement): Moved the `Location loc' variable here.
28087         (Statement.EmitBoolExpression): If we have a symbol writer, call
28088         ec.Mark() before emitting any code to tell it that we're at the
28089         beginning of a new statement.
28090         (StatementExpression): Added `Location' argument to the constructor.
28091         (Block): Added public readonly variable `StartLocation' and public
28092         variable `EndLocation'.  The latter is to be set using SetEndLocation().
28093         (Block): Added constructor which takes a start and end location.
28094         (Block.SetEndLocation): New method. This sets the end location.
28095         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
28096         local variables we create.
28097         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
28098         each statement and do also mark the begin and end of the block.
28099
28100         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
28101         tell it the current lexer.Location, use Location.Null for the end of the
28102         block.
28103         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
28104         current block, set its end location using SetEndLocation().
28105         (statement_expression): StatementExpression constructor now takes the
28106         lexer.Location as additional argument.
28107         (for_statement, declare_local_variables): Likewise.
28108         (declare_local_variables): When creating a new implicit block, use the
28109         new Block constructor and pass it the lexer.Location.
28110
28111 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
28112
28113         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
28114         members also on the parent interfaces recursively.
28115
28116 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
28117
28118         * report.cs: Use new formats, since Gonzalo finished the missing
28119         bits. 
28120
28121         * expression.cs (Binary.ResolveOperator): added missing operator|
28122         operator& and operator^ for bool/bool.
28123
28124         * cs-parser.jay: CheckDef now takes a Location argument that is
28125         used to report errors more precisly (instead of reporting the end
28126         of a definition, we try to track something which is a lot closer
28127         to the source of the problem).
28128
28129         * cs-tokenizer.cs: Track global token use, so we can properly flag
28130         the use of #define/#undef after the first token has been seen.
28131
28132         Also, rename the reportXXXX to Error_DescriptiveName
28133
28134         * decl.cs (DeclSpace.IsTopLevel): Move property here from
28135         TypeContainer, so that Enum and Interface can use this too.
28136
28137         * class.cs (TypeContainer.LookupInterfaceOrClass,
28138         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
28139         `builder' argument.  Typically this was used to pass the parent
28140         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
28141         the definition).  
28142
28143         The problem is that a nested class could trigger the definition of
28144         a toplevel class, and the builder would be obviously wrong in that
28145         case. 
28146
28147         So we drop this argument, and we compute dynamically the
28148         TypeBuilder/ModuleBuilder (the correct information was available
28149         to us anyways from DeclSpace.Parent)
28150
28151         * interface.cs (Interface.DefineInterface): Drop builder
28152         parameter cleanup like class.cs
28153
28154         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
28155         like class.cs
28156
28157         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
28158         values. 
28159
28160         (Try.Emit): Propagate the returns value from the statement.
28161
28162         (Return.Emit): Even if we are leavning 
28163
28164         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
28165
28166         * modifiers.cs: Fix the computation of MethodAttributes flags.
28167
28168 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
28169
28170         * driver.cs: allow compilation of files that start with '/'.
28171         Add a default case when checking the argument of --target.
28172
28173 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
28174
28175         * interface.cs: Implement the same search algorithm for types in
28176         the interface code.
28177
28178         * delegate.cs: Do not allow multiple definition.
28179
28180         * Recovered ChangeLog that got accidentally amputated
28181
28182         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
28183
28184         * rootcontext.cs: Load manually enum to allow core classes to
28185         contain enumerations.
28186
28187         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
28188         Update to new static methods in TypeManager.
28189
28190         * typemanager.cs (GetMethod, GetConstructor): Use our
28191         implementation of FindMembers to find the members, since during
28192         corlib compilation, the types are TypeBuilders and GetMethod and
28193         GetConstructor do not work.
28194
28195         Make all methods in TypeManager static.
28196
28197         (InitCodeHelpers): Split the functionality from
28198         the InitCodeTypes function.
28199
28200         * driver.cs: Call InitCodeHelpers after we have populated the
28201         types. 
28202
28203         * cs-parser.jay (delegate_declaration): we did not used to compute
28204         the delegate name correctly for void delegates.
28205
28206 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
28207
28208         * rootcontext.cs (RootContext): Init the interface_resolve_order
28209         and type_container_resolve_order always.
28210
28211         (ResolveCore, BootstrapCorlib_ResolveClass,
28212         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
28213         compiler when compiling with --nostdlib
28214
28215         * class.cs (TypeContainer.DefineType): Check that our parent is
28216         not null.  This test is most important when we are bootstraping
28217         the core types.
28218
28219         * codegen.cs: Split out the symbol writing code.
28220
28221 2002-03-25  Martin Baulig  <martin@gnome.org>
28222
28223         * driver.cs (-g): Made -g an alias for --debug.
28224
28225 2002-03-24  Martin Baulig  <martin@gnome.org>
28226
28227         * codegen.cs (SymbolWriter): New public variable. Returns the
28228         current symbol writer.
28229         (CodeGen): Added `bool want_debugging_support' argument to the
28230          constructor. If true, tell the ModuleBuild that we want debugging
28231         support and ask it for the ISymbolWriter.
28232         (Save): If we have a symbol writer, call it's Close() method after
28233         saving the assembly.
28234
28235         * driver.c (--debug): New command line argument to create a
28236         debugger information file.
28237
28238         * location.cs (SymbolDocument): New public property. Returns an
28239         ISymbolDocumentWriter object for the current source file or null
28240         if we don't have a symbol writer.
28241
28242 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
28243
28244         * driver.cs (LoadAssembly): Correctly return when all the paths
28245         have been tried and not before.
28246
28247         * statement.cs (Switch.Emit): return the actual coverage for this
28248         statement (returns/not-returns)
28249
28250         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
28251         switch of the statement if we are the last switch section.  That
28252         kills two problems: try/catch problems (we used to emit an empty
28253         nop at the end) and switch statements where all branches would
28254         return. 
28255
28256 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
28257
28258         * driver.cs: Add default assemblies (the equivalent to the
28259         Microsoft CSC.RSP file)
28260
28261         * cs-tokenizer.cs: When updating `cols and setting it to zero,
28262         also update tokens_seen and set it to false.
28263
28264         * driver.cs: Implement --recurse for Mike.
28265
28266         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
28267         correctly splitting out the paths.
28268
28269 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
28270
28271         * interface.cs (Interface.PopulateProperty): Instead of using
28272         `parent' as the declaration space for the set parameters, use
28273         `this' 
28274
28275         * support.cs (InternalParameters): InternalParameters constructor
28276         takes a DeclSpace instead of a TypeContainer.
28277
28278         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
28279         types are being initialized, load the address of it before calling
28280         the function.  
28281
28282         (New): Provide a mechanism to disable the generation of local
28283         value type temporaries when the caller will be providing us with
28284         an address to store it.
28285
28286         (ArrayCreation.EmitDynamicInitializers): Use it.
28287
28288 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
28289
28290         * expression.cs (Invocation.EmitArguments): Only probe for array
28291         property if there is more than one argument.  Sorry about that.
28292
28293         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
28294         empty param arrays.
28295
28296         * class.cs (Method.LabelParameters): Fix incorrect code path that
28297         prevented the `ParamArrayAttribute' from being applied to the
28298         params attribute.
28299
28300 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
28301
28302         * support.cs (ReflectionParameters): Correctly compute whether the
28303         last argument is a params array.  Fixes the problem with
28304         string.Split ('a')
28305
28306         * typemanager.cs: Make the assemblies array always be non-null
28307         (empty, but non-null)
28308
28309         * tree.cs (RecordDecl): New function that abstracts the recording
28310         of names.  This reports error 101, and provides a pointer to the
28311         previous declaration.  Fixes a crash in the compiler.
28312
28313         * cs-parser.jay (constructor_declaration): Update to new grammar,
28314         and provide a constructor_body that can be empty.
28315
28316 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
28317
28318         * driver.cs: Add support for --resources.
28319
28320         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
28321         Make all types for the various array helper methods be integer.
28322
28323         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
28324         CheckState to ConvCast.
28325
28326         (ConvCast): Now it takes a `checked' state argument, to avoid
28327         depending on the emit context for the conversion, and just using
28328         the resolve time setting.
28329
28330         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
28331         instead of Invocation.EmitArguments.  We do not emit the original
28332         arguments, instead we emit those which have been converted to
28333         unsigned int expressions.
28334
28335         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
28336
28337         * codegen.cs: ditto.
28338
28339         * expression.cs (LocalVariableReference): Drop the use of the
28340         Store function that depended on the variable index.
28341
28342         * statement.cs (VariableInfo): Drop the `Idx' property from this
28343         class, as this is not taking into account the indexes for
28344         temporaries tat we generate during the execution, getting the
28345         indexes wrong.
28346
28347         * class.cs: First emit class initializers, then call the parent
28348         constructor. 
28349
28350         * expression.cs (Binary): Fix opcode emision.
28351         (UnaryMutator.EmitCode): Support checked code generation
28352
28353         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
28354         matches for events for both the Static and Instance scans,
28355         pointing to the same element.   Fix that.
28356
28357 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
28358
28359         * rootcontext.cs (ResolveTree): Always set the
28360         interface_resolve_order, because nested interfaces will be calling
28361         into us.
28362
28363         * class.cs (GetInterfaceOrClass): Track the same resolution
28364         process used by TypeManager.LookupType.  This fixes the nested
28365         type lookups in class declarations (separate path from
28366         LookupType). 
28367
28368         (TypeContainer.DefineType): Also define nested interfaces.
28369         (TypeContainer.RegisterOrder): New public function used to
28370         register the order in which child interfaces need to be closed.
28371
28372         Nested interfaces need to be closed after their parents have been
28373         created. 
28374
28375         * interface.cs (InterfaceAttr): Put all the logic for computing
28376         the interface attribute here. 
28377
28378         (DefineInterface): Register our interface order with the
28379         RootContext or with the TypeContainer depending on the case.
28380
28381 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28382
28383         * cs-parser.jay: rework foreach statement to work with the new
28384         changes to the policy on SimpleNames.
28385
28386         * report.cs: support Stacktrace on warnings as well.
28387
28388         * makefile: drop --unsafe and /unsafe from the compile.
28389
28390 2002-03-13  Ravi Pratap  <ravi@ximian.com>
28391
28392         * ecore.cs (StandardConversionExists): Modify to take an Expression
28393         as the first parameter. Ensure we do null -> reference type conversion
28394         checking.
28395
28396         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
28397         temporary Expression objects.
28398
28399 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
28400
28401         * interface.cs: workaround bug in method overloading resolution
28402         (there is already a bugzilla bug for it).
28403
28404 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28405
28406         We could also solve this problem by having a separate path for
28407         performing type lookups, instead of DoResolve, we could have a
28408         ResolveType entry point, and only participating pieces of the
28409         production (simplename, deref, array) would implement this. 
28410
28411         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
28412         signal SimpleName to only resolve type names and not attempt to
28413         resolve anything else.
28414
28415         * expression.cs (Cast): Set the flag.
28416
28417         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28418
28419         * class.cs: Only report 108 if there is no `new' modifier.
28420
28421         * cs-parser.jay: rework foreach statement to work with the new
28422         changes to the policy on SimpleNames.
28423
28424         * report.cs: support Stacktrace on warnings as well.
28425
28426         * makefile: drop --unsafe and /unsafe from the compile.
28427
28428 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28429
28430         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28431         lookups here, instead of doing that at parse time.  This means
28432         that our grammar will not introduce `LocalVariableReferences' as
28433         expressions at this point.  That solves the problem of code like
28434         this:
28435
28436         class X {
28437            static void Main ()
28438            { int X = 1;
28439             { X x = null }}}
28440
28441         This is only half the fix.  The full fix requires parameters to
28442         also be handled in this way.
28443
28444         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28445         makes the use more obvious of the DeclSpace.  The
28446         ec.TypeContainer.TypeBuilder is now only used to pull the
28447         TypeBuilder for it.
28448
28449         My theory is that I can get rid of the TypeBuilder completely from
28450         the EmitContext, and have typecasts where it is used (from
28451         DeclSpace to where it matters).  
28452
28453         The only pending problem is that the code that implements Aliases
28454         is on TypeContainer, and probably should go in DeclSpace.
28455
28456         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28457         lookups here, instead of doing that at parse time.  This means
28458         that our grammar will not introduce `LocalVariableReferences' as
28459         expressions at this point.  That solves the problem of code like
28460         this:
28461
28462         class X {
28463            static void Main ()
28464            { int X = 1;
28465             { X x = null }}}
28466
28467         This is only half the fix.  The full fix requires parameters to
28468         also be handled in this way.
28469
28470         * class.cs (Property.DefineMethod): When implementing an interface
28471         method, set newslot, when implementing an abstract method, do not
28472         set the flag (before we tried never setting it, or always setting
28473         it, which is the difference).
28474         (Indexer.DefineMethod): same.
28475         (Method.DefineMethod): same.
28476
28477         * ecore.cs: Only set the status used flag if we get back a Field.
28478
28479         * attribute.cs: Temporary hack, so Paolo can keep working.
28480
28481 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28482
28483         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28484         the unmanaged type in the case we have a MarshalAs attribute.
28485
28486         (Resolve): Handle the case when we are parsing the special MarshalAs
28487         attribute [we need to store the unmanaged type to use later]
28488
28489         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28490         MarshalAs Attribute.
28491
28492         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28493         on parameters and accordingly set the marshalling info.
28494
28495 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28496
28497         * class.cs: Optimizing slightly by removing redundant code after
28498         we switched to the `NoTypes' return value.
28499         (Property.DefineMethod): use NoTypes here too.
28500
28501         This fixes the bug I introduced in my last batch of changes.
28502
28503 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28504
28505         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28506
28507         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28508         Enums since those are types too. 
28509
28510         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28511
28512         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28513         thanks to a call during the lookup process.
28514
28515 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28516
28517         * statement.cs (Foreach): Lots of work to accomodate a particular
28518         kind of foreach statement that I had not kept in mind.  It is
28519         possible to have foreachs on classes that provide a GetEnumerator
28520         method that return objects that implement the "pattern" for using
28521         a foreach, there is no need to support GetEnumerator
28522         specifically. 
28523
28524         This is needed to compile nant.
28525
28526         * decl.cs: Only report 114 if the member is not `Finalize' and if
28527         the warning level is at least 2.
28528
28529         * class.cs: Moved the compare function from Method to
28530         MethodSignature. 
28531
28532         (MethodSignature.InheritableMemberSignatureCompare): Add new
28533         filter function that is used to extract inheritable methods from a
28534         class. 
28535
28536         (Method.Define): Use the new `inheritable_method_signature_filter'
28537         delegate
28538
28539         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28540         command. 
28541
28542 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28543
28544         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28545
28546         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28547
28548         * expression.cs: Pass location information to
28549         ConvertImplicitStandard. 
28550
28551         * class.cs: Added debugging code to track return values from
28552         interfaces. 
28553
28554 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28555
28556         * expression.cs (Is.DoResolve): If either side of the `is' is an
28557         interface, do not flag the warning.
28558
28559         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28560         for interfaces
28561
28562         * report.cs: Allow for --fatal to be used with --probe.
28563
28564         * typemanager.cs (NoTypes): Move the definition for the empty Type
28565         array here. 
28566
28567         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28568         properties. 
28569         (TypeContainer.DefineProxy): New function used to proxy to parent
28570         implementations when implementing interfaces.
28571         (TypeContainer.ParentImplements): used to lookup if our parent
28572         implements a public function that is required by an interface.
28573         (TypeContainer.VerifyPendingMethods): Hook this up.
28574
28575         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28576         `modules' and `assemblies' arraylists into arrays.  We only grow
28577         these are the very early start up of the program, so this improves
28578         the speedof LookupType (nicely measured).
28579
28580         * expression.cs (MakeByteBlob): Replaced unsafe code with
28581         BitConverter, as suggested by Paolo.
28582
28583         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28584         folding of string concatenation, but if either side is a string,
28585         and the other is not, then return null, and let the runtime use
28586         the concatenation on the string plus the object (using
28587         `Object.ToString'). 
28588
28589 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28590
28591         Constant Folding has been implemented now.
28592
28593         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28594         the error instead on types that are not supported in one's
28595         complement. 
28596
28597         * constant.cs (Constant and all children): New set of functions to
28598         perform implict and explicit conversions.
28599
28600         * ecore.cs (EnumConstant): Implement the new functions to perform
28601         conversion by proxying to the child expression.
28602
28603         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28604         own separate setting that can not be turned off from the command
28605         line using --unchecked or --checked and is only controlled using
28606         the checked/unchecked statements and expressions.  This setting is
28607         used by the constant folder to flag errors.
28608
28609         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28610         ConstantCheckState as well.   
28611
28612         During Resolve, they also have to flag the state, because the
28613         constant folder runs completely in the Resolve phase.
28614
28615         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28616         well.
28617
28618 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28619
28620         * cfold.cs: New file, this file contains the constant folder.
28621
28622         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28623         argument to track whether we are using the resulting address to
28624         load or store a value and provide better error messages. 
28625
28626         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28627         new AddressOf arguments.
28628
28629         * statement.cs (Foreach.EmitCollectionForeach): Update
28630
28631         * expression.cs (Argument.Emit): Call AddressOf with proper
28632         arguments to track usage.
28633
28634         (New.DoEmit): Call AddressOf with new arguments.
28635
28636         (Unary.Emit): Adjust AddressOf call.
28637
28638 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28639
28640         * cs-parser.jay (member_access): Change the case for pre-defined types
28641         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28642         this suggestion.
28643
28644         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28645         a method body.
28646
28647         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28648         essentially like methods and apply attributes like MethodImplOptions to them too.
28649
28650         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28651         not being null.
28652
28653         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28654         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28655         is the DeclSpace.
28656
28657         * Update code everywhere accordingly.
28658
28659         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28660
28661         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28662
28663 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28664
28665         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28666         try performing lookups against those instead of jumping straight into using
28667         the 'using' clauses.
28668
28669         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28670
28671         (LookupType): Perform lookups in implicit parents too.
28672
28673         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28674         sequence as RootContext.LookupType. 
28675
28676         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28677         the various cases of namespace lookups into this method.
28678
28679 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28680
28681         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28682         in positional arguments)
28683
28684         * class.cs (Operator): Update the AllowedModifiers to contain
28685         extern. 
28686
28687         * cs-parser.jay: Update operator declaration to allow for the
28688         operator body to be empty.
28689
28690         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28691         values. 
28692
28693 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28694
28695         * class.cs (Method.Emit): Label parameters.
28696
28697         * driver.cs: Return 1 or 0 as the program exit code.
28698
28699 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28700
28701         * expression.cs: Special case the `null' object when trying to
28702         auto-compute the type, as anything can be explicitly converted to
28703         that. 
28704
28705         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28706         spotting this Paolo.
28707
28708         (Expression.ImplicitNumericConversion): Perform comparissions of
28709         the type using the underlying type in the case of an enumeration
28710         rather than using the enumeration type for the compare.
28711
28712         Cope with the underlying == type case, which is not possible to
28713         catch before. 
28714
28715         (Expression.ConvertNumericExplicit): Perform comparissions of
28716         the type using the underlying type in the case of an enumeration
28717         rather than using the enumeration type for the compare.
28718
28719         * driver.cs: If the user does not supply an extension, assume .exe
28720
28721         * cs-parser.jay (if_statement): Rewrote so that we can track the
28722         location for the if statement.
28723
28724         * expression.cs (Binary.ConstantFold): Only concat strings when
28725         the operation is "+", not everything ;-)
28726
28727         * statement.cs (Statement.EmitBoolExpression): Take a location
28728         argument. 
28729         (If, While, Do): Track location.
28730
28731         * expression.cs (Binary.ResolveOperator): In the object + string
28732         case, I was missing a call to ConvertImplicit
28733
28734 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28735
28736         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28737         Location arguments. Ensure we use RootContext.LookupType to do our work
28738         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28739
28740         * interface.cs (PopulateMethod): Handle the type of the parameter being
28741         null gracefully.
28742
28743         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28744         have a params method with no fixed arguments and a call is made with no
28745         arguments.
28746
28747 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28748
28749         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28750         the verbatim-string-literal
28751
28752         * support.cs (InternalParameters.ParameterModifier): handle null
28753         fixed parameters.
28754         (InternalParameters.ParameterType): ditto.
28755
28756         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28757         duplicating the name of the variable parameter.
28758         (GetParameterByName): Fix bug where we were not looking up array
28759         paramters if they were the only present (thanks Paolo!).
28760         (GetParameterInfo): We only have an empty set of types if both
28761         fixed and array are set to null.
28762         (GetParameterInfo-idx): Handle FixedParameter == null
28763
28764         * cs-parser.jay: Handle the case where there is no catch
28765         statements (missing null test).
28766
28767 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28768
28769         * driver.cs (MainDriver): Be conservative on our command line
28770         handling.
28771
28772         Catch DirectoryNotFoundException when calling GetFiles.
28773
28774         (SplitPathAndPattern): Used to split the input specification into
28775         a path and a pattern that we can feed to Directory.GetFiles.
28776
28777 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28778
28779         * statement.cs (Fixed): Implement the last case of the Fixed
28780         statement (string handling).
28781
28782         * expression.cs (StringPtr): New class used to return a char * to
28783         a string;  Used by the Fixed statement.
28784
28785         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28786
28787         * expression.cs (Binary.ResolveOperator): Remove redundant
28788         MemberLookup pn parent type.
28789         Optimize union call, we do not need a union if the types are the same.
28790         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28791         type.
28792
28793         Specialize the use of MemberLookup everywhere, instead of using
28794         the default settings. 
28795
28796         (StackAlloc): Implement stackalloc keyword.
28797
28798         * cs-parser.jay: Add rule to parse stackalloc.
28799
28800         * driver.cs: Handle /h, /help, /?
28801
28802         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28803         before we supported unsafe code.
28804
28805         * makefile: add --unsafe to the self compilation of mcs.
28806
28807 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28808
28809         * expression.cs (PointerArithmetic): New class that is used to
28810         perform pointer arithmetic.
28811         (Binary.Resolve): Handle pointer arithmetic
28812         Handle pointer comparission.
28813         (ArrayPtr): Utility expression class that is used to take the
28814         address of an array.
28815
28816         (ElementAccess): Implement array access for pointers
28817
28818         * statement.cs (Fixed): Implement fixed statement for arrays, we
28819         are missing one more case before we are done.
28820
28821         * expression.cs (Indirection): Implement EmitAssign and set the
28822         ExprClass to Variable.  This allows pointer dereferences to be
28823         treated as variables, and to have values assigned to them.
28824
28825         * ecore.cs (Expression.StoreFromPtr): New utility function to
28826         store values dereferencing.
28827
28828 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28829
28830         * expression.cs (Binary.ResolveOperator): Ensure that we are
28831         not trying to operate on a void type - this fixes the reported
28832         bug.
28833
28834         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28835         the parent implementation is sealed.
28836
28837         * ../errors/cs0239.cs : Add.
28838
28839         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28840
28841         * typemanager.cs (unverifiable_code_type): Corresponds to 
28842         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28843         which have unsafe code in them.
28844
28845         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28846         unsafe context.
28847
28848 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28849
28850         * cs-tokenizer.cs: Add support for @"litreal strings"
28851
28852         Make tokenizer accept pre-processor directives
28853         on any column (remove the old C-like limitation). 
28854
28855         * rootcontext.cs (EmitCode): Emit any global attributes.
28856         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28857
28858         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28859
28860         * cs-parser.jay: Add support for global attributes.  
28861
28862 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28863
28864         * expression.cs (Indirection): New helper class.  Unary will
28865         create Indirection classes to be able to implement the
28866         IMemoryLocation interface on it.
28867
28868 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28869
28870         * cs-parser.jay (fixed_statement): reference the right statement.
28871
28872         * statement.cs (Fixed.Emit): Finish implementing the fixed
28873         statement for the &x case.
28874
28875 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28876
28877         * class.cs (Property.Define, Method.Define): Remove newslot when
28878         `implementing'.  
28879
28880         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28881         wrong.  NewSlot should only be used if the `new' keyword is present.
28882
28883         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28884         locating our system dir.  Sorry about this.
28885
28886 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28887
28888         * driver.cs (GetSystemDir): Compute correctly the location of our
28889         system assemblies.  I was using the compiler directory instead of
28890         the library directory.
28891
28892 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28893
28894         * expression.cs (BetterFunction): Put back in what Miguel commented out
28895         since it is the correct fix. The problem is elsewhere ;-)
28896
28897         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28898         parameters of the parms method are themselves compatible or not !
28899
28900         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28901         to check that a class implements an interface before saying that an implicit
28902         conversion was allowed. Use ImplementsInterface to do the checking.
28903
28904 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28905
28906         * class.cs (Method.Define): Track whether we are an explicit
28907         implementation or not.  And only call DefineMethodOverride if we
28908         are an explicit implementation.
28909
28910         (Property.DefineMethod): Ditto.
28911
28912 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28913
28914         * expression.cs (BetterFunction): Catch hideous bug which was
28915          preventing us from detecting ambiguous calls due to implicit casts i.e
28916         cs0121.
28917
28918 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28919
28920         * support.cs (Pair): Remove un-needed method.  I figured why I was
28921         getting the error in cs-parser.jay, the variable in a foreach loop
28922         is readonly, and the compiler does not really treat this as a variable.
28923
28924         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28925         instead of EQUALS in grammar.  
28926
28927         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28928
28929         * expression.cs (Unary.DoResolve): Check whether the argument is
28930         managed or not.
28931
28932 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28933
28934         * support.cs: Api for Pair to set a value.  Despite the fact that
28935         the variables are public the MS C# compiler refuses to compile
28936         code that accesses the field if the variable is part of a foreach
28937         statement. 
28938
28939         * statement.cs (Fixed): Begin implementation of the fixed
28940         statement.
28941
28942         (Block.AddVariable): Return the VariableInfo on success and null
28943         on failure instead of true/false. 
28944
28945         * cs-parser.jay (foreach): Catch errors on variables already
28946         defined (we were ignoring this value before) and properly unwind
28947         the block hierarchy
28948
28949         (fixed_statement): grammar for the fixed statement.
28950
28951 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28952
28953         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28954         pointer types to be incretemented.
28955
28956         (SizeOf): Implement.
28957
28958         * cs-parser.jay (pointer_member_access): Implement
28959         expr->IDENTIFIER production.
28960
28961         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28962         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28963         on safe contexts.
28964
28965         (Unary): Implement indirection.
28966
28967         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28968         use in non-unsafe context).
28969
28970         (SimpleName.DoResolve): Check for pointers in field access on safe
28971         contexts. 
28972
28973         (Expression.LoadFromPtr): Factor the load-indirect code in this
28974         function.  This was duplicated in UnboxCast and ParameterReference
28975
28976 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28977
28978         * expression.cs (ComposedCast): report an error if a pointer cast
28979         is used in a safe region.
28980
28981         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28982         pointer type casts in unsafe context.
28983
28984         * codegen.cs (EmitContext): Set up IsUnsafe.
28985
28986         * cs-parser.jay (non_expression_type): Add productions for pointer
28987         casts. 
28988
28989         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28990         code.  We should not use force into static mode if the method is
28991         not virtual.  Fixes bug in MIS
28992
28993         * statement.cs (Do.Emit, While.Emit, For.Emit,
28994         Statement.EmitBoolExpression): Add support to Do and While to
28995         propagate infinite loop as `I do return' semantics.
28996
28997         Improve the For case to also test for boolean constants.
28998
28999         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
29000         to the list of attributes we can add.
29001
29002         Remove `EmitContext' argument.
29003
29004         * class.cs (Method.Define): Apply parameter attributes.
29005         (Constructor.Define): Apply parameter attributes.
29006         (MethodCore.LabelParameters): Move here the core of labeling
29007         parameters. 
29008
29009         * support.cs (ReflectionParameters.ParameterModifier,
29010         InternalParameters.ParameterModifier): Use IsByRef on the type and
29011         only return the OUT bit for these parameters instead of in/out/ref
29012         flags.
29013
29014         This is because I miss-understood things.  The ParameterInfo.IsIn
29015         and IsOut represent whether the parameter has the [In] and [Out]
29016         attributes set.  
29017
29018 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
29019
29020         * ecore.cs (FieldExpr.Emit): Release temporaries.
29021
29022         * assign.cs (LocalTemporary.Release): new function.
29023
29024         * codegen.cs (EmitContext.GetTemporaryStorage,
29025         EmitContext.FreeTemporaryStorage): Rework the way we deal with
29026         temporary storage.  Now we can "put back" localbuilders when we
29027         are done with them
29028
29029 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
29030
29031         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
29032         need to make a copy of the variable to generate verifiable code.
29033
29034 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
29035
29036         * driver.cs: Compute dynamically the system directory.
29037
29038         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
29039         Slower, but more generally useful.  Used by the abstract
29040         registering implementation. 
29041
29042         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
29043         the rules for the special rule on Type/instances.  First check if
29044         we have the same name, and if so, try that special static path
29045         rather than the instance path.
29046
29047 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
29048
29049         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
29050         for, while and if.
29051
29052         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
29053         Enum, ValueType, Delegate or Array for non-corlib compiles.
29054
29055         * cs-tokenizer.cs: Catch long identifiers (645)
29056
29057         * typemanager.cs (IndexerPropetyName): Ravi never tested this
29058         piece of code.
29059
29060         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
29061         fix, we were returning too early, so we were not registering
29062         pending methods from abstract classes.
29063
29064         Do not register pending methods if the class is abstract.
29065
29066         * expression.cs (Conditional.DoResolve): Report circular implicit
29067         conversions when we neecd to compute it for conditional
29068         expressions. 
29069
29070         (Is.DoResolve): If the expression is always of the provided type,
29071         flag warning 183.  If the expression can not ever be of the
29072         provided type flag warning 184.
29073
29074         * class.cs: Catch 169 as well.
29075
29076         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
29077         read. 
29078
29079 2002-01-18  Nick Drochak  <ndrochak@gol.com>
29080
29081         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
29082
29083 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
29084
29085         * interface.cs: (PopulateMethod): Check for pointers being defined
29086         only if the unsafe context is active.
29087         (PopulateProperty): ditto.
29088         (PopulateIndexer): ditto.
29089
29090         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
29091         specified.  If pointers are present, make sure that they are
29092         present in an unsafe context.
29093         (Constructor, Constructor.Define): ditto.
29094         (Field, Field.Define): ditto.
29095         (Property, Property.Define): ditto.
29096         (Event, Event.Define): ditto.
29097
29098         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
29099         hashtable if there are classes or structs defined.
29100
29101         * expression.cs (LocalVariableReference.DoResolve): Simplify this
29102         code, as the constant resolution moved.
29103
29104         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
29105         the metadata, so we can flag error 133. 
29106
29107         * decl.cs (MemberCore.UnsafeOK): New function to test that a
29108         pointer is being declared in an unsafe context.
29109
29110 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
29111
29112         * modifiers.cs (Modifiers.Check): Require a Location argument.
29113         Report error 227 for Unsafe use.
29114
29115         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
29116
29117         * statement.cs (For.Emit): If the test is null, then report that
29118         we do `return', as we wont reach anything afterwards.
29119
29120         (Switch.SwitchGoverningType): Track the expression that matched
29121         the conversion.
29122
29123         * driver.cs: Allow negative numbers as an error code to flag.
29124
29125         * cs-parser.jay: Handle 1551.
29126
29127         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
29128
29129 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
29130
29131         * cs-parser.jay: Report 1518 (type declaration can only contain
29132         class, struct, interface, enum or delegate)
29133
29134         (switch_label): Report 1523 (keywords `case' or `default' must
29135         preced code)
29136
29137         (opt_switch_sections): Report 1522 (empty switch)
29138
29139         * driver.cs: Report 1515 (response file specified multiple times)
29140         Report 1516 (Source file specified multiple times).
29141
29142         * expression.cs (Argument.Resolve): Signal 1510
29143
29144         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
29145         access not allowed in static code)
29146
29147 2002-01-11  Ravi Pratap  <ravi@ximian.com>
29148
29149         * typemanager.cs (IsPointerType): Utility method which we are going
29150         to need a lot.
29151
29152         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
29153         the object type, so we take care of that.
29154
29155         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
29156
29157         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
29158         added to non-params parameters :-)
29159
29160         * typemanager.cs (CSharpName): Include 'void' type too. 
29161
29162         (void_ptr_type): Include in the set of core types.
29163
29164         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
29165         duplicating code.
29166
29167         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
29168         an unsafe context.
29169
29170         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
29171         completely forgotten about it.
29172
29173 2002-01-10  Ravi Pratap  <ravi@ximian.com>
29174
29175         * cs-parser.jay (pointer_type): Add. This begins our implementation
29176         of parsing rules for unsafe code.
29177
29178         (unsafe_statement): Implement.
29179
29180         (embedded_statement): Modify to include the above.
29181
29182         * statement.cs (Unsafe): Implement new class for unsafe blocks.
29183
29184         * codegen.cs (EmitContext.InUnsafe): Add. This determines
29185         if the current context is an unsafe one.
29186
29187         * cs-parser.jay (local_variable_pointer_type): Since local variable types
29188         are handled differently, we need separate rules for them.
29189
29190         (local_variable_declaration): Update to use local_variable_pointer_type
29191         to allow variable declarations of unmanaged pointer types.
29192
29193         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
29194         in unsafe contexts.
29195
29196         * ../errors/cs0214.cs : Add.
29197
29198 2002-01-16  Nick Drochak  <ndrochak@gol.com>
29199
29200         * makefile: remove 'response' file when cleaning.
29201
29202 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
29203
29204         * cs-parser.jay: Report 1524.
29205
29206 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
29207
29208         * typemanager.cs (RegisterMethod): drop checking if we have
29209         registered this from here
29210
29211 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
29212
29213         * class.cs (Method.EmitDestructor): Implement calling our base
29214         destructor. 
29215
29216         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
29217         value of InFinally.
29218
29219         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
29220         this routine and will wrap the call in a try/catch block.  Deal
29221         with the case.
29222
29223 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
29224
29225         * ecore.cs (Expression.MemberLookup): instead of taking a
29226         parameter `same_type' that was used to tell whether we could
29227         access private members we compute our containing type from the
29228         EmitContext.
29229
29230         (FieldExpr): Added partial support for volatile fields.  This does
29231         not work for volatile fields exposed from assemblies, as I can not
29232         figure out how to extract the modreq from it.
29233
29234         Updated all the source files to use this.
29235
29236         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
29237         because it is referenced by MemberLookup very often. 
29238
29239 2002-01-09  Ravi Pratap  <ravi@ximian.com>
29240
29241         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
29242         TypeBuilder.GetCustomAttributes to retrieve what we need.
29243
29244         Get rid of redundant default_member_attr_type as this is the same as
29245         default_member_type which already exists.
29246
29247         * interface.cs, attribute.cs : Update accordingly.
29248
29249 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
29250
29251         * typemanager.cs: Enable IndexerPropertyName again.  It does not
29252         work for TYpeBuilders though.  Ravi, can you please fix this?
29253
29254         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
29255
29256         * expression.cs (Argument.Emit): Handle the case of ref objects
29257         being passed to ref functions;  
29258
29259         (ParameterReference.EmitLoad): Loads the content of the pointer
29260         without dereferencing.
29261
29262 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29263
29264         * cs-tokenizer.cs: Implemented the pre-processing expressions.
29265
29266 2002-01-08  Ravi Pratap  <ravi@ximian.com>
29267
29268         * class.cs (Indexer.DefineMethod): Incorporate the interface
29269         type in the name of the method if we are doing explicit interface
29270         implementation.
29271
29272         * expression.cs (ConversionExists): Remove as it is completely obsolete.
29273
29274         (BetterConversion): Fix extremely trivial bug where we were referring to
29275         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
29276         again !
29277
29278         * ../errors/bug16.cs : Add although we have fixed it.
29279
29280 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29281
29282         * expression.cs (BaseIndexer): Begin implementation.
29283
29284         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
29285
29286         * cs-parser.jay (indexer_declarator): Use qualified_identifier
29287         production directly to remove a shift/reduce, and implement
29288         explicit interface implementation.
29289
29290         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
29291         after a floating point suffix.
29292
29293         * expression.cs (DoNumericPromotions): Improved the conversion for
29294         uint/uint.  If we have a constant, we avoid doing a typecast to a
29295         larger type.
29296
29297         * class.cs (Indexer): Implement explicit interface implementation
29298         for indexers.
29299
29300 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29301
29302         * class.cs: make the default instance constructor public and hidebysig.
29303
29304 2001-01-03  Ravi Pratap  <ravi@ximian.com>
29305
29306         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
29307         so we can call it from elsewhere.
29308
29309         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
29310         we emit it internally if the class has a defined indexer; otherwise the user
29311         emits it by decorating the class definition with the DefaultMemberAttribute.
29312
29313         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
29314         attribute is not used on a type which defines an indexer.
29315
29316         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
29317         character when we skip whitespace.
29318
29319         * ../errors/cs0646.cs : Add.
29320
29321 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
29322
29323         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
29324         again. 
29325
29326         * makefile: Add practical target `mcs3.exe' which builds the third
29327         generation compiler. 
29328
29329         * expression.cs (New): Fix structures constructor calling.
29330
29331         * class.cs (Property, Method, Indexer): Emit Final flag on the
29332         method if we are an interface implementation and we are not
29333         abstract. 
29334
29335         * ecore.cs (PropertyExpr): New public field `IsBase', tells
29336         whether this property is referencing a `base' method.
29337
29338         * expression.cs (Invocation.EmitCall): take an extra argument:
29339         is_base, this is used to determine whether the `call' or
29340         `callvirt' opcode should be used.
29341
29342
29343         * delegate.cs: update EmitCall.
29344
29345         * class.cs (Method.Define): Set NewSlot for the cases where we are
29346         not implementing an interface method.
29347
29348         (Property.Define): ditto.
29349
29350 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
29351
29352         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
29353         'r'.  Allows mcs to parse itself fully.
29354
29355 2002-01-02  Ravi Pratap  <ravi@ximian.com>
29356
29357         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
29358         of the number of initializers that require the InitializeArray method.
29359
29360         (CheckIndices): Store the Expression in all cases - not the plain value. Also
29361         update the above field where necessary.
29362
29363         (MakeByteBlob): Update accordingly.
29364
29365         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
29366         greater than 2.
29367
29368         (EmitDynamicInitializers): Update in accordance with the new optimization.
29369
29370         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
29371         same OpCode applies.
29372
29373         * cs-parser.jay : Fix some glaring errors I introduced.
29374
29375 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
29376
29377         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
29378         so that we can check for name clashes there too.
29379
29380         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
29381         for interface indexers.
29382
29383         * interfaces.cs (Define): Emit the default member attribute.
29384
29385         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
29386         variable was being referred to while setting the value ;-)
29387
29388 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
29389
29390         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
29391         byte-by-byte information when we know the data is zero.
29392
29393         Make the block always a multiple of 4, because
29394         DefineInitializedData has a bug.
29395
29396         * assign.cs: Fix, we should assign from the temporary, not from
29397         the source. 
29398
29399         * expression.cs (MakeByteBlob): Fix my incorrect code.
29400
29401 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
29402
29403         * typemanager.cs (EnumToUnderlying): This function is used to get
29404         the underlying type from an enumeration, because it does not
29405         always work. 
29406
29407         * constant.cs: Use the I4_S form for values between -128 and 127.
29408
29409         * statement.cs (Block.LookupLabel): Looks up a label.
29410         (Block): Drop support for labeled blocks.
29411
29412         (LabeledStatement): New kind of statement that represents a label
29413         only.
29414
29415         (Goto): Finally implement this bad boy.
29416
29417         * cs-parser.jay: Update to reflect new mechanism to implement
29418         labels.
29419
29420 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29421
29422         * codegen.cs (EmitContext.This): a codegen property that keeps the
29423         a single instance of this instead of creating many different this
29424         instances. 
29425
29426         * delegate.cs (Delegate.DoResolve): Update to use the property;
29427
29428         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29429
29430         * expression.cs (BaseAccess.DoResolve): Ditto.
29431
29432 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29433
29434         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29435         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29436
29437         (InitCoreTypes): Update accordingly.
29438
29439         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29440         so we can quickly store the state.
29441
29442         (ApplyAttributes): Set the correct implementation flags
29443         for InternalCall methods.
29444
29445 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29446
29447         * expression.cs (EmitCall): if a method is not virtual, then do
29448         not use callvirt on it.
29449
29450         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29451         user defined stuff) requires the use of stobj, which takes an
29452         address on the stack instead of an array and an index.  So emit
29453         the Ldelema operation for it.
29454
29455         (EmitStoreOpcode): Use stobj for valuetypes.
29456
29457         (UnaryMutator.EmitCode): Use the right 1 value depending on
29458         whether we are dealing with int64/uint64, float or doubles.
29459
29460         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29461         constructors that I implemented last night.
29462
29463         (Constructor.IsDefault): Fix to work properly for static
29464         constructors.
29465
29466         * cs-parser.jay (CheckDef): report method signature errors.
29467         Update error number 103 to be 132.
29468
29469         * decl.cs: New AdditionResult enumeration value: MethodExists.
29470         Although we do this check for methods later on in the semantic
29471         analysis, catching repeated default constructors is so easy that
29472         we catch these here. 
29473
29474         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29475         promotions code.
29476
29477         (ParameterReference.EmitAssign, Emit): handle
29478         bools as bytes.
29479
29480         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29481         (ArrayAccess.EmitStoreOpcode): ditto.
29482
29483         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29484
29485         * expression.cs (MakeByteBlob): Complete all the missing types
29486         (uint, short, ushort, byte, sbyte)
29487
29488         * class.cs: Only init instance field initializers on instance
29489         constructors. 
29490
29491         Rename `constructors' to instance_constructors. 
29492
29493         (TypeContainer.AddConstructor): Only add constructors to the list
29494         if it is not static.
29495
29496         Make sure that we handle default_static_constructor independently
29497         everywhere where we handle instance_constructors
29498
29499 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29500
29501         * class.cs: Do not lookup or create a base initializer for a
29502         static constructor.
29503
29504         (ConstructorInitializer.Resolve): use the proper type to lookup
29505         for constructors.
29506
29507         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29508
29509         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29510         in DeclSpace. 
29511
29512         * decl.cs: CloseType is now an virtual method, the default
29513         implementation just closes this type.
29514
29515 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29516
29517         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29518         to PreserveSig by default. Also emit HideBySig on such methods.
29519
29520         Basically, set the defaults to standard values.
29521
29522         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29523         argument, if candidate is better, it can't be worse than the best !
29524
29525         (Invocation): Re-write bits to differentiate between methods being
29526         applicable in their expanded form and their normal form - for params
29527         methods of course.
29528
29529         Get rid of use_standard everywhere as only standard conversions are allowed
29530         in overload resolution. 
29531
29532         More spec conformance.
29533
29534 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29535
29536         * driver.cs: Add --timestamp, to see where the compiler spends
29537         most of its time.
29538
29539         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29540         `this' in static code.
29541
29542         (SimpleName.DoResolve): Implement in terms of a helper function
29543         that allows static-references to be passed upstream to
29544         MemberAccess.
29545
29546         (Expression.ResolveWithSimpleName): Resolve specially simple
29547         names when called by MemberAccess to implement the special
29548         semantics. 
29549
29550         (Expression.ImplicitReferenceConversion): Handle conversions from
29551         Null to reference types before others, as Null's type is
29552         System.Object. 
29553
29554         * expression.cs (Invocation.EmitCall): Handle the special case of
29555         calling methods declared on a reference type from a ValueType
29556         (Base classes System.Object and System.Enum)
29557
29558         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29559         the left hand side is a TypeExpr, not on every enumeration. 
29560
29561         (Binary.Resolve): If types are reference types, then do a cast to
29562         object on operators != and == of both arguments.
29563
29564         * typemanager.cs (FindMembers): Extract instance and static
29565         members if requested.
29566
29567         * interface.cs (PopulateProperty): Use void_type instead of null
29568         as the return type for the setter method.
29569
29570         (PopulateIndexer): ditto.
29571
29572 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29573
29574         * support.cs (ReflectionParameters): Fix minor bug where we
29575         were examining the wrong parameter for the ParamArray attribute.
29576
29577         Cope with requests for the type of the parameter at position
29578         greater than the params parameter's. We now return the element
29579         type of the params array as that makes more sense.
29580
29581         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29582         accordingly as we no longer have to extract the element type
29583         ourselves.
29584
29585         (Invocation.OverloadResolve): Update.
29586
29587 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29588
29589         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29590         against IEnumerator, test whether the return value is a descendant
29591         of the IEnumerator interface.
29592
29593         * class.cs (Indexer.Define): Use an auxiliary method to implement
29594         the other bits of the method definition.  Begin support for
29595         explicit interface implementation.
29596
29597         (Property.DefineMethod): Use TypeManager.void_type instead of null
29598         for an empty return value.
29599
29600 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29601
29602         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29603         dealing with a FieldExpr which is composed of a FieldBuilder, in
29604         the code path we did extract the constant, but we should have
29605         obtained the underlying value to be able to cast it (otherwise we
29606         end up in an infinite loop, this is what Ravi was running into).
29607
29608         (ArrayCreation.UpdateIndices): Arrays might be empty.
29609
29610         (MemberAccess.ResolveMemberAccess): Add support for section
29611         14.5.4.1 that deals with the special case of E.I when E is a type
29612         and something else, that I can be a reference to a static member.
29613
29614         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29615         handle a particular array type to create byte blobs, it is just
29616         something we dont generate byteblobs for.
29617
29618         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29619         arguments. 
29620
29621         * location.cs (Push): remove the key from the hashtable that we
29622         are about to add.   This happens for empty files.
29623
29624         * driver.cs: Dispose files after we have parsed them.
29625
29626         (tokenize): new function that only runs the tokenizer on its
29627         input, for speed testing.
29628
29629 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29630
29631         * class.cs (Event.Define): Define the private field only if there
29632         are no accessors defined.
29633
29634         * expression.cs (ResolveMemberAccess): If there is no associated
29635         field with the event, that means we have an event defined with its
29636         own accessors and we should flag error cs0070 since transforming
29637         ourselves into a field is not valid in that case.
29638
29639         * ecore.cs (SimpleName.DoResolve): Same as above.
29640
29641         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29642         and charset to sane values.
29643
29644 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29645
29646         * assign.cs (DoResolve): Perform check on events only if they 
29647         are being accessed outside the declaring type.
29648
29649         * cs-parser.jay (event_declarations): Update rules to correctly
29650         set the type of the implicit parameter etc.
29651
29652         (add_accessor, remove_accessor): Set current local parameters.
29653
29654         * expression.cs (Binary): For delegate addition and subtraction,
29655         cast the return value from the method into the appropriate delegate
29656         type.
29657
29658 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29659
29660         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29661         of these as the workaround is unnecessary.
29662
29663         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29664         delegate data - none of that is needed at all.
29665
29666         Re-write bits to extract the instance expression and the delegate method
29667         correctly.
29668
29669         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29670         on delegates too.
29671
29672         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29673         of attaching attributes instead of duplicating code everywhere.
29674
29675         * everywhere : Update code to do attribute emission using the above method.
29676
29677 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29678
29679         * expression.cs (IsParamsMethodApplicable): if there are not
29680         parameters, return immediately.
29681
29682         * ecore.cs: The 0 literal can be implicity converted to an enum
29683         type. 
29684
29685         (SimpleName.DoResolve): First lookup the type, then lookup the
29686         members. 
29687
29688         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29689         want to get its address.  If the InstanceExpression is not
29690         addressable, store the result in a temporary variable, then get
29691         the address of it.
29692
29693         * codegen.cs: Only display 219 errors on warning level or above. 
29694
29695         * expression.cs (ArrayAccess): Make it implement the
29696         IMemoryLocation interface.
29697
29698         (Binary.DoResolve): handle the operator == (object a, object b)
29699         and operator != (object a, object b) without incurring into a
29700         BoxedCast (because 5 != o should never be performed).
29701
29702         Handle binary enumerator operators.
29703
29704         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29705         value type, otherwise use Ldelem_ref.
29706
29707         Use precomputed names;
29708
29709         (AddressOf): Implement address of
29710
29711         * cs-parser.jay (labeled_statement): Fix recursive block
29712         addition by reworking the production.
29713
29714         * expression.cs (New.DoEmit): New has a special case:
29715                 
29716                  If we are dealing with a ValueType, we have a few
29717                  situations to deal with:
29718                 
29719                     * The target of New is a ValueType variable, that is
29720                       easy, we just pass this as the variable reference
29721                 
29722                     * The target of New is being passed as an argument,
29723                       to a boxing operation or a function that takes a
29724                       ValueType.
29725                 
29726                       In this case, we need to create a temporary variable
29727                       that is the argument of New.
29728
29729
29730 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29731
29732         * rootcontext.cs (LookupType): Check that current_type is not null before
29733         going about looking at nested types.
29734
29735         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29736         not implement the IAssignMethod interface any more.
29737
29738         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29739         where we tranform them into FieldExprs if they are being resolved from within
29740         the declaring type.
29741
29742         * ecore.cs (SimpleName.DoResolve): Do the same here.
29743
29744         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29745
29746         * ../errors/bug10.cs : Add.
29747
29748         * ../errors/cs0070.cs : Add.
29749
29750         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29751
29752         * assign.cs : Get rid of EventIsLocal everywhere.
29753
29754 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29755
29756         * ecore.cs (ConvertIntLiteral): finished the implementation.
29757
29758         * statement.cs (SwitchLabel): Convert the value we are using as a
29759         key before looking up the table.
29760
29761 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29762
29763         * codegen.cs (EmitTopBlock): Require a Location argument now.
29764
29765         * cs-parser.jay (constructor_declarator): We need to setup
29766         current_local_parameters before we parse the
29767         opt_constructor_initializer, to allow the variables to be bound
29768         to the constructor arguments.
29769
29770         * rootcontext.cs (LookupType): First lookup nested classes in our
29771         class and our parents before we go looking outside our class.
29772
29773         * expression.cs (ConstantFold): Extract/debox the values at the
29774         beginnning. 
29775
29776         * rootcontext.cs (EmitCode): Resolve the constants first before we
29777         resolve the types.  This is not really needed, but it helps debugging.
29778
29779         * statement.cs: report location.
29780
29781         * cs-parser.jay: pass location to throw statement.
29782
29783         * driver.cs: Small bug fix.
29784
29785         * report.cs: Updated format to be 4-zero filled digits.
29786
29787 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29788
29789         * expression.cs (CheckIndices): Fix minor bug where the wrong
29790         variable was being referred to ;-)
29791
29792         (DoEmit): Do not call EmitStaticInitializers when the 
29793         underlying type is System.Object.
29794
29795 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29796
29797         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29798         and do the usual workaround for SRE.
29799
29800         * class.cs (MyEventBuilder.EventType): New member to get at the type
29801         of the event, quickly.
29802
29803         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29804
29805         * assign.cs (Assign.DoResolve): Handle the case when the target
29806         is an EventExpr and perform the necessary checks.
29807
29808         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29809         interface.
29810
29811         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29812
29813         (EventExpr): Set the type in the constructor itself since we 
29814         are meant to be born fully resolved.
29815
29816         (EventExpr.Define): Revert code I wrote earlier.
29817                 
29818         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29819         instance expression is null. The instance expression is a This in that case
29820         or a null, depending on whether it is a static method or not.
29821
29822         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29823         refers to more than one method.
29824
29825         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29826         and accordingly flag errors.
29827
29828 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29829
29830         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29831
29832 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29833
29834         * location.cs (ToString): Provide useful rutine.
29835
29836 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29837
29838         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29839         objects, return the actual integral boxed.
29840
29841         * statement.cs (SwitchLabel): define an ILLabel for each
29842         SwitchLabel. 
29843
29844         (Switch.CheckSwitch): If the value is a Literal, extract
29845         the underlying literal.
29846
29847         Also in the unused hashtable we had, add the SwitchLabel so we can
29848         quickly look this value up.
29849
29850         * constant.cs: Implement a bunch of new constants.  Rewrite
29851         Literal based on this.  Made changes everywhere to adapt to this.
29852
29853         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29854         dereferencing array only once, and also copes with enumrations.
29855
29856         bytes are two bytes wide, not one.
29857
29858         (Cast): Perform constant conversions.
29859
29860         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29861         wrappers to the literals here.
29862
29863         * expression.cs (DoNumericPromotions): long literals can converted
29864         to ulong implicity (this is taken care of elsewhere, but I was
29865         missing this spot).
29866
29867         * ecore.cs (Expression.Literalize): Make the return type Literal,
29868         to improve type checking.
29869
29870         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29871
29872 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29873
29874         * literal.cs: Revert code from ravi that checked the bounds.  The
29875         bounds are sane by the definition of the type itself. 
29876
29877         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29878         need to actually look up in our parent hierarchy for interfaces
29879         implemented. 
29880
29881         * const.cs: Use the underlying type for enumerations
29882
29883         * delegate.cs: Compute the basename for the delegate creation,
29884         that should fix the delegate test case, and restore the correct
29885         Type Lookup semantics in rootcontext
29886
29887         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29888         referencing a nested type with the Reflection API is using the "+"
29889         sign. 
29890
29891         * cs-parser.jay: Do not require EOF token at the end.
29892
29893 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29894
29895         * rootcontext.cs (LookupType): Concatenate type names with
29896         a '.' instead of a '+' The test suite passes again.
29897
29898         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29899         field of the enumeration.
29900
29901         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29902         the case when the member is an EventExpr.
29903
29904         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29905         static has an associated instance expression.
29906
29907         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29908
29909         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29910
29911         * class.cs (Event.Define): Register event and perform appropriate checks
29912         for error #111.
29913
29914         We define the Add and Remove methods even if the use provides none because
29915         in that case, we provide default implementations ourselves.
29916
29917         Define a private field of the type of the event. This is done by the CSC compiler
29918         and we should be doing it too ;-)
29919
29920         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29921         More methods we use in code we generate.
29922
29923         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29924         is important.
29925
29926         (InitCoreTypes): Update accordingly for the above.
29927
29928         * class.cs (Event.Emit): Generate code for default accessors that we provide
29929
29930         (EmitDefaultMethod): Do the job in the above.
29931
29932         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29933         appropriate place.
29934
29935 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29936
29937         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29938         builders even if we were missing one.
29939
29940         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29941         pass the Basename as our class name instead of the Name.  The
29942         basename will be correctly composed for us.
29943
29944         * parameter.cs (Paramters): Now takes a Location argument.
29945
29946         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29947         make all the code call directly LookupType in RootContext and take
29948         this chance to pass the Location information everywhere.
29949
29950         * Everywhere: pass Location information.
29951
29952 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29953
29954         * class.cs (Constructor.Define): Updated way of detecting the
29955         length of the parameters.
29956
29957         (TypeContainer.DefineType): Use basename as the type name for
29958         nested types.
29959
29960         (TypeContainer.Define): Do not recursively define types here, as
29961         definition is taken care in order by the RootContext.
29962
29963         * tree.cs: Keep track of namespaces in a per-file basis.
29964
29965         * parameter.cs (Parameter.ComputeSignature): Update to use
29966         DeclSpace. 
29967
29968         (Parameters.GetSignature): ditto.
29969
29970         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29971         instead of a TypeContainer.
29972
29973         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29974         resolve names.  Because we need to be resolve in our context, not
29975         our parents.
29976
29977         * driver.cs: Implement response files.
29978
29979         * class.cs (TypeContainer.DefineType): If we are defined, do not
29980         redefine ourselves.
29981
29982         (Event.Emit): Emit the code for add/remove handlers.
29983         (Event.Define): Save the MethodBuilders for add/remove.
29984
29985         * typemanager.cs: Use pair here too.
29986
29987         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29988         DictionaryEntry requires the first argument to be non-null.  
29989
29990         (enum_declaration): Compute full name for registering the
29991         enumeration.
29992
29993         (delegate_declaration): Instead of using
29994         formal_parameter_list, use opt_formal_parameter_list as the list
29995         can be empty.
29996
29997         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29998         (EventParsing): New property that controls whether `add' and
29999         `remove' are returned as tokens or identifiers (for events);
30000
30001 2001-12-19  Ravi Pratap  <ravi@ximian.com>
30002
30003         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
30004         use MyEventBuilder only and let it wrap the real builder for us.
30005
30006         (MyEventBuilder): Revamp constructor etc.
30007
30008         Implement all operations that we perform on EventBuilder in precisely the same
30009         way here too.
30010
30011         (FindMembers): Update to use the EventBuilder member.
30012
30013         (Event.Emit): Update accordingly.
30014
30015 2001-12-18  Ravi Pratap  <ravi@ximian.com>
30016
30017         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
30018         by calling the appropriate methods.
30019
30020         (GetCustomAttributes): Make stubs as they cannot possibly do anything
30021         useful.
30022
30023         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
30024
30025 2001-12-17  Ravi Pratap  <ravi@ximian.com>
30026
30027         * delegate.cs (Delegate.Populate): Check that the return type
30028         and various parameters types are indeed accessible.
30029
30030         * class.cs (Constructor.Define): Same here.
30031
30032         (Field.Define): Ditto.
30033
30034         (Event.Define): Ditto.
30035
30036         (Operator.Define): Check that the underlying Method defined itself
30037         correctly - so it's MethodBuilder should not be null.
30038
30039         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
30040         expression happens to be null.
30041
30042         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
30043         members but as of now we don't seem to be able to do anything really useful with it.
30044
30045         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
30046         not the EventBuilder.
30047
30048 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
30049
30050         * cs-tokenizer.cs: Add support for defines.
30051         Add support for #if, #elif, #else, #endif
30052
30053         (eval_var): evaluates a variable.
30054         (eval): stubbed for evaluating functions.
30055
30056         * cs-parser.jay: Pass the defines information
30057
30058         * driver.cs: Add --define command line option.
30059
30060         * decl.cs: Move MemberCore here.
30061
30062         Make it the base class for DeclSpace.  This allows us to catch and
30063         report 108 and 109 for everything now.
30064
30065         * class.cs (TypeContainer.Define): Extract all the members
30066         before populating and emit the warning 108 (new keyword required
30067         to override) instead of having each member implement this.
30068
30069         (MemberCore.Define): New abstract method, we will be using this in
30070         the warning reporting engine in Populate.
30071
30072         (Operator.Define): Adjust to new MemberCore protocol. 
30073
30074         * const.cs (Const): This does not derive from Expression, it is a
30075         temporary object we use to create fields, it is a MemberCore. 
30076
30077         * class.cs (Method.Define): Allow the entry point to be in a
30078         specific class.
30079
30080         * driver.cs: Rewrite the argument handler to clean it up a bit.
30081
30082         * rootcontext.cs: Made it just an auxiliary namespace feature by
30083         making everything static.
30084
30085         * driver.cs: Adapt code to use RootContext type name instead of
30086         instance variable.
30087
30088         * delegate.cs: Remove RootContext argument.
30089
30090         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
30091         argument. 
30092
30093         * class.cs (Event.Define): The lookup can fail.
30094
30095         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
30096
30097         * expression.cs: Resolve the this instance before invoking the code.
30098
30099 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
30100
30101         * cs-parser.jay: Add a production in element_access that allows
30102         the thing to become a "type" reference.  This way we can parse
30103         things like "(string [])" as a type.
30104
30105         Note that this still does not handle the more complex rules of
30106         casts. 
30107
30108
30109         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
30110
30111         * ecore.cs: (CopyNewMethods): new utility function used to
30112         assemble the list of methods from running FindMembers.
30113
30114         (MemberLookup): Rework FindMembers so that 
30115
30116 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
30117
30118         * class.cs (TypeContainer): Remove Delegates who fail to be
30119         defined.
30120
30121         * delegate.cs (Populate): Verify that we dont get null return
30122         values.   TODO: Check for AsAccessible.
30123
30124         * cs-parser.jay: Use basename to emit error 574 (destructor should
30125         have the same name as container class), not the full name.
30126
30127         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
30128         possible representation.  
30129
30130         Also implements integer type suffixes U and L.
30131
30132 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
30133
30134         * expression.cs (ArrayCreation.DoResolve): We need to do the
30135         argument resolution *always*.
30136
30137         * decl.cs: Make this hold the namespace.  Hold the root context as
30138         well.
30139         (LookupType): Move here.
30140
30141         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
30142
30143         * location.cs (Row, Name): Fixed the code, it was always returning
30144         references to the first file.
30145
30146         * interface.cs: Register properties defined through interfaces.
30147
30148         * driver.cs: Add support for globbing on the command line
30149
30150         * class.cs (Field): Make it derive from MemberCore as well.
30151         (Event): ditto.
30152
30153 2001-12-15  Ravi Pratap  <ravi@ximian.com>
30154
30155         * class.cs (Event::Define): Check that the type of the event is a delegate
30156         type else flag error #66.
30157
30158         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
30159         same.
30160
30161         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
30162         values of EntryPoint, CharSet etc etc.
30163
30164         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
30165
30166         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
30167         be null and we should ignore this. I am not sure if this is really clean. Apparently,
30168         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
30169         which needs this to do its work.
30170
30171         * ../errors/cs0066.cs : Add.
30172
30173 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
30174
30175         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
30176         helper functions.
30177
30178         * class.cs: (MethodSignature.MethodSignature): Removed hack that
30179         clears out the parameters field.
30180         (MemberSignatureCompare): Cleanup
30181
30182         (MemberCore): New base class used to share code between MethodCore
30183         and Property.
30184
30185         (RegisterRequiredImplementations) BindingFlags.Public requires
30186         either BindingFlags.Instace or Static.  Use instance here.
30187
30188         (Property): Refactored code to cope better with the full spec.
30189
30190         * parameter.cs (GetParameterInfo): Return an empty array instead
30191         of null on error.
30192
30193         * class.cs (Property): Abstract or extern properties have no bodies.
30194
30195         * parameter.cs (GetParameterInfo): return a zero-sized array.
30196
30197         * class.cs (TypeContainer.MethodModifiersValid): Move all the
30198         method modifier validation to the typecontainer so we can reuse
30199         this on properties.
30200
30201         (MethodCore.ParameterTypes): return an empty sized array of types.
30202
30203         (Property.Define): Test property modifier validity.
30204
30205         Add tests for sealed/override too.
30206
30207         (Method.Emit): abstract or extern methods have no bodies.
30208
30209 2001-12-14  Ravi Pratap  <ravi@ximian.com>
30210
30211         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
30212         thing.
30213
30214         (Method::Define, ::Emit): Modify accordingly.
30215
30216         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
30217
30218         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
30219
30220         * makefile: Pass in /unsafe.
30221
30222 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
30223
30224         * class.cs (MakeKey): Kill routine.
30225
30226         * class.cs (TypeContainer.Define): Correctly define explicit
30227         method implementations (they require the full interface name plus
30228         the method name).
30229
30230         * typemanager.cs: Deply the PtrHashtable here and stop using the
30231         lame keys.  Things work so much better.
30232
30233         This of course broke everyone who depended on `RegisterMethod' to
30234         do the `test for existance' test.  This has to be done elsewhere.
30235
30236         * support.cs (PtrHashtable): A hashtable that avoid comparing with
30237         the object stupid Equals method (because, that like fails all over
30238         the place).  We still do not use it.
30239
30240         * class.cs (TypeContainer.SetRequiredInterface,
30241         TypeContainer.RequireMethods): Killed these two routines and moved
30242         all the functionality to RegisterRequiredImplementations.
30243
30244         (TypeContainer.RegisterRequiredImplementations): This routine now
30245         registers all the implementations required in an array for the
30246         interfaces and abstract methods.  We use an array of structures
30247         which can be computed ahead of time to reduce memory usage and we
30248         also assume that lookups are cheap as most classes will not
30249         implement too many interfaces.
30250
30251         We also avoid creating too many MethodSignatures.
30252
30253         (TypeContainer.IsInterfaceMethod): Update and optionally does not
30254         clear the "pending" bit if we find that there are problems with
30255         the declaration.
30256
30257         (TypeContainer.VerifyPendingMethods): Update to report errors of
30258         methods that look like implementations but are not.
30259
30260         (TypeContainer.Define): Add support for explicit interface method
30261         implementation. 
30262
30263 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
30264
30265         * typemanager.cs: Keep track of the parameters here instead of
30266         being a feature of the TypeContainer.
30267
30268         * class.cs: Drop the registration of parameters here, as
30269         InterfaceMethods are also interface declarations.
30270
30271         * delegate.cs: Register methods with the TypeManager not only with
30272         the TypeContainer.  This code was buggy.
30273
30274         * interface.cs: Full registation here.
30275
30276 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
30277
30278         * expression.cs: Remove reducer for binary expressions, it can not
30279         be done this way.
30280
30281         * const.cs: Put here the code that used to go into constant.cs
30282
30283         * constant.cs: Put here the code for constants, this is a new base
30284         class for Literals.
30285
30286         * literal.cs: Make Literal derive from Constant.
30287
30288 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
30289
30290         * statement.cs (Return.Emit): Report error 157 if the user
30291         attempts to return from a finally block.
30292
30293         (Return.Emit): Instead of emitting a return, jump to the end of
30294         the function.
30295
30296         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
30297         LocalBuilder to store the result of the function.  ReturnLabel is
30298         the target where we jump.
30299
30300
30301 2001-12-09  Radek Doulik  <rodo@ximian.com>
30302
30303         * cs-parser.jay: remember alias in current namespace
30304
30305         * ecore.cs (SimpleName::DoResolve): use aliases for types or
30306         namespaces
30307
30308         * class.cs (LookupAlias): lookup alias in my_namespace
30309
30310         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
30311         aliases hashtable
30312         (LookupAlias): lookup alias in this and if needed in parent
30313         namespaces
30314
30315 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
30316
30317         * support.cs: 
30318
30319         * rootcontext.cs: (ModuleBuilder) Made static, first step into
30320         making things static.  I need this to avoid passing the
30321         TypeContainer when calling ParameterType.
30322
30323         * support.cs (InternalParameters.ParameterType): Remove ugly hack
30324         that did string manipulation to compute the type and then call
30325         GetType.  Use Parameter.ParameterType instead.
30326
30327         * cs-tokenizer.cs: Consume the suffix for floating values.
30328
30329         * expression.cs (ParameterReference): figure out whether this is a
30330         reference parameter or not.  Kill an extra variable by computing
30331         the arg_idx during emission.
30332
30333         * parameter.cs (Parameters.GetParameterInfo): New overloaded
30334         function that returns whether a parameter is an out/ref value or not.
30335
30336         (Parameter.ParameterType): The type of the parameter (base,
30337         without ref/out applied).
30338
30339         (Parameter.Resolve): Perform resolution here.
30340         (Parameter.ExternalType): The full type (with ref/out applied).
30341
30342         * statement.cs (Using.Emit, Using.EmitExpression): Implement
30343         support for expressions on the using statement.
30344
30345 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
30346
30347         * statement.cs (Using.EmitLocalVariableDecls): Split the
30348         localvariable handling of the using statement.
30349
30350         (Block.EmitMeta): Keep track of variable count across blocks.  We
30351         were reusing slots on separate branches of blocks.
30352
30353         (Try.Emit): Emit the general code block, we were not emitting it. 
30354
30355         Check the type of the declaration to be an IDisposable or
30356         something that can be implicity converted to it. 
30357
30358         Emit conversions if required.
30359
30360         * ecore.cs (EmptyExpression): New utility class.
30361         (Expression.ImplicitConversionExists): New utility function.
30362
30363 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
30364
30365         * statement.cs (Using): Implement.
30366
30367         * expression.cs (LocalVariableReference): Support read only variables.
30368
30369         * statement.cs: Remove the explicit emit for the Leave opcode.
30370         (VariableInfo): Add a readonly field.
30371
30372 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
30373
30374         * ecore.cs (ConvCast): new class used to encapsulate the various
30375         explicit integer conversions that works in both checked and
30376         unchecked contexts.
30377
30378         (Expression.ConvertNumericExplicit): Use new ConvCast class to
30379         properly generate the overflow opcodes.
30380
30381 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30382
30383         * statement.cs: The correct type for the EmptyExpression is the
30384         element_type, not the variable type.  Ravi pointed this out.
30385
30386 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30387
30388         * class.cs (Method::Define): Handle PInvoke methods specially
30389         by using DefinePInvokeMethod instead of the usual one.
30390
30391         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
30392         above to do the task of extracting information and defining the method.
30393
30394 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30395
30396         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
30397         of the condition for string type.
30398
30399         (Emit): Move that here. 
30400
30401         (ArrayCreation::CheckIndices): Keep string literals in their expression
30402         form.
30403
30404         (EmitDynamicInitializers): Handle strings appropriately.
30405
30406 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30407
30408         * codegen.cs (EmitContext): Replace multiple variables with a
30409         single pointer to the current Switch statement.
30410
30411         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
30412         EmitContext.
30413
30414 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30415
30416         * statement.cs 
30417
30418         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30419         default'.
30420
30421         (Foreach.Emit): Foreach on arrays was not setting
30422         up the loop variables (for break/continue).
30423
30424         (GotoCase): Semi-implented.
30425
30426 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30427
30428         * attribute.cs (CheckAttribute): Handle system attributes by using
30429         Attribute.GetAttributes to examine information we need.
30430
30431         (GetValidPlaces): Same here.
30432
30433         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30434
30435         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30436
30437         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30438
30439         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30440
30441         (Method::Emit): Handle the case when we are a PInvoke method.
30442
30443 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30444
30445         * expression.cs: Use ResolveWithSimpleName on compound names.
30446
30447 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30448
30449         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30450         before trying to reduce it.
30451
30452         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30453
30454         * constant.cs (LookupConstantValue): Implement.
30455
30456         (EmitConstant): Use the above in emitting the constant.
30457
30458         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30459         that are user-defined by doing a LookupConstantValue on them.
30460
30461         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30462         too, like above.
30463
30464 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30465
30466         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30467
30468         (BaseAccess.DoResolve): Implement.
30469
30470         (MemberAccess.DoResolve): Split this routine into a
30471         ResolveMemberAccess routine that can be used independently
30472
30473 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30474
30475         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30476         As that share bits of the implementation.  Is returns a boolean,
30477         while As returns the Type that is being probed.
30478
30479 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30480
30481         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30482         instead of a Literal - much easier.
30483
30484         (EnumInTransit): Remove - utterly useless :-)
30485
30486         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30487
30488         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30489
30490         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30491         chain when we have no associated expression.
30492
30493 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30494
30495         * constant.cs (Define): Use Location while reporting the errror.
30496
30497         Also emit a warning when 'new' is used and there is no inherited
30498         member to hide.
30499
30500         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30501         populated.
30502
30503         (LookupEnumValue): Implement to lookup an enum member's value and define it
30504         if necessary.
30505
30506         (Populate): Re-write accordingly to use the above routine.
30507
30508 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30509
30510         * expression.cs (This): Fix prototype for DoResolveLValue to
30511         override the base class DoResolveLValue.
30512
30513         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30514         declarations) 
30515
30516         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30517         (we need to load the address of the field here).  This fixes
30518         test-22. 
30519
30520         (FieldExpr.DoResolveLValue): Call the DoResolve
30521         function to initialize the Instance expression.
30522
30523         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30524         correctly the GetEnumerator operation on a value type.
30525
30526         * cs-parser.jay: Add more simple parsing error catches.
30527
30528         * statement.cs (Switch): Add support for string switches.
30529         Handle null specially.
30530
30531         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30532
30533 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30534
30535         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30536
30537         (declare_local_constant): New helper function.
30538
30539         * statement.cs (AddConstant): Keep a separate record of constants
30540
30541         (IsConstant): Implement to determine if a variable is a constant.
30542
30543         (GetConstantExpression): Implement.
30544
30545         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30546
30547         * statement.cs (IsVariableDefined): Re-write.
30548
30549 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30550
30551         * class.cs (TypeContainer::FindMembers): Look for constants
30552         in the case when we are looking for MemberTypes.Field
30553
30554         * expression.cs (MemberAccess::DoResolve): Check that in the
30555         case we are a FieldExpr and a Literal, we are not being accessed
30556         by an instance reference.
30557
30558         * cs-parser.jay (local_constant_declaration): Implement.
30559
30560         (declaration_statement): Implement for constant declarations.
30561
30562 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30563
30564         * statement.cs (Switch): Catch double defaults.
30565
30566         (Switch): More work on the switch() statement
30567         implementation.  It works for integral values now, need to finish
30568         string support.
30569
30570
30571 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30572
30573         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30574         integer literals into other integer literals.  To be used by
30575         switch. 
30576
30577 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30578
30579         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30580         some memory.
30581
30582         (EmitDynamicInitializers): Cope with the above since we extract data
30583         directly from ArrayData now.
30584
30585         (ExpectInitializers): Keep track of whether initializers are mandatory
30586         or not.
30587
30588         (Bounds): Make it a hashtable to prevent the same dimension being 
30589         recorded for every element in that dimension.
30590
30591         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30592         from being found.
30593
30594         Also fix bug which was causing the indices to be emitted in the reverse
30595         order.
30596
30597 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30598
30599         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30600         unfinished.  They do not work, because the underlying code is
30601         sloppy.
30602
30603 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30604
30605         * cs-parser.jay: Remove bogus fixme.
30606
30607         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30608         on Switch statement.
30609
30610 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30611
30612         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30613         the same. 
30614
30615         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30616         parameter. Apparently, any expression is allowed. 
30617
30618         (ValidateInitializers): Update accordingly.
30619
30620         (CheckIndices): Fix some tricky bugs thanks to recursion.
30621
30622         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30623         I was being completely brain-dead.
30624
30625         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30626         and re-write acordingly.
30627
30628         (DelegateInvocation): Re-write accordingly.
30629
30630         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30631
30632         (MakeByteBlob): Handle types more correctly.
30633
30634         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30635         initialization from expressions but it is incomplete because I am a complete
30636         Dodo :-|
30637
30638 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30639
30640         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30641         on If.  Basically, we have to return `true' (ie, we do return to
30642         our caller) only if both branches of the if return.
30643
30644         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30645         short-circuit operators, handle them as short circuit operators. 
30646
30647         (Cast.DoResolve): Resolve type.
30648         (Cast.Cast): Take an expression as the target type.
30649
30650         * cs-parser.jay (cast_expression): Remove old hack that only
30651         allowed a limited set of types to be handled.  Now we take a
30652         unary_expression and we resolve to a type during semantic
30653         analysis.
30654
30655         Use the grammar productions from Rhys to handle casts (this is
30656         not complete like Rhys syntax yet, we fail to handle that corner
30657         case that C# has regarding (-x), but we will get there.
30658
30659 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30660
30661         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30662         field which is an array type.
30663
30664         * cs-parser.jay (declare_local_variables): Support array initialization too.
30665
30666         * typemanager.cs (MakeKey): Implement.
30667
30668         (everywhere): Use the above appropriately.
30669
30670         * cs-parser.jay (for_statement): Update for array initialization while
30671         declaring variables.
30672
30673         * ecore.cs : The error message was correct, it's the variable's names that
30674         were misleading ;-) Make the code more readable.
30675
30676         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30677         the correct type etc.
30678
30679         (ConvertExplicit): Handle Enum types by examining the underlying type.
30680
30681 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30682
30683         * parameter.cs (GetCallingConvention): Always return
30684         CallingConventions.Standard for now.
30685
30686 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30687
30688         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30689         and `r' after calling DoNumericPromotions.
30690
30691         * ecore.cs: Fix error message (the types were in the wrong order).
30692
30693         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30694         BindingFlags.Instance as well 
30695
30696         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30697         implicit int literal conversion in an empty cast so that we
30698         propagate the right type upstream.
30699
30700         (UnboxCast): new class used to unbox value types.
30701         (Expression.ConvertExplicit): Add explicit type conversions done
30702         by unboxing.
30703
30704         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30705         the target type before applying the implicit LongLiterals to ULong
30706         literal cast.
30707
30708 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30709
30710         * cs-parser.jay (for_statement): Reworked the way For works: now
30711         we declare manually any variables that are introduced in
30712         for_initializer to solve the problem of having out-of-band code
30713         emition (that is what got for broken).
30714
30715         (declaration_statement): Perform the actual variable declaration
30716         that used to be done in local_variable_declaration here.
30717
30718         (local_variable_declaration): Do not declare anything, just pass
30719         the information on a DictionaryEntry
30720
30721 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30722
30723         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30724         re-write of the logic to now make it recursive.
30725
30726         (UpdateIndices): Re-write accordingly.
30727
30728         Store element data in a separate ArrayData list in the above methods.
30729
30730         (MakeByteBlob): Implement to dump the array data into a byte array.
30731
30732 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30733
30734         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30735         into CheckIndices.
30736
30737         * constant.cs (Define): Implement.
30738
30739         (EmitConstant): Re-write fully.
30740
30741         Pass in location info.
30742
30743         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30744         respectively.
30745
30746         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30747         DictionaryEntry since we need location info too.
30748
30749         (constant_declaration): Update accordingly.
30750
30751         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30752         code into another method : UpdateIndices.
30753
30754 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30755
30756         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30757         some type checking etc.
30758
30759 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30760
30761         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30762         bits to provide dimension info if the user skips doing that.
30763
30764         Update second constructor to store the rank correctly.
30765
30766 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30767
30768         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30769         and try to implement.
30770
30771         * ../errors/cs0150.cs : Add.
30772
30773         * ../errors/cs0178.cs : Add.
30774
30775 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30776
30777         * statement.cs: Implement foreach on multi-dimensional arrays. 
30778
30779         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30780         name of the params argument.
30781
30782         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30783         initializing the array.
30784
30785         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30786         we can use this elsewhere.
30787
30788         * statement.cs: Finish implementation of foreach for single
30789         dimension arrays.
30790
30791         * cs-parser.jay: Use an out-of-band stack to pass information
30792         around, I wonder why I need this.
30793
30794         foreach_block: Make the new foreach_block the current_block.
30795
30796         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30797         function used to return a static Parameters structure.  Used for
30798         empty parameters, as those are created very frequently.
30799
30800         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30801
30802 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30803
30804         * interface.cs : Default modifier is private, not public. The
30805         make verify test passes again.
30806
30807 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30808
30809         * support.cs (ReflectionParameters): Fix logic to determine
30810         whether the last parameter is a params one. Test 9 passes again.
30811
30812         * delegate.cs (Populate): Register the builders we define with
30813         RegisterParameterForBuilder. Test 19 passes again.
30814
30815         * cs-parser.jay (property_declaration): Reference $6 instead
30816         of $$ to get at the location.
30817
30818         (indexer_declaration): Similar stuff.
30819
30820         (attribute): Ditto.
30821
30822         * class.cs (Property): Register parameters for the Get and Set methods
30823         if they exist. Test 23 passes again.
30824
30825         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30826         call to EmitArguments as we are sure there aren't any params arguments. 
30827         Test 32 passes again.
30828
30829         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30830         IndexOutOfRangeException. 
30831
30832         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30833         Test 33 now passes again.
30834
30835 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30836
30837         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30838         broke a bunch of things.  Will have to come up with a better way
30839         of tracking locations.
30840
30841         * statement.cs: Implemented foreach for single dimension arrays.
30842
30843 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30844
30845         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30846         an error.  This removes the lookup from the critical path.
30847
30848         * cs-parser.jay: Removed use of temporary_loc, which is completely
30849         broken. 
30850
30851 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30852
30853         * support.cs (ReflectionParameters.ParameterModifier): Report
30854         whether the argument is a PARAMS argument or not.
30855
30856         * class.cs: Set the attribute `ParamArrayAttribute' on the
30857         parameter argument.
30858
30859         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30860         and cons_param_array_attribute (ConstructorInfo for
30861         ParamArrayAttribute)., 
30862
30863         * codegen.cs: Emit the return using the `Return' statement, that
30864         way we can report the error correctly for missing return values. 
30865
30866         * class.cs (Method.Emit): Clean up.
30867
30868         * expression.cs (Argument.Resolve): Take another argument: the
30869         location where this argument is used.  Notice that this is not
30870         part of the "Argument" class as to reduce the size of the
30871         structure (we know the approximate location anyways).
30872
30873         Test if the argument is a variable-reference, if not, then
30874         complain with a 206.
30875
30876         (Argument.Emit): Emit addresses of variables.
30877
30878         (Argument.FullDesc): Simplify.
30879
30880         (Invocation.DoResolve): Update for Argument.Resolve.
30881
30882         (ElementAccess.DoResolve): ditto.
30883
30884         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30885         method should be virtual, as this method is always virtual.
30886
30887         (NewDelegate.DoResolve): Update for Argument.Resolve.
30888
30889         * class.cs (ConstructorInitializer.DoResolve): ditto.
30890
30891         * attribute.cs (Attribute.Resolve): ditto.
30892
30893 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30894
30895         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30896
30897         * expression.cs (ParameterReference): Drop IStackStorage and implement
30898         IAssignMethod instead. 
30899
30900         (LocalVariableReference): ditto.
30901
30902         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30903         IAssignMethod instead. 
30904
30905 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30906
30907         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30908         enumerations that are used in heavily used structures derive from
30909         byte in a laughable and pathetic attempt to reduce memory usage.
30910         This is the kind of pre-optimzations that you should not do at
30911         home without adult supervision.
30912
30913         * expression.cs (UnaryMutator): New class, used to handle ++ and
30914         -- separatedly from the other unary operators.  Cleans up the
30915         code, and kills the ExpressionStatement dependency in Unary.
30916
30917         (Unary): Removed `method' and `Arguments' from this class, making
30918         it smaller, and moving it all to SimpleCall, so I can reuse this
30919         code in other locations and avoid creating a lot of transient data
30920         strucutres when not required.
30921
30922         * cs-parser.jay: Adjust for new changes.
30923
30924 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30925
30926         * enum.cs (Enum.Populate): If there is a failure during
30927         definition, return
30928
30929         * cs-parser.jay (opt_enum_base): we used to catch type errors
30930         here, but this is really incorrect.  The type error should be
30931         catched during semantic analysis.
30932
30933 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30934
30935         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30936         current_local_parameters as expected since I, in my stupidity, had forgotten
30937         to do this :-)
30938
30939         * attribute.cs (GetValidPlaces): Fix stupid bug.
30940
30941         * class.cs (Method::Emit): Perform check on applicability of attributes.
30942
30943         (Constructor::Emit): Ditto.
30944
30945         (Field::Emit): Ditto.
30946
30947         (Field.Location): Store location information.
30948
30949         (Property, Event, Indexer, Operator): Ditto.
30950
30951         * cs-parser.jay (field_declaration): Pass in location for each field.
30952
30953         * ../errors/cs0592.cs : Add.
30954
30955 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30956
30957         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30958
30959         (InitCoreTypes): Update accordingly.
30960
30961         (RegisterAttrType, LookupAttr): Implement.
30962
30963         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30964         info about the same.
30965
30966         (Resolve): Update to populate the above as necessary.
30967
30968         (Error592): Helper.
30969
30970         (GetValidPlaces): Helper to the above.
30971
30972         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30973
30974         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30975
30976 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30977
30978         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30979
30980         * ../errors/cs0617.cs : Add.
30981
30982 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30983
30984         * enum.cs (Emit): Rename to Populate to be more consistent with what
30985         we expect it to do and when exactly it is called.
30986
30987         * class.cs, rootcontext.cs : Update accordingly.
30988
30989         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30990         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30991
30992         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30993
30994         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30995         of a fieldinfo using the above, when dealing with a FieldBuilder.
30996
30997 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30998
30999         * ../errors/cs0031.cs : Add.
31000
31001         * ../errors/cs1008.cs : Add.
31002
31003         * ../errrors/cs0543.cs : Add.
31004
31005         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
31006         enum type.
31007
31008         (FindMembers): Implement.
31009
31010         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
31011         enums and delegates too.
31012
31013         (enum_types): Rename to builder_to_enum.
31014
31015         (delegate_types): Rename to builder_to_delegate.
31016
31017         * delegate.cs (FindMembers): Implement.
31018
31019 2001-11-09  Ravi Pratap  <ravi@ximian.com>
31020
31021         * typemanager.cs (IsEnumType): Implement.
31022
31023         * enum.cs (Emit): Re-write parts to account for the underlying type
31024         better and perform checking etc.
31025
31026         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
31027         of the underlying type.
31028
31029         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
31030         value
31031
31032         * enum.cs (error31): Helper to report error #31.
31033
31034         * cs-parser.jay (enum_declaration): Store location of each member too.
31035
31036         * enum.cs (member_to_location): New hashtable. 
31037
31038         (AddEnumMember): Update location hashtable.
31039
31040         (Emit): Use the location of each member while reporting errors.
31041
31042 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
31043
31044         * cs-parser.jay: A for_initializer if is a
31045         local_variable_declaration really ammount to have an implicit
31046         block with the variable declaration and no initializer for for.
31047
31048         * statement.cs (For.Emit): Cope with null initializers.
31049
31050         This fixes the infinite loop on for initializers.
31051
31052 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
31053
31054         * enum.cs: More cleanup.
31055
31056         * ecore.cs: Remove dead code.
31057
31058         * class.cs (Property.Emit): More simplification.
31059         (Event.Emit): ditto.
31060
31061         Reworked to have less levels of indentation.
31062
31063 2001-11-08  Ravi Pratap  <ravi@ximian.com>
31064
31065         * class.cs (Property): Emit attributes.
31066
31067         (Field): Ditto.
31068
31069         (Event): Ditto.
31070
31071         (Indexer): Ditto.
31072
31073         (Operator): Ditto.
31074
31075         * enum.cs (Emit): Ditto.
31076
31077         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
31078         Enums too.
31079
31080         * class.cs (Field, Event, etc.): Move attribute generation into the
31081         Emit method everywhere.
31082
31083         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
31084         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
31085         as we had no way of defining nested enums !
31086
31087         * rootcontext.cs : Adjust code accordingly.
31088
31089         * typemanager.cs (AddEnumType): To keep track of enum types separately.
31090
31091 2001-11-07  Ravi Pratap  <ravi@ximian.com>
31092
31093         * expression.cs (EvalConstantExpression): Move into ecore.cs
31094
31095         * enum.cs (Enum): Rename some members and make them public and readonly
31096         according to our convention.
31097
31098         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
31099         nothing else.
31100
31101         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
31102
31103         (Enum::Emit): Write a simple version for now which doesn't try to compute
31104         expressions. I shall modify this to be more robust in just a while.
31105
31106         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
31107
31108         (TypeContainer::CloseType): Create the Enum types too.
31109
31110         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
31111
31112         * expression.cs (EvalConstantExpression): Get rid of completely.
31113
31114         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
31115         user-defined values and other cases.
31116
31117         (IsValidEnumLiteral): Helper function.
31118
31119         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
31120         out there in the case we had a literal FieldExpr.
31121
31122         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
31123
31124         (Literalize): Revamp a bit to take two arguments.
31125
31126         (EnumLiteral): New class which derives from Literal to wrap enum literals.
31127
31128 2001-11-06  Ravi Pratap  <ravi@ximian.com>
31129
31130         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
31131
31132         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
31133
31134         (Resolve): Use the above to ensure we have proper initializers.
31135
31136 2001-11-05  Ravi Pratap  <ravi@ximian.com>
31137
31138         * expression.cs (Expression::EvalConstantExpression): New method to 
31139         evaluate constant expressions.
31140
31141         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
31142
31143 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
31144
31145         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
31146         in an array.
31147
31148         (Binary.ResolveOperator): Handle operator != (object a, object b)
31149         and operator == (object a, object b);
31150
31151         (Binary.DoNumericPromotions): Indicate whether the numeric
31152         promotion was possible.
31153
31154         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
31155         Implement.  
31156
31157         Made the ArrayAccess implement interface IAssignMethod instead of
31158         IStackStore as the order in which arguments are passed reflects
31159         this.
31160
31161         * assign.cs: Instead of using expr.ExprClass to select the way of
31162         assinging, probe for the IStackStore/IAssignMethod interfaces.
31163
31164         * typemanager.cs: Load InitializeArray definition.
31165
31166         * rootcontext.cs (RootContext.MakeStaticData): Used to define
31167         static data that can be used to initialize arrays. 
31168
31169 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
31170
31171         * expression.cs: Handle operator== and operator!= for booleans.
31172
31173         (Conditioal.Reduce): Implement reducer for the ?: operator.
31174
31175         (Conditional.Resolve): Implement dead code elimination.
31176
31177         (Binary.Resolve): Catch string literals and return a new
31178         concatenated string.
31179
31180         (Unary.Reduce): Implement reduction of unary expressions.
31181
31182         * ecore.cs: Split out the expression core handling here.
31183
31184         (Expression.Reduce): New method used to perform constant folding
31185         and CSE.  This is needed to support constant-expressions. 
31186
31187         * statement.cs (Statement.EmitBoolExpression): Pass true and false
31188         targets, and optimize for !x.
31189
31190 2001-11-04  Ravi Pratap  <ravi@ximian.com>
31191
31192         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
31193         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
31194         set custom atttributes.
31195
31196         * literal.cs (Literal::GetValue): New abstract method to return the actual
31197         value of the literal, cast as an object.
31198
31199         (*Literal): Implement GetValue method.
31200
31201         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
31202         expressions to the arraylist but objects of type Argument.
31203
31204         * class.cs (TypeContainer::Emit): Emit our attributes too.
31205
31206         (Method::Emit, Constructor::Emit): Ditto.
31207
31208         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
31209         to be ignoring earlier.
31210
31211 2001-11-03  Ravi Pratap  <ravi@ximian.com>
31212
31213         * attribute.cs (AttributeSection::Define): Implement to do the business
31214         of constructing a CustomAttributeBuilder.
31215
31216         (Attribute): New trivial class. Increases readability of code.  
31217
31218         * cs-parser.jay : Update accordingly.
31219
31220         (positional_argument_list, named_argument_list, named_argument): New rules
31221
31222         (attribute_arguments): Use the above so that we are more correct.
31223
31224 2001-11-02  Ravi Pratap  <ravi@ximian.com>
31225
31226         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
31227         to perform all checks for a method with a params parameter.
31228
31229         (Invocation::OverloadResolve): Update to use the above method and therefore
31230         cope correctly with params method invocations.
31231
31232         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
31233         params too.
31234
31235         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
31236         constructors in our parent too because we can't afford to miss out on 
31237         protected ones ;-)
31238
31239         * attribute.cs (AttributeSection): New name for the class Attribute
31240
31241         Other trivial changes to improve readability.
31242
31243         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
31244         use the new class names.
31245
31246 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31247
31248         * class.cs (Method::Define): Complete definition for params types too
31249
31250         (Indexer::Define): Ditto.
31251
31252         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
31253         Cope everywhere with a request for info about the array parameter.
31254
31255 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31256
31257         * tree.cs (RecordNamespace): Fix up to check for the correct key.
31258
31259         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
31260         local_variable_type to extract the string corresponding to the type.
31261
31262         (local_variable_type): Fixup the action to use the new helper method.
31263
31264         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
31265         go.
31266
31267         * expression.cs : Clean out code which uses the above.
31268
31269 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31270
31271         * typemanager.cs (RegisterMethod): Check if we already have an existing key
31272         and bale out if necessary by returning a false.
31273
31274         (RegisterProperty): Ditto.
31275
31276         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
31277         and print out appropriate error messages.
31278
31279         * interface.cs (everywhere): Ditto.
31280
31281         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
31282         location to constructor.
31283
31284         * class.cs (Property, Event, Indexer): Update accordingly.
31285
31286         * ../errors/cs111.cs : Added.
31287
31288         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
31289         of a method, as laid down by the spec.
31290
31291         (Invocation::OverloadResolve): Use the above method.
31292
31293 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31294
31295         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
31296         now take a TypeContainer and a Parameters object.
31297
31298         (ParameterData): Modify return type of ParameterModifier method to be 
31299         Parameter.Modifier and not a string.
31300
31301         (ReflectionParameters, InternalParameters): Update accordingly.
31302
31303         * expression.cs (Argument::GetParameterModifier): Same here.
31304
31305         * support.cs (InternalParameters::ParameterType): Find a better way of determining
31306         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
31307         symbol in it at all so maybe this is only for now.
31308
31309 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31310
31311         * support.cs (InternalParameters): Constructor now takes an extra argument 
31312         which is the actual Parameters class.
31313
31314         (ParameterDesc): Update to provide info on ref/out modifiers.
31315
31316         * class.cs (everywhere): Update call to InternalParameters to pass in
31317         the second argument too.
31318
31319         * support.cs (ParameterData): Add ParameterModifier, which is a method 
31320         to return the modifier info [ref/out etc]
31321
31322         (InternalParameters, ReflectionParameters): Implement the above.
31323
31324         * expression.cs (Argument::ParameterModifier): Similar function to return
31325         info about the argument's modifiers.
31326
31327         (Invocation::OverloadResolve): Update to take into account matching modifiers 
31328         too.
31329
31330         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
31331         a new SetFormalParameters object which we pass to InternalParameters.
31332
31333 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31334
31335         * expression.cs (NewArray): Merge into the ArrayCreation class.
31336
31337 2001-10-29  Ravi Pratap  <ravi@ximian.com>
31338
31339         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
31340         NewUserdefinedArray into one as there wasn't much of a use in having
31341         two separate ones.
31342
31343         * expression.cs (Argument): Change field's name to ArgType from Type.
31344
31345         (Type): New readonly property which returns the proper type, taking into 
31346         account ref/out modifiers.
31347
31348         (everywhere): Adjust code accordingly for the above.
31349
31350         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
31351         whether we are emitting for a ref or out parameter.
31352
31353         * expression.cs (Argument::Emit): Use the above field to set the state.
31354
31355         (LocalVariableReference::Emit): Update to honour the flag and emit the
31356         right stuff.
31357
31358         * parameter.cs (Attributes): Set the correct flags for ref parameters.
31359
31360         * expression.cs (Argument::FullDesc): New function to provide a full desc.
31361
31362         * support.cs (ParameterData): Add method ParameterDesc to the interface.
31363
31364         (ReflectionParameters, InternalParameters): Implement the above method.
31365
31366         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
31367         reporting errors.
31368
31369         (Invocation::FullMethodDesc): Ditto. 
31370
31371 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
31372
31373         * cs-parser.jay: Add extra production for the second form of array
31374         creation. 
31375
31376         * expression.cs (ArrayCreation): Update to reflect the above
31377         change. 
31378
31379         * Small changes to prepare for Array initialization.
31380
31381 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
31382
31383         * typemanager.cs (ImplementsInterface): interface might be null;
31384         Deal with this problem;
31385
31386         Also, we do store negative hits on the cache (null values), so use
31387         this instead of calling t.GetInterfaces on the type everytime.
31388
31389 2001-10-28  Ravi Pratap  <ravi@ximian.com>
31390
31391         * typemanager.cs (IsBuiltinType): New method to help determine the same.
31392
31393         * expression.cs (New::DoResolve): Get rid of array creation code and instead
31394         split functionality out into different classes.
31395
31396         (New::FormArrayType): Move into NewBuiltinArray.
31397
31398         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
31399         quite useless.
31400
31401         (NewBuiltinArray): New class to handle creation of built-in arrays.
31402
31403         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
31404         account creation of one-dimensional arrays.
31405
31406         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
31407
31408         (NewUserdefinedArray::DoResolve): Implement.
31409
31410         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
31411
31412         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
31413         we maintain inside the TypeManager. This is necessary to perform lookups on the
31414         module builder.
31415
31416         (LookupType): Update to perform GetType on the module builders too.     
31417
31418         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31419
31420         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31421
31422 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31423
31424         * expression.cs (New::DoResolve): Implement guts of array creation.
31425
31426         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31427
31428 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31429
31430         * expression.cs: Fix bug I introduced lsat night that broke
31431         Delegates. 
31432
31433         (Expression.Resolve): Report a 246 error (can not resolve name)
31434         if we find a SimpleName in the stream.
31435
31436         (Expression.ResolveLValue): Ditto.
31437
31438         (Expression.ResolveWithSimpleName): This function is a variant of
31439         ResolveName, this one allows SimpleNames to be returned without a
31440         warning.  The only consumer of SimpleNames is MemberAccess
31441
31442 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31443
31444         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31445         might arrive here.  I have my doubts that this is correct.
31446
31447         * statement.cs (Lock): Implement lock statement.
31448
31449         * cs-parser.jay: Small fixes to support `lock' and `using'
31450
31451         * cs-tokenizer.cs: Remove extra space
31452
31453         * driver.cs: New flag --checked, allows to turn on integer math
31454         checking. 
31455
31456         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31457         Threading.Monitor.Exit 
31458
31459 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31460
31461         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31462         Expression Class to be IndexerAccess.
31463
31464         Notice that Indexer::DoResolve sets the eclass to Value.
31465
31466 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31467
31468         * class.cs (TypeContainer::Emit): Emit code for indexers.
31469
31470         * assign.cs (IAssignMethod): New interface implemented by Indexers
31471         and Properties for handling assignment.
31472
31473         (Assign::Emit): Simplify and reuse code. 
31474
31475         * expression.cs (IndexerAccess, PropertyExpr): Implement
31476         IAssignMethod, clean up old code. 
31477
31478 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31479
31480         * typemanager.cs (ImplementsInterface): New method to determine if a type
31481         implements a given interface. Provides a nice cache too.
31482
31483         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31484         method.
31485
31486         (ConvertReferenceExplicit): Ditto.
31487
31488         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31489         various methods, with correct names etc.
31490
31491         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31492         Operator.UnaryNegation.
31493
31494         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31495         we have a unary plus or minus operator.
31496
31497         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31498         UnaryMinus.
31499
31500         * everywhere : update accordingly.
31501
31502         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31503         respectively.
31504
31505         * class.cs (Method::Define): For the case where we are implementing a method
31506         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31507         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31508
31509 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31510
31511         * interface.cs (FindMembers): Implement to work around S.R.E
31512         lameness.
31513
31514         * typemanager.cs (IsInterfaceType): Implement.
31515
31516         (FindMembers): Update to handle interface types too.
31517
31518         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31519         use IsAssignableFrom as that is not correct - it doesn't work.
31520
31521         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31522         and accordingly override EmitStatement.
31523
31524         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31525         using the correct logic :-)
31526
31527 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31528
31529         * ../errors/cs-11.cs : Add to demonstrate error -11 
31530
31531 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31532
31533         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31534         then pass this as a hint to ResolveLValue.
31535
31536         * expression.cs (FieldExpr): Add Location information
31537
31538         (FieldExpr::LValueResolve): Report assignment to readonly
31539         variable. 
31540
31541         (Expression::ExprClassFromMemberInfo): Pass location information.
31542
31543         (Expression::ResolveLValue): Add new method that resolves an
31544         LValue. 
31545
31546         (Expression::DoResolveLValue): Default invocation calls
31547         DoResolve. 
31548
31549         (Indexers): New class used to keep track of indexers in a given
31550         Type. 
31551
31552         (IStackStore): Renamed from LValue, as it did not really describe
31553         what this did.  Also ResolveLValue is gone from this interface and
31554         now is part of Expression.
31555
31556         (ElementAccess): Depending on the element access type
31557
31558         * typemanager.cs: Add `indexer_name_type' as a Core type
31559         (System.Runtime.CompilerServices.IndexerNameAttribute)
31560
31561         * statement.cs (Goto): Take a location.
31562
31563 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31564
31565         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31566         if two delegates are compatible.
31567
31568         (NewDelegate::DoResolve): Update to take care of the case when
31569         we instantiate a delegate from another delegate.
31570
31571         * typemanager.cs (FindMembers): Don't even try to look up members
31572         of Delegate types for now.
31573
31574 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31575
31576         * delegate.cs (NewDelegate): New class to take care of delegate
31577         instantiation.
31578
31579         * expression.cs (New): Split the delegate related code out into 
31580         the NewDelegate class.
31581
31582         * delegate.cs (DelegateInvocation): New class to handle delegate 
31583         invocation.
31584
31585         * expression.cs (Invocation): Split out delegate related code into
31586         the DelegateInvocation class.
31587
31588 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31589
31590         * expression.cs (New::DoResolve): Implement delegate creation fully
31591         and according to the spec.
31592
31593         (New::DoEmit): Update to handle delegates differently.
31594
31595         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31596         because of which we were printing out arguments in reverse order !
31597
31598         * delegate.cs (VerifyMethod): Implement to check if the given method
31599         matches the delegate.
31600
31601         (FullDelegateDesc): Implement.
31602
31603         (VerifyApplicability): Implement.
31604
31605         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31606         delegate invocations too.
31607
31608         (Invocation::Emit): Ditto.
31609
31610         * ../errors/cs1593.cs : Added.
31611
31612         * ../errors/cs1594.cs : Added.
31613
31614         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31615
31616 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31617
31618         * typemanager.cs (intptr_type): Core type for System.IntPtr
31619
31620         (InitCoreTypes): Update for the same.
31621
31622         (iasyncresult_type, asynccallback_type): Ditto.
31623
31624         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31625         correct.
31626
31627         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31628         too.
31629
31630         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31631         the builders for the 4 members of a delegate type :-)
31632
31633         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31634         type.
31635
31636         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31637
31638         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31639
31640 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31641
31642         * statement.cs (Break::Emit): Implement.   
31643         (Continue::Emit): Implement.
31644
31645         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31646         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31647         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31648         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31649         end loop
31650
31651         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31652         properties that track the label for the current loop (begin of the
31653         loop and end of the loop).
31654
31655 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31656
31657         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31658         use of emitting anything at all.
31659
31660         * class.cs, rootcontext.cs : Get rid of calls to the same.
31661
31662         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31663
31664         (Populate): Define the constructor correctly and set the implementation
31665         attributes.
31666
31667         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31668         have been defined.
31669
31670         (AddDelegateType): Implement.
31671
31672         (IsDelegateType): Implement helper method.
31673
31674         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31675
31676         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31677         and accordingly handle it.
31678
31679         * delegate.cs (Populate): Take TypeContainer argument.
31680         Implement bits to define the Invoke method. However, I still haven't figured out
31681         how to take care of the native int bit :-(
31682
31683         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31684         Qualify the name of the delegate, not its return type !
31685
31686         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31687         conversion.
31688
31689         (StandardConversionExists): Checking for array types turns out to be recursive.
31690
31691         (ConvertReferenceExplicit): Implement array conversion.
31692
31693         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31694
31695 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31696
31697         * cs-parser.jay (delegate_declaration): Store the fully qualified
31698         name as it is a type declaration.
31699
31700         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31701         readonly.
31702
31703         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31704         as TypeContainer::DefineType.
31705
31706         (Populate): Method in which all the definition of the various methods (Invoke)
31707         etc is done.
31708
31709         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31710         see.
31711
31712         (CloseDelegate): Finally creates the delegate.
31713
31714         * class.cs (TypeContainer::DefineType): Update to define delegates.
31715         (Populate, Emit and CloseType): Do the same thing here too.
31716
31717         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31718         delegates in all these operations.
31719
31720 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31721
31722         * expression.cs: LocalTemporary: a new expression used to
31723         reference a temporary that has been created.
31724
31725         * assign.cs: Handle PropertyAccess back here, so that we can
31726         provide the proper semantic access to properties.
31727
31728         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31729         a few more explicit conversions. 
31730
31731         * modifiers.cs: `NEW' modifier maps to HideBySig.
31732
31733         * expression.cs (PropertyExpr): Make this into an
31734         ExpressionStatement, and support the EmitStatement code path. 
31735
31736         Perform get/set error checking, clean up the interface.
31737
31738         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31739         them into toplevel access objects.
31740
31741 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31742
31743         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31744         SRE.
31745
31746         * typemanager.cs: Keep track here of our PropertyBuilders again to
31747         work around lameness in SRE.
31748
31749 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31750
31751         * expression.cs (LValue::LValueResolve): New method in the
31752         interface, used to perform a second resolution pass for LValues. 
31753
31754         (This::DoResolve): Catch the use of this in static methods.
31755
31756         (This::LValueResolve): Implement.
31757
31758         (This::Store): Remove warning, assigning to `this' in structures
31759         is 
31760
31761         (Invocation::Emit): Deal with invocation of
31762         methods on value types.  We need to pass the address to structure
31763         methods rather than the object itself.  (The equivalent code to
31764         emit "this" for structures leaves the entire structure on the
31765         stack instead of a pointer to it). 
31766
31767         (ParameterReference::DoResolve): Compute the real index for the
31768         argument based on whether the method takes or not a `this' pointer
31769         (ie, the method is static).
31770
31771         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31772         value types returned from functions when we need to invoke a
31773         method on the sturcture.
31774
31775
31776 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31777
31778         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31779         defining the type in the Modulebuilder or Typebuilder. This is to take
31780         care of nested types which need to be defined on the TypeBuilder using
31781         DefineNestedMethod.
31782
31783         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31784         methods in RootContext, only ported to be part of TypeContainer.
31785
31786         (TypeContainer::GetInterfaceOrClass): Ditto.
31787
31788         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31789
31790         * interface.cs (Interface::DefineInterface): New method. Does exactly
31791         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31792         too.
31793
31794         (Interface::GetInterfaces): Move from RootContext here and port.
31795
31796         (Interface::GetInterfaceByName): Same here.
31797
31798         * rootcontext.cs (ResolveTree): Re-write.
31799
31800         (PopulateTypes): Re-write.
31801
31802         * class.cs (TypeContainer::Populate): Populate nested types too.
31803         (TypeContainer::Emit): Emit nested members too.
31804
31805         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31806         instead just use the name argument passed in as it is already fully
31807         qualified.
31808
31809         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31810         to TypeContainer mapping to see if a type is user-defined.
31811
31812         * class.cs (TypeContainer::CloseType): Implement. 
31813
31814         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31815         the default constructor.
31816
31817         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31818         twice.
31819
31820         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31821
31822         * interface.cs (CloseType): Create the type here.
31823
31824         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31825         the hierarchy.
31826
31827         Remove all the methods which are now in TypeContainer.
31828
31829 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31830
31831         * delegate.cs (Define): Re-write bits to define the delegate
31832         correctly.
31833
31834 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31835
31836         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31837
31838         * expression.cs (ImplicitReferenceConversion): handle null as well
31839         as a source to convert to any reference type.
31840
31841         * statement.cs (Return): Perform any implicit conversions to
31842         expected return type.  
31843
31844         Validate use of return statement.  
31845
31846         * codegen.cs (EmitContext): Pass the expected return type here.
31847
31848         * class.cs (Method, Constructor, Property): Pass expected return
31849         type to EmitContext.
31850
31851 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31852
31853         * expression.cs: Make DoResolve take an EmitContext instead of a
31854         TypeContainer.
31855
31856         Replaced `l' and `location' for `loc', for consistency.
31857
31858         (Error, Warning): Remove unneeded Tc argument.
31859
31860         * assign.cs, literal.cs, constant.cs: Update to new calling
31861         convention. 
31862
31863         * codegen.cs: EmitContext now contains a flag indicating whether
31864         code is being generated in a static method or not.
31865
31866         * cs-parser.jay: DecomposeQI, new function that replaces the old
31867         QualifiedIdentifier.  Now we always decompose the assembled
31868         strings from qualified_identifier productions into a group of
31869         memberaccesses.
31870
31871 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31872
31873         * rootcontext.cs: Deal with field-less struct types correctly now
31874         by passing the size option to Define Type.
31875
31876         * class.cs: Removed hack that created one static field. 
31877
31878 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31879
31880         * statement.cs: Moved most of the code generation here. 
31881
31882 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31883
31884         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31885         seem very right.
31886
31887         (ElementAccess): Remove useless bits for now - keep checks as the spec
31888         says.
31889
31890 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31891
31892         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31893         and start performing checks according to the spec.
31894
31895 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31896
31897         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31898         rank_specifiers instead.
31899
31900         (rank_specifiers): Change the order in which the rank specifiers are stored
31901
31902         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31903
31904         * expression.cs (ElementAccess): Implement the LValue interface too.
31905
31906 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31907
31908         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31909         except that user defined conversions are not included.
31910
31911         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31912         perform the conversion of the return type, if necessary.
31913
31914         (New::DoResolve): Check whether we are creating an array or an object
31915         and accordingly do the needful.
31916
31917         (New::Emit): Same here.
31918
31919         (New::DoResolve): Implement guts of array creation.
31920
31921         (New::FormLookupType): Helper function.
31922
31923 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31924
31925         * codegen.cs: Removed most of the code generation here, and move the
31926         corresponding code generation bits to the statement classes. 
31927
31928         Added support for try/catch/finalize and throw.
31929
31930         * cs-parser.jay: Added support for try/catch/finalize.
31931
31932         * class.cs: Catch static methods having the flags override,
31933         virtual or abstract.
31934
31935         * expression.cs (UserCast): This user cast was not really doing
31936         what it was supposed to do.  Which is to be born in fully resolved
31937         state.  Parts of the resolution were being performed at Emit time! 
31938
31939         Fixed this code.
31940
31941 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31942
31943         * expression.cs: Implicity convert the result from UserCast.
31944
31945 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31946
31947         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31948         prevented it from working correctly. 
31949
31950         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31951         merely ConvertImplicit.
31952
31953 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31954
31955         * typemanager.cs: Make the LookupTypeContainer function static,
31956         and not per-instance.  
31957
31958         * class.cs: Make static FindMembers (the one that takes a Type
31959         argument). 
31960
31961         * codegen.cs: Add EmitForeach here.
31962
31963         * cs-parser.jay: Make foreach a toplevel object instead of the
31964         inline expansion, as we need to perform semantic analysis on it. 
31965
31966 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31967
31968         * expression.cs (Expression::ImplicitUserConversion): Rename to
31969         UserDefinedConversion.
31970
31971         (Expression::UserDefinedConversion): Take an extra argument specifying 
31972         whether we look for explicit user conversions too.
31973
31974         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31975
31976         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31977
31978         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31979         with the appropriate arguments.
31980
31981         * cs-parser.jay (cast_expression): Record location too.
31982
31983         * expression.cs (Cast): Record location info.
31984
31985         (Expression::ConvertExplicit): Take location argument.
31986
31987         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31988         to determine if we are doing explicit conversions.
31989
31990         (UserCast::Emit): Update accordingly.
31991
31992         (Expression::ConvertExplicit): Report an error if everything fails.
31993
31994         * ../errors/cs0030.cs : Add.
31995
31996 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31997
31998         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31999         virtual and newslot bits. 
32000
32001         * class.cs (TypeContainer::RegisterRequiredImplementations):
32002         Record methods we need.
32003
32004         (TypeContainer::MakeKey): Helper function to make keys for
32005         MethodBases, since the Methodbase key is useless.
32006
32007         (TypeContainer::Populate): Call RegisterRequiredImplementations
32008         before defining the methods.   
32009
32010         Create a mapping for method_builders_to_methods ahead of time
32011         instead of inside a tight loop.
32012
32013         (::RequireMethods):  Accept an object as the data to set into the
32014         hashtable so we can report interface vs abstract method mismatch.
32015
32016 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
32017
32018         * report.cs: Make all of it static.
32019
32020         * rootcontext.cs: Drop object_type and value_type computations, as
32021         we have those in the TypeManager anyways.
32022
32023         Drop report instance variable too, now it is a global.
32024
32025         * driver.cs: Use try/catch on command line handling.
32026
32027         Add --probe option to debug the error reporting system with a test
32028         suite. 
32029
32030         * report.cs: Add support for exiting program when a probe
32031         condition is reached.
32032
32033 2001-10-03  Ravi Pratap  <ravi@ximian.com>
32034
32035         * expression.cs (Binary::DoNumericPromotions): Fix the case when
32036         we do a forcible conversion regardless of type, to check if 
32037         ForceConversion returns a null.
32038
32039         (Binary::error19): Use location to report error.
32040
32041         (Unary::error23): Use location here too.
32042
32043         * ../errors/cs0019.cs : Check in.
32044
32045         * ../errors/cs0023.cs : Check in.
32046
32047         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
32048         case of a non-null MethodInfo object with a length of 0 !
32049
32050         (Binary::ResolveOperator): Flag error if overload resolution fails to find
32051         an applicable member - according to the spec :-)
32052         Also fix logic to find members in base types.
32053
32054         (Unary::ResolveOperator): Same here.
32055
32056         (Unary::report23): Change name to error23 and make first argument a TypeContainer
32057         as I was getting thoroughly confused between this and error19 :-)
32058
32059         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
32060         (::FindMostEncompassedType): Implement.
32061         (::FindMostEncompassingType): Implement.
32062         (::StandardConversionExists): Implement.
32063
32064         (UserImplicitCast): Re-vamp. We now need info about most specific
32065         source and target types so that we can do the necessary conversions.
32066
32067         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
32068         mathematical union with no duplicates.
32069
32070 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
32071
32072         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
32073         in order from base classes to child classes, so that we can in
32074         child classes look up in our parent for method names and
32075         attributes (required for handling abstract, virtual, new, override
32076         constructs: we need to instrospect our base class, and if we dont
32077         populate the classes in order, the introspection might be
32078         incorrect.  For example, a method could query its parent before
32079         the parent has any methods and would determine that the parent has
32080         no abstract methods (while it could have had them)).
32081
32082         (RootContext::CreateType): Record the order in which we define the
32083         classes.
32084
32085 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
32086
32087         * class.cs (TypeContainer::Populate): Also method definitions can
32088         fail now, keep track of this.
32089
32090         (TypeContainer::FindMembers): Implement support for
32091         DeclaredOnly/noDeclaredOnly flag.
32092
32093         (Constructor::Emit) Return the ConstructorBuilder.
32094
32095         (Method::Emit) Return the MethodBuilder. 
32096         Check for abstract or virtual methods to be public.
32097
32098         * rootcontext.cs (RootContext::CreateType): Register all the
32099         abstract methods required for the class to be complete and the
32100         interface methods that must be implemented. 
32101
32102         * cs-parser.jay: Report error 501 (method requires body if it is
32103         not marked abstract or extern).
32104
32105         * expression.cs (TypeOf::Emit): Implement.
32106
32107         * typemanager.cs: runtime_handle_type, new global type.
32108
32109         * class.cs (Property::Emit): Generate code for properties.
32110
32111 2001-10-02  Ravi Pratap  <ravi@ximian.com>
32112
32113         * expression.cs (Unary::ResolveOperator): Find operators on base type
32114         too - we now conform exactly to the spec.
32115
32116         (Binary::ResolveOperator): Same here.
32117
32118         * class.cs (Operator::Define): Fix minor quirk in the tests.
32119
32120         * ../errors/cs0215.cs : Added.
32121
32122         * ../errors/cs0556.cs : Added.
32123
32124         * ../errors/cs0555.cs : Added.
32125
32126 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
32127
32128         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
32129         single integer which is really efficient
32130
32131 2001-10-01  Ravi Pratap  <ravi@ximian.com>
32132
32133         *  expression.cs (Expression::ImplicitUserConversion): Use location
32134         even in the case when we are examining True operators.
32135  
32136         * class.cs (Operator::Define): Perform extensive checks to conform
32137         with the rules for operator overloading in the spec.
32138
32139         * expression.cs (Expression::ImplicitReferenceConversion): Implement
32140         some of the other conversions mentioned in the spec.
32141
32142         * typemanager.cs (array_type): New static member for the System.Array built-in
32143         type.
32144
32145         (cloneable_interface): For System.ICloneable interface.
32146
32147         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
32148         we start resolving the tree and populating types.
32149
32150         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
32151  
32152 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
32153
32154         * expression.cs (Expression::ExprClassFromMemberInfo,
32155         Expression::Literalize): Create literal expressions from
32156         FieldInfos which are literals.
32157
32158         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
32159         type casts, because they were wrong.  The test suite in tests
32160         caught these ones.
32161
32162         (ImplicitNumericConversion): ushort to ulong requires a widening
32163         cast. 
32164
32165         Int32 constant to long requires widening cast as well.
32166
32167         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
32168         for integers because the type on the stack is not i4.
32169
32170 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
32171
32172         * expression.cs (report118): require location argument. 
32173
32174         * parameter.cs: Do not dereference potential null value.
32175
32176         * class.cs: Catch methods that lack the `new' keyword when
32177         overriding a name.  Report warnings when `new' is used without
32178         anything being there to override.
32179
32180         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
32181
32182         * class.cs: Only add constructor to hashtable if it is non-null
32183         (as now constructors can fail on define).
32184
32185         (TypeManager, Class, Struct): Take location arguments.
32186
32187         Catch field instance initialization in structs as errors.
32188
32189         accepting_filter: a new filter for FindMembers that is static so
32190         that we dont create an instance per invocation.
32191
32192         (Constructor::Define): Catch errors where a struct constructor is
32193         parameterless 
32194
32195         * cs-parser.jay: Pass location information for various new
32196         constructs. 
32197
32198         * delegate.cs (Delegate): take a location argument.
32199
32200         * driver.cs: Do not call EmitCode if there were problesm in the
32201         Definition of the types, as many Builders wont be there. 
32202
32203         * decl.cs (Decl::Decl): Require a location argument.
32204
32205         * cs-tokenizer.cs: Handle properly hex constants that can not fit
32206         into integers, and find the most appropiate integer for it.
32207
32208         * literal.cs: Implement ULongLiteral.
32209
32210         * rootcontext.cs: Provide better information about the location of
32211         failure when CreateType fails.
32212
32213 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
32214
32215         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
32216         as well.
32217
32218         * expression.cs (Binary::CheckShiftArguments): Add missing type
32219         computation.
32220         (Binary::ResolveOperator): Add type to the logical and and logical
32221         or, Bitwise And/Or and Exclusive Or code paths, it was missing
32222         before.
32223
32224         (Binary::DoNumericPromotions): In the case where either argument
32225         is ulong (and most signed types combined with ulong cause an
32226         error) perform implicit integer constant conversions as well.
32227
32228 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32229
32230         * expression.cs (UserImplicitCast): Method should always be
32231         non-null. 
32232         (Invocation::BetterConversion): Simplified test for IntLiteral.
32233
32234         (Expression::ImplicitNumericConversion): Split this routine out.
32235         Put the code that performs implicit constant integer conversions
32236         here. 
32237
32238         (Expression::Resolve): Become a wrapper around DoResolve so we can
32239         check eclass and type being set after resolve.
32240
32241         (Invocation::Badness): Remove this dead function
32242
32243         (Binary::ResolveOperator): Do not compute the expensive argumnets
32244         unless we have a union for it.
32245
32246         (Probe::Emit): Is needs to do an isinst and then
32247         compare against null.
32248
32249         (::CanConvert): Added Location argument.  If the Location argument
32250         is null (Location.Null), then we do not report errors.  This is
32251         used by the `probe' mechanism of the Explicit conversion.  We do
32252         not want to generate an error for something that the user
32253         explicitly requested to be casted.  But the pipeline for an
32254         explicit cast first tests for potential implicit casts.
32255
32256         So for now, if the Location is null, it means `Probe only' to
32257         avoid adding another argument.   Might have to revise this
32258         strategy later.
32259
32260         (ClassCast): New class used to type cast objects into arbitrary
32261         classes (used in Explicit Reference Conversions).
32262
32263         Implement `as' as well.
32264
32265         Reverted all the patches from Ravi below: they were broken:
32266
32267                 * The use of `level' as a mechanism to stop recursive
32268                   invocations is wrong.  That was there just to catch the
32269                   bug with a strack trace but not as a way of addressing
32270                   the problem.
32271
32272                   To fix the problem we have to *understand* what is going
32273                   on and the interactions and come up with a plan, not
32274                   just get things going.
32275
32276                 * The use of the type conversion cache that I proposed
32277                   last night had an open topic: How does this work across
32278                   protection domains.  A user defined conversion might not
32279                   be public in the location where we are applying the
32280                   conversion, a different conversion might be selected
32281                   (ie, private A->B (better) but public B->A (worse),
32282                   inside A, A->B applies, but outside it, B->A will
32283                   apply).
32284
32285                 * On top of that (ie, even if the above is solved),
32286                   conversions in a cache need to be abstract.  Ie, `To
32287                   convert from an Int to a Short use an OpcodeCast', not
32288                   `To convert from an Int to a Short use the OpcodeCast on
32289                   the variable 5' (which is what this patch was doing).
32290
32291 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32292
32293         * expression.cs (Invocation::ConversionExists): Re-write to use
32294         the conversion cache
32295
32296         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
32297         cache all conversions done, not just user-defined ones.
32298
32299         (Invocation::BetterConversion): The real culprit. Use ConversionExists
32300         to determine if a conversion exists instead of acutually trying to 
32301         perform the conversion. It's faster too.
32302
32303         (Expression::ConvertExplicit): Modify to use ConversionExists to check
32304         and only then attempt the implicit conversion.
32305
32306 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32307
32308         * expression.cs (ConvertImplicit): Use a cache for conversions
32309         already found. Check level of recursion and bail out if necessary.
32310
32311 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32312
32313         * typemanager.cs (string_concat_string_string, string_concat_object_object):
32314         Export standard methods that we expect for string operations.
32315
32316         * statement.cs (Block::UsageWarning): Track usage of variables and
32317         report the errors for not used variables.
32318
32319         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
32320         operator. 
32321
32322 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32323
32324         * codegen.cs: remove unnneded code 
32325
32326         * expression.cs: Removed BuiltinTypeAccess class
32327
32328         Fix the order in which implicit conversions are
32329         done.  
32330
32331         The previous fixed dropped support for boxed conversions (adding a
32332         test to the test suite now)
32333
32334         (UserImplicitCast::CanConvert): Remove test for source being null,
32335         that code is broken.  We should not feed a null to begin with, if
32336         we do, then we should track the bug where the problem originates
32337         and not try to cover it up here.
32338
32339         Return a resolved expression of type UserImplicitCast on success
32340         rather than true/false.  Ravi: this is what I was talking about,
32341         the pattern is to use a static method as a "constructor" for
32342         objects. 
32343
32344         Also, do not create arguments until the very last minute,
32345         otherwise we always create the arguments even for lookups that
32346         will never be performed. 
32347
32348         (UserImplicitCast::Resolve): Eliminate, objects of type
32349         UserImplicitCast are born in a fully resolved state. 
32350
32351         * typemanager.cs (InitCoreTypes): Init also value_type
32352         (System.ValueType). 
32353
32354         * expression.cs (Cast::Resolve): First resolve the child expression.
32355
32356         (LValue): Add new method AddressOf to be used by
32357         the `&' operator.  
32358
32359         Change the argument of Store to take an EmitContext instead of an
32360         ILGenerator, because things like FieldExpr need to be able to call
32361         their children expression to generate the instance code. 
32362
32363         (Expression::Error, Expression::Warning): Sugar functions for
32364         reporting errors.
32365
32366         (Expression::MemberLookup): Accept a TypeContainer instead of a
32367         Report as the first argument.
32368
32369         (Expression::ResolvePrimary): Killed.  I still want to improve
32370         this as currently the code is just not right.
32371
32372         (Expression::ResolveMemberAccess): Simplify, but it is still
32373         wrong. 
32374
32375         (Unary::Resolve): Catch errors in AddressOf operators.
32376
32377         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
32378         index to a byte for the short-version, or the compiler will choose
32379         the wrong Emit call, which generates the wrong data.
32380
32381         (ParameterReference::Emit, ::Store): same.
32382
32383         (FieldExpr::AddressOf): Implement.
32384
32385         * typemanager.cs: TypeManager: made public variable instead of
32386         property.
32387
32388         * driver.cs: document --fatal.
32389
32390         * report.cs (ErrorMessage, WarningMessage): new names for the old
32391         Error and Warning classes.
32392
32393         * cs-parser.jay (member_access): Turn built-in access to types
32394         into a normal simplename
32395
32396 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32397
32398         * expression.cs (Invocation::BetterConversion): Fix to cope
32399         with q being null, since this was introducing a bug.
32400
32401         * expression.cs (ConvertImplicit): Do built-in conversions first.
32402
32403 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32404
32405         * expression.cs (UserImplicitCast::Resolve): Fix bug.
32406
32407 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32408
32409         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
32410         I had introduced long ago (what's new ?).
32411
32412         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
32413         the work of all the checking. 
32414         (ConvertImplicit): Call CanConvert and only then create object if necessary.
32415         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
32416
32417         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32418         that is the right way. 
32419
32420         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32421         overloading resolution. Use everywhere instead of cutting and pasting code.
32422
32423         (Binary::ResolveOperator): Use MakeUnionSet.
32424
32425         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32426         we have to convert to bool types. Not complete yet.
32427
32428 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32429
32430         * typemanager.cs (TypeManager::CSharpName): support ushort.
32431
32432         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32433         to provide an expression that performsn an implicit constant int
32434         conversion (section 6.1.6).
32435         (Expression::ConvertImplicitRequired): Reworked to include
32436         implicit constant expression conversions.
32437
32438         (Expression::ConvertNumericExplicit): Finished.
32439
32440         (Invocation::Emit): If InstanceExpression is null, then it means
32441         that we perform a call on this.
32442
32443 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32444
32445         * expression.cs (Unary::Emit): Remove some dead code.
32446         (Probe): Implement Resolve and Emit for `is'.
32447         (Expression::ConvertImplicitRequired): Attempt to do constant
32448         expression conversions here.  Maybe should be moved to
32449         ConvertImplicit, but I am not sure.
32450         (Expression::ImplicitLongConstantConversionPossible,
32451         Expression::ImplicitIntConstantConversionPossible): New functions
32452         that tell whether is it possible to apply an implicit constant
32453         expression conversion.
32454
32455         (ConvertNumericExplicit): Started work on explicit numeric
32456         conversions.
32457
32458         * cs-parser.jay: Update operator constants.
32459
32460         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32461         (Parameters::GetSignature): Hook up VerifyArgs here.
32462         (Parameters::VerifyArgs): Verifies that no two arguments have the
32463         same name. 
32464
32465         * class.cs (Operator): Update the operator names to reflect the
32466         ones that the spec expects (as we are just stringizing the
32467         operator names).
32468
32469         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32470         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32471         previous usage did only work for our methods.
32472         (Expression::ConvertImplicit): Handle decimal implicit numeric
32473         conversions as well.
32474         (Expression::InternalTypeConstructor): Used to invoke constructors
32475         on internal types for default promotions.
32476
32477         (Unary::Emit): Implement special handling for the pre/post
32478         increment/decrement for overloaded operators, as they need to have
32479         the same semantics as the other operators.
32480
32481         (Binary::ResolveOperator): ditto.
32482         (Invocation::ConversionExists): ditto.
32483         (UserImplicitCast::Resolve): ditto.
32484
32485 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32486
32487         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32488         operator, return after emitting body. Regression tests pass again !
32489
32490         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32491         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32492         (Invocation::OverloadResolve): Ditto.
32493         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32494
32495         * everywhere : update calls to the above methods accordingly.
32496
32497 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32498
32499         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32500
32501         * expression.cs (ExpressionStatement): New base class used for
32502         expressions that can appear in statements, so that we can provide
32503         an alternate path to generate expression that do not leave a value
32504         on the stack.
32505
32506         (Expression::Emit, and all the derivatives): We no longer return
32507         whether a value is left on the stack or not.  Every expression
32508         after being emitted leaves a single value on the stack.
32509
32510         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32511         facilties of ExpressionStatement if possible.
32512
32513         * cs-parser.jay: Update statement_expression.
32514
32515 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32516
32517         * driver.cs: Change the wording of message
32518
32519 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32520
32521         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32522         the type of the expression to the return type of the method if
32523         we have an overloaded operator match ! The regression tests pass again !
32524         (Unary::ResolveOperator): Ditto.
32525
32526         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32527         to find "op_Implicit", not "implicit" ;-)
32528         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32529         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32530
32531         * everywhere : Correct calls to the above accordingly.
32532
32533         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32534         (ConvertImplicit): Do user-defined conversion if it exists.
32535
32536 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32537
32538         * assign.cs: track location.
32539         (Resolve): Use implicit conversions on assignment.
32540
32541         * literal.cs: Oops.  Not good, Emit of short access values should
32542         pass (Bytes) or the wrong argument will be selected.
32543
32544         * expression.cs (Unary::Emit): Emit code for -expr.
32545
32546         (Unary::ResolveOperator): Handle `Substract' for non-constants
32547         (substract from zero from the non-constants).
32548         Deal with Doubles as well. 
32549
32550         (Expression::ConvertImplicitRequired): New routine that reports an
32551         error if no implicit conversion exists. 
32552
32553         (Invocation::OverloadResolve): Store the converted implicit
32554         expressions if we make them
32555
32556 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32557
32558         * class.cs (ConstructorInitializer): Take a Location argument.
32559         (ConstructorBaseInitializer): Same here.
32560         (ConstructorThisInitializer): Same here.
32561
32562         * cs-parser.jay : Update all calls accordingly.
32563
32564         * expression.cs (Unary, Binary, New): Take location argument.
32565         Update accordingly everywhere.
32566
32567         * cs-parser.jay : Update all calls to the above to take a location
32568         argument.
32569
32570         * class.cs : Ditto.
32571
32572 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32573
32574         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32575         (Invocation::BetterConversion): Same here
32576         (Invocation::ConversionExists): Ditto.
32577
32578         (Invocation::ConversionExists): Implement.
32579
32580 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32581
32582         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32583         Also take an additional TypeContainer argument.
32584
32585         * All over : Pass in TypeContainer as argument to OverloadResolve.
32586
32587         * typemanager.cs (CSharpName): Update to check for the string type and return
32588         that too.
32589
32590         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32591         a given method.
32592
32593 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32594
32595         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32596         (Invocation::BetterFunction): Implement.
32597         (Invocation::BetterConversion): Implement.
32598         (Invocation::ConversionExists): Skeleton, no implementation yet.
32599
32600         Okay, things work fine !
32601
32602 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32603
32604         * typemanager.cs: declare and load enum_type, delegate_type and
32605         void_type. 
32606
32607         * expression.cs (Expression::Emit): Now emit returns a value that
32608         tells whether a value is left on the stack or not.  This strategy
32609         might be reveted tomorrow with a mechanism that would address
32610         multiple assignments.
32611         (Expression::report118): Utility routine to report mismatches on
32612         the ExprClass.
32613
32614         (Unary::Report23): Report impossible type/operator combination
32615         utility function.
32616
32617         (Unary::IsIncrementableNumber): Whether the type can be
32618         incremented or decremented with add.
32619         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32620         complemented. 
32621         (Unary::ResolveOperator): Implement ++, !, ~,
32622
32623         (Invocation::Emit): Deal with new Emit convetion.
32624
32625         * All Expression derivatives: Updated their Emit method to return
32626         whether they leave values on the stack or not.
32627
32628         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32629         stack for expressions that are statements. 
32630
32631 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32632
32633         * expression.cs (LValue): New interface.  Must be implemented by
32634         LValue objects.
32635         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32636         LValue interface.
32637
32638         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32639         interface for generating code, simplifies the code.
32640
32641 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32642
32643         * expression.cs (everywhere): Comment out return statements in ::Resolve
32644         methods to avoid the warnings.
32645
32646 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32647
32648         * driver.cs (parse): Report error 2001 if we can not open the
32649         source file.
32650
32651         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32652         not resolve it.
32653
32654         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32655         object. 
32656
32657         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32658         otherwise nested blocks end up with the same index.
32659
32660         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32661
32662         * expression.cs:  Instead of having FIXMEs in the Resolve
32663         functions, throw exceptions so it is obvious that we are facing a
32664         bug. 
32665
32666         * cs-parser.jay (invocation_expression): Pass Location information.
32667
32668         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32669         Use a basename for those routines because .NET does not like paths
32670         on them. 
32671
32672         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32673         already defined.
32674
32675 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32676
32677         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32678         are loading the correct data types (throws an exception if not).
32679         (TypeManager::InitCoreTypes): Use CoreLookupType
32680
32681         * expression.cs (Unary::ResolveOperator): return the child
32682         expression for expressions which are just +expr.
32683         (Unary::ResolveOperator): Return negative literals for -LITERAL
32684         expressions (otherwise they are Unary {Literal}).
32685         (Invocation::Badness): Take into account `Implicit constant
32686         expression conversions'.
32687
32688         * literal.cs (LongLiteral): Implement long literal class.
32689         (IntLiteral): export the `Value' of the intliteral. 
32690
32691 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32692
32693         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32694
32695         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32696         instead of 'Operator'
32697
32698         * expression.cs (Binary::ResolveOperator): Update accordingly.
32699         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32700         and 'Minus'
32701
32702         * cs-parser.jay (unary_expression): Update to use the new names.
32703
32704         * gen-treedump.cs (GetUnary): Same here.
32705
32706         * expression.cs (Unary::Resolve): Implement.
32707         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32708         operators are found instead of making noise ;-)
32709         (Unary::ResolveOperator): New method to do precisely the same thing which
32710         Binary::ResolveOperator does for Binary expressions.
32711         (Unary.method, .Arguments): Add.
32712         (Unary::OperName): Implement.   
32713         (Unary::ForceConversion): Copy and Paste !
32714
32715         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32716         a unary operator.
32717
32718         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32719         for the inbuilt operators. Only overloading works for now ;-)
32720
32721 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32722
32723         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32724         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32725
32726         * expression.cs (This::Emit): Implement. 
32727         (This::Resolve): Implement.
32728         (TypeOf:Resolve): Implement.
32729         (Expression::ResolveSimpleName): Add an implicit this to instance
32730         field references. 
32731         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32732         Bind instance variable to Field expressions.
32733         (FieldExpr::Instance): New field used to track the expression that
32734         represents the object instance.
32735         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32736         binding 
32737         (FieldExpr::Emit): Implement.
32738
32739         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32740         the last instruction contains a return opcode to avoid generating
32741         the last `ret' instruction (this generates correct code, and it is
32742         nice to pass the peverify output).
32743
32744         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32745         initializer for static and instance variables.
32746         (Constructor::Emit): Allow initializer to be null in the case of
32747         static constructors.  Only emit initializer for instance
32748         constructors. 
32749
32750         (TypeContainer::FindMembers): Return a null array if there are no
32751         matches.
32752
32753         Also fix the code for the MemberTypes.Method branch, as it was not
32754         scanning that for operators (or tried to access null variables before).
32755
32756         * assign.cs (Assign::Emit): Handle instance and static fields. 
32757
32758         * TODO: Updated.
32759
32760         * driver.cs: Stop compilation if there are parse errors.
32761
32762         * cs-parser.jay (constructor_declaration): Provide default base
32763         initializer for non-static constructors.
32764         (constructor_declarator): Do not provide a default base
32765         initializers if none was specified.
32766         Catch the fact that constructors should not have parameters.
32767
32768         * class.cs: Do not emit parent class initializers for static
32769         constructors, that should be flagged as an error.
32770
32771 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32772
32773         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32774         Move back code into TypeContainer::Populate.
32775
32776 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32777
32778         * class.cs (TypeContainer::AddConstructor): Fix the check to
32779         compare against Name, not Basename. 
32780         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32781
32782         * cs-parser.jay : Update accordingly.
32783
32784         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32785         for methods, don't forget to look into the operators too.
32786         (RegisterMethodBuilder): Helper method to take care of this for
32787         methods, constructors and operators.
32788         (Operator::Define): Completely revamp.
32789         (Operator.OperatorMethod, MethodName): New fields.
32790         (TypeContainer::Populate): Move the registering of builders into
32791         RegisterMethodBuilder.
32792         (Operator::Emit): Re-write.
32793
32794         * expression.cs (Binary::Emit): Comment out code path to emit method
32795         invocation stuff for the case when we have a user defined operator. I am
32796         just not able to get it right !
32797
32798 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32799
32800         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32801         argument. 
32802
32803         (Expression::MemberLookup): Provide a version that allows to
32804         specify the MemberTypes and BindingFlags. 
32805
32806         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32807         so it was not fetching variable information from outer blocks.
32808
32809         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32810         Beforefieldinit as it was buggy.
32811
32812         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32813         that Ravi put here.  
32814
32815         * class.cs (Constructor::Emit): Only emit if block is not null.
32816         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32817         deal with this by semantically definining it as if the user had
32818         done it.
32819
32820         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32821         constructors as we now "emit" them at a higher level.
32822
32823         (TypeContainer::DefineDefaultConstructor): Used to define the
32824         default constructors if none was provided.
32825
32826         (ConstructorInitializer): Add methods Resolve and Emit. 
32827
32828         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32829
32830 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32831
32832         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32833         the default constructor builder with our hashtable for methodbuilders
32834         to methodcores.
32835
32836         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32837         and argument_count is 0 in which case we have a match.
32838         (Binary::ResolveOperator): More null checking and miscellaneous coding
32839         style cleanup.
32840
32841 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32842
32843         * rootcontext.cs (IsNameSpace): Compare against null.
32844
32845         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32846
32847         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32848         and Unary::Operator.
32849
32850         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32851         accordingly.
32852
32853         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32854         we have overloaded operators.
32855         (Binary::ResolveOperator): Implement the part which does the operator overload
32856         resolution.
32857
32858         * class.cs (Operator::Emit): Implement.
32859         (TypeContainer::Emit): Emit the operators we have too.
32860
32861         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32862         the case when we have a user-defined operator.
32863
32864 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32865
32866         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32867
32868 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32869
32870         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32871         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32872         (Constructor::Emit): Implement.
32873         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32874         if we have no work to do. 
32875         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32876         Emit method.
32877
32878         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32879         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32880
32881         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32882         of parent.parent.
32883
32884 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32885
32886         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32887         in the source.
32888         (Tree::RecordNamespace): Method to do what the name says ;-)
32889         (Tree::Namespaces): Property to get at the namespaces hashtable.
32890
32891         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32892         keep track.
32893
32894         * rootcontext.cs (IsNamespace): Fixed it :-)
32895
32896 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32897
32898         * class.cs (TypeContainer::FindMembers): Add support for
32899         constructors. 
32900         (MethodCore): New class that encapsulates both the shared aspects
32901         of a Constructor and a Method.  
32902         (Method, Constructor): Factored pieces into MethodCore.
32903
32904         * driver.cs: Added --fatal which makes errors throw exceptions.
32905         Load System assembly as well as part of the standard library.
32906
32907         * report.cs: Allow throwing exceptions on errors for debugging.
32908
32909         * modifiers.cs: Do not use `parent', instead use the real type
32910         container to evaluate permission settings.
32911
32912         * class.cs: Put Ravi's patch back in.  He is right, and we will
32913         have to cope with the
32914
32915 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32916
32917         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32918         FamORAssem, not FamANDAssem.
32919
32920 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32921
32922         * driver.cs: Added --parse option that only parses its input files
32923         and terminates.
32924
32925         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32926         incorrect.  IsTopLevel is not used to tell whether an object is
32927         root_types or not (that can be achieved by testing this ==
32928         root_types).  But to see if this is a top-level *class* (not
32929         necessarly our "toplevel" container). 
32930
32931 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32932
32933         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32934         parent instead of a direct call to GetType.
32935
32936 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32937
32938         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32939         Modifiers.TypeAttr. This should just be a call to that method.
32940
32941         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32942         object so that we can determine if we are top-level or not.
32943
32944         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32945         TypeContainer too.
32946
32947         * enum.cs (Enum::Define): Ditto.
32948
32949         * modifiers.cs (FieldAttr): Re-write.
32950
32951         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32952         (TypeContainer::HaveStaticConstructor): New property to provide access
32953         to precisely that info.
32954
32955         * modifiers.cs (MethodAttr): Re-write.
32956         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32957
32958         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32959         of top-level types as claimed.
32960
32961 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32962
32963         * expression.cs (MemberLookup): Fruitless attempt to lookup
32964         constructors.  Maybe I need to emit default constructors?  That
32965         might be it (currently .NET emits this for me automatically).
32966         (Invocation::OverloadResolve): Cope with Arguments == null.
32967         (Invocation::EmitArguments): new function, shared by the new
32968         constructor and us.
32969         (Invocation::Emit): Handle static and instance methods.  Emit
32970         proper call instruction for virtual or non-virtual invocations.
32971         (New::Emit): Implement.
32972         (New::Resolve): Implement.
32973         (MemberAccess:Resolve): Implement.
32974         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32975         to track instances.
32976         (FieldExpr::Resolve): Set type.
32977
32978         * support.cs: Handle empty arguments.
32979                 
32980         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32981         SimpleLookup): Auxiliary routines to help parse a qualifier
32982         identifier.  
32983
32984         Update qualifier_identifier rule.
32985
32986         * codegen.cs: Removed debugging messages.
32987
32988         * class.cs: Make this a global thing, this acts just as a "key" to
32989         objects that we might have around.
32990
32991         (Populate): Only initialize method_builders_to_methods once.
32992
32993         * expression.cs (PropertyExpr): Initialize type from the
32994         PropertyType. 
32995
32996         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32997         Resolve pattern.  Attempt to implicitly convert value to boolean.
32998         Emit code.
32999
33000         * expression.cs: Set the type for the int32/int32 argument case.
33001         (Binary::ResolveOperator): Set the return type to boolean for
33002         comparission operators
33003
33004         * typemanager.cs: Remove debugging print code.
33005
33006         (Invocation::Resolve): resolve type.
33007
33008         * class.cs: Allocate a MemberInfo of the correct size, as the code
33009         elsewhere depends on the test to reflect the correct contents.
33010
33011         (Method::) Keep track of parameters, due to System.Reflection holes
33012
33013         (TypeContainer::Populate): Keep track of MethodBuilders to Method
33014         mapping here.
33015
33016         (TypeContainer::FindMembers): Use ArrayList and then copy an array
33017         of the exact size and return that.
33018
33019         (Class::LookupMethodByBuilder): New function that maps
33020         MethodBuilders to its methods.  Required to locate the information
33021         on methods because System.Reflection bit us again.
33022
33023         * support.cs: New file, contains an interface ParameterData and
33024         two implementations: ReflectionParameters and InternalParameters
33025         used to access Parameter information.  We will need to grow this
33026         as required.
33027
33028         * expression.cs (Invocation::GetParameterData): implement a cache
33029         and a wrapper around the ParameterData creation for methods. 
33030         (Invocation::OverloadResolve): Use new code.
33031
33032 2001-09-13  Ravi Pratap  <ravi@ximian.com>
33033
33034         * class.cs (TypeContainer::EmitField): Remove and move into 
33035         (Field::Define): here and modify accordingly.
33036         (Field.FieldBuilder): New member.
33037         (TypeContainer::Populate): Update accordingly.
33038         (TypeContainer::FindMembers): Implement.
33039
33040 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
33041
33042         * statement.cs: (VariableInfo::VariableType): New field to be
33043         initialized with the full type once it is resolved. 
33044
33045 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
33046
33047         * parameter.cs (GetParameterInfo): Use a type cache to compute
33048         things only once, and to reuse this information
33049
33050         * expression.cs (LocalVariableReference::Emit): Implement.
33051         (OpcodeCast::Emit): fix.
33052
33053         (ParameterReference::Resolve): Implement.
33054         (ParameterReference::Emit): Implement.
33055
33056         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
33057         that are expressions need to stay as Expressions.
33058
33059         * typemanager.cs (CSharpName): Returns the C# name of a type if
33060         possible. 
33061
33062         * expression.cs (Expression::ConvertImplicit): New function that
33063         implements implicit type conversions.
33064
33065         (Expression::ImplicitReferenceConversion): Implements implicit
33066         reference conversions.
33067
33068         (EmptyCast): New type for transparent casts.
33069
33070         (OpcodeCast): New type for casts of types that are performed with
33071         a sequence of bytecodes.
33072
33073         (BoxedCast): New type used for casting value types into reference
33074         types.  Emits a box opcode.
33075
33076         (Binary::DoNumericPromotions): Implements numeric promotions of
33077         and computation of the Binary::Type.
33078
33079         (Binary::EmitBranchable): Optimization.
33080
33081         (Binary::Emit): Implement code emission for expressions.
33082
33083         * typemanager.cs (TypeManager): Added two new core types: sbyte
33084         and byte.
33085
33086 2001-09-12  Ravi Pratap  <ravi@ximian.com>
33087
33088         * class.cs (TypeContainer::FindMembers): Method which does exactly
33089         what Type.FindMembers does, only we don't have to use reflection. No
33090         implementation yet.
33091
33092         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
33093         typecontainer objects as we need to get at them.
33094         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
33095
33096         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
33097         typecontainer object.
33098
33099         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
33100         of just a Report object.
33101
33102 2001-09-11  Ravi Pratap  <ravi@ximian.com>
33103
33104         * class.cs (Event::Define): Go back to using the prefixes "add_" and
33105         "remove_"
33106         (TypeContainer::Populate): Now define the delegates of the type too.
33107         (TypeContainer.Delegates): Property to access the list of delegates defined
33108         in the type.
33109
33110         * delegates.cs (Delegate::Define): Implement partially.
33111
33112         * modifiers.cs (TypeAttr): Handle more flags.
33113
33114 2001-09-11  Ravi Pratap  <ravi@ximian.com>
33115
33116         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
33117         and not <=
33118         (Operator::Define): Re-write logic to get types by using the LookupType method
33119         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
33120         (Indexer::Define): Ditto.
33121         (Event::Define): Ditto.
33122         (Property::Define): Ditto.
33123
33124 2001-09-10  Ravi Pratap  <ravi@ximian.com>
33125
33126         * class.cs (TypeContainer::Populate): Now define operators too. 
33127         (TypeContainer.Operators): New property to access the list of operators
33128         in a type.
33129         (Operator.OperatorMethodBuilder): New member to hold the method builder
33130         for the operator we are defining.
33131         (Operator::Define): Implement.
33132
33133 2001-09-10  Ravi Pratap  <ravi@ximian.com>
33134
33135         * class.cs (Event::Define): Make the prefixes of the accessor methods
33136         addOn_ and removeOn_ 
33137
33138         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
33139         of the location being passed in too. Ideally, this should go later since all
33140         error reporting should be done through the Report object.
33141
33142         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
33143         (Populate): Iterate thru the indexers we have and define them too.
33144         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
33145         for the get and set accessors.
33146         (Indexer::Define): Implement.
33147
33148 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
33149
33150         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
33151         my previous implementation, did not work.
33152
33153         * typemanager.cs: Add a couple of missing types (the longs).
33154
33155         * literal.cs: Use TypeManager.bool_type instead of getting it.
33156
33157         * expression.cs (EventExpr): New kind of expressions.
33158         (Expressio::ExprClassFromMemberInfo): finish
33159
33160 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
33161
33162         * assign.cs: Emit stores to static fields differently.
33163
33164 2001-09-08  Ravi Pratap  <ravi@ximian.com>
33165
33166         * Merge in changes and adjust code to tackle conflicts. Backed out my
33167         code in Assign::Resolve ;-) 
33168
33169 2001-09-08  Ravi Pratap  <ravi@ximian.com>
33170
33171         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
33172         instead Report.Error and also pass in the location.
33173         (CSharpParser::Lexer): New readonly property to return the reference
33174         to the Tokenizer object.
33175         (declare_local_variables): Use Report.Error with location instead of plain 
33176         old error.
33177         (CheckDef): Ditto.
33178
33179         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
33180         (Operator.CheckBinaryOperator): Ditto.
33181
33182         * cs-parser.jay (operator_declarator): Update accordingly.
33183
33184         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
33185         (CheckBinaryOperator): Same here.
33186
33187         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
33188         on the name without any prefixes of namespace names etc. This is because we
33189         already might have something already fully qualified like 
33190         'System.Console.WriteLine'
33191
33192         * assign.cs (Resolve): Begin implementation. Stuck ;-)
33193
33194 2001-09-07  Ravi Pratap  <ravi@ximian.com>
33195
33196         * cs-tokenizer.cs (location): Return a string which also contains
33197         the file name.
33198
33199         * expression.cs (ElementAccess): New class for expressions of the
33200         type 'element access.'
33201         (BaseAccess): New class for expressions of the type 'base access.'
33202         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
33203         respectively.
33204
33205         * cs-parser.jay (element_access): Implement action.
33206         (base_access): Implement actions.
33207         (checked_expression, unchecked_expression): Implement.
33208
33209         * cs-parser.jay (local_variable_type): Correct and implement.
33210         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
33211
33212         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
33213
33214         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
33215         name and the specifiers.
33216
33217         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
33218
33219         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
33220         making them all public ;-)
33221
33222         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
33223         class anyways.
33224
33225 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
33226
33227         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
33228         PropertyExprs.
33229         (FieldExpr, PropertyExprs): New resolved expressions.
33230         (SimpleName::MemberStaticCheck): Perform static checks for access
33231         to non-static fields on static methods. Maybe this should be
33232         generalized for MemberAccesses. 
33233         (SimpleName::ResolveSimpleName): More work on simple name
33234         resolution. 
33235
33236         * cs-parser.jay (primary_expression/qualified_identifier): track
33237         the parameter index.
33238
33239         * codegen.cs (CodeGen::Save): Catch save exception, report error.
33240         (EmitContext::EmitBoolExpression): Chain to expression generation
33241         instead of temporary hack.
33242         (::EmitStatementExpression): Put generic expression code generation.
33243
33244         * assign.cs (Assign::Emit): Implement variable assignments to
33245         local variables, parameters and fields.
33246
33247 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
33248
33249         * statement.cs (Block::GetVariableInfo): New method, returns the
33250         VariableInfo for a variable name in a block.
33251         (Block::GetVariableType): Implement in terms of GetVariableInfo
33252
33253         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
33254         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
33255
33256 2001-09-06  Ravi Pratap  <ravi@ximian.com>
33257
33258         * cs-parser.jay (operator_declaration): Continue on my quest : update
33259         to take attributes argument.
33260         (event_declaration): Ditto.
33261         (enum_declaration): Ditto.
33262         (indexer_declaration): Ditto.
33263
33264         * class.cs (Operator::Operator): Update constructor accordingly.
33265         (Event::Event): Ditto.
33266
33267         * delegate.cs (Delegate::Delegate): Same here.
33268
33269         * enum.cs (Enum::Enum): Same here.
33270
33271 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33272
33273         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
33274
33275         * ../tests/cs0658.cs : New file to demonstrate error 0658.
33276
33277         * attribute.cs (Attributes): New class to encapsulate all attributes which were
33278         being passed around as an arraylist.
33279         (Attributes::AddAttribute): Method to add attribute sections.
33280
33281         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
33282         (struct_declaration): Update accordingly.
33283         (constant_declaration): Update.
33284         (field_declaration): Update.
33285         (method_header): Update.
33286         (fixed_parameter): Update.
33287         (parameter_array): Ditto.
33288         (property_declaration): Ditto.
33289         (destructor_declaration): Ditto.
33290
33291         * class.cs (Struct::Struct): Update constructors accordingly.
33292         (Class::Class): Ditto.
33293         (Field::Field): Ditto.
33294         (Method::Method): Ditto.
33295         (Property::Property): Ditto.
33296         (TypeContainer::OptAttribute): update property's return type.
33297
33298         * interface.cs (Interface.opt_attributes): New member.
33299         (Interface::Interface): Update to take the extra Attributes argument.
33300
33301         * parameter.cs (Parameter::Parameter): Ditto.
33302
33303         * constant.cs (Constant::Constant): Ditto.
33304
33305         * interface.cs (InterfaceMemberBase): New OptAttributes field.
33306         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
33307         the attributes as a parameter.
33308         (InterfaceProperty): Update constructor call.
33309         (InterfaceEvent): Ditto.
33310         (InterfaceMethod): Ditto.
33311         (InterfaceIndexer): Ditto.
33312
33313         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
33314         pass the attributes too.
33315         (interface_event_declaration): Ditto.
33316         (interface_property_declaration): Ditto.
33317         (interface_method_declaration): Ditto.
33318         (interface_declaration): Ditto.
33319
33320 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
33321
33322         * class.cs (Method::Define): Track the "static Main" definition to
33323         create an entry point. 
33324
33325         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
33326         EntryPoint if we find it. 
33327
33328         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
33329         (EmitContext::ig): Make this variable public.
33330
33331         * driver.cs: Make the default output file be the first file name
33332         with the .exe extension.  
33333
33334         Detect empty compilations
33335
33336         Handle various kinds of output targets.  Handle --target and
33337         rename -t to --dumper.
33338
33339         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
33340         methods inherited from Expression return now an Expression.  This
33341         will is used during the tree rewriting as we resolve them during
33342         semantic analysis.
33343
33344         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
33345         the spec.  Missing entirely is the information about
33346         accessability of elements of it.
33347
33348         (Expression::ExprClassFromMemberInfo): New constructor for
33349         Expressions that creates a fully initialized Expression based on
33350         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
33351         a Type.
33352
33353         (Invocation::Resolve): Begin implementing resolution of invocations.
33354
33355         * literal.cs (StringLiteral):  Implement Emit.
33356
33357 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33358
33359         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
33360         member.
33361
33362 2001-09-04  Ravi Pratap  <ravi@ximian.com>
33363
33364         * cs-parser.jay (attribute_arguments): Implement actions.
33365         (attribute): Fix bug in production. Implement action.
33366         (attribute_list): Implement.
33367         (attribute_target): Implement.
33368         (attribute_target_specifier, opt_target_specifier): Implement
33369         (CheckAttributeTarget): New method to check if the attribute target
33370         is valid.
33371         (attribute_section): Implement.
33372         (opt_attributes): Implement.
33373
33374         * attribute.cs : New file to handle attributes.
33375         (Attribute): Class to hold attribute info.
33376
33377         * cs-parser.jay (opt_attribute_target_specifier): Remove production
33378         (attribute_section): Modify production to use 2 different rules to 
33379         achieve the same thing. 1 s/r conflict down !
33380         Clean out commented, useless, non-reducing dimension_separator rules.
33381
33382         * class.cs (TypeContainer.attributes): New member to hold list
33383         of attributes for a type.
33384         (Struct::Struct): Modify to take one more argument, the attribute list.
33385         (Class::Class): Ditto.
33386         (Field::Field): Ditto.
33387         (Method::Method): Ditto.
33388         (Property::Property): Ditto.
33389
33390         * cs-parser.jay (struct_declaration): Update constructor call to
33391         pass in the attributes too.
33392         (class_declaration): Ditto.
33393         (constant_declaration): Ditto.
33394         (field_declaration): Ditto.
33395         (method_header): Ditto.
33396         (fixed_parameter): Ditto.
33397         (parameter_array): Ditto.
33398         (property_declaration): Ditto.
33399
33400         * constant.cs (Constant::Constant): Update constructor similarly.
33401         Use System.Collections.
33402
33403         * parameter.cs (Parameter::Parameter): Update as above.
33404
33405 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33406
33407         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
33408         (TypeContainer.delegates): New member to hold list of delegates.
33409
33410         * cs-parser.jay (delegate_declaration): Implement the action correctly 
33411         this time as I seem to be on crack ;-)
33412
33413 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
33414
33415         * rootcontext.cs (RootContext::IsNamespace): new function, used to
33416         tell whether an identifier represents a namespace.
33417
33418         * expression.cs (NamespaceExpr): A namespace expression, used only
33419         temporarly during expression resolution.
33420         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33421         utility functions to resolve names on expressions.
33422
33423 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33424
33425         * codegen.cs: Add hook for StatementExpressions. 
33426
33427         * class.cs: Fix inverted test for static flag in methods.
33428
33429 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33430
33431         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33432         to make it coincide with MS' number.
33433         (Operator::CheckBinaryOperator): Ditto.
33434
33435         * ../errors/errors.txt : Remove error numbers added earlier.
33436
33437         * ../errors/cs1019.cs : Test case for error # 1019
33438
33439         * ../errros/cs1020.cs : Test case for error # 1020
33440
33441         * cs-parser.jay : Clean out commented cruft.
33442         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33443         used anywhere - non-reducing rule.
33444         (namespace_declarations): Non-reducing rule - comment out.
33445
33446         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33447         with TypeContainer::AddEnum.
33448
33449         * delegate.cs : New file for delegate handling classes.
33450         (Delegate): Class for declaring delegates.
33451
33452         * makefile : Update.
33453
33454         * cs-parser.jay (delegate_declaration): Implement.
33455
33456 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33457
33458         * class.cs (Event::Define): Implement.
33459         (Event.EventBuilder): New member.
33460
33461         * class.cs (TypeContainer::Populate): Update to define all enums and events
33462         we have.
33463         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33464         readonly fields for all these cases ?
33465
33466 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33467
33468         * class.cs (Property): Revamp to use the convention of making fields readonly.
33469         Accordingly modify code elsewhere.
33470
33471         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33472         the Define method of the Property class.
33473
33474         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33475         trivial bug.
33476         (TypeContainer::Populate): Update to define all the properties we have. Also
33477         define all enumerations.
33478
33479         * enum.cs (Define): Implement.
33480
33481 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33482
33483         * cs-parser.jay (overloadable_operator): The semantic value is an
33484         enum of the Operator class.
33485         (operator_declarator): Implement actions.
33486         (operator_declaration): Implement.
33487
33488         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33489         validity of definitions.
33490         (Operator::CheckBinaryOperator): Static method to check for binary operators
33491         (TypeContainer::AddOperator): New method to add an operator to a type.
33492
33493         * cs-parser.jay (indexer_declaration): Added line to actually call the
33494         AddIndexer method so it gets added ;-)
33495
33496         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33497         already taken care of by the MS compiler ?  
33498
33499 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33500
33501         * class.cs (Operator): New class for operator declarations.
33502         (Operator::OpType): Enum for the various operators.
33503
33504 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33505
33506         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33507         ostensibly handle this in semantic analysis.
33508
33509         * cs-parser.jay (general_catch_clause): Comment out
33510         (specific_catch_clauses, specific_catch_clause): Ditto.
33511         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33512         (catch_args, opt_catch_args): New productions.
33513         (catch_clause): Rewrite to use the new productions above
33514         (catch_clauses): Modify accordingly.
33515         (opt_catch_clauses): New production to use in try_statement
33516         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33517         and re-write the code in the actions to extract the specific and
33518         general catch clauses by being a little smart ;-)
33519
33520         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33521         Hooray, try and catch statements parse fine !
33522
33523 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33524
33525         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33526         string from the hashtable of variables.
33527
33528         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33529         I end up making that mistake ;-)
33530         (catch_clauses): Fixed gross error which made Key and Value of the 
33531         DictionaryEntry the same : $1 !!
33532
33533 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33534
33535         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33536
33537         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33538         when the add and remove accessors are specified. 
33539
33540 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33541
33542         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33543         information about indexer_declarator.
33544         (indexer_declarator): Implement actions.
33545         (parsing_indexer): New local boolean used to keep track of whether
33546         we are parsing indexers or properties. This is necessary because 
33547         implicit_parameters come into picture even for the get accessor in the 
33548         case of an indexer.
33549         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33550
33551         * class.cs (Indexer): New class for indexer declarations.
33552         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33553         (TypeContainer::indexers): New member to hold list of indexers for the
33554         type.
33555
33556 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33557
33558         * cs-parser.jay (add_accessor_declaration): Implement action.
33559         (remove_accessor_declaration): Implement action.
33560         (event_accessors_declaration): Implement
33561         (variable_declarators): swap statements for first rule - trivial.
33562
33563         * class.cs (Event): New class to hold information about event
33564         declarations.
33565         (TypeContainer::AddEvent): New method to add an event to a type
33566         (TypeContainer::events): New member to hold list of events.
33567
33568         * cs-parser.jay (event_declaration): Implement actions.
33569
33570 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33571
33572         * cs-parser.jay (dim_separators): Implement. Make it a string
33573         concatenating all the commas together, just as they appear.
33574         (opt_dim_separators): Modify accordingly
33575         (rank_specifiers): Update accordingly. Basically do the same
33576         thing - instead, collect the brackets here.
33577         (opt_rank_sepcifiers): Modify accordingly.
33578         (array_type): Modify to actually return the complete type string
33579         instead of ignoring the rank_specifiers.
33580         (expression_list): Implement to collect the expressions
33581         (variable_initializer): Implement. We make it a list of expressions
33582         essentially so that we can handle the array_initializer case neatly too.
33583         (variable_initializer_list): Implement.
33584         (array_initializer): Make it a list of variable_initializers
33585         (opt_array_initializer): Modify accordingly.
33586
33587         * expression.cs (New::NType): Add enumeration to help us
33588         keep track of whether we have an object/delegate creation
33589         or an array creation.
33590         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33591         members to hold data about array creation.
33592         (New:New): Modify to update NewType
33593         (New:New): New Overloaded contructor for the array creation
33594         case.
33595
33596         * cs-parser.jay (array_creation_expression): Implement to call
33597         the overloaded New constructor.
33598
33599 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33600
33601         * class.cs (TypeContainer::Constructors): Return member
33602         constructors instead of returning null.
33603
33604 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33605
33606         * typemanager.cs (InitCoreTypes): Initialize the various core
33607         types after we have populated the type manager with the user
33608         defined types (this distinction will be important later while
33609         compiling corlib.dll)
33610
33611         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33612         on Expression Classification.  Now all expressions have a method
33613         `Resolve' and a method `Emit'.
33614
33615         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33616         generation from working.     Also add some temporary debugging
33617         code. 
33618
33619 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33620
33621         * codegen.cs: Lots of code generation pieces.  This is only the
33622         beginning, will continue tomorrow with more touches of polish.  We
33623         handle the fundamentals of if, while, do, for, return.  Others are
33624         trickier and I need to start working on invocations soon.
33625
33626         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33627         s.InitStatement. 
33628
33629         * codegen.cs (EmitContext): New struct, used during code
33630         emission to keep a context.   Most of the code generation will be
33631         here. 
33632
33633         * cs-parser.jay: Add embedded blocks to the list of statements of
33634         this block.  So code generation proceeds in a top down fashion.
33635
33636 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33637
33638         * statement.cs: Add support for multiple child blocks.
33639
33640 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33641
33642         * codegen.cs (EmitCode): New function, will emit the code for a
33643         Block of code given a TypeContainer and its ILGenerator. 
33644
33645         * statement.cs (Block): Standard public readonly optimization.
33646         (Block::Block constructors): Link children. 
33647         (Block::Child): Child Linker.
33648         (Block::EmitVariables): Emits IL variable declarations.
33649
33650         * class.cs: Drop support for MethodGroups here, delay until
33651         Semantic Analysis.
33652         (Method::): Applied the same simplification that I did before, and
33653         move from Properties to public readonly fields.
33654         (Method::ParameterTypes): Returns the parameter types for the
33655         function, and implements a cache that will be useful later when I
33656         do error checking and the semantic analysis on the methods is
33657         performed.
33658         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33659         and made a method, optional argument tells whether this is a class
33660         or a structure to apply the `has-this' bit.
33661         (Method::GetCallingConvention): Implement, returns the calling
33662         convention. 
33663         (Method::Define): Defines the type, a second pass is performed
33664         later to populate the methods.
33665
33666         (Constructor::ParameterTypes): implement a cache similar to the
33667         one on Method::ParameterTypes, useful later when we do semantic
33668         analysis. 
33669
33670         (TypeContainer::EmitMethod):  New method.  Emits methods.
33671
33672         * expression.cs: Removed MethodGroup class from here.
33673
33674         * parameter.cs (Parameters::GetCallingConvention): new method.
33675
33676 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33677
33678         * class.cs (TypeContainer::Populate): Drop RootContext from the
33679         argument. 
33680
33681         (Constructor::CallingConvention): Returns the calling convention.
33682         (Constructor::ParameterTypes): Returns the constructor parameter
33683         types. 
33684
33685         (TypeContainer::AddConstructor): Keep track of default constructor
33686         and the default static constructor.
33687
33688         (Constructor::) Another class that starts using `public readonly'
33689         instead of properties. 
33690
33691         (Constructor::IsDefault): Whether this is a default constructor. 
33692
33693         (Field::) use readonly public fields instead of properties also.
33694
33695         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33696         track of static constructors;  If none is used, turn on
33697         BeforeFieldInit in the TypeAttributes. 
33698
33699         * cs-parser.jay (opt_argument_list): now the return can be null
33700         for the cases where there are no arguments. 
33701
33702         (constructor_declarator): If there is no implicit `base' or
33703         `this', then invoke the default parent constructor. 
33704
33705         * modifiers.cs (MethodAttr): New static function maps a set of
33706         modifiers flags into a MethodAttributes enum
33707         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33708         MethodAttr, TypeAttr to represent the various mappings where the
33709         modifiers are used.
33710         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33711
33712 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33713
33714         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33715         method arguments.
33716
33717         * interface.cs (PopulateIndexer): Implemented the code generator
33718         for interface indexers.
33719
33720 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33721
33722         * interface.cs (InterfaceMemberBase): Now we track the new status
33723         here.  
33724
33725         (PopulateProperty): Implement property population.  Woohoo!  Got
33726         Methods and Properties going today. 
33727
33728         Removed all the properties for interfaces, and replaced them with
33729         `public readonly' fields. 
33730
33731 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33732
33733         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33734         initialize their hashtables/arraylists only when they are needed
33735         instead of doing this always.
33736
33737         * parameter.cs: Handle refs and out parameters.
33738
33739         * cs-parser.jay: Use an ArrayList to construct the arguments
33740         instead of the ParameterCollection, and then cast that to a
33741         Parameter[] array.
33742
33743         * parameter.cs: Drop the use of ParameterCollection and use
33744         instead arrays of Parameters.
33745
33746         (GetParameterInfo): Use the Type, not the Name when resolving
33747         types. 
33748
33749 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33750
33751         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33752         and instead use public readonly fields.
33753
33754         * class.cs: Put back walking code for type containers.
33755
33756 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33757
33758         * class.cs (MakeConstant): Code to define constants.
33759
33760         * rootcontext.cs (LookupType): New function.  Used to locate types 
33761
33762
33763 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33764
33765         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33766         this System.Reflection code is.  Kudos to Microsoft
33767
33768         * typemanager.cs: Implement a type cache and avoid loading all
33769         types at boot time.  Wrap in LookupType the internals.  This made
33770         the compiler so much faster.  Wow.  I rule!
33771
33772         * driver.cs: Make sure we always load mscorlib first (for
33773         debugging purposes, nothing really important).
33774
33775         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33776         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33777
33778         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33779         on namespaces that have been imported using the `using' keyword.
33780
33781         * class.cs (TypeContainer::TypeAttr): Virtualize.
33782         (Class::TypeAttr): Return attributes suitable for this bad boy.
33783         (Struct::TypeAttr): ditto.
33784         Handle nested classes.
33785         (TypeContainer::) Remove all the type visiting code, it is now
33786         replaced with the rootcontext.cs code
33787
33788         * rootcontext.cs (GetClassBases): Added support for structs. 
33789
33790 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33791
33792         * interface.cs, statement.cs, class.cs, parameter.cs,
33793         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33794         Drop use of TypeRefs, and use strings instead.
33795
33796 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33797
33798         * rootcontext.cs: 
33799
33800         * class.cs (Struct::Struct): set the SEALED flags after
33801         checking the modifiers.
33802         (TypeContainer::TypeAttr): new property, returns the
33803         TypeAttributes for a class.  
33804
33805         * cs-parser.jay (type_list): Oops, list production was creating a
33806         new list of base types.
33807
33808         * rootcontext.cs (StdLib): New property.
33809         (GetInterfaceTypeByName): returns an interface by type name, and
33810         encapsulates error handling here.
33811         (GetInterfaces): simplified.
33812         (ResolveTree): Encapsulated all the tree resolution here.
33813         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33814         types. 
33815
33816         * driver.cs: Add support for --nostdlib, to avoid loading the
33817         default assemblies.
33818         (Main): Do not put tree resolution here. 
33819
33820         * rootcontext.cs: Beginning of the class resolution.
33821
33822 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33823
33824         * rootcontext.cs: Provide better error reporting. 
33825
33826         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33827
33828         * rootcontext.cs (CreateInterface): Handle the case where there
33829         are no parent interfaces.
33830
33831         (CloseTypes): Routine to flush types at the end.
33832         (CreateInterface): Track types.
33833         (GetInterfaces): Returns an array of Types from the list of
33834         defined interfaces.
33835
33836         * typemanager.c (AddUserType): Mechanism to track user types (puts
33837         the type on the global type hash, and allows us to close it at the
33838         end). 
33839
33840 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33841
33842         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33843         RecordInterface instead.
33844
33845         * cs-parser.jay: Updated to reflect changes above.
33846
33847         * decl.cs (Definition): Keep track of the TypeBuilder type that
33848         represents this type here.  Not sure we will use it in the long
33849         run, but wont hurt for now.
33850
33851         * driver.cs: Smaller changes to accomodate the new code.
33852
33853         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33854         when done. 
33855
33856         * rootcontext.cs (CreateInterface):  New method, used to create
33857         the System.TypeBuilder type for interfaces.
33858         (ResolveInterfaces): new entry point to resolve the interface
33859         hierarchy. 
33860         (CodeGen): Property, used to keep track of the code generator.
33861
33862 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33863
33864         * cs-parser.jay: Add a second production for delegate_declaration
33865         with `VOID'.
33866
33867         (enum_body): Put an opt_comma here instead of putting it on
33868         enum_body or enum_member_declarations so we can handle trailing
33869         commas on enumeration members.  Gets rid of a shift/reduce.
33870
33871         (type_list): Need a COMMA in the middle.
33872
33873         (indexer_declaration): Tell tokenizer to recognize get/set
33874
33875         * Remove old targets.
33876
33877         * Re-add the parser target.
33878
33879 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33880
33881         * cs-parser.jay: Add precendence rules for a number of operators
33882         ot reduce the number of shift/reduce conflicts in the grammar.
33883
33884 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33885
33886         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33887         and put it here.
33888
33889         Get rid of old crufty code.
33890
33891         * rootcontext.cs: Use this to keep track of the parsed
33892         representation and the defined types available to the program. 
33893
33894         * gen-treedump.cs: adjust for new convention.
33895
33896         * type.cs: Split out the type manager, and the assembly builder
33897         from here. 
33898
33899         * typemanager.cs: the type manager will live here now.
33900
33901         * cil-codegen.cs: And the code generator here. 
33902
33903 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33904
33905         * makefile: Fixed up for easy making.
33906
33907 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33908
33909         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33910         the 
33911
33912         (unary_expression): Expand pre_increment_expression and
33913         post_decrement_expression to reduce a shift/reduce.
33914
33915 2001-07-11  Simon Cozens
33916
33917         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33918
33919         Improve allow_keyword_as_indent name.
33920
33921 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33922
33923         * Adjustments for Beta2. 
33924
33925 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33926
33927         * decl.cs: Added `Define' abstract method.
33928         (InTransit): new property, used to catch recursive definitions. 
33929
33930         * interface.cs: Implement `Define'. 
33931
33932         * modifiers.cs: Map Modifiers.constants to
33933         System.Reflection.TypeAttribute flags.
33934
33935         * class.cs: Keep track of types and user-defined types.
33936         (BuilderInit): New method for creating an assembly
33937         (ResolveType): New function to launch the resolution process, only
33938         used by interfaces for now.
33939
33940         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33941         that are inserted into the name space. 
33942
33943 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33944
33945         * ARGH.  I have screwed up my tree so many times due to the use of
33946         rsync rather than using CVS.  Going to fix this at once. 
33947
33948         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33949         load types.
33950
33951 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33952
33953         * Experiment successful: Use System.Type rather that our own
33954         version of Type.  
33955
33956 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33957
33958         * cs-parser.jay: Removed nsAliases from here.
33959
33960         Use new namespaces, handle `using XXX;' 
33961
33962         * namespace.cs: Reimplemented namespace handling, use a recursive
33963         definition of the class.  Now we can keep track of using clauses
33964         and catch invalid using clauses.
33965
33966 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33967
33968         * gen-treedump.cs: Adapted for all the renaming.
33969
33970         * expression.cs (Expression): this class now has a Type property
33971         which returns an expression Type.
33972
33973         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33974         `Type', as this has a different meaning now in the base
33975
33976 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33977
33978         * interface.cs, class.cs: Removed from all the sources the
33979         references to signature computation, as we can not do method
33980         signature computation during the parsing time, as we are not
33981         trying to solve at that point distinguishing:
33982
33983         class X {
33984                 void a (Blah x) {}
33985                 void a (NS.Blah x) {}
33986         }
33987
33988         Which depending on the context might be valid or not, as we do not
33989         know if Blah is the same thing as NS.Blah at that point.
33990
33991         * Redid everything so the code uses TypeRefs now instead of
33992         Types.  TypeRefs are just temporary type placeholders, that need
33993         to be resolved.  They initially have a pointer to a string and the
33994         current scope in which they are used.  This is used later by the
33995         compiler to resolve the reference to an actual Type. 
33996
33997         * DeclSpace is no longer a CIR.Type, and neither are
33998         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33999         are all DeclSpaces, but no Types. 
34000
34001         * type.cs (TypeRefManager): This implements the TypeRef manager,
34002         which keeps track of all the types that need to be resolved after
34003         the parsing has finished. 
34004
34005 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
34006
34007         * ARGH.  We are going to have to store `foreach' as a class rather
34008         than resolving it, as we need to verify error 1579 after name
34009         resolution.   *OR* we could keep a flag that says `This request to
34010         IEnumerator comes from a foreach statement' which we can then use
34011         to generate the error.
34012
34013 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
34014
34015         * class.cs (TypeContainer.AddMethod): we now add methods to the
34016         MethodGroup instead of the method hashtable.  
34017
34018         * expression.cs: Add MethodGroup abstraction, which gets us one
34019         step closer to the specification in the way we handle method
34020         declarations.  
34021
34022         * cs-parser.jay (primary_expression): qualified_identifier now
34023         tried to match up an identifier to a local variable reference or
34024         to a parameter reference.
34025
34026         current_local_parameters is now a parser global variable that
34027         points to the current parameters for the block, used during name
34028         lookup.
34029
34030         (property_declaration): Now creates an implicit `value' argument to
34031         the set accessor.
34032
34033 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
34034
34035         * parameter.cs: Do not use `param' arguments as part of the
34036         signature, per the spec.
34037
34038 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
34039
34040         * decl.cs: Base class for classes, structs and interfaces.  This
34041         is the "Declaration Space" 
34042
34043         * cs-parser.jay: Use CheckDef for checking declaration errors
34044         instead of having one on each function.
34045
34046         * class.cs: Factor out some code for handling error handling in
34047         accordance to the "Declarations" section in the "Basic Concepts"
34048         chapter in the ECMA C# spec.
34049
34050         * interface.cs: Make all interface member classes derive from
34051         InterfaceMemberBase.
34052
34053 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
34054
34055         * Many things: all interfaces are parsed and generated in
34056         gen-treedump.  Support for member variables, constructors,
34057         destructors, properties, constants is there.
34058
34059         Beginning of the IL backend, but very little done, just there for
34060         testing purposes. 
34061
34062 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
34063
34064         * cs-parser.jay: Fix labeled statement.
34065
34066         * cs-tokenizer.cs (escape): Escape " and ' always.
34067         ref_line, ref_name: keep track of the line/filename as instructed
34068         by #line by the compiler.
34069         Parse #line.
34070
34071 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
34072
34073         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
34074         to match the values in System.CodeDOM.
34075
34076         Divid renamed to Divide.
34077
34078         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
34079         statements. 
34080         (Statements.set): remove.
34081
34082         * System.CodeDOM/CodeCatchClause.cs: always have a valid
34083         statements. 
34084
34085         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
34086         falseStatements always have valid values. 
34087
34088         * cs-parser.jay: Use System.CodeDOM now.
34089