3c7ea0b466574760db64f8ed6c2ae50951300509
[mono.git] / mcs / mcs / ChangeLog
1 2010-01-07  Marek Safar  <marek.safar@gmail.com>
2
3         * method.cs: Move all method based declarations into a new file.
4
5 2010-01-07  Marek Safar  <marek.safar@gmail.com>
6
7         * *.cs: Extract field specification.
8
9 2009-12-17  Marek Safar  <marek.safar@gmail.com>
10
11         * field.cs: Extracted from class.cs
12
13 2009-12-15  Marek Safar  <marek.safar@gmail.com>
14
15         * attribute.cs (GetFixedBuffer): Work on field definition only.
16
17 2009-12-15  Marek Safar  <marek.safar@gmail.com>
18
19         * *.cs: Clean up NET_4_0 conditional where possible.
20
21 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
22
23         support.cs (DynamicType): Assembly property returns the assembly builder.
24         This is required due to how compiler context works in corlib.
25
26 2009-12-14  Marek Safar  <marek.safar@gmail.com>
27
28         A fix for bug #564376
29         * assign.cs (LocalTemporary): Removed no longer needed special
30         by-ref handling.
31
32 2009-12-11  Marek Safar  <marek.safar@gmail.com>
33
34         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
35         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
36         enum for easier debugging.
37
38 2009-12-10  Marek Safar  <marek.safar@gmail.com>
39
40         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
41         point.
42         
43         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
44         directly.
45
46 2009-12-10  Marek Safar  <marek.safar@gmail.com>
47
48         * cs-parser.jay, statement.cs: Handle parser error in code
49         completition.
50
51 2009-12-10  Marek Safar  <marek.safar@gmail.com>
52
53         * ecore.cs: Ignore base imported methods when they are already
54         in method bag.
55         
56         * eval.cs: Handle non-existent keys.
57         
58         * report.cs, driver.cs: Make fatal work with console printer only.
59
60 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
61
62         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
63
64 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
65
66         * typemanager.cs: Add MakeGenericMethod that checks if the method
67         is really the generic method definition.
68
69         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
70         to inflate generic methods.
71
72 2009-12-08  Marek Safar  <marek.safar@gmail.com>
73
74         A fix for bug #561149
75         * anonymous.cs: Use actual type parameters when checking for generic
76         method host.
77
78 2009-12-08  Marek Safar  <marek.safar@gmail.com>
79
80         A fix for bug #561369
81         * expression.cs (DoNumericPromotion): Fixed typo.
82
83 2009-12-08  Marek Safar  <marek.safar@gmail.com>
84
85         *.cs: Moving to generics world.
86
87         cs-parser.jay: Removed current_array_type.
88
89 2009-12-07  Marek Safar  <marek.safar@gmail.com>
90
91         *.cs: Moving to generics world.
92
93 2009-12-04  Marek Safar  <marek.safar@gmail.com>
94
95         *.cs: Moving to generics world (day 2).
96
97 2009-12-03  Marek Safar  <marek.safar@gmail.com>
98
99         *.cs: Moving to generics world.
100
101 2009-12-02  Marek Safar  <marek.safar@gmail.com>
102
103         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
104         Encode dynamic type attribute for elements where attributes cannot
105         be used.
106
107 2009-12-01  Marek Safar  <marek.safar@gmail.com>
108
109          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
110          arguments by ref.
111
112 2009-12-01  Marek Safar  <marek.safar@gmail.com>
113
114         A fix for bug #360455
115         * class.cs: Never report a unused warning for generic events to
116         workaround wrong expression type.
117
118 2009-11-30  Marek Safar  <marek.safar@gmail.com>
119
120         A fix for bug #558305
121         * decl.cs, class.cs: Check partial method definitions using correct
122         flag.
123
124 2009-11-30  Marek Safar  <marek.safar@gmail.com>
125
126         * argument.cs: Don't cache rarely used dynamic flag.
127
128 2009-11-27  Marek Safar  <marek.safar@gmail.com>
129
130         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
131
132 2009-11-27  Marek Safar  <marek.safar@gmail.com>
133
134         * ecore.cs (SimpleName): Removed no longer needed in_transit as
135         Resolve is now non-reentrant (saves ~0.6MB for corlib).
136
137 2009-11-26  Marek Safar  <marek.safar@gmail.com>
138
139         A fix for bug #545081
140         * decl.cs: Check private nested types of nested types recursively.
141
142 2009-11-26  Marek Safar  <marek.safar@gmail.com>
143
144         A fix for bug #558305
145         * location.cs: Ignore self referencing #line directive
146
147 2009-11-26  Marek Safar  <marek.safar@gmail.com>
148
149         A fix for bug #558292
150         * class.cs: Allow single unsafe fixed buffer fields.
151
152 2009-11-26  Marek Safar  <marek.safar@gmail.com>
153
154         * expression: Optimize few more zero-based operations.
155
156 2009-11-26  Marek Safar  <marek.safar@gmail.com>
157
158         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
159         avoids boxing of literal values.
160
161 2009-11-26  Marek Safar  <marek.safar@gmail.com>
162
163         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
164         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
165         codegen.cs: LocatedToken redesing to avoid excessive allocation and
166         boxing (saves ~7MB for corlib). Also fixes presise token location.
167
168 2009-11-25  Marek Safar  <marek.safar@gmail.com>
169
170         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
171         common data buckers.
172
173 2009-11-24  Marek Safar  <marek.safar@gmail.com>
174
175         * expression.cs: Lower static array initializer barrier.
176         
177         * support.cs, driver.cs: Share reader buffer.
178
179 2009-11-23  Marek Safar  <marek.safar@gmail.com>
180
181         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
182
183 2009-11-23  Marek Safar  <marek.safar@gmail.com>
184
185         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
186         cleanup some obsolete code.
187
188 2009-11-20  Marek Safar  <marek.safar@gmail.com>
189
190         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
191         Expression.Resolve.
192
193 2009-11-20  Marek Safar  <marek.safar@gmail.com>
194
195         * *.cs: Resolved expressions are never resolved again, this helps to
196         uncover some not easy to find bugs and improve the performance.
197
198 2009-11-19  Marek Safar  <marek.safar@gmail.com>
199
200         * *.cs: Made constant expressions fully compatible with any other
201         expression.
202
203 2009-11-19  Marek Safar  <marek.safar@gmail.com>
204
205         * *.cs: DoResolve is a worker method and has to be protected.
206
207 2009-11-18  Marek Safar  <marek.safar@gmail.com>
208
209         * *.cs: More context specific handling.
210
211 2009-11-17  Marek Safar  <marek.safar@gmail.com>
212
213         * *.cs: More context specific handling.
214
215 2009-11-16  Marek Safar  <marek.safar@gmail.com>
216
217         * dynamic.cs, class.cs: Removed few fixed user types conversions.
218         
219         * symbolwriter.cs: Uses public ILOffset.
220
221 2009-11-13  Marek Safar  <marek.safar@gmail.com>
222
223         A fix for bug #553650
224         * generic.cs: Another missing TypeToCoreType, still too many to fix.
225
226 2009-11-13  Marek Safar  <marek.safar@gmail.com>
227
228         A fix for bug #555170
229
230         * class.cs, delegate.cs, enum.cs: Constants have to be available
231         for parameters resolve.
232
233 2009-11-12  Marek Safar  <marek.safar@gmail.com>
234
235         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
236         arrays.
237
238 2009-11-12  Marek Safar  <marek.safar@gmail.com>
239
240         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
241         with a statically known candidate set.
242
243 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
244
245         * generic.cs: Made type inflation for generic constraint checks
246         recursive. This fixes BGO #553655.
247
248 2009-11-11  Marek Safar  <marek.safar@gmail.com>
249
250         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
251         checks.
252
253 2009-11-10  Marek Safar  <marek.safar@gmail.com>
254
255         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
256         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
257         attribute.cs: Add some dynamic error checking.
258
259 2009-11-07  Marek Safar  <marek.safar@gmail.com>
260
261         A fix for bug #553465
262
263         * expression.cs: Fixed mixed version of expression tree anonymous
264         type.
265
266 2009-11-06  Marek Safar  <marek.safar@gmail.com>
267
268         A fix for bug #553031
269
270         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
271         expression tree version of anonymous type with members declaration.
272
273 2009-11-05  Marek Safar  <marek.safar@gmail.com>
274
275         * parameter.cs: Handle nullable parameter default expression.
276         
277         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
278         class.cs, attribute.cs: Check for wrong dynamic arguments.
279
280 2009-11-05  Marek Safar  <marek.safar@gmail.com>
281
282         * statement.cs: Dynamic statements.
283
284 2009-11-04  Marek Safar  <marek.safar@gmail.com>
285
286         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
287         Compound assignments over dynamic type.
288
289 2009-11-03  Marek Safar  <marek.safar@gmail.com>
290
291         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
292         constructor arguments.
293
294 2009-10-30  Marek Safar  <marek.safar@gmail.com>
295
296         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
297         codegen.cs: Unary mutator on dynamic member access expression.
298
299 2009-10-29  Marek Safar  <marek.safar@gmail.com>
300
301         A fix for bug #550580   
302         * convert.cs: Don't eliminate explicit precission casts.
303
304 2009-10-28  Marek Safar  <marek.safar@gmail.com>
305
306         A fix for bug #550404
307         
308         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
309         expression.cs, statement.cs, ecore.cs: Quote any nested expression
310         tree.
311
312 2009-10-27  Marek Safar  <marek.safar@gmail.com>
313
314         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
315         constant.
316         
317         * class.cs: Allow nullable binary user operators.
318
319 2009-10-26  Marek Safar  <marek.safar@gmail.com>
320
321         * expression.cs: Move binary expression optimization at the end of
322         resolve.
323
324 2009-10-23  Marek Safar  <marek.safar@gmail.com>
325
326         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
327         Separate NullConstant from NullLiteral.
328
329 2009-10-23  Marek Safar  <marek.safar@gmail.com>
330
331         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
332         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
333         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
334         ModuleContainer. Add common unclosed member check routine.
335
336 2009-10-22  Marek Safar  <marek.safar@gmail.com>
337
338         * argument.cs: Use literal flag for real literals only.
339
340         * dynamic.cs: Use correct return type for custom delegates.
341
342 2009-10-22  Marek Safar  <marek.safar@gmail.com>
343
344         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
345         resolver.
346
347 2009-10-22  Marek Safar  <marek.safar@gmail.com>
348
349         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
350
351 2009-10-21  Marek Safar  <marek.safar@gmail.com>
352
353         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
354         conversion.
355
356 2009-10-21  Marek Safar  <marek.safar@gmail.com>
357
358         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
359         binder flags.
360
361 2009-10-20  Marek Safar  <marek.safar@gmail.com>
362
363         * argument.cs, dynamic.cs, expression.cs: Latest API update.
364
365 2009-10-19  Marek Safar  <marek.safar@gmail.com>
366
367         * typemanager.cs, expression.cs: Dynamic array initializer.
368
369 2009-10-16  Marek Safar  <marek.safar@gmail.com>
370
371         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
372         is imported.
373
374 2009-10-16  Marek Safar  <marek.safar@gmail.com>
375
376         A fix for bug #493523, #507067
377         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
378         standard nullable conversion using underlying standard conversion
379         and not full conversion.
380
381 2009-10-15  Marek Safar  <marek.safar@gmail.com>
382
383         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
384         type in VerifyArgumentsCompat.
385
386 2009-10-15  Marek Safar  <marek.safar@gmail.com>
387
388         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
389         Reject variable used with type arguments.
390
391 2009-10-14  Marek Safar  <marek.safar@gmail.com>
392
393         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
394         Implement dynamic expressions assignment.
395
396 2009-10-14  Marek Safar  <marek.safar@gmail.com>
397
398         * expression.cs: Build underlying expression when resolving unary
399         mutators.
400
401 2009-10-14  Marek Safar  <marek.safar@gmail.com>
402
403         * expression.cs: Emit enum array initializer using binary blob.
404
405 2009-10-08  Marek Safar  <marek.safar@gmail.com>
406
407         * typemanager.cs, constant.cs: Optimize decimal constants which fit
408         to long range.
409
410 2009-10-07  Marek Safar  <marek.safar@gmail.com>
411
412         * typemanager.cs: Reset object_type.
413         
414         * assign: Made SimpleAssign public.
415
416 2009-10-06  Marek Safar  <marek.safar@gmail.com>
417
418         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
419         invocation assembly to IsThisOrFriendAssembly.
420
421 2009-10-05  Marek Safar  <marek.safar@gmail.com>
422
423         * expression.cs: Equality comparison of generic parameter with
424         class constraint.
425
426 2009-10-05  Marek Safar  <marek.safar@gmail.com>
427
428         A fix for bug #543570
429         * generic.cs: Import predefined constraints correctly.
430
431 2009-10-02  Marek Safar  <marek.safar@gmail.com>
432
433         * ecore.cs: Don't crash on overloads with optional paremeters where
434         arguments count overflows.
435         
436         * parameter.cs: Import optional parameter constants using optional
437         value type.
438
439 2009-10-01  Marek Safar  <marek.safar@gmail.com>
440
441         * Makefile: Default is gmcs compiler.
442
443 2009-10-01  Marek Safar  <marek.safar@gmail.com>
444
445         * cs-parser.jay: Fixed few NRE.
446
447 2009-10-01  Marek Safar  <marek.safar@gmail.com>
448
449         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
450
451 2009-09-30  Marek Safar  <marek.safar@gmail.com>
452
453         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
454         ShimExpression, ImplicitCast.
455
456 2009-09-30  Marek Safar  <marek.safar@gmail.com>
457
458         A fix for bug #542959
459         * delegate.cs: Emit correct delegate instance variable when there
460         are static and non-static overloads.
461
462 2009-09-29  Marek Safar  <marek.safar@gmail.com>
463
464         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
465         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
466
467 2009-09-28  Marek Safar  <marek.safar@gmail.com>
468
469         A fix for bug #542487
470         * ecore.cs: Resolve extension methods hidden by properties.
471
472 2009-09-25  Marek Safar  <marek.safar@gmail.com>
473
474         * expression.cs, ecore.cs: More dynamic binary expressions.
475
476 2009-09-22  Marek Safar  <marek.safar@gmail.com>
477
478         * nullable.cs, expression.cs: Fixed null lifted conversion for
479         bitwise enum operations.
480
481 2009-09-22  Marek Safar  <marek.safar@gmail.com>
482
483         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
484         values in checked context.
485
486 2009-09-22  Marek Safar  <marek.safar@gmail.com>
487
488         * expression.cs, ecore.cs: Fixed array index constant conversion.
489
490 2009-09-20  Miguel de Icaza  <miguel@novell.com>
491
492         * expression.cs: Do not crash when MemberLookup returns something
493         that is not a MemberExpr here.   Report error 582 instead. 
494
495         Fixes #499988.
496
497 2009-09-18  Marek Safar  <marek.safar@gmail.com>
498
499         * decl.cs, class.cs: Check protected property accessors.
500
501 2009-09-18  Marek Safar  <marek.safar@gmail.com>
502
503         * dynamic.cs, assign.cs: Dynamic compound assignment.
504
505 2009-09-17  Marek Safar  <marek.safar@gmail.com>
506
507         * expression.cs: Fixed compound assignment explicit conversion.
508
509 2009-09-17  Marek Safar  <marek.safar@gmail.com>
510
511         * expression.cs, ecore.cs: Cannot infer variables from method group.
512
513 2009-09-16  Marek Safar  <marek.safar@gmail.com>
514
515         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
516         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
517         codegen.cs: Dynamic binary operations scaffolding.
518
519 2009-09-15  Marek Safar  <marek.safar@gmail.com>
520
521         * expression.cs: Fixes nullable promotion for enum type variables.
522
523 2009-09-11  Marek Safar  <marek.safar@gmail.com>
524
525         * driver.cs, dynamic.cs: Reset more static variables.
526
527 2009-09-11  Marek Safar  <marek.safar@gmail.com>
528
529         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
530         driver.cs: Introduced Expression::MakeExpression.
531
532 2009-09-11  Marek Safar  <marek.safar@gmail.com>
533
534         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
535
536 2009-09-09  Marek Safar  <marek.safar@gmail.com>
537
538         * eval.cs, report.cs: Use Console.Out for all eval error or warning
539         output.
540
541 2009-09-09  Marek Safar  <marek.safar@gmail.com>
542
543         A fix for bug #518707
544         * expression.cs (Is): Optimize only generic parameter type
545         expression probing value type generic parameter.
546
547 2009-09-09  Marek Safar  <marek.safar@gmail.com>
548
549         A fix for bug #532571
550         * ecore.cs: Check for simple name type arguments used with
551         non-generic type.
552
553 2009-09-08  Marek Safar  <marek.safar@gmail.com>
554
555         A fix for bug #497421
556         * generic.cs (CheckConstraint): Don't use buildin types to check for
557         parameterless constructor.
558
559 2009-09-08  Marek Safar  <marek.safar@gmail.com>
560
561         A fix for bug #537402
562         * generic.cs (CheckConstraint): Correctly inflate generic type
563         arguments when checking generic method. 
564
565 2009-09-08  Marek Safar  <marek.safar@gmail.com>
566
567         A fix for bug #536463
568         * decl.cs (AddToContainer): Don't report collision between explicit
569         and parameterless non-explicit members.
570
571 2009-09-08  Marek Safar  <marek.safar@gmail.com>
572
573         * eval.cs: Reset more static stuff.
574
575 2009-09-07  Marek Safar  <marek.safar@gmail.com>
576
577         A fix for bug #324625
578         * expression.cs, ecore.cs: Create nested generic type expression
579         using declaring and not current type.
580
581 2009-09-07  Marek Safar  <marek.safar@gmail.com>
582
583         * *.cs: Changed Report class to accept various output printers and
584         be an instance class. An expression resolver can now use different
585         message reporter for each call and Report.Error can safely throw
586         an exception. Part of ongoing work to turn mcs into proper library.
587
588 2009-09-04  Marek Safar  <marek.safar@gmail.com>
589
590         * statement.cs, ecore.cs: Removed error reporting from emit code.
591
592 2009-09-04  Marek Safar  <marek.safar@gmail.com>
593
594         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
595
596 2009-09-03  Marek Safar  <marek.safar@gmail.com>
597
598         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
599         parser checks out of constructors.
600
601 2009-09-02  Marek Safar  <marek.safar@gmail.com>
602
603         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
604
605 2009-09-02  Marek Safar  <marek.safar@gmail.com>
606
607         A fix for bug #535448
608         * anonymous.cs, class.cs: Copy return label between all contexts.
609
610 2009-09-02  Marek Safar  <marek.safar@gmail.com>
611
612         A fix for bug #535395
613         * namespace.cs: Resolve context can be null.
614
615 2009-08-25  Marek Safar  <marek.safar@gmail.com>
616
617         A fix for bug #533912
618         * generic.cs: Use correct context for constraints resolving.
619
620 2009-08-25  Marek Safar  <marek.safar@gmail.com>
621
622         A fix for bug #532630
623         * driver.cs: Trim conditional symbols.
624
625 2009-08-25  Marek Safar  <marek.safar@gmail.com>
626
627         * context.cs: New file.
628         
629         * *.exe.sources, *.csproj: Updated.
630
631 2009-08-25  Marek Safar  <marek.safar@gmail.com>
632
633         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
634         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
635         IMembercontext, some small cleanups.
636
637 2009-08-24  Marek Safar  <marek.safar@gmail.com>
638
639         * *.cs: Split ResolveContext and EmitContext.
640
641 2009-08-24  Marek Safar  <marek.safar@gmail.com>
642
643         * *.cs: Only ResolveContext implements IMemberContext.
644
645 2009-08-21  Marek Safar  <marek.safar@gmail.com>
646
647         * *.cs: Renamed IResolveContext to IMemberContext.
648
649 2009-08-21  Marek Safar  <marek.safar@gmail.com>
650
651         * *.cs: Detached ResolveContext from EmitContext.
652
653 2009-08-21  Marek Safar  <marek.safar@gmail.com>
654
655         * codegen.cs: Moved flow-analysis to BlockContext.
656
657 2009-08-21  Marek Safar  <marek.safar@gmail.com>
658
659         * *.cs: Detached BlockContext from EmitContext.
660
661 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
662
663         * statement.cs: avoid nullref when the return value of GetEnumerator()
664         does not contain any MoveNext() method.
665
666 2009-08-19  Marek Safar  <marek.safar@gmail.com>
667
668         * *.cs: Removed IResolveContext::GenericDeclContainer.
669
670 2009-08-19  Marek Safar  <marek.safar@gmail.com>
671
672         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
673
674 2009-08-19  Marek Safar  <marek.safar@gmail.com>
675
676         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
677         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
678
679 2009-08-18  Marek Safar  <marek.safar@gmail.com>
680
681         * *.cs: Removed boolean fields from EmitContext.
682
683 2009-08-18  Marek Safar  <marek.safar@gmail.com>
684
685         * *.cs: Add IResolveContext::IsStatic.
686
687 2009-08-18  Marek Safar  <marek.safar@gmail.com>
688
689         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
690
691 2009-08-17  Marek Safar  <marek.safar@gmail.com>
692
693         * *.cs: Removed DeclContainer from EmitContext.
694
695 2009-08-17  Marek Safar  <marek.safar@gmail.com>
696
697         * *.cs: Add IResolveContext::CurrentTypeParameters.
698
699 2009-08-14  Marek Safar  <marek.safar@gmail.com>
700
701         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
702
703 2009-08-14  Marek Safar  <marek.safar@gmail.com>
704
705         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
706         codegen.cs: Add IResolveContext::LookupExtensionMethod.
707
708 2009-08-13  Marek Safar  <marek.safar@gmail.com>
709
710         * decl.cs: Look in PartialContainer for parent type parameters.
711
712 2009-08-13  Marek Safar  <marek.safar@gmail.com>
713
714         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
715         codegen.cs: Add IResolveContext::LookupTypeParameter.
716
717 2009-08-13  Marek Safar  <marek.safar@gmail.com>
718
719         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
720         Moved resolved logic from Emit to Resolve.
721
722 2009-08-13  Marek Safar  <marek.safar@gmail.com>
723
724         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
725         codegen.cs: Reworked atttributes handling of ResolveContext.
726
727 2009-08-12  Marek Safar  <marek.safar@gmail.com>
728
729         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
730         LookupNamespaceOrType to ResolveContext.
731
732 2009-08-12  Marek Safar  <marek.safar@gmail.com>
733
734         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
735         class.cs: Removed unused parameters and methods.
736
737 2009-08-11  Marek Safar  <marek.safar@gmail.com>
738
739         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
740         codegen.cs: Finding the best common type of a set of expressions for
741         lambda statements.
742
743 2009-08-07  Marek Safar  <marek.safar@gmail.com>
744
745         * dynamic.cs, expression.cs: More dynamic conversions.
746
747 2009-08-06  Miguel de Icaza  <miguel@novell.com>
748
749         * generic.cs: This loop was incorrect, it was increment ii, but
750         checking for `i'.  This was a change introduced to fix #327497,
751         now we fix #424012.
752  
753         * class.cs: Catch another case for cs0533 error, fixes #324782.
754
755 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
756
757         * typemanager.cs (GetGenericArguments): SRE returns null for
758         generic methods on type builder instances if they are not generic
759         themselves. For example, for Foo<int>::Bar() it returns null, but
760         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
761
762 2009-08-05  Marek Safar  <marek.safar@gmail.com>
763
764         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
765         delegate.cs: Work on dynamic binding.
766
767 2009-08-04  Marek Safar  <marek.safar@gmail.com>
768
769         A second fix for bug #525342
770         * class.cs: Attach partial method attributes to method
771         implementation.
772
773 2009-08-03  Marek Safar  <marek.safar@gmail.com>
774
775         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
776         restrictions.
777         
778         * rootcontext.cs: Default to langversion v4.
779
780 2009-08-03  Marek Safar  <marek.safar@gmail.com>
781
782         * pending.cs: Check return type before member info is set.
783
784 2009-08-03  Marek Safar  <marek.safar@gmail.com>
785
786         * anonymous.cs: Fully initialize generic hoisted field expression.
787
788 2009-08-02  Miguel de Icaza  <miguel@novell.com>
789
790         * cs-parser.jay: Flag variables declared on the interactive shell
791         as used to prevent the 168 warning about local variable not being
792         used. 
793
794 2009-07-31  Marek Safar  <marek.safar@gmail.com>
795
796         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
797         attribute.cs: Emit dynamic export attribute.
798
799 2009-07-30  Marek Safar  <marek.safar@gmail.com>
800
801         * expression.cs: More verifier work.
802
803 2009-07-29  Marek Safar  <marek.safar@gmail.com>
804
805         * nullable.cs: Fixed SRE crash during corlib compilation.
806
807 2009-07-29  Marek Safar  <marek.safar@gmail.com>
808
809         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
810         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
811         More TypeManager.TypeToCoreType needed.
812
813 2009-07-29  Marek Safar  <marek.safar@gmail.com>
814
815         * anonymous.cs: Update after recent SRE fixes.
816
817 2009-07-28  Marek Safar  <marek.safar@gmail.com>
818
819         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
820         version of GetFieldHandle for fields of generic types.
821
822 2009-07-27  Marek Safar  <marek.safar@gmail.com>
823
824         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
825         ecore.cs: Add TypeManager.IsDynamicType,
826         PredefinedAttributes.Dynamic.
827
828 2009-07-27  Marek Safar  <marek.safar@gmail.com>
829
830         A fix for bug #415375
831         * expression.cs: Fixed object and reference type parameter
832         comparison.
833
834 2009-07-27  Marek Safar  <marek.safar@gmail.com>
835
836         A fix for bug #525342
837         * class.cs: Attach partial method attributes to method
838         implementation.
839
840 2009-07-24  Marek Safar  <marek.safar@gmail.com>
841
842         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
843         Dynamic arguments.
844
845 2009-07-24  Marek Safar  <marek.safar@gmail.com>
846
847         * anonymous.cs (MutateField): Add imported types handling.
848
849 2009-07-23  Marek Safar  <marek.safar@gmail.com>
850
851         * expression.cs, delegate.cs: Moved arguments resolve into their
852         counterparts expressions. Removed argument resolve from
853         CollectionElementInitializer.
854
855 2009-07-23  Marek Safar  <marek.safar@gmail.com>
856
857         A fix for bug #523683
858         * convert.cs, delegate.cs: Use common overload mechanism for method
859         group conversion check.
860
861 2009-07-22  Marek Safar  <marek.safar@gmail.com>
862
863         A fix for bug #523899
864         * generics.cs: Exact type inference with other bound types.
865
866 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
867
868         Don't complain when the same type is implemented by the output
869         assembly as well as multiple referenced assemblies
870         * namespace.cs (RootNamespace.LookupTypeReflection): Add
871         'must_be_unique' flag.
872         (GlobalRootNamespace): Update to changes.
873         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
874         already have a type in hand.
875
876 2009-07-22  Marek Safar  <marek.safar@gmail.com>
877
878         * expression.cs: More verifier instrumentation.
879         
880         * statement.cs: Do proper throw expression conversion.
881
882 2009-07-22  Marek Safar  <marek.safar@gmail.com>
883
884         A fix for bug #522789
885         * expression.cs: Mutate invocation return type.
886
887 2009-07-16  Marek Safar  <marek.safar@gmail.com>
888
889         * anonymous.cs: Split assignable and readonly generated variable
890         references.
891
892 2009-07-16  Marek Safar  <marek.safar@gmail.com>
893
894         A fix for bug #521671
895         * statement.cs: Fixed crash when checking missing type.
896
897 2009-07-16  Marek Safar  <marek.safar@gmail.com>
898
899         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
900         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
901         class.cs, driver.cs: Work on dynamic binding.
902
903         * dynamic.cs: New file.
904
905         * *.sources, *.proj: Updated.
906
907 2009-07-15  Marek Safar  <marek.safar@gmail.com>
908
909         * expression.cs (Conditional): Avoid double Resolve.
910
911 2009-07-13  Marcus Griep  <marcus@griep.us>
912
913         * ecore.cs: Fix obscure bug with resolving members of interfaces
914         that hide parent interface members. Fixes bug #444388 and corrects
915         bug #323096
916
917 2009-07-13  Marek Safar  <marek.safar@gmail.com>
918
919         * expression.cs (LocalVariableReference): Bounce resolve.
920
921 2009-07-10  Marek Safar  <marek.safar@gmail.com>
922
923         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
924         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
925         types to new class.
926         
927         * support.cs: New dynamic type wrapper.
928
929 2009-07-08  Marek Safar  <marek.safar@gmail.com>
930
931         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
932         typed local variable.
933
934 2009-07-06  Marek Safar  <marek.safar@gmail.com>
935
936         A fix for bug #519005
937         * anonymous.cs: Use null_type as no return type placeholder.
938
939 2009-07-02  Marek Safar  <marek.safar@gmail.com>
940
941         * generic.cs: Handle type inference of identical type parameters
942         with different bounds.
943
944 2009-07-01  Marek Safar  <marek.safar@gmail.com>
945
946         * expression.cs, class.cs: Events variance.
947         
948         * cs-parser.jay: Interface events error messages.
949
950 2009-07-01  Marek Safar  <marek.safar@gmail.com>
951
952         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
953
954 2009-06-29  Marek Safar  <marek.safar@gmail.com>
955
956         * parameter.cs, convert.cs, expression.cs, class.cs: Default
957         parameter expression can be value-type New.
958
959         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
960
961 2009-06-26  Marek Safar  <marek.safar@gmail.com>
962
963         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
964         Implemented C# 4.0 named arguments.
965
966 2009-06-24  Marek Safar  <marek.safar@gmail.com>
967
968         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
969         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
970         parameter modifier. Also fixes bug #515497.
971
972 2009-06-24  Marek Safar  <marek.safar@gmail.com>
973
974         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
975         arguments expression to be implemented.
976         
977         *.sources: Add argument.cs
978
979 2009-06-23  Marek Safar  <marek.safar@gmail.com>
980
981         * parameter.cs: Moved GetParameterIndexByName to base class.
982         
983         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
984         unused AType. Use argument's version of GetExpressionTree.
985
986 2009-06-22  Marek Safar  <marek.safar@gmail.com>
987
988         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
989         arguments grammar.
990
991 2009-06-17  Marek Safar  <marek.safar@gmail.com>
992
993         A fix for bug #514096
994         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
995
996 2009-06-17  Marek Safar  <marek.safar@gmail.com>
997
998         * expression.cs: The first multi-dimensional array nested array
999         initializers was not checked.
1000         
1001         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1002
1003 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1004
1005         A fix for bug #513400
1006         * nullable.cs (EmitEquality): Operands emit could be simplified for
1007         built-in types when we now emit user operators differently.
1008
1009 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1010
1011         * ecore.cs: Report inaccessible delegate methods correctly.
1012
1013 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1014
1015         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1016         cs-parser.jay: Implemented C# 4.0 optional parameters.
1017
1018 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1019
1020         * driver.cs: Removed broken DefineManifestResource.
1021
1022 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1023
1024         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1025         Use $(BOOTSTRAP_PROFILE) instead.
1026
1027 2009-06-12  Jb Evain  <jbevain@novell.com>
1028
1029         * rootcontext.cs: add a Platform field.
1030         * driver.cs: handle /platform.
1031         * codegen.cs: pass the proper flags according to
1032         the platform when saving the assembly.
1033
1034 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1035
1036         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1037         Add optional parameters grammar.
1038
1039 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1040
1041         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1042         driver.cs: Split lang version and metadata version.
1043
1044 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1045
1046         * decl.cs: Better overload ctor collision error message.
1047
1048 2009-06-05  Jb Evain  <jbevain@novell.com>
1049
1050         * driver.cs (EmbededResource): avoid using an internal method
1051         in gmcs to embed manifest resources.
1052
1053 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1054
1055         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1056         the compiler from older mono versions (like moon's bots)
1057
1058 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1059
1060         * namespace.cs (LookupTypeReflection): Ignore collisions between
1061         forwarded types.
1062
1063 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1064
1065         * codegen.cs: Enabled generic type forwarders.
1066
1067 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1068
1069         * dmcs.*: Add another version of SRE compiler.
1070
1071 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1072
1073         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1074         generic-mcs.cs: Fixed variant type conversions.
1075
1076 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1077
1078         A fix for bug #507863
1079         * codegen.cs: Fixes a crash on invalid string value attribute.
1080
1081 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1082
1083         A fix for bug #508334
1084         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1085         cs-parser.jay: Fully import __arglist modifier.
1086
1087 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1088
1089         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1090         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1091         actually work with closed generic types.
1092
1093 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1094
1095         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1096         Fix the build by replacing the use of 'var' with the actual type.
1097
1098 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1099
1100         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1101     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1102         declarations.
1103           
1104         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1105         filter.
1106
1107 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1108                         Marek Safar  <marek.safar@gmail.com>
1109
1110         A fix for bug #377509
1111         * parameter.cs: Use predefined and not empty name for implicit
1112         setters.
1113
1114 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1115
1116         * class.cs: Don't report wrong warnings for event fields.
1117
1118 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1119
1120         A fix for bug #504667
1121         * class.cs: Check for static class using parent container instead of
1122         parent type.
1123
1124 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1125
1126         A fix for bug #496922
1127         * expression.cs: Always use temporary variable when using object
1128         initializer.
1129
1130 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1131
1132         A fix for bug #495112
1133         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1134         local cache.
1135
1136 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1137
1138         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1139
1140 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1141
1142         * complete.cs: No idea how gonzalo got a null in the list, but
1143         avoid crashing.
1144
1145 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1146
1147         * complete.cs (CompletionElementInitializer): New completion class
1148         to support completing inside a C# 3 element initializer, so this
1149         allows completion for Silverlight situations where it is very
1150         common to do:
1151
1152         new TextBlock () { Fo<TAB>
1153
1154         (CompletionSimpleName): Expose the prefix that was
1155         passed to the simple name.
1156
1157         * cs-parser.jay (object_or_collection_initializer): Add support
1158         for element_initializers.
1159
1160         * expression.cs (CollectionOrObjectInitializers.DoResolve):
1161         special case completion expressions as this method aggressively
1162         collects data before it operates, and errors were being thrown
1163         earlier than we were able to complete.
1164
1165 2009-04-23  Miguel de Icaza  <miguel@novell.com>
1166
1167         * eval.cs: Make getcompletions silent and enable debugging output
1168         if the -v option is passed.
1169
1170         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
1171         Consider looking up the namespace that matches the prefix being
1172         used. 
1173
1174         This is part of the support for allowing completions like:
1175         `System.Co<TAB>' to complete to System.Console.
1176
1177         * complete.cs (CompletionSimpleName.AppendResults): Make this
1178         routine reusable.
1179
1180 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
1181
1182         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
1183         COMPLETE_COMPLETION as internal.
1184
1185 2009-04-17  Miguel de Icaza  <miguel@novell.com>
1186
1187         * complete.cs: Include namespace resolution in simple names as
1188         well as global types and types in the using scope in the
1189         resolution. 
1190
1191         * namespace.cs: Supporting infrastrcture to provide completions
1192         based on the current using scope. 
1193
1194         * eval.cs: Introduce an entry point that allows for initialization
1195         to return a list of the files passed on the command line.
1196
1197 2009-04-14  Marek Safar  <marek.safar@gmail.com>
1198
1199         A fix for bug #494243
1200         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
1201
1202 2009-04-13  Marek Safar  <marek.safar@gmail.com>
1203
1204         A fix for bug #493887
1205         * statement.cs: Don't skip string multi-section with default or
1206         null label when populating string hashtable.
1207
1208 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1209
1210         A fix for bug #492329
1211         * expression.cs (New): Load variable when assigning type parameter
1212         to ref variable.
1213
1214 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1215
1216         A fix for bug #488960
1217         * decl.cs: Compare MVAR types using non-null values.
1218
1219 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1220
1221         * typemanager.cs, expression.cs: Removed unused nullable checks.
1222
1223 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1224
1225         * *.cs: Removed some gmcs conditionals.
1226
1227 2009-03-26  Marek Safar  <marek.safar@gmail.com>
1228
1229         * generic.cs, support.cs: Moved generics stuff out of support.cs
1230
1231 2009-03-24  Marek Safar  <marek.safar@gmail.com>
1232
1233         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
1234         DeclaringType.
1235
1236 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1237
1238         * attribute.cs: Consider all members for error reporting when
1239         checking named arguments.
1240
1241 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1242
1243         A fix for bug #487625
1244         * namespace.cs: Use a warning for all predefined type conflicts.
1245
1246 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1247
1248         A fix for bug #485706
1249         * statement.cs: Explicitly type catch type argument to pass verifier
1250         check.
1251
1252 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1253
1254         Initial support to provide code completion facilities to consumers
1255         of the evaluator API.
1256         
1257         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
1258         support the completion engine.   When we reach the end of the
1259         input stream instead of returning EOF, when this flag is true the
1260         tokenizer instead produces:
1261
1262                 One GENERATE_COMPLETION token: this token then must be
1263                 handled in the grammar at every point where the user
1264                 would likely request a completion.
1265
1266                 As many COMPLETE_COMPLETION tokens as necessary.   These
1267                 tokens are generated to assist the parser in unwinding and
1268                 producing a valid parse tree.    
1269
1270         The parser rules do not have to be perfect, the parser needs to be
1271         augmented with judicious use of GENERATE_COMPLETION tokens to
1272         improve the areas where we can provide completion and the parser
1273         needs to add support for COMPLETE_COMPLETION tokens in productions
1274         to make them work.
1275
1276         It is common to not have enough support for COMPLETE_COMPLETION
1277         under certain rules and that even if we generated the
1278         GENERATE_COMPLETION token that the resulting tree will be invalid
1279         due to the missing rules that support COMPLETE_COMPLETION.
1280
1281         The final EOF token is produced by having the parser notify the
1282         tokenizer when it reaches the root production that the next token
1283         should be EOF.
1284
1285         * support.cs (CompletionResult): New Exception.   This exception
1286         is thrown to return the completion results when one of the special
1287         completion expressions is reached.
1288
1289         This exception is thrown by the completing ExpressionStatements
1290         classes that live in complete.cs
1291
1292         * complete.cs (CompletingExpression): a new base class for
1293         completing expressions.   This derives from the
1294         ExpressionStatement class and not from Expression as it allows
1295         completion to happen not only where expressions are expected in
1296         the grammar, but also where statements are expected.
1297
1298         (CompletionSimpleName): A new class used to provide completions
1299         for SimpleNames.     This currently only resolves to local
1300         variables from the evaluator context (GetVars call).
1301
1302         (CompletionMemberAccess): Implements support for completing member
1303         access patterns. 
1304
1305         * cs-parser.jay: Add support for completion in a few places. 
1306
1307         * eval.cs (GetCompletions): New public API for the evaluator that
1308         returns a list of possible completions given the input.   The
1309         return value is an array of completions 
1310
1311         * anonymous.cs (Compatible): If the exception thrown from the
1312         resolved expression is a CompletionResult exception let that one
1313         through instead of printing a diagnostic error in the try/catch. 
1314 <       
1315 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1316
1317         * 
1318
1319         * driver.cs (Main): Use Environment.Exit to quit quickly and
1320         prevent the compiler from doing the usual wait for helper thread
1321         to terminate.  
1322
1323         This is to prevent a slowdown that was reported by Gonzalo on
1324         ASP.NET 
1325
1326 2009-03-19  Marek Safar  <marek.safar@gmail.com>
1327
1328         * ecore.cs: Load build-in types directly instead of accessing
1329         an internal field.
1330
1331 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1332
1333         * ecore.cs: Always use unbox.any when available.
1334
1335 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1336
1337         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
1338
1339 2009-03-17  Marek Safar  <marek.safar@gmail.com>
1340
1341         * generic.cs: Removed obsolete version of type inference.
1342
1343 2009-03-16  Marek Safar  <marek.safar@gmail.com>
1344
1345         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
1346         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
1347         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
1348         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
1349
1350 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1351
1352         A fix for bug #482996
1353         * anonymous.cs: Make sure we are not infering return type when
1354         checking type compatibility.
1355
1356 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1357
1358         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
1359         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
1360         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
1361         attributes in their own structure. Needed when accessing their
1362         properties before they are resolved.
1363
1364 2009-03-09  Marek Safar  <marek.safar@gmail.com>
1365
1366         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
1367         hashtable (~10x faster).
1368         
1369         * driver.cs: Removed wrong Reset.
1370
1371 2009-03-08  Marek Safar  <marek.safar@gmail.com>
1372
1373         * class.cs: Use correct common base type for unmanaged delayed
1374         check.
1375
1376         * rootcontext.cs: Wrap unhandled exception.
1377
1378 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
1379
1380         Make SeekableStreamReader self-tuning and arbitrarily seekable
1381         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
1382         the buffer.
1383         (SeekableStreamReader.Position.set): Use it.  Simplify logic
1384         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
1385         buffer size when the stream needs to be re-read from the beginning.
1386
1387 2009-03-05  Marek Safar  <marek.safar@gmail.com>
1388
1389         A fix for bug #480100
1390         * parameter.cs: A parameter is not hoisted when used directly as ET.
1391
1392 2009-03-04  Marek Safar  <marek.safar@gmail.com>
1393
1394         * statement.cs: Fixed an issue when using variable is of interface
1395         type.
1396
1397 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1398
1399         A fix for bug #480319
1400         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
1401
1402 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1403
1404         A fix for bug #480867
1405         * typemanager.cs, expression.cs, ecore.cs: Changed method group
1406         expression to have no valid type.
1407
1408 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1409
1410         A fix for bug #481258
1411         * class.cs: Set extension method flag in partial container.
1412
1413 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1414
1415         * statement.cs, typemanager.cs: Use expression for StringEmitter.
1416         
1417         * attribute.cs: Add sanity check.
1418
1419 2009-02-27  Marek Safar  <marek.safar@gmail.com>
1420
1421         * class.cs: Add external constructor error.
1422
1423 2009-02-26  Marek Safar  <marek.safar@gmail.com>
1424
1425         A fix for bug #475354
1426         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
1427         correctly user defined nullable equality operators.
1428
1429 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1430
1431         A fix for bug #479532
1432         * expression.cs: Implement NewInitialize::AddressOf.
1433
1434 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1435
1436         A fix for bug #413633
1437         * expression.cs: Iterate all base class-constraint types.
1438
1439 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1440
1441         A fix for bug #479209
1442         * literal.cs: Mutate null underlying type.
1443
1444 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1445
1446         A fix for bug #476295
1447         * convert.cs: Avoid wrapping implicitly convertible reference type.
1448
1449 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1450
1451         * iterators.cs: Create MemberName correctly.
1452
1453 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1454
1455         A fix for bug #478655
1456         * literal.cs: Check also underlying null type conversion.
1457
1458 2009-02-21  Marek Safar  <marek.safar@gmail.com>
1459
1460         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
1461
1462 2009-02-20  Marek Safar  <marek.safar@gmail.com>
1463
1464         A fix for bug #477447
1465         * statement.cs: Add reference to correct parent storey when this
1466         is accessible from deep children storey (more than 1 level).
1467
1468 2009-02-19  Marek Safar  <marek.safar@gmail.com>
1469
1470         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
1471         * class.cs: Define base type members before setting up member cache.
1472
1473 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1474
1475         A fix for bug #477378
1476         * nullable.cs, expression.cs, statement.cs: More precise null type
1477         sanity checks.
1478
1479 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1480
1481         A fix for bug #472805
1482         * typemanager.cs, namespace.cs: Import only visible extension method
1483         types.
1484
1485 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1486
1487         A fix for bug #476895
1488         * attribute.cs: Use correct resolve context for attribute type.
1489
1490 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1491
1492         A fix for bug #476266
1493         * anonymous.cs: Mutate multi-dimensional arrays.
1494
1495 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1496
1497         A fix for bug #476400
1498         * statement.cs, expression.cs: Removed wrong Dispose optimization.
1499
1500 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1501
1502         A fix for bug #476811
1503         * generics.cs: Fixed null-literal check.
1504
1505 2009-02-17  Marek Safar  <marek.safar@gmail.com>
1506
1507         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
1508         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
1509         messing with static variables.
1510
1511 2009-02-16  Marek Safar  <marek.safar@gmail.com>
1512
1513         A fix for bug #475965
1514         * generics.cs: Check generic parameter type after extracting from
1515         Expression<T>.
1516
1517 2009-02-16  Marek Safar  <marek.safar@gmail.com>
1518
1519         A fix for bug #475823
1520         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
1521         typed-null support.
1522
1523 2009-02-14  Marek Safar  <marek.safar@gmail.com>
1524
1525         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
1526         Simplified event field definition using backing field and not
1527         field builder directly.
1528
1529         * expression.cs (EmitLdArg): Optimize fast paths.
1530
1531 2009-02-13  Marek Safar  <marek.safar@gmail.com>
1532
1533         A fix for bug #475327
1534         * expression.cs (ArrayCreation): Don't mutate values optimized away.
1535
1536 2009-02-13  Marek Safar  <marek.safar@gmail.com>
1537
1538         A fix for bug #475342
1539         * cs-parser.jay: Using 'super' instead of 'base' to call base
1540         constructor crashes compiler.
1541
1542 2009-02-13  Marek Safar  <marek.safar@gmail.com>
1543
1544         A fix for bug #475354
1545         * expression.cs (Constantify): Add nullable types.
1546         
1547         * const.cs (EmitDecimalConstant): Avoid explicit cast.
1548
1549 2009-02-12  Marek Safar  <marek.safar@gmail.com>
1550
1551         A fix for bug #475246
1552         * expression.cs: More broken flowanalysis hacking needed.
1553
1554 2009-02-12  Marek Safar  <marek.safar@gmail.com>
1555
1556         * attribute.cs: Compare only ref/out array modifiers. 
1557
1558 2009-02-11  Marek Safar  <marek.safar@gmail.com>
1559
1560         * statement.cs: Use member cache when looking for foreach members.
1561
1562 2009-02-11  Marek Safar  <marek.safar@gmail.com>
1563
1564         * expression.cs: Don't expose internal initializer types.
1565         
1566         * statement.cs: Check also explicit conversions for goto case.
1567
1568 2009-02-11  Marek Safar  <marek.safar@gmail.com>
1569
1570         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
1571
1572 2009-02-10  Marek Safar  <marek.safar@gmail.com>
1573
1574         * *.cs: Replace null-type with NullLiteral where appropriate.
1575
1576 2009-02-09  Marek Safar  <marek.safar@gmail.com>
1577
1578         * expression.cs: Initializer of reference argument use temporary
1579         variable to be verifiable.
1580         
1581         * parameter.cs: Share EmitLdArg.
1582
1583 2009-02-09  Marek Safar  <marek.safar@gmail.com>
1584
1585         A fix for bug #473559
1586         * class.cs: Fixed: Not reporting error about nested class with the
1587         same name.
1588
1589 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
1590
1591         Contributed under the MIT/X11 license.
1592
1593         * generic.cs: Added VerifyVariantTypeParameters which performs new
1594         variance verification logic. The old logic, based on the spec, was
1595         wrong because the spec is full of LIES!
1596
1597         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
1598
1599         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
1600
1601         * class.cs:
1602         * ecore.cs: Added calls to the new variance verification logic.
1603
1604         * parameter.cs:
1605         * delegate.cs: Removed calls to the old variance verification logic.
1606
1607 2009-02-06  Marek Safar  <marek.safar@gmail.com>
1608
1609         * delegate.cs: Use cached Invoke method directly.
1610
1611 2009-02-06  Marek Safar  <marek.safar@gmail.com>
1612
1613         * expression.cs: Emit expression tree for hoisted variable access.
1614
1615 2009-02-04  Marek Safar  <marek.safar@gmail.com>
1616
1617         * namespace.cs: Add better extension class check.
1618
1619 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
1620
1621         * generic.cs: Fixed typeo (TypeParameter.Variacne).
1622
1623 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
1624
1625         This patch adds initial generic variance support to the compiler.
1626         It is contributed under the MIT/X11 license.
1627
1628         * typemanager.cs: Modified ImplementsInterface to check variance.
1629         Added VerifyVariantTypeParameters which checks the specified type to see
1630         if it uses a variant type parameter as a type argument (which is not
1631         allowed). Added IsVariantOf which determins if the first type is a
1632         variant of the second. NOTE: This only supports reference types at
1633         the moment to conform with the current level of VM support. When the
1634         VM supports value types, this will follow step.
1635
1636         * generic.cs: Added the Variance enum. Added a Variance property to
1637         TypeParameter and added variance support to definition phase. Added a
1638         Variance property to TypeParameterName. Also check to make sure that
1639         no variant types appear in generic method parameters.
1640
1641         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
1642         keywords if the langversion supports it.
1643
1644         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
1645         that variant types are only used in legal positions. Also added
1646         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
1647         parameters.
1648
1649         * decl.cs: Construct TypeParameter with the variance information.
1650
1651         * convert.cs: Checks variance in ImplicitReferenceConversionExists
1652         and ImplicitConversionStandard.
1653
1654         * rootcontext.cs: Added new "Future" language version.
1655
1656         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
1657         type parameters are not used as type arguments in interface inheritance.
1658         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
1659         parameters are not used as method return types. In MemberBase.
1660         ResolveMemberType, ensure that variant type parameters are not used
1661         as type arguments. Also call VerifyNoVariantTypeParameters on every
1662         set of parameters which are resolved.
1663
1664         * delegate.cs: Modified Delegate.Define to ensure that variant
1665         parameters are not used as type arguments and that a contravariant
1666         parameter is not used as the return type. Also call
1667         VerifyNoVariantTypeParameters on the delegate parameters.
1668
1669         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
1670         to specify generic variance.
1671
1672         * driver.cs: Added support for LanguageVersion.Future in the form of
1673         "-langversion:future".
1674
1675         * generic-mcs.cs: Stubbed out new members in generic.cs.
1676
1677 2009-02-03  Marek Safar  <marek.safar@gmail.com>
1678
1679         * class.cs, generic.cs: Emit type parameter constraints for nested
1680         types.
1681
1682 2009-02-02  Marek Safar  <marek.safar@gmail.com>
1683
1684         A fix for bug #471213
1685         * class.cs: Avoid emitting backing field for abstract event fields.
1686
1687 2009-02-01  Marek Safar  <marek.safar@gmail.com>
1688
1689         A fix for bug #359731
1690         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
1691         expressions.
1692
1693 2009-01-30  Marek Safar  <marek.safar@gmail.com>
1694
1695         A fix for bug #470767
1696         * statement.cs: Introduced BlockScopeExpression, needed when 
1697         expression tree conversion has to emit scope variables.
1698
1699 2009-01-29  Marek Safar  <marek.safar@gmail.com>
1700
1701         * class.cs: Remove duplicate CallingConvention.
1702
1703 2009-01-29  Marek Safar  <marek.safar@gmail.com>
1704
1705         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
1706         when I finally found the right naming convention.
1707
1708 2009-01-29  Marek Safar  <marek.safar@gmail.com>
1709
1710         * cs-tokenizer.cs: Put back different open parens optimization.
1711
1712 2009-01-28  Marek Safar  <marek.safar@gmail.com>
1713
1714         A fix for bug #470227
1715         * cs-tokenizer.cs: Remove too agressive parser optimization.
1716
1717 2009-01-28  Marek Safar  <marek.safar@gmail.com>
1718
1719         A fix for bug #324319
1720         * class.cs: Remove too early base type resolve.
1721
1722 2009-01-27  Marek Safar  <marek.safar@gmail.com>
1723
1724         A fix for bug #324319
1725         * ecore.cs: Explicitly type null when assigning to type argument to
1726         make pass verifier check.
1727
1728 2009-01-27  Marek Safar  <marek.safar@gmail.com>
1729
1730         * anonymous.cs: Fixed recent regression when initializing captured 
1731         this.
1732
1733 2009-01-26  Marek Safar  <marek.safar@gmail.com>
1734
1735         A fix for bug #469019
1736         * anonymous.cs: Use all parent type parameters when instantiating
1737         nested generic storey.
1738
1739 2009-01-26  Marek Safar  <marek.safar@gmail.com>
1740
1741         * expression.cs: Check for null instance methodgroup expression.
1742
1743 2009-01-26  Marek Safar  <marek.safar@gmail.com>
1744
1745         A fix for bug #469244
1746         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
1747         instance inside a conditional expression.
1748
1749 2009-01-23  Marek Safar  <marek.safar@gmail.com>
1750
1751         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
1752         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
1753         GetElementType and HasElementType. IsValueType clean up.
1754
1755 2009-01-23  Marek Safar  <marek.safar@gmail.com>
1756
1757         * nullable.cs: Use common EmitCall.
1758         
1759         * expression.cs: Emit constraint. for virtual calls only.
1760
1761 2009-01-23  Marek Safar  <marek.safar@gmail.com>
1762
1763         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
1764         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
1765         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
1766         checks.
1767
1768 2009-01-22  Jb Evain  <jbevain@novell.com>
1769
1770         * anonymous.cs: make anonymous types' ToString implementation
1771         match what csc outputs.
1772
1773 2009-01-21  Marek Safar  <marek.safar@gmail.com>
1774
1775         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
1776         up.
1777
1778 2009-01-17  Marek Safar  <marek.safar@gmail.com>
1779
1780         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
1781         verifier checks.
1782
1783 2009-01-16  Marek Safar  <marek.safar@gmail.com>
1784
1785         * nullable.cs (LiftedBinaryOperator): Check for all possible null
1786         expressions.
1787
1788 2009-01-15  Marek Safar  <marek.safar@gmail.com>
1789
1790         A fix for bug #466634
1791         * statement.cs: Add reference for nested storey when only this
1792         is captured.
1793
1794 2009-01-15  Marek Safar  <marek.safar@gmail.com>
1795
1796         A fix for bug #466474
1797         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
1798         was specified.
1799
1800 2009-01-15  Marek Safar  <marek.safar@gmail.com>
1801
1802         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
1803         Fixed nested stories parent referencing process. Also fixes #463985.
1804
1805 2009-01-06  Marek Safar  <marek.safar@gmail.com>
1806
1807         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
1808         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
1809         implementation. Also fixes #463108.
1810
1811 2009-01-05  Marek Safar  <marek.safar@gmail.com>
1812
1813         A fix for bug #416109
1814         * decl.cs: Issue correct CLSAttribute warning location.
1815
1816 2009-01-05  Marek Safar  <marek.safar@gmail.com>
1817
1818         A fix for bug #456775
1819         * attribute.cs: Use attribute owner scope when resolving attribute
1820         arguments.
1821
1822 2009-01-05  Marek Safar  <marek.safar@gmail.com>
1823
1824         A fix for bug #457257
1825         * decl.cs: Fixed incorrect member declaring type comparison.
1826
1827 2009-01-05  Marek Safar  <marek.safar@gmail.com>
1828
1829         A fix for bug #460896
1830         * driver.cs: Handle /RES resources as embeddable.
1831
1832 2009-01-05  Marek Safar  <marek.safar@gmail.com>
1833
1834         A fix for bug #462515
1835         * ecore.cs: Report inacessible members upwards.
1836
1837 2009-01-05  Marek Safar  <marek.safar@gmail.com>
1838
1839         A fix for bug #463190, #463192
1840         * decl.cs, namespace.cs: Also import internal extension classes.
1841
1842 2009-01-04  Marek Safar  <marek.safar@gmail.com>
1843
1844         A fix for bug #463415
1845         * generic.cs: Use right index for RemoveDependentTypes.
1846
1847 2009-01-02  Marek Safar  <marek.safar@gmail.com>
1848
1849         A fix for bug #463196
1850         * expression.cs: Fixed enum to null comparison.
1851
1852 2009-01-02  Marek Safar  <marek.safar@gmail.com>
1853
1854         A fix for bug #463121
1855         * nullable.cs: Fixed nullable user equality operator comparison.
1856
1857 2009-01-02  Marek Safar  <marek.safar@gmail.com>
1858
1859         A fix for bug #462950
1860         * class.cs, decl.cs: Use full explicit name when defining automatic
1861         property backing field.
1862
1863 2009-01-02  Marek Safar  <marek.safar@gmail.com>
1864
1865         A fix for bug #462592
1866         * pending.cs: Emit type arguments for generic proxy method.
1867
1868 2008-12-30  Marek Safar  <marek.safar@gmail.com>
1869
1870         * expression.cs (As): Mutate all type arguments.
1871
1872 2008-12-29  Marek Safar  <marek.safar@gmail.com>
1873
1874         A fix for bug #462622
1875         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
1876         context.
1877
1878 2008-12-29  Marek Safar  <marek.safar@gmail.com>
1879
1880         A fix for bug #450782
1881         * ecore.cs: Consider more variables of form V.I to be fixed.
1882
1883 2008-12-29  Marek Safar  <marek.safar@gmail.com>
1884
1885         A fix for bug #460712
1886         * typemanager.cs: Core types could be imported.
1887
1888 2008-12-28  Marek Safar  <marek.safar@gmail.com>
1889
1890         A fix for bugs #460847, #460772, #458049, #457339, #447807
1891         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
1892         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
1893         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
1894         user lambdas used inside query clauses.
1895
1896 2008-12-18  Marek Safar  <marek.safar@gmail.com>
1897
1898         A fix for bug #460229
1899         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
1900
1901 2008-12-18  Marek Safar  <marek.safar@gmail.com>
1902
1903         A fix for bug #459952
1904         * decl.cs, namespace.cs: Use common CheckAccessLevel.
1905
1906 2008-12-18  Marek Safar  <marek.safar@gmail.com>
1907
1908         A fix for bug #459630
1909         * convert.cs: Enum to valuetype conversion is not allowed.
1910
1911 2008-12-18  Marek Safar  <marek.safar@gmail.com>
1912
1913         A fix for bug #457087
1914         * generic.cs: Don't crash when constraint comes from type
1915         declaration.
1916
1917 2008-12-16  Marek Safar  <marek.safar@gmail.com>
1918
1919         A fix for bug #459221
1920         * anonymous.cs, statement.cs: Delay only captured this
1921         initialization.
1922
1923 2008-12-12  Marek Safar  <marek.safar@gmail.com>
1924
1925         A fix for bug #457489
1926         * anonymous.cs, statement.cs: Split anonymous storey instantiation
1927         and initialization to capture scope initializers correctly.
1928
1929 2008-12-11  Marek Safar  <marek.safar@gmail.com>
1930
1931         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
1932         ParameterReference refactoring.
1933
1934 2008-12-03  Marek Safar  <marek.safar@gmail.com>
1935
1936         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
1937         to be imported from any assembly.
1938
1939 2008-12-03  Marek Safar  <marek.safar@gmail.com>
1940
1941         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
1942         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
1943         from anonymous method and lambda expression.
1944
1945 2008-12-01  Marek Safar  <marek.safar@gmail.com>
1946
1947         A fix for bug #448560
1948         * expression.cs (As): Box any generic type arguments to be
1949         verifiable.
1950
1951 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
1952
1953         Add tripwire for implicit conversion bugs
1954         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
1955         for CS1501 error.
1956         (MethodGroupExpr.OverloadResolve): Add sanity check between
1957         IsApplicable and VerifyArgumentsCompat.
1958         (VerifyArgumentsCompat): Report CS1501 where appropriate.
1959
1960 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
1961
1962         Fix build break in System.Data_test
1963         * convert.cs (ImplicitConversionExists): Move NullLiteral
1964         conversions ...
1965         (ImplicitStandardConversionExists): ... here.
1966
1967 2008-11-28  Marek Safar  <marek.safar@gmail.com>
1968
1969         * literal.cs: Emit correctly explicit null to nullable cast.
1970
1971 2008-11-28  Marek Safar  <marek.safar@gmail.com>
1972
1973         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
1974         resolve.
1975
1976 2008-11-28  Marek Safar  <marek.safar@gmail.com>
1977
1978         A fix for bug #449005
1979         * convert.cs, nullable.cs: Use only one implicit nullable
1980         conversion.
1981
1982 2008-11-27  Marek Safar  <marek.safar@gmail.com>
1983
1984         * convert.cs, literal.cs: More Convert cleanup is needed.
1985
1986 2008-11-27  Marek Safar  <marek.safar@gmail.com>
1987
1988         * decl.cs, class.cs: Fixed misleading error message.
1989
1990 2008-11-26  Marek Safar  <marek.safar@gmail.com>
1991
1992         A fix for bug #449005
1993         * nullable.cs (EmitEquality): Disable optimization for user operator
1994         operands.
1995
1996 2008-11-25  Marek Safar  <marek.safar@gmail.com>
1997
1998         A fix for bug #447027
1999         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2000         with context variables stored as expression instances.
2001
2002 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2003
2004         A fix for bug #447027
2005         * delegate.cs: Fixed delegate VerifyMethod logic.
2006
2007 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2008
2009         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2010         but not verifiable.
2011
2012 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2013
2014         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2015         member type resolve to follow normal flow, instead of random
2016         property access.
2017
2018 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2019
2020         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2021         type.
2022
2023 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2024
2025         * const.cs: Emit decimal array constant as literal.
2026
2027 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2028
2029         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2030
2031 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2032
2033         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2034         into real property (saves 8 MB for corlib compilation).
2035
2036 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2037
2038         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2039         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2040         generic-mcs.cs: Small cleanup of TypeArguments.
2041
2042 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2043
2044         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2045         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2046         of ConstructedType expression, renamed to GenericTypeExpr.
2047
2048 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2049
2050         A fix for bug #445303
2051         * location.cs (IsConditionalDefined): Handle undefined global
2052         defines.
2053
2054 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2055
2056         A fix for bug #444678
2057         * expression.cs (TryReduceConstant): Always create new constant
2058         instance.
2059
2060 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2061
2062         A fix for bug #444673
2063         * ecore.cs: Ignore open generic types when used as generic type
2064         instance fields.
2065
2066 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2067
2068         A fix for bug #445458
2069         * expression.cs, cs-parser.jay: Don't crash when an expression
2070         statement is null.
2071
2072 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2073
2074         A fix for bug #445464
2075         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2076         inside unbound type.
2077
2078 2008-11-14  Jb Evain  <jbevain@novell.com>
2079
2080         * driver.cs: ignore empty -nowarn argument such as
2081         the one in -nowarn:12,13,,.
2082
2083 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2084
2085         A fix for bug #444271
2086         * anonymous.cs: Rescan parent storeys when best candidate was
2087         undone.
2088
2089 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2090
2091         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2092         useless UnboundTypeExpression.
2093         
2094         * attribute.cs: Do check obsolete attribute on generic types.
2095
2096 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2097
2098         A fix for bugs #425680, #400139
2099         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2100         refactoring.
2101
2102 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2103
2104         A fix for bug #435747
2105         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2106         compound value types assignment. Few micro optimizations added.
2107
2108 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2109
2110         A fix for bug #442610
2111         * anonymous.cs (MutateConstructor): More SRE hacking.
2112
2113 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2114
2115         A fix for bug #442579
2116         * ecore.cs: Also initialize expanded form of a method with 1 params
2117         parameter.
2118
2119 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2120
2121         * expression.cs (UnaryMutator): Do early l-side check.
2122
2123 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2124
2125         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2126         Init, otherwise we would crash later on when checking for friend
2127         assemblies. 
2128
2129         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2130         Otherwise we never get any meaningful information as to what
2131         failed. 
2132
2133 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2134
2135         A fix for bug #436318
2136         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2137
2138 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2139
2140         * namespace.cs: Turns out that it was a really bad idea to hide
2141         the errors for namespaces not found here in eval mode.    
2142
2143         * eval.cs: When we process using clauses, only enter those into
2144         the list of valid using clauses after they have been validated.   
2145
2146         The above change gives the proper semantics: it does not
2147         senselessly report the same errors with broken using statements by
2148         never storing them in the first place when they are invalid.
2149
2150 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2151
2152         A fix for bug #421839
2153         * cs-parser.jay: Remove expression from coalesce rule to force lower
2154         priority than the assignment operator.
2155
2156 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2157
2158         A fix for bug #437875
2159         * nullable.cs: Compile correctly method group operand used with null
2160         coalescing operator.
2161
2162 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2163
2164         A fix for bug #434589
2165         * expression.cs (Binary): Ignore lifted conversions when at least
2166         one operand is of reference type.
2167
2168 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2169
2170         * cs-parser.jay: Better syntax error report.
2171
2172 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2173
2174         A fix for bug #436792
2175         * cs-parser.jay: Use GetLocation to access location.
2176
2177 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2178
2179         A fix for bug #440774
2180         * cs-parser.jay: Also set current_array_type when parsing local
2181         variables types.
2182
2183 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2184
2185         A fix for bug #440785
2186         * expression.cs (As): Don't resolve self modifing expression
2187         multiple times.
2188
2189 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2190
2191         A fix for bug #439447
2192         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
2193
2194 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2195
2196         A fix for bug #437571
2197         * cs-parser.jay: Fixes internal error for invalid expression
2198         statements.
2199
2200 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2201
2202         * ecore.cs: Resolve correctly ambiguous params delegate methods.
2203
2204 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2205
2206         * generic.cs, anonymous.cs: Simplified GetDeclarations.
2207
2208 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2209
2210         * cs-tokenizer.cs: More precise cast parsing.
2211
2212 2008-10-16  Martin Baulig  <martin@ximian.com>
2213
2214         * anonymous.cs (AnonymousMethodStorey): Put back the
2215         `hoisted_locals' hashtable and use it in EmitType().
2216
2217 2008-10-15  Marek Safar  <marek.safar@gmail.com>
2218
2219         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
2220         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
2221         ~5MB for corlib.
2222
2223 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2224
2225         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
2226
2227 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2228
2229         * statement.cs: Mutate scope initializers.
2230
2231 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2232
2233         * expression.cs: Use typeless value for This constant.
2234         
2235         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
2236
2237 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2238
2239         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
2240         tokenizer.
2241
2242 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2243
2244         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
2245         type to type cast.
2246
2247 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2248
2249         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
2250         parser and tokenizer. Fixes many ambiguities including #433258.
2251
2252 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2253
2254         * cs-parser.jay: Fixed missing accessor recovery.
2255
2256 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2257
2258         A fix for bug #433701
2259         * expression.cs: Better error message.
2260
2261 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2262
2263         * cs-parser.jay, expression.cs: Start reporting real parser errors.
2264         
2265         * Makefile: Disabled unused debug symbols.
2266
2267         Also fixes: #320556, #321097, #321656, #321876, #351316
2268
2269 2008-10-09  Miguel de Icaza  <miguel@novell.com>
2270
2271         * eval.cs: rename "<interactive>" to "{interactive}", to work
2272         around a requirement in the compiler that this be a valid
2273         filename, and in Windows it is not (433886).
2274
2275 2008-10-09  Marek Safar  <marek.safar@gmail.com>
2276
2277         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
2278
2279 2008-10-08  Marek Safar  <marek.safar@gmail.com>
2280
2281         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
2282         cs-parser.jay: Generic type declaration and type arguments cleanup.
2283
2284 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2285
2286         * cs-parser.jay: Allow parsing weird array creation construct.
2287
2288 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2289
2290         * cs-parser.jay: Conflicts reduction.
2291
2292 2008-10-04  Marek Safar  <marek.safar@gmail.com>
2293
2294         * cs-parser.jay: Conflicts reduction.
2295
2296 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
2297
2298         Fix #398325
2299         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
2300         property.  Add a 'count' hint about the use of the shared vector.
2301         Ensure that we don't leak out dirty bits.
2302         (UsageVector.MergeChild): Throw away information about variables
2303         in child vectors.
2304         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
2305
2306 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2307
2308         A fix for bug #431746
2309         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
2310         parameters when iterator is created.
2311
2312 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2313
2314         A fix for bug #431827
2315         * expression.cs: Fixed right based pointer arithmetic operations
2316         emit.
2317
2318 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2319
2320         A fix for bug #353779
2321         * assign.cs, expression.cs: Fixed compound assignment conversions.
2322
2323 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2324
2325         A fix for bug #375262
2326         * statement.cs: Refactor ArrayForeach to be usable with string
2327         indexer. Optimized single dimentional arrays foreach.
2328
2329 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2330
2331         A fix for bug #431255
2332         * anonymous.cs, expression.cs: Removed broken optimization.
2333
2334 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2335
2336         * anonymous.cs: Use full type parameters of parent generic
2337         containers. Removed unnecessary AddParentStoreyReference call.
2338
2339 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2340
2341         A fix for bug #324702
2342         * class.cs: Use better shorter names for explicit interface member
2343         implementations.
2344
2345         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
2346
2347 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2348         
2349         * expression.cs: Use new interface to check fixed expression.
2350
2351 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2352
2353         A fix for bug #421101
2354         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
2355         interface to check for fixed fixed-buffers.
2356
2357 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2358
2359         A fix for bug #429264
2360         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
2361         
2362         * delegate.cs: Removed unnecessary casts.
2363
2364 2008-09-30  Marek Safar  <marek.safar@gmail.com>
2365
2366         A fix for bug #352151
2367         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
2368         class.cs: Fixed already defined explicit interface members check.
2369
2370 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
2371
2372         cs-tokenizer.cs: Fix typo.
2373
2374 2008-09-28  Miguel de Icaza  <miguel@novell.com>
2375
2376         * eval.cs (InteractiveBase): The quit command now just sets a
2377         flag, instead of calling Environment.Exit(), it is milder on
2378         embedded hosts. 
2379
2380         CompiledMethod is now in Mono.CSharp, not nested inside
2381         the Evaluator, it was inconvenient to use.
2382
2383 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2384
2385         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
2386         code to be invoked without having to reparse.
2387
2388 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2389
2390         * ecore.cs: The recent changes to FieldExpr broke this as well.
2391         Fixes LINQ queries in the interactive shell.
2392
2393         * Multiple files: indentation fixing for the Mono coding
2394         guidelines for the switch statement.
2395
2396         * eval.cs: Make the Evaluator API thread safe.
2397
2398 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2399
2400         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
2401         constructor parsing.
2402
2403 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2404
2405         A fix for bug #325326
2406         * statement.cs: Check possible mistaken empty statement using
2407         explicit blocks only.
2408
2409 2008-09-25  Miguel de Icaza  <miguel@novell.com>
2410
2411         * eval.cs (LoadAssembly, ReferenceAssembly): Call
2412         RootNamespace.ComputeNamespaces to update the internal list of
2413         namespaces, this is no longer done for us.
2414
2415         (InteractiveBase): Use the Evaluator APIs instead of calling into
2416         Driver directly
2417
2418 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2419
2420         A fix for bug #429264
2421         * expression.cs: Missing mutator for access to multidimensional
2422         arrays.
2423
2424 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2425
2426         * class.cs, statement: Emit DebuggerHidden attribute for iterator
2427         entry wrapper.
2428         
2429         * driver.cs: Missing input argument check.
2430
2431 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2432
2433         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
2434         expression.cs, statement.cs, rootcontext.cs, class.cs, 
2435         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
2436         DefineMembers.
2437
2438 2008-09-24  Miguel de Icaza  <miguel@novell.com>
2439
2440         * ecore.cs (FieldExpr): Only initialize eclass when we return a
2441         fully constructed FieldExpr, fixes the regression introduced in
2442         the last commit.
2443         
2444         * ecore.cs, expression.cs: Plug back the eclass initialization as
2445         otherwise it regresses `csharp'. 
2446
2447 2008-09-24  Marek Safar  <marek.safar@gmail.com>
2448
2449         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
2450         ecore.cs, attribute.cs: Moved obsolete method checks from emit
2451         phase to resolve phase. It resolves problems with expression trees
2452         and fixes bugs #323796, #325156.
2453
2454 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2455
2456         * codegen.cs: Report better error when symbol writer is missing.
2457
2458 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2459
2460         * codegen.cs: Set .NET symbol writer.
2461         
2462         * decl.cs: Guard against null generic arguments.
2463         
2464         * report.cs: Don't report exactly same additional details.
2465
2466 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2467
2468         A fix for bug #324917
2469         * cs-parser.jay: Add missing multidimensional non-expression type
2470         ranks.
2471         
2472 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2473
2474         A fix for bug #428191
2475         * anonymous.cs: Create an outer generic fields also for non-storey
2476         anonymous methods.
2477
2478 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2479
2480         A fix for bug #378294
2481         * class.cs: Make fixed size buffers gmcs feature only.
2482
2483 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2484
2485         A fix for bug #355622, #324993
2486         * assign.cs, const.cs, class.cs: Create new EmitContext for each
2487         field initializer.
2488
2489 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2490
2491         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
2492         error reporting.
2493
2494 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2495
2496         A fix for bug #416110
2497         * generic.cs: Struct constraint results in default ctor and
2498         ValueType base type constraint to be set.
2499
2500 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2501
2502         A fix for bug #423791
2503         * generic.cs: Fixed params output type type-inference.
2504
2505 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2506
2507         * cs-parser.jay, expression.cs: Fixed few expression crashes.
2508         
2509 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2510
2511         * cs-tokenizer.cs: Don't break on extra partial modifier.
2512
2513 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2514
2515         A fix for bug #427592
2516         * generic.cs: Use common parameter resolve method.
2517
2518 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2519
2520         A fix for bug #414758
2521         * expression.cs, ecore.cs: Fixed crash when accessing non-static
2522         property.
2523
2524 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2525
2526         * driver.cs, namespace.cs: Read types and namespaces after all
2527         requested assemblies are loaded, fixes issues with System.Core
2528         auto-reference, and #419888.
2529
2530 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2531
2532         A fix for bug #417705
2533         * cs-parser.jay: Fixed as/is operator expression split.
2534
2535 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2536
2537         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
2538         Fixed expression tree representation of empty new expression and
2539         new initializer expression.
2540
2541 2008-09-18  Miguel de Icaza  <miguel@novell.com>
2542
2543         * eval.cs: Remove warning, keep reference to driver around.
2544
2545         * Hide fields that do not need to be public.
2546
2547 2008-09-17  Marek Safar  <marek.safar@gmail.com>
2548
2549         A fix for bug #426385
2550         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
2551         conversion for array elements.
2552
2553 2008-09-17  Marek Safar  <marek.safar@gmail.com>
2554
2555         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
2556         void parsing conflicts.
2557
2558 2008-09-15  Marek Safar  <marek.safar@gmail.com>
2559
2560         A fix for bug #425601
2561         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
2562         System.Core only when there is no custom ExtensionAttribute
2563         implementation.
2564
2565 2008-09-15  Miguel de Icaza  <miguel@novell.com>
2566
2567         * namespace.cs: Do not report CS0246 (name
2568
2569 2008-09-12  Marek Safar  <marek.safar@gmail.com>
2570
2571         A fix for bug #425669
2572         * generic.cs: Don't cache generic static anonymous method 
2573         containers.
2574
2575 2008-09-12  Marek Safar  <marek.safar@gmail.com>
2576
2577         * generic.cs, class.cs, delegate.cs: Check recursive inherited
2578         conflicting constraints.
2579
2580 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
2581
2582         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
2583         mcs too.
2584
2585 2008-09-12  Marek Safar  <marek.safar@gmail.com>
2586
2587         * literal.cs, convert.cs, expression.cs, statement.cs: More null
2588         to null pointer conversion fixes.
2589
2590 2008-09-11  Marek Safar  <marek.safar@gmail.com>
2591
2592         * cs-parser.jay, expression.cs: An implicitly typed local variable
2593         declarator cannot use an array initializer.
2594
2595 2008-09-11  Marek Safar  <marek.safar@gmail.com>
2596
2597         * cs-parser.jay: Reduced number of printed tokens, add sorting.
2598
2599 2008-09-11  Marek Safar  <marek.safar@gmail.com>
2600
2601         * generic.cs (InflatedConstraints): Don't crash when constraints
2602         are different.
2603         
2604         * cs-parser.jay: const_declarator is a block.
2605
2606         * constant.cs: Check for not allowed NaN conversions.
2607
2608 2008-09-10  Miguel de Icaza  <miguel@novell.com>
2609
2610         * driver.cs: Drop --shell argument, the compiler is no longer a
2611         REPL. 
2612
2613         * eval.cs: Move most of the code that deals with evaluation into
2614         this file and document the public API from repl.cs
2615
2616         * repl.cs: Remove from here.
2617         
2618 2008-09-10  Marek Safar  <marek.safar@gmail.com>
2619
2620         A fix for bug #424684
2621         * generic.cs: Generic class constraints must come first.
2622
2623 2008-09-09  Miguel de Icaza  <miguel@novell.com>
2624
2625         * cs-parser.jay: Improve error reporting for syntax errors in
2626         statements and expressions, we now report the expected tokens
2627         instead of reporting the useless "; expected".
2628
2629         Drop the strings from the token declaration, it turns out that
2630         they did not do what I thought they did.  Instead they were adding
2631         two sets of tokens to the tables.
2632
2633 2008-09-09  Marek Safar  <marek.safar@gmail.com>
2634
2635         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
2636         delegate.cs: Share special type check.
2637
2638 2008-09-09  Marek Safar  <marek.safar@gmail.com>
2639
2640         A fix for bug #423981
2641         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
2642
2643 2008-09-09  Marek Safar  <marek.safar@gmail.com>
2644
2645         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
2646         ConvertImplicitly.
2647
2648 2008-09-09  Marek Safar  <marek.safar@gmail.com>
2649
2650         A fix for bugs: #324750, #335946
2651         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
2652         lookup rule to determine ?-based tokens.
2653
2654 2008-09-08  Miguel de Icaza  <miguel@novell.com>
2655
2656         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
2657         expressions (like event adding or removing) end up here, so we
2658         need to treat those as statements.
2659
2660         Add LoadAssembly method.
2661
2662 2008-09-04  Miguel de Icaza  <miguel@novell.com>
2663
2664         * repl.cs: Add Time method.
2665
2666 2008-09-05  Marek Safar  <marek.safar@gmail.com>
2667
2668         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
2669
2670 2008-09-05  Miguel de Icaza  <miguel@novell.com>
2671
2672         * repl.cs: Add workaround for old compilers.
2673
2674 2008-09-04  Jb Evain  <jbevain@novell.com>
2675
2676         * repl.cs (PrettyPrint): pretty print everything that
2677         implements IDictionary, as well as IEnumerables. Also,
2678         add a quit helper property.
2679
2680 2008-09-04  Marek Safar  <marek.safar@gmail.com>
2681
2682         * constant.cs: Better error reporting for decimal literals.
2683         
2684         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
2685         field attributes.
2686         
2687 2008-09-04  Marek Safar  <marek.safar@gmail.com>
2688                         Miguel de Icaza  <miguel@novell.com>
2689
2690         A fix for bug #422951
2691         * assign.cs (Assign.DoResolve): Perform the type conversions
2692         checks before we attempt to initialize `New' initializers. 
2693
2694 2008-09-04  Marek Safar  <marek.safar@gmail.com>
2695
2696         A fix for bug #422853
2697         * delegate.cs (DelegateCreation): Add special handling for
2698         EmptyExpression.Null instance expression which is just another
2699         hack for undecided member instance exression.
2700
2701 2008-09-04  Marek Safar  <marek.safar@gmail.com>
2702
2703         * expression.cs, ecore.cs: Emit full expression tree for reduced
2704         binary expressions.
2705
2706 2008-09-04  Marek Safar  <marek.safar@gmail.com>
2707
2708         * expression.cs (This): Guard against multi-resolving.
2709         
2710         * ecore.cs, statement.cs (Throw): Simplified.
2711         
2712         * flowanalysis.cs: Also verify event fields.
2713
2714 2008-09-04  Miguel de Icaza  <miguel@novell.com>
2715
2716         * assign.cs (Assign.DoResolve): Perform the type conversions
2717         checks before we attempt to initialize `New' initializers. 
2718
2719         * repl.cs (PrettyPrint): Add Hashtable prettyprint
2720
2721         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
2722         public. 
2723
2724         * repl.cs: Update help.
2725
2726 2008-09-03  Miguel de Icaza  <miguel@novell.com>
2727
2728         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
2729         handling of the default config handling, including the special
2730         treatment of System.Core assembly. 
2731
2732         Fixes the REPL processing for LINQ.
2733
2734 2008-09-03  Marek Safar  <marek.safar@gmail.com>
2735
2736         A fix for bug #422507
2737         * expression.cs (UnboxCast): Add missing child expression mutator.
2738
2739 2008-09-03  Marek Safar  <marek.safar@gmail.com>
2740
2741         * driver.cs: Don't self reference System.Core assembly.
2742
2743 2008-09-03  Marek Safar  <marek.safar@gmail.com>
2744
2745         A fix for bug #422507
2746         * expression.cs (StringConcat): Add missing type mutator.
2747
2748 2008-09-03  Marek Safar  <marek.safar@gmail.com>
2749
2750         * generic.cs (TypeInferenceContext): Follow equality rule for
2751         constructed type lower bound type inference.
2752
2753 2008-09-02  Miguel de Icaza  <miguel@novell.com>
2754
2755         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
2756         <dblank@cs.brynmawr.edu> which updates the cursor position on
2757         refresh.
2758         
2759 2008-09-02  Marek Safar  <marek.safar@gmail.com>
2760
2761         A fix for bug #367145
2762         * driver.cs: Fixed import of extension methods when using -noconfig
2763         option.
2764
2765 2008-09-02  Marek Safar  <marek.safar@gmail.com>
2766
2767         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
2768         version from non-generic implementation instead.
2769
2770 2008-09-01  Marek Safar  <marek.safar@gmail.com>
2771
2772         A fix for bug #418908
2773         * class.cs: Use AddScopeStatement for field initializers.
2774
2775 2008-09-01  Marek Safar  <marek.safar@gmail.com>
2776
2777         A fix for bug #415385
2778         * ecore.cs, convert.cs: Do method group conversion for equal group types.
2779
2780 2008-09-01  Marek Safar  <marek.safar@gmail.com>
2781
2782         A fix for bug #421736
2783         * iterators.cs: Don't crash on unreachable iterators.
2784
2785 2008-09-01  Marek Safar  <marek.safar@gmail.com>
2786
2787         A fix for bug #421628
2788         * parameter.cs, attribute.cs: Clone also parameter attributes.
2789
2790 2008-08-30  Miguel de Icaza  <miguel@novell.com>
2791
2792         * namespace.cs (LookupType): In EvalMode, try to replace
2793         the TypeBuilder from our cache with a Type as Reflection.Emit does
2794         not  like to mix code from older assemblies emitted and new
2795         assemblies emitted. 
2796
2797         This sounds like a serious Mono bug that prevents multiple
2798         assemblies to be generated and consumed at the same time.
2799
2800         * cs-parser.jay (push_current_class): Do not make interactive
2801         classes internal or private, make them public as we currently
2802         generate each new class in a new assembly.   
2803
2804 2008-08-29  Miguel de Icaza  <miguel@novell.com>
2805
2806         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
2807         remove types that are entered into the global namespace during
2808         parsing so that we can remove them on failure.
2809  
2810         * cs-parser.jay: Parsing: we now keep track of types that are
2811         entered into global variables and queue those in case the parsing
2812         or resolution fail.
2813  
2814         This happens in a few situations: during partial-input, we invoke
2815         the parser repeatedly for example with the string "class X", this
2816         would cause X to be registed, and we need to remove this
2817         registration so that another parse attempt later with say "class X {"
2818         would actually work.
2819  
2820         Additionally, if there is an error in the resolution phase, for
2821         example: "class X : NonExistant {}" th
2822         
2823         * cs-parser.jay: Be more precise with the errors being raised,
2824         instead of flagging all exceptions during parsing to be attributed
2825         to the parsing process, distinguish those from errors happening in
2826         the actions and hint that using -v would produce the actual
2827         exception. 
2828
2829         * repl.cs: Do not load all compiler references on each reset,
2830         doing the partial reset takes care of this.
2831         
2832 2008-08-28  Miguel de Icaza  <miguel@novell.com>
2833
2834         * repl.cs: Add support for loading all the files from
2835         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
2836         as shell libraries.
2837
2838         Introduce a micro-parser that is able to deambiguate on its input
2839         whether we are dealing with a compilation unit (namespace, class,
2840         interface, struct, delegate) declaration or a statement.   This
2841         allows both declarations and statements to be entered. 
2842
2843         Set history size by default to 300 lines.
2844
2845         Instead of distinguishing based on the parser.InteractiveResult,
2846         have only two cases: statements were parsed, or a compilation unit
2847         was.   Always pull the Using statement additions from the
2848         compilation unit parse.
2849         
2850         * cs-tokenizer.cs: Rename tokens to better describe their intent
2851         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
2852         
2853         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
2854         EvalMode is used to trigger the lookup of global variables while
2855         StatementMode is used turn variable declarations into static
2856         fields.
2857
2858         * getline.cs: Allow history size to be set.
2859         
2860 2008-08-29  Marek Safar  <marek.safar@gmail.com>
2861
2862         A fix for bug #360755
2863         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
2864
2865 2008-08-29  Marek Safar  <marek.safar@gmail.com>
2866
2867         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
2868         
2869         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
2870         member name, it is too confusing
2871         
2872         * decl.cs, class.cs: Don't report unused fields with attached attribute.
2873         
2874         * rootcontext.cs: Finally default to warning level 4.
2875
2876 2008-08-28  Marek Safar  <marek.safar@gmail.com>
2877
2878         * class.cs (CheckBase): Ignore overloaded operators.
2879
2880 2008-08-28  Marek Safar  <marek.safar@gmail.com>
2881
2882         A fix for bug #420830
2883         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
2884
2885 2008-08-28  Marek Safar  <marek.safar@gmail.com>
2886
2887         A fix for bug #420832
2888         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
2889
2890 2008-08-28  Marek Safar  <marek.safar@gmail.com>
2891
2892         A fix for bug #420386
2893         * nullables.cs: Fixed logic of nullable user comparison operators involving
2894         null values.
2895
2896 2008-08-28  Marek Safar  <marek.safar@gmail.com>
2897         
2898         * attribute (IsClsCompliant): Use FALSE value for pointer types.
2899
2900 2008-08-27  Miguel de Icaza  <miguel@novell.com>
2901
2902         * repl.cs: Add support for aborting the running code with C-c. 
2903
2904 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
2905
2906         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
2907
2908 2008-08-27  Miguel de Icaza  <miguel@novell.com>
2909
2910         * cs-parser.jay (interactive_statement_list): A new set of rules
2911         for hosting statements that uses the "interactive_" prefix.   
2912
2913         * repl.cs: Add support for parsing `using' as a statement or as a
2914         directive.  Deambiguating before passing this to the parser.
2915
2916         We need to distinguish statement_expressions that occur at the
2917         toplevel vs those that occur embedded into expressions.
2918
2919         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
2920         that fixes the cursor key handling, and a history bug.
2921         
2922 2008-08-26  Miguel de Icaza  <miguel@novell.com>
2923
2924         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
2925         limitations in Console, instead the 2.0 bootstrap libraries now
2926         include the Console bits.
2927
2928         Also, remove the use of Nullables from getline.cs
2929
2930         ------------
2931         
2932         Interactive support for the C# compiler.   Use gmcs --shell to
2933         enter a read-eval-print loop shell.
2934
2935         Docs: http://www.mono-project.com/CsharpRepl
2936         
2937         * sources: include repl.cs here and getline.cs for gmcs.exe,
2938         everything else is getline.cs impaired.
2939
2940         * Makefile: when bootstrapping pass a special flag
2941         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
2942         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
2943         This distinguishes those two cases.
2944
2945         * repl.cs: Support for a read-eval-print loop.   Will be soon
2946         refactored into eval support and then REPL on top of it.
2947
2948         * ecore.cs: If a simplename lookup fails, before erroring out,
2949         if we are in EvalMode to resolve the name to a declaration in the
2950         Eval-land.    
2951
2952         This means that variable declarations that happened in previous
2953         classes (as repl puts every statement in a separate class) are
2954         made visible in this way.
2955
2956         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
2957         triggered an error due to the end of file being reached.   This is
2958         used to do multi-line input, and notify the caller that the user
2959         needs to provide more text before a successful parse.
2960
2961         Add new grammar rules after the INTERACTIVE_PARSER token is seen
2962         to drive the evaluation with a custom wrapper. 
2963
2964         * driver.cs: Add support for --shell, and refactor some code to be
2965         reused from repl.cs
2966         
2967         * namespace.cs: Add support for serializing the contents of the
2968         namespaces and reloading them.  
2969
2970         * getline.cs: A managed implementation of ReadLine under
2971         X11/Apache2 license terms.  Easy to embed in other applications as
2972         well.
2973
2974         * namespace.cs: Add some functions to save and restore the
2975         namespace state.
2976
2977         * rootcontext.cs: New public field.
2978
2979         * cs-tokenizer.cs: Add support for one of the possible characters
2980         we introduce into the token stream.  
2981
2982         This patch does not affect the regular tokenization process, the
2983         only performance hit would happen if there is an invalid character
2984         on the input string.
2985
2986         * support.cs: Move isatty helper routine here.
2987
2988         * codegen.cs: Small cleanup, and add a mechanism to initialize the
2989         code generator for in-memory assemblies.
2990
2991 2008-08-26  Marek Safar  <marek.safar@gmail.com>
2992
2993         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
2994         parameter cannot be always used as a type.
2995
2996 2008-08-21  Marek Safar  <marek.safar@gmail.com>
2997
2998         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
2999
3000 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3001
3002         * convert.cs: Implement explicit array to IList<T> conversion.
3003
3004 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3005
3006         A fix for bug #362740
3007         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3008
3009 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3010         
3011         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3012         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3013         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3014         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3015         handling to use just one type of infrastructure and deal with generics
3016         more effectivelly.
3017
3018 2008-07-23  Martin Baulig  <martin@ximian.com>
3019
3020         *** Merged this from trunk revision 108527 ***
3021
3022         * statement.cs
3023         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3024         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3025         scope variable.
3026
3027 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3028         
3029         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3030         error checks.
3031
3032 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3033         
3034         * delegate.cs: Fixed compiler crash when creating delegate using partial
3035         method.
3036         
3037         * typemanager.cs: MulticastDelegate is not a delegate.
3038
3039 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3040         
3041         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3042         checks.
3043
3044 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3045
3046         * cs-parser.jay (type): Allow 'var' in mcs too.
3047         (local_variable_type): Likewise.
3048
3049 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3050         
3051         * driver.cs: Removed broken -noconfig variants.
3052
3053 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3054         
3055         A fix for bug #417078
3056         * expression.cs: Emit correctly left side pointer operators.
3057
3058 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3059
3060         * generic.cs, lambda.cs: Inflate method generic arguments only.
3061
3062 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3063
3064         * class.cs: Fixed struct layout check regression.
3065
3066 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3067
3068         * cs-parser.jay, enum.cs: Simplified enum parsing.
3069         
3070         * decl.cs: Check all type parameters conflicts.
3071         
3072         * expression.cs, statement.cs, attribute.cs: More expression checks.
3073
3074 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3075
3076         * generic.cs: Add type inference types restriction.
3077         
3078         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3079         anonymous.cs, expression.cs: Allocate less accessor parameters.
3080
3081 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3082
3083         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3084         classes.
3085
3086 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3087
3088         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3089
3090 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3091
3092         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3093         Also fixes #362146 and #381592.
3094
3095 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3096
3097         * ecore.cs: Reduced constant cannot be used as an attribute value.
3098         
3099         * cs-parser.jay: Base expression has to be a type.
3100         
3101         * expression.cs (Conditional): Uses ReducedExpression.
3102
3103 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3104
3105         A fix for bug #376826
3106         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3107         address of hoisted local variable or parameter cannot be taken.
3108
3109 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3110
3111         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3112         anonymous method inside checked/unchecked expression.
3113
3114 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3115
3116         * typemanager.cs (IsEqual): Guard against null.
3117         
3118         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3119         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3120         routine. Fixed few misleading conversion errors.
3121
3122 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3123
3124         * class.cs: Consider generics when checking cycles in struct layout.
3125
3126 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3127
3128         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3129
3130 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3131
3132         A fix for bug #414165
3133         * anonymous.cs: Use same anonymous implementation method for all anonymous
3134         method emits.
3135
3136 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3137
3138         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3139         constraints.
3140
3141 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3142
3143         * cs-parser.jay: Typeof argument has to be a type expression.
3144         
3145         * namespace.cs: Check alias and namespace definitions collisions.
3146         
3147         * class.cs, pending.cs: Moved explicit interface accessor implementation
3148         check.
3149         
3150         * delegate.cs, expression.cs: Verify special name invocations.
3151         
3152 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3153
3154         * cs-parser.jay: Don't choke on empty generic type arguments.
3155         
3156         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3157         
3158         * expression.cs, ecore.cs: Minor expressions bugs.
3159
3160 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3161
3162         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
3163         and added more error handling.
3164         
3165         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
3166         
3167         *  modifiers.cs, enum.cs: Fixed.
3168
3169 2008-07-31  Jb Evain  <jbevain@novell.com>
3170
3171         * driver.cs: remove -pkg ability of smcs.
3172
3173 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3174
3175         * statement.cs (Switch): Correctly set empty default target for single
3176         blocks.
3177
3178 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3179
3180         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
3181         string switch statement implementation to use string dictionary which
3182         significantly (2-8x) improves performance of generated code.
3183
3184 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3185
3186         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
3187         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
3188         
3189 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3190
3191         A fix for bug #412595
3192         * typemanager.cs, convert.cs, expression.cs: Some types are never
3193         convertible to each other.
3194
3195 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3196
3197         * nullable.cs (CreateNullConstant): An error messages update.
3198
3199 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3200
3201         A fix for bug #412595
3202         * cfold.cs: Don't cast undefined bool constant.
3203
3204 2008-07-29  Martin Baulig  <martin@ximian.com>
3205
3206         * symbolwriter.cs
3207         (SymbolWriter.Reset): New public static method.
3208
3209         * driver.cs
3210         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
3211
3212 2008-07-28  Marek Safar  <marek.safar@gmail.com>
3213
3214         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
3215         
3216         * expression.cs (ElementAccess): Exact size allocation.
3217
3218 2008-07-26  Marek Safar  <marek.safar@gmail.com>
3219
3220         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
3221
3222 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3223
3224         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
3225         
3226         * class.cs: Removed $PRIVATE$ field hack which caused problems during
3227         flow analysis.
3228
3229 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3230
3231         A fix for bug #412217
3232         * assign.cs: Mutate also assignment type.
3233
3234 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3235
3236         A fix for bug #323644
3237         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
3238         indexers.
3239
3240 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3241
3242         A fix for bug #412134
3243         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
3244         non-enumerable operands when overloading equality or bitwise operators.
3245
3246 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3247
3248         * anonymous.cs: Cache closed generic anonymous method delegates.
3249
3250 2008-07-24  Marek Safar  <marek.safar@gmail.com>
3251
3252         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
3253         anonymous.cs, statement.cs: Always emit anonymous method as static method
3254         when is instance free. Use nesting for nested anynomous methods blocks.
3255         
3256 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3257
3258         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
3259         types.
3260
3261 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3262
3263         * expression.cs: Removed MakeSimpleCall.
3264
3265 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3266
3267         A fix for bug #323012
3268         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
3269         Base method implementing interface has to be public.
3270
3271 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3272
3273         * cs-parser.jay: Don't break on missing argument.
3274
3275 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3276
3277         A fix for bug #320993
3278         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
3279           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
3280
3281 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3282
3283         A fix for bug #320748
3284         * convert.cs: Implicit user operators cannot convert to interfaces
3285
3286 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3287
3288         A fix for bug #312686
3289         * driver.cs: Ignore empty assembly references.
3290
3291 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3292
3293         A fix for bug #387040
3294         * ecore.cs: Skip constrains check for an explicit implementation.
3295
3296 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3297
3298         A fix for bug #409045
3299         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
3300           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
3301           identifiers are file specific unless passed as input arguments.
3302
3303 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3304
3305          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
3306          to emit UnmanagedMarshal data under 2.0 profile.
3307
3308 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3309
3310         A fix for bug #410369
3311         * parameter.cs: Clone correctly ParamsParameter.
3312
3313 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3314
3315         * expression.cs (Argument): Always report type for type based expressions
3316         errors.
3317
3318 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3319
3320         A fix for bug #410666
3321         * anonymous.cs: Correctly initialize generic storey reference.
3322
3323 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3324
3325         * convert.cs: Don't box same type arguments.
3326
3327 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3328
3329         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
3330         Finished missing generic type mutators.
3331
3332 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3333
3334         * iterators.cs, statement.cs: Finished statements CloneTo.
3335
3336 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3337
3338         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
3339         
3340         * expression.cs: Emit optimized default value expressions in expression tree
3341         array initializer.
3342
3343 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3344
3345         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
3346
3347 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3348
3349         A fix for bug #367536
3350         * cs-parser.jay: Check static constructor of generic types for an access
3351         modifier.
3352
3353 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3354
3355         A fix for bug #353800
3356         * lambda.cs: Emit ret for contextual statements.
3357         
3358         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
3359         up emitting redundant ret for all anonymous methods with return.
3360
3361 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3362
3363         A fix for bug #365188
3364         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
3365         create anonymous method storey in unreachable block.
3366
3367 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3368
3369         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
3370         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
3371         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
3372         statement.cs: Fixed relevant defects found by Gendarme.
3373
3374 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3375
3376         A fix for bug #325291
3377         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
3378         statement.cs: Replaced IAnonymousHost with top level block flag.
3379
3380 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3381
3382         * cs-parser.jay: Clean up unused open_parens.
3383
3384 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3385
3386         * ecore.cs: Custom error message for a range variable assignment.
3387
3388 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3389
3390         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
3391         load.
3392
3393 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3394
3395         * literal.cs: Null literal is of object type.
3396
3397 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3398
3399         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
3400         expression of nullable equality comparison.
3401
3402 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3403
3404         * expression.cs(PointerArithmetic): Removed redundant assignment.
3405
3406 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3407
3408         * decl.cs (GetSignatureForError): Report full namespace name for containers.
3409
3410 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3411
3412         A fix for bug #408361
3413         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
3414         they are replaced by GetMethod.
3415
3416 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3417
3418         A fix for bug #408721 by jeremie.laval@gmail.com
3419         * expression.cs (Indirection): Implemented CloneTo.
3420
3421 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3422
3423         * statement.cs (AssignableSlots): Temporary disabled variable initialization
3424         assert check.
3425
3426 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3427
3428         * report.cs (EnableReporting): Don't reinitialize 0-based values.
3429
3430 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3431
3432         * linq.cs: Reset tranparent parameter counter in probing mode.
3433
3434 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3435
3436         * anonymous.cs: Mutate anonymous method type.
3437
3438 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3439
3440         * ecore.cs, anonymous.cs: Mutate field expressions.
3441
3442 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3443
3444         A fix for bug #369670
3445         * linq.cs, statement.cs: Use explicit block for query expressions variables.
3446
3447 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3448
3449         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
3450
3451 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
3452
3453         Fix bug #314902
3454         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
3455         only one '>', and finds a '>>', abort the generic lookahead.
3456
3457 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3458
3459         A fix for bug #319902
3460         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
3461
3462 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3463
3464         A fix for bug #406371
3465         * statement.cs: Moved EmitSymbolInfo to Block.
3466
3467 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3468
3469         * ecore.cs: Report better error for extension method overload failures.
3470
3471 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3472
3473         * expression.cs (Is): No need to box reference values.
3474
3475 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3476
3477         * class.cs: Use event resolve context when initializing CreateEmitContext.
3478
3479 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3480
3481         A fix for bug #394436
3482         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
3483         method used inside expression trees. Added more LINQ to expression tree
3484         conversions.
3485
3486 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3487
3488         A fix for bug #378189, #370577
3489         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
3490         from expression.
3491
3492 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3493
3494         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
3495         hierarchically.
3496
3497 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3498
3499         A fix for bug #406702
3500         * anonymous.cs: Always park anonymous method in the nearest parent storey.
3501
3502 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3503
3504         A fix for bug #406648
3505         * cs-parser.jay: Report nullable use in mcs for some cases.
3506
3507 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3508
3509         * ecore.cs: Improved argument mismatch error messages.
3510
3511 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3512
3513         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
3514
3515 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3516
3517         * expression.cs (TypeOf): Mutate type argument.
3518
3519 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3520
3521         * class.cs: Report missing partial modifier for correct type.
3522
3523 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3524
3525         * ecore.cs, expression.cs (VariableReference): Variable property is 
3526         protected.
3527
3528 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3529
3530         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
3531         
3532 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3533
3534         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
3535         method delegates.
3536
3537 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3538
3539         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
3540         anonymous method storey to an instance method when only "this" is hoisted.
3541
3542 2008-07-03  Marek Safar  <marek.safar@gmail.com>
3543
3544         A fix for bug #321615
3545         * expression.cs: Pointer comparisons use unsigned operator.
3546
3547 2008-07-03  Marek Safar  <marek.safar@gmail.com>
3548
3549         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
3550
3551 2008-07-02  Marek Safar  <marek.safar@gmail.com>
3552
3553         A fix for bug #404905
3554         * class.cs: Always initialize local unsafe variables.
3555
3556 2008-06-30  Marek Safar  <marek.safar@gmail.com>
3557
3558         A fix for bug #396987
3559         * expression.cs (NewInitialize): Clear local temporary variable for next run
3560
3561 2008-06-27  Marek Safar  <marek.safar@gmail.com>
3562
3563         A fix for bug #401020
3564         * ecore.cs: Both types and modifiers have to match for ref and out arguments
3565
3566 2008-06-27  Marek Safar  <marek.safar@gmail.com>
3567
3568         A fix for bug #398319
3569         * cs-parser.jay: Implemented undocumented base access expression inside
3570         anonymous types.
3571
3572 2008-06-26  Marek Safar  <marek.safar@gmail.com>
3573
3574         A fix for bug #404227
3575         * cs-parser.jay: Parse namespace declaration using qualified identifier.
3576
3577 2008-06-26  Marek Safar  <marek.safar@gmail.com>
3578
3579         A fix for bug #404227
3580         * convert.cs: Fixed explicit array to interface cast.
3581
3582 2008-06-26  Marek Safar  <marek.safar@gmail.com>
3583
3584         A fix for bug #403894
3585         * delegate.cs: Mutate DelegateInvocation type.
3586
3587 2008-06-26  Marek Safar  <marek.safar@gmail.com>
3588
3589         A fix for bug #379348
3590         * delegate.cs: Box a load of generic parameters.
3591
3592 2008-06-26  Marek Safar  <marek.safar@gmail.com>
3593
3594         * expression.cs: Add an array creation arguments mutate.
3595
3596 2008-06-26  Marek Safar  <marek.safar@gmail.com>
3597
3598         A fix for bug #386068
3599         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
3600         parameter.
3601
3602 2008-06-25  Marek Safar  <marek.safar@gmail.com>
3603
3604         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
3605         CloneTo.
3606
3607 2008-06-25  Marek Safar  <marek.safar@gmail.com>
3608
3609         A fix for bug #403518
3610         * delegate.cs: Type correctly anonymous method new invocation.
3611
3612 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3613
3614         A fix for bug #394826
3615         * anonymous.cs: Fully qualify members when resolving anonymous type internal
3616         calls.
3617
3618 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3619
3620         A fix for bug #394826
3621         * anonymous.cs, iterators.cs: Construct generic storey only when is really
3622         needed.
3623
3624 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3625
3626         * class.cs: Clone indexer parameters for localized capturing.
3627
3628 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3629
3630         A fix for bug #402379
3631         * expression.cs: Don't crash when an object initializer resolve fails.
3632
3633 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3634
3635         A fix for bug #402888
3636         * expression.cs: Mutate conditional expression.
3637
3638 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3639
3640         A fix for bug #401012
3641         * class.cs: Keep StructLayout in shared container.
3642
3643 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3644
3645         A fix for bug #400438
3646         * decl.cs, class.cs: Only properties can be automatically implemented.
3647
3648 2008-06-24  Marek Safar  <marek.safar@gmail.com>
3649
3650         * statement.cs (ChangeToIterator): Copy also labels.
3651
3652 2008-06-23  Marek Safar  <marek.safar@gmail.com>
3653
3654         * ecore.cs: Pass type argument details to parent extension method.
3655
3656 2008-06-23  Marek Safar  <marek.safar@gmail.com>
3657
3658         A fix for bug #375966
3659         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
3660
3661 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
3662
3663         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
3664
3665 2008-06-22  Marek Safar  <marek.safar@gmail.com>
3666
3667         A fix for bug #394347
3668         * anonymous.cs: Cache compatible delegates as compatibility check produces
3669         a new method every time.
3670
3671 2008-06-20  Marek Safar  <marek.safar@gmail.com>
3672
3673         * anonymous.cs: Propagate storey reference for single references.
3674
3675 2008-06-20  Marek Safar  <marek.safar@gmail.com>
3676
3677         A fix for bug #387615
3678         * assign.cs, expression.cs: Correctly clone compound assignment.
3679
3680 2008-06-19  Marek Safar  <marek.safar@gmail.com>
3681
3682         A fix for bug #359611, #359604
3683         * anonymous.cs: Mutate all types of hoisted parameters.
3684
3685 2008-06-19  Marek Safar  <marek.safar@gmail.com>
3686
3687         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
3688         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
3689         expression.cs, codegen.cs, statement.cs
3690         
3691         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
3692         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
3693         
3694         ** Anonymous methods, lambda expressions rewrite **
3695         
3696         Anonymous expressions are now resolved when an explicit block is resolved 
3697         and they don't require any registration procedure anymore. Further,
3698         anonymous methods are defined when explicit block is emitted which allows
3699         better control of whole process and opens possibilities for more
3700         optimizations as well as alternative to reverse whole process.
3701         
3702         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
3703         process consistent and to correctly emit hoisted generic methods when they
3704         have at least 1 hoisted variable.
3705         
3706 2008-06-17  Martin Baulig  <martin@ximian.com>
3707
3708         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
3709         iterator method.
3710         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
3711         virtual property; check it in Emit().
3712         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
3713         an iterator.
3714         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
3715         an iterator.
3716         (Indexer.Define): Likewise.
3717
3718 2008-06-17  Marek Safar  <marek.safar@gmail.com>
3719
3720         * convert.cs: Don't use IsInterface on type arguments.
3721         
3722         * delegate.cs: DelegateInvocation uses MethodInfo.
3723         
3724         * parameter.cs: Removed IsTypeParameter.
3725         
3726         * generic-mcs.cs: More missing stuff.
3727
3728 2008-06-16  Martin Baulig  <martin@ximian.com>
3729
3730         * modifiers.cs
3731         (Modifiers.DEBUGGER_HIDDEN): New public const.
3732
3733         * typemanager.cs
3734         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
3735
3736         * class.cs
3737         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
3738         (AbstractPropertyEventMethod): Likewise.
3739         (Constructor.Emit): Likewise.
3740         (SourceMethod.SetCompilerGenerated): Removed.
3741
3742         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
3743         on MoveNext().
3744
3745         * anonymous.cs
3746         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
3747         if we're an `IteratorHost'.
3748         (AnonymousMethodMethod..ctor): Don't set
3749         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
3750         not on the method.
3751
3752 2008-06-16  Marek Safar  <marek.safar@gmail.com>
3753
3754         * statement.cs: Clean-up foreach statements.
3755
3756 2008-06-12  Marek Safar  <marek.safar@gmail.com>
3757
3758         * class.cs: Stop using public method which should not exist
3759         (MethodBuilder.SetGenericMethodSignature).
3760
3761 2008-06-11  Martin Baulig  <martin@ximian.com>
3762
3763         * location.cs
3764         (Location.LookupFile): Add `CompilationUnit' argument; when given
3765         a relative file name, make it relative to the directory the .cs
3766         file is located in instead of using the current directory.
3767
3768 2008-06-11  Martin Baulig  <martin@ximian.com>
3769
3770         * class.cs
3771         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
3772         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
3773         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
3774         (SourceMethod.SetCompilerGenerated): Likewise.
3775
3776 2008-06-11  Marek Safar  <marek.safar@gmail.com>
3777
3778         * codegen.cs, driver: Only write symbol file when it's asked for.
3779
3780 2008-06-11  Marek Safar  <marek.safar@gmail.com>
3781
3782         * codegen.cs: Don't use assembly writer error handling for symbol writer.
3783
3784 2008-06-10  Martin Baulig  <martin@ximian.com>
3785
3786         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
3787
3788 2008-06-09  Marek Safar  <marek.safar@gmail.com>
3789
3790         A fix for bug #316290
3791         * expression.cs: Include decimal operators in predefined table.
3792         
3793         * parameters.cs: More readonlyness.
3794
3795 2008-06-09  Marek Safar  <marek.safar@gmail.com>
3796
3797         A fix for bug #397213
3798         * cs-parser.jay: One more missing current_local_parameters reset.
3799
3800 2008-06-09  Marek Safar  <marek.safar@gmail.com>
3801
3802         A fix for bug #396633
3803         * class.cs: Host backing field in partial container.
3804
3805 2008-06-09  Marek Safar  <marek.safar@gmail.com>
3806
3807         A fix for bug #397068
3808         * expression.cs: Check both operand types when predefined operator is used.
3809
3810 2008-06-05  Martin Baulig  <martin@ximian.com>
3811
3812         Merged the `debugger-kahalo' branch.
3813
3814         * class.cs
3815         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
3816         we're an iterator method.
3817         (SourceMethod): Reflect latest symbol writer changes;
3818         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
3819         now `start_row' and `end_row'.
3820         (Constructor.Emit): Fix the logic whether to emit symbol information.
3821
3822         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
3823         generated methods.
3824
3825         * location.cs
3826         (CompilationUnit): New public class; derives from `SourceFile'.
3827         (SourceFileEntry.DefineSymbolInfo): New public method.
3828         (SourceFileEntry.SetChecksum): New public method.
3829         (Location): Encode hidden line numbers by using `column == 255';
3830         the .ctor now accepts `column == -1' to mark a hidden line number.
3831         (Location.Hidden): New public property.
3832         (Location.CheckPoint): Add `CompilationUnit'.
3833         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
3834         (Location.Push): Add `CompilationUnit compile_unit' argument.
3835         (Location.CompilationUnit): New public property.
3836
3837         * statement.cs
3838         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
3839
3840         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
3841
3842         * driver.cs: `SourceFile' -> `CompilationUnit'.
3843
3844         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
3845
3846         * namespace.cs: `SourceFile' -> `CompilationUnit'.
3847
3848         * cs-tokenizer.cs: Add support for `#pragma checksum' and
3849         `#line hidden'.
3850
3851         * symbolwriter.cs
3852         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
3853         new symbol writer API to also pass the file.
3854
3855 2008-06-05  Marek Safar  <marek.safar@gmail.com>
3856
3857         * statement.cs: Emit catch variable assignment using variable expression.
3858         
3859 2008-06-05  Marek Safar  <marek.safar@gmail.com>
3860
3861         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
3862         with other variable types.
3863
3864 2008-06-04  Marek Safar  <marek.safar@gmail.com>
3865
3866         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
3867         GetLength method emit, it breaks resolve rules.
3868         
3869 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
3870             Marek Safar  <marek.safar@gmail.com>
3871                         
3872         A fix for bug #395542
3873         * cs-parser.jay: The trailing comma is allowed in anonymous type member
3874         declaration.
3875         
3876 2008-06-02  Marek Safar  <marek.safar@gmail.com>
3877
3878         A fix for bug #395287
3879         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
3880
3881 2008-05-31  Marek Safar  <marek.safar@gmail.com>
3882
3883         A fix for bug #395845
3884         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
3885         non-nullable parameter type.
3886         
3887 2008-05-31  Marek Safar  <marek.safar@gmail.com>
3888
3889         * class.cs: Handle contructor initializer as a statement in top-level block.
3890
3891 2008-05-30  Marek Safar  <marek.safar@gmail.com>
3892
3893         * attribute.cs: Don't mix old and new corlib types when emitting corlib
3894         security attributes.
3895
3896 2008-05-24  Marek Safar  <marek.safar@gmail.com>
3897
3898         * ecore.cs, expression.cs: Small IVariable refactoring.
3899
3900 2008-05-22  Marek Safar  <marek.safar@gmail.com>
3901
3902         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
3903
3904 2008-05-21  Marek Safar  <marek.safar@gmail.com>
3905
3906         * cs-parser.jay: Removed redundant catch type check.
3907
3908 2008-05-21  Marek Safar  <marek.safar@gmail.com>
3909
3910         A fix for bug #390372
3911         * nullable.cs: Set correct return type.
3912
3913 2008-05-21  Marek Safar  <marek.safar@gmail.com>
3914
3915         A fix for bug #391062
3916         * typemanager.cs: Fixed crash when comparing null types.
3917
3918 2008-05-21  Marek Safar  <marek.safar@gmail.com>
3919
3920         A fix for bug #391871
3921         * cs-parser.jay: Better error handling for invalid catch type.
3922
3923 2008-05-20  Marek Safar  <marek.safar@gmail.com>
3924
3925         A fix for bug #392155
3926         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
3927
3928 2008-05-15  Marek Safar  <marek.safar@gmail.com>
3929
3930         A fix for bug #390666
3931         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
3932         expressions.
3933
3934 2008-05-15  Marek Safar  <marek.safar@gmail.com>
3935
3936         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
3937         in getter.
3938
3939 2008-05-13  Marek Safar  <marek.safar@gmail.com>
3940
3941         A fix for bug #389625
3942         * delegate.cs, generic.cs: Some progress on method group return type
3943         inference.
3944
3945 2008-05-13  Marek Safar  <marek.safar@gmail.com>
3946
3947         A fix for bug #378419
3948         * namespace.cs: Inspect also parent namespaces not only namespace entries.
3949
3950 2008-05-12  Marek Safar  <marek.safar@gmail.com>
3951
3952         * class.cs (Constructor): Added IsCompilerGenerated.
3953
3954 2008-05-12  Marek Safar  <marek.safar@gmail.com>
3955
3956         * expression.cs: Enum binary operators can accept non-enum operand only when
3957         is implicitly convertible to underlying type.
3958
3959 2008-05-12  Marek Safar  <marek.safar@gmail.com>
3960
3961         A fix for bug #389272
3962         * support.cs: Workaround System.InvalidOperationException for enums.
3963
3964 2008-05-12  Marek Safar  <marek.safar@gmail.com>
3965
3966         A fix for bug #389073
3967         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
3968
3969 2008-05-10  Marek Safar  <marek.safar@gmail.com>
3970
3971         * driver.cs: Split Parse.
3972         
3973         * location.cs (LookupFile): Uses string.Empty.
3974
3975 2008-05-07  Marek Safar  <marek.safar@gmail.com>
3976
3977         * expression.cs, parameter.cs: Small ParameterReference clean up.
3978
3979 2008-05-07  Marek Safar  <marek.safar@gmail.com>
3980
3981         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
3982         hack. Fixes #387502.
3983
3984 2008-05-06  Martin Baulig  <martin@ximian.com>
3985
3986         * class.cs (Constructor.Emit): Fix the logic whether to emit
3987         symbol information.
3988
3989 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
3990
3991         Fix #385503
3992         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
3993         InvalidOperationException when the iterator is before the start or
3994         after the end.
3995
3996 2008-05-06  Marek Safar  <marek.safar@gmail.com>
3997
3998         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
3999         when left is nullable type.
4000
4001 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4002
4003         A fix for bug #386628
4004         * expression.cs (LocalVariableReference): Continue in resolving when
4005         variable is not assigned.
4006
4007 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4008
4009         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4010         nullable operations.
4011
4012 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4013
4014         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4015         it saves many redundant temporary variables for nullable operations.
4016
4017 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4018
4019         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4020         
4021         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4022         method.
4023         
4024         * nullable.cs: Constant coalescing operator optimizations.
4025
4026 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4027
4028         * constant.cs: Use unsigned conversion for values which are unsigned only.
4029
4030 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4031
4032         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4033         coalescing operator as it should be.
4034
4035 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4036
4037         A fix for bug #371016
4038         * expression.cs: All predefined delegate operators require implicit method
4039         group conversion.
4040         
4041 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4042
4043         * constant.cs: Emit long constant as uint when fits the range.
4044         
4045         * convert.cs, expression.cs: Fixed few unsafe conversions.
4046
4047 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4048
4049         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4050
4051 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4052
4053         Fix #385758
4054         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4055         'expr'.
4056         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4057
4058 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4059
4060         * constant.cs, literal.cs: IsLiteral property for error reporting.
4061         
4062         * ecore.cs, expression.cs: Implemented Property expression.
4063
4064 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4065
4066         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4067         
4068         * nullable.cs: Implemented nullable coalescing null operator.
4069
4070         * ecore.cs, expression.cs: Expression trees work.
4071
4072 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4073
4074         * ecore.cs: CreateExpressionTree is finally abstract.
4075
4076         * expression.cs, linq.cs: Updated.
4077
4078 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4079
4080         * expression.cs, ecore.cs: Block base access expression inside expression
4081         tree.
4082
4083 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4084
4085         A fix for bug #385058
4086         * expression.cs: User-defined operator implementations always take
4087         precedence over predefined operator implementations.
4088
4089 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4090
4091         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4092         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4093         expression tree conversions.
4094         
4095 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4096
4097         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4098         operators method details to Operator class.
4099
4100 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4101
4102         * anonymous.cs: Pass unsafe flags to anonymous container.
4103         
4104         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4105         inside expression tree.
4106
4107 2008-04-29  Martin Baulig  <martin@ximian.com>
4108
4109         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4110         (Tokenizer.PopPosition): Also restore the `line'.
4111
4112 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4113
4114         * delegate.cs: Implemented Invoke expression.
4115
4116 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4117
4118         * expression.cs: Fixed equality reference comparison regression.
4119
4120 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4121
4122         * ecore.cs: Clean up EmptyCast hack.
4123         
4124         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4125         using correct conversion rules. Also fixes #383993.
4126
4127 2008-04-28  Martin Baulig  <martin@ximian.com>
4128
4129         * class.cs (Constructor.Emit): Don't emit debugging information
4130         for generated default .ctor's.
4131
4132 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4133
4134         * convert.cs: Empty-cast ushort to int conversion.
4135
4136 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4137
4138         A fix for bug #384191
4139         * ecore.cs, expression.cs: Fixed expression cloning.
4140
4141 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4142
4143         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4144
4145 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4146
4147         Fix #381559, test-638.cs, test-639.cs
4148         * assign.cs (CompoundAssign.Helper): New wrapper.
4149         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4150         access.
4151         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4152         Pass unconverted expressions to the params array creation expression.
4153         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4154         (PropertyExpr.EmitAssign): Likewise.
4155         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4156         element if it is of kind CompoundAssign.Helper.
4157         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
4158         first before anything else.
4159         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
4160         (ArrayAccess.LoadArrayAndArguments): Simplify.
4161
4162 2008-04-27  Marek Safar  <marek.safar@gmail.com>
4163
4164         * expression.cs: Fixed cloning of typeof(void).
4165
4166 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
4167
4168         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
4169         (Assign.Emit): Likewise.  Move it to ...
4170         (CompoundAssign.DoResolve): ... here and ...
4171         (CompoundAssign.Emit): ... here.
4172         (EventAddOrRemove): New helper to handle += and -= on events, and
4173         avoid the use of BinaryDelegates.
4174         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
4175         (EventExpr.EmitAddOrRemove): Improve.
4176         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
4177
4178         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
4179         create VarExprs for 'foo.bar.var'.
4180         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
4181         is a highly inappropriate name for its functionality.
4182
4183 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4184
4185         Simplify handling of multiple assignments
4186         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
4187         inheritable-only.
4188         (SimpleAssign): New.  Class to be used for normal assignments.
4189         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
4190         * expression.cs, parameter.cs, statement.cs: Likewise.
4191
4192 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4193
4194         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
4195         for incompatible underlying types, more to come, uff.
4196
4197 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4198
4199         Fix gtest-388.cs
4200         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
4201         Handle 'leave_copy'.
4202
4203 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4204
4205         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
4206
4207 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
4208
4209         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
4210         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
4211         * statement.cs (While, Do, For): Allow test to have side effects.
4212         (For.DoEmit): Always emit InitStatement.
4213
4214         Fix test-635.cs
4215         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
4216         Always create SideEffectConstant.
4217         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
4218         of type EnumConstant.
4219
4220         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4221         Handle 'right' being SideEffectConstant of type 'bool'.
4222
4223         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4224         Use left.EmitBranchable instead of open coding it, so as to
4225         improve optimization opportunities.
4226
4227         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
4228
4229         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
4230         assumptions.
4231         (Expression.EmitSideEffect): Document.
4232
4233 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4234
4235         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
4236
4237 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4238
4239         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
4240
4241 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4242
4243         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
4244         conversion to expression tree.
4245
4246 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4247
4248         * ecore.cs: Removed unused expression.
4249
4250 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4251
4252         * expression.cs: Implemented NegateChecked and New expressions.
4253
4254 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4255
4256         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
4257
4258 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
4259
4260         Fix #351102
4261         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
4262         needing final 'ret' instruction.
4263
4264 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4265
4266         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
4267
4268 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4269
4270         * expression.cs: Emit ldnull and not null expression as an instance argument
4271          of static method expression calls.
4272
4273 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4274
4275         A fix for bug #378200
4276         * expression.cs: Fixed crash when creating parameterless expression tree
4277         method call.
4278
4279 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4280
4281         A fix for bug #375297
4282         * anonymous.cs: Fixed crash when inferring from null argument anonymous
4283         method.
4284
4285 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4286
4287         A fix for bug #377596
4288         * decl.cs, class.cs: Emit delegate type argument attributes.
4289
4290 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4291
4292         A fix for bug #365314
4293         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
4294         
4295 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4296
4297         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
4298         only.
4299
4300 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4301
4302         * generic.cs (TypeParameter): Removed redundant location.
4303
4304 2008-04-19  Marek Safar  <marek.safar@gmail.com>
4305
4306         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
4307         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
4308         FullNamedExpression in all declaration type expression, statements will come
4309         later.
4310
4311 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4312
4313         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
4314         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
4315
4316 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4317
4318         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
4319         code.
4320
4321 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4322
4323         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
4324         constraints.
4325
4326 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4327
4328         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
4329         name expressions.
4330         Also fixes #340463.
4331
4332 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
4333
4334         Hook up 'EmitSideEffect'
4335         * constant.cs (Constant.EmitSideEffect): New.
4336         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
4337         (SideEffectConstant.EmitSideEffect): New.
4338         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
4339         unconditional branch in EmitBranchable.
4340         (FieldExpr.EmitBranchable): New.
4341         * expression.cs (Unary.EmitSideEffect): New.
4342         (Binary.EmitSideEffect): New.
4343         (VariableReference.EmitSideEffect): New.  Do nothing.
4344
4345 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4346
4347         Introduce 'EmitSideEffect'
4348         * ecore.cs (Expression.EmitSideEffect): New.
4349         (TypeCast): Rename from EmptyCast.
4350         (EmptyCast): New.
4351         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
4352         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
4353         * convert.cs, nullable.cs: Update to changes.
4354
4355 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4356
4357         * class.cs, cs-parser.jay: Early check for base types expression.
4358
4359 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4360
4361         * decl.cs (MemberName): Declare PrettyName as obsolete.
4362
4363 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4364
4365         * namespace.cs: Use MemberName comparison.
4366
4367 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4368
4369         Fix build break
4370         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
4371         FullName.
4372         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
4373         (MemberName.FullyQualifiedName): New.  Provides the functionality
4374         that users assume FullName would have.
4375         * ecore.cs, namespace.cs: Update to changes.
4376
4377         * statement.cs (Using.assign): Make into ExpressionStatement.
4378         (Using.EmitPreTryBody): Simplify.
4379
4380 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4381
4382         * report.cs: ColorFormat is protected.
4383         
4384         * rootcontext.cs: Unused fields clean-up.
4385         
4386         * namespace.cs: Made UsingEntry name private.
4387
4388 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4389
4390         * cs-tokenizer.cs, location.cs: Removed unused field.
4391
4392 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
4393             Raja R Harinath  <harinath@hurrynot.org>
4394
4395         Fix #379822
4396         * constant.cs (SideEffectConstant.value): Rename from 'left'.
4397         (SideEffectConstant.side_effect): Rename from 'right'.
4398         (SideEffectConstant..ctor): Normalize 'side_effect'.
4399         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
4400         value of this constant.
4401         * cfold.cs: Update to changes.
4402
4403 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4404
4405         * cs-paser.jay: Removed unused variable.
4406         
4407         * driver.cs: Made Compile instance method.
4408
4409 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
4410
4411         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
4412
4413 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4414
4415         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
4416
4417 2008-04-13  Jb Evain  <jbevain@novell.com>
4418
4419         * namespace.cs: update the System.Core fullname for 2.1
4420         * driver.cs: update the list of required assemblies for 2.1.
4421         Merged from the Moonlight 2 branch.
4422
4423 2008-04-11  Marek Safar  <marek.safar@gmail.com>
4424
4425         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
4426         types and user defined operators. User operators arguments has to be checked
4427         for null value before invocation, which also means no operator is called
4428         when any argument is not convertible to unwrapped nullable type.
4429         
4430 2008-04-09  Marek Safar  <marek.safar@gmail.com>
4431
4432         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
4433         of Unary expressions to follow operator overloading rules precisely.
4434         Also fixes #321794, #323794
4435         
4436 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4437
4438         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
4439         expression.
4440         
4441 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4442
4443         * expression.cs, ecore.cs: Implemented MemberInit expression.
4444         
4445 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
4446
4447         Fix mono/tests/exception4.cs
4448         * statement.cs (ExceptionStatement, TryCatch): Revert to using
4449         ec.NeedReturnLabel () rather emitting a 'nop'.
4450
4451         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
4452         simple heuristic.
4453         (TryCatch.SomeCodeFollows): Likewise.
4454         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
4455         for 'break', 'continue' and 'return' statements inside a try.
4456         We're fairly sure that the generated IL stream will have more
4457         instructions textually following the try.
4458         (FlowBranchingTryCatch): Likewise.
4459
4460         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
4461         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
4462         overrides.
4463
4464         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
4465         wrapper -- forward everything to CollectionForeach.
4466         (CollectionForeach.NonDisposableWrapper): New.
4467         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
4468         instead of a pop + branch to end.
4469
4470 2008-04-07  Marek Safar  <marek.safar@gmail.com>
4471
4472         A fix for bug #377485
4473         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
4474         Propagate location for extension method groups. Report conversion failure at
4475         right place.
4476
4477 2008-04-07  Marek Safar  <marek.safar@gmail.com>
4478
4479         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
4480         ListInit and Field expressions.
4481
4482 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
4483
4484         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
4485         Since $PC is always -1 inside the body of MoveNext, the fault
4486         handler is a no-op.
4487         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
4488         * statement.cs (ExceptionStatement.emit_finally): Likewise.
4489         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
4490
4491         The denouement!  Fix #324708
4492         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
4493         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
4494         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
4495         'finally' inside the finally clause.
4496
4497         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
4498         inside an iterator.  Don't emit the body of the 'finally' inside
4499         the finally clause yet.
4500
4501         Use the ResumableStatement infrastructure for MoveNext ()
4502         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
4503         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
4504         'old_resume_points'.  Move dispatcher upfront.
4505         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
4506         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
4507         in an enumerator.  This encodes the main fix in this patch series
4508         -- we can only jump into the first instruction of a try from the
4509         outside, but we want to emit try/finally regions in iterators and
4510         resume in the middle of them.
4511
4512 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
4513
4514         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
4515         of NeedReturnLabel here.
4516
4517         Introduce a common point for emitting try/finally to IL
4518         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
4519         features of the various subclasses, which are now driven by ...
4520         (ExceptionStatement.EmitPreTryBody): ... this and ...
4521         (ExceptionStatement.EmitTryBody): ... this and the original
4522         EmitFinallyBody.
4523         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
4524         Remove DoEmit and update to follow above protocol.
4525
4526         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
4527         of the dispatcher are the same, skip emitting the 'switch'.
4528         * iterator.cs (Iterator.EmitDispose): Update to changes.
4529
4530         Clean up handling of 'using' statement
4531         * statement.cs (UsingTemporary): New.  Carved out of ...
4532         (Using): ... this.  Simplify drastically.  Handle exactly
4533         one variable.
4534         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
4535         or Using as appropriate.  If there are multiple variable declared,
4536         create nested Using statements.
4537         (resource_acquisition): Kill.
4538
4539         * statement.cs (ExceptionStatement.EmitForDispose): Use
4540         EmitFinallyBody, not EmitFinally.
4541
4542         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
4543         * iterator.cs: Update to changes.
4544
4545         Start using the ResumableStatement infrastructure
4546         * statement.cs (ResumeableStatement.PrepareForDispose): New.
4547         (ResumableStatement.EmitForDispose): New.
4548         (ExceptionStatement): Override them.
4549         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
4550         EmitForDispose to create the body of the Dispose method.  Don't
4551         use OldResumePoint.
4552
4553         * iterator.cs (Iterator.AddResumePoint): Move here from ...
4554         * statement.cs (Toplevel.AddResumePoint): ... here.
4555         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
4556         * flowanalysis.cs (FlowBranchingIterator): New.
4557         * codegen.cs (EmitContext): Update to changes.
4558
4559         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
4560         (Iterator.old_resume_points): Rename from 'resume_points'.
4561         (Iterator.MoveNextStatement): Remove unused class.
4562
4563         New infrastructure for try/finally in iterators (still unused)
4564         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
4565         (FlowBranchingToplevel.AddResumePoint): Hook into
4566         ToplevelBlock.AddResumePoint.
4567         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
4568         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
4569         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
4570         resume points and assign program-counter values.
4571         (ExceptionBlock.AddResumePoint): Collect resume points for
4572         de-muxer at the top of try block.
4573         * iterators.cs (Yield.CheckContext): Simplify.
4574         (Yield.Resolve): Use FlowBranching.AddResumePoint.
4575
4576 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
4577
4578         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
4579         argument to an ExitStatement.
4580         (FlowBranchingException): Refactor saved origins code.
4581         * statement.cs (ExitStatement): Update to cahges.
4582         * iterator.cs (YieldBreak): Likewise.
4583
4584         * statement.cs (ResumableStatement): New.  Common base class for
4585         YieldReturn and ExceptionStatement.
4586         (ExitStatement): New.  Common base class for Return and YieldBreak.
4587         (Return): Update to changes.
4588         * iterator.cs (YieldBreak): Likewise.
4589         * lambda.cs (ContextualReturn): Likewise.
4590
4591         Fix #377028
4592         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
4593         emit a meaningful error message.
4594
4595         Fix #324765, #319508
4596         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
4597         (VariableInfo.SetAssigned): Set it.
4598         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
4599         determine if CS0219 or CS0168 is appropriate.  Don't use
4600         flow-analysis information.
4601         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
4602         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
4603         (EmitContext.EndFlowBranching): ... this.
4604
4605 2008-04-03  Marek Safar  <marek.safar@gmail.com>
4606
4607         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
4608
4609 2008-04-03  Marek Safar  <marek.safar@gmail.com>
4610
4611         A fix for bug #376508
4612         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
4613         ImplicitConversionExists.
4614
4615 2008-04-03  Marek Safar  <marek.safar@gmail.com>
4616
4617         * expression.cs (Binary): Added remaining binary operators to expression
4618         tree builder.
4619
4620         * nullable.cs: Optimize shift with null argument.
4621
4622 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
4623
4624         Fix minor IL regression
4625         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
4626         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
4627         * cs-parser.jay (try_statement): Update to changes.
4628
4629         * statement.cs (TryFinally.need_exc_block): Delete.
4630         (TryFinally): Update to changes.
4631
4632         Now all ExceptionStatements are unconditional
4633         * statement.cs (CollectionForeach.DisposableWrapper): New.
4634         Extract out the try/finally code into a new wrapper.
4635         (CollectionForeach.Resolve): Use it to simplify the code.
4636
4637 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
4638
4639         Start at simplifying ExceptionStatement semantics a bit
4640         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
4641         * cs-parser.jay (try_statement): Update to changes.
4642         (opt_catch_clauses): Remove.
4643         * flowanalysis.cs: Update to changes.
4644         (FlowBranching.BranchingType.TryCatch): New.
4645         (FlowBranchingTryCatch): New.
4646
4647         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
4648         (FlowBranching.CreateBranching): Update to changes.
4649         (FlowBranchingBlock.AddSibling): Add sanity check.
4650         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
4651         Update to changes.
4652
4653         * iterators.cs (Iterator.MarkFinally): Remove.
4654         * statement.cs (ExceptionStatement): Update to changes.
4655
4656         Add support for skipping over finally blocks at runtime.  First
4657         in a series to fix #324708
4658         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
4659         (Iterator.EmitMoveNext): Initialize it.
4660         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
4661         branch over the body of the 'finally' clause.
4662
4663 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
4664
4665         Avoid lopsided use of Foo/DoFoo names
4666         * statement.cs (ExpressionStatement.EmitFinallyBody):
4667         Rename from EmitFinally.
4668         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
4669         * iterator.cs: Update to changes.
4670
4671 2008-04-02  Marek Safar  <marek.safar@gmail.com>
4672
4673         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
4674         based on UserOperatorCall. More binary nullable operators clean up.
4675
4676 2008-04-02  Martin Baulig  <martin@ximian.com>
4677
4678         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
4679
4680 2008-04-02  Marek Safar  <marek.safar@gmail.com>
4681
4682         * nullable.cs: Merge user and empty conversions when lifting expression
4683         trees.
4684         
4685         * expression.cs (StringConcat): Implemented expression tree representation.
4686
4687 2008-04-01  Marek Safar  <marek.safar@gmail.com>
4688
4689         * nullable.cs: When lifting null literal and a user operator exists, no call 
4690         is made.
4691         
4692 2008-04-01  Marek Safar  <marek.safar@gmail.com>
4693
4694         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
4695         null.
4696
4697 2008-04-01  Marek Safar  <marek.safar@gmail.com>
4698
4699         * nullable.cs, expression.cs: Use namespace instead heavily nested
4700         monster abstract class.
4701
4702 2008-04-01  Marek Safar  <marek.safar@gmail.com>
4703
4704         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
4705         lifting of null literal and user operators. Clean up of some temporary
4706         nullable hacks.
4707
4708 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
4709
4710         Fix #368224, test-629.cs
4711         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
4712         if it crossed an unwind-protect boundary.
4713         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
4714         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
4715         inside an unwind-protected region.
4716         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
4717         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
4718         'leave' instead of a 'br' if unwind-protected.
4719         (Iterator.EmitYieldBreak): Likewise.
4720
4721 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
4722
4723         * driver.cs: Only define versioninfo resources if no win32 resource
4724         file was specified.
4725
4726 2008-03-28  Marek Safar  <marek.safar@gmail.com>
4727
4728         A fix for bug #372375
4729         * convert.cs: Fixed boxing of nullable types.
4730
4731 2008-03-28  Marek Safar  <marek.safar@gmail.com>
4732
4733         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
4734         type.
4735
4736 2008-03-28  Marek Safar  <marek.safar@gmail.com>
4737
4738         A fix for bug #374619
4739         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
4740         
4741 2008-03-27  Marek Safar  <marek.safar@gmail.com>
4742
4743         * lambda.cs: Check return type only for invocation.
4744         
4745 2008-03-27  Marek Safar  <marek.safar@gmail.com>
4746
4747         A fix for bug #374214
4748         * ecore.cs: Correctly report argument type mismatch.
4749
4750 2008-03-27  Marek Safar  <marek.safar@gmail.com>
4751
4752         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
4753         and not rely on broken IsEnum.
4754
4755 2008-03-27  Marek Safar  <marek.safar@gmail.com>
4756
4757         * nullable.cs: New file, extracted from generic.cs.
4758         
4759         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
4760
4761 2008-03-27  Marek Safar  <marek.safar@gmail.com>
4762
4763         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
4764         predefined comparison operators and null literals.
4765         
4766         * report.cs: New warning ID.
4767         
4768 2008-03-25  Marek Safar  <marek.safar@gmail.com>
4769
4770         A fix for bug #370577
4771         * lambda.cs: Check return type too.
4772
4773 2008-03-25  Marek Safar  <marek.safar@gmail.com>
4774
4775         A fix for bug #372846
4776         * class.cs: Automatic properties can be declared as unsafe.
4777
4778 2008-03-20  Marek Safar  <marek.safar@gmail.com>
4779
4780         * location.cs: Use string based concatenation.
4781         
4782         * expression.cs: LiftedBinaryOperator is gmcs only.
4783         
4784 2008-03-20  Marek Safar  <marek.safar@gmail.com>
4785
4786         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
4787         conversions rules and expression trees.
4788
4789 2008-03-19  Marek Safar  <marek.safar@gmail.com>
4790
4791         * delegate.cs: Use extension method source as delegate target.
4792
4793 2008-03-19  Marek Safar  <marek.safar@gmail.com>
4794
4795         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
4796         binary operations to be purely based on binary operations and optimized
4797         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
4798         and other ET refactoring.
4799         
4800         * typemanager.cs: Fixed warning.
4801         
4802 2008-03-17  Marek Safar  <marek.safar@gmail.com>
4803
4804         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
4805         
4806         * symbolwriter.cs: Fixed.
4807
4808 2008-03-17  Marek Safar  <marek.safar@gmail.com>
4809
4810         * anonymous.cs, driver.cs: Reset anonymous types counters.
4811
4812 2008-03-17  Marek Safar  <marek.safar@gmail.com>
4813
4814         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
4815         
4816         * class.cs: Use fullname for all type member definitions.
4817         
4818 2008-02-19  Martin Baulig  <martin@ximian.com>
4819
4820         * class.cs
4821         (IMethodData.EmitExtraSymbolInfo): New interface method.
4822         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
4823         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
4824         interface method here as an empty public virtual method.
4825
4826         * anonymous.cs
4827         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
4828         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
4829         CodeGen.SymbolWriter.SetRealMethodName().       
4830
4831 2008-02-18  Martin Baulig  <martin@ximian.com>
4832
4833         * anonymous.cs
4834         (ScopeInfo.EmitType): Override this and emit debugging
4835         information for captured variables.
4836         (RootScopeInfo.EmitType): Override this and emit symbol
4837         information for a captured `this'.
4838
4839 2008-02-15  Martin Baulig  <martin@ximian.com>
4840
4841         * iterators.cs: Emit debugging info.
4842
4843         * codegen.cs
4844         (EmitContext.Flags): Add `OmitDebuggingInfo'.
4845         (EmitContext.OmitDebuggingInfo): New public property.
4846
4847         * statement.cs
4848         (While): Override Emit() and don't emit symbol info there; do it
4849         inside DoEmit() instead.
4850         (Block.Emit): Omit symbol information while emitting the scope
4851         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
4852         block logic.
4853         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
4854         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
4855         .ctor to make `IsIterator' work.
4856
4857 2008-03-14  Martin Baulig  <martin@ximian.com>
4858
4859         * symbolwriter.cs: Added the new symbol writer function from the
4860         debugger's `terrania' branch; temporarily enclose them inside
4861         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
4862         my vacations.
4863
4864 2008-03-14  Martin Baulig  <martin@ximian.com>
4865
4866         * symbolwriter.cs
4867         (SymbolWriter): Make this a public static class.
4868
4869         * codegen.cs
4870         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
4871         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
4872
4873 2008-03-14  Marek Safar  <marek.safar@gmail.com>
4874
4875         A fix for bug #370577
4876         * statement.cs, lambda.cs: Added extra limitations when dealing with void
4877         return type.
4878         
4879 2008-03-14  Marek Safar  <marek.safar@gmail.com>
4880
4881         * typemanager.cs (CSharpName): Made 250 times faster.
4882
4883 2008-03-13  Marek Safar  <marek.safar@gmail.com>
4884
4885         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
4886         
4887 2008-03-12  Marek Safar  <marek.safar@gmail.com>
4888
4889         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
4890         crash when predefined field does not exist.
4891         
4892 2008-03-12  Marek Safar  <marek.safar@gmail.com>
4893
4894         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
4895         
4896 2008-03-12  Marek Safar  <marek.safar@gmail.com>
4897
4898         * class.cs (FixedField): Don't crash when contructors are missing.
4899
4900 2008-03-11  Marek Safar  <marek.safar@gmail.com>
4901
4902         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
4903         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
4904         check internal types accessibility for internal and external types.
4905         Replaced EnumToUnderlying by GetEnumUnderlyingType.
4906
4907 2008-03-11  Marek Safar  <marek.safar@gmail.com>
4908
4909         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
4910         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
4911         attribute.cs, statement: Use corect instance of predefined types (work
4912         related to #364674).
4913
4914 2008-03-07  Marek Safar  <marek.safar@gmail.com>
4915
4916         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
4917         
4918 2008-03-07  Marek Safar  <marek.safar@gmail.com>
4919
4920         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
4921         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
4922         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
4923         predefined types clean up, delayed predefined types members initialization
4924         (work related to #364674).
4925
4926 2008-03-05  Marek Safar  <marek.safar@gmail.com>
4927
4928         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
4929         
4930 2008-03-05  Marek Safar  <marek.safar@gmail.com>
4931
4932         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
4933         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
4934         predefined types clean up (work related to #364674).
4935
4936 2008-03-04  Marek Safar  <marek.safar@gmail.com>
4937
4938         * ecore.cs: Print an error message instead of throwing exception.
4939         
4940 2008-03-04  Marek Safar  <marek.safar@gmail.com>
4941
4942         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
4943         expression.cs, statement.cs: Unififed null literal representation.
4944
4945 2008-03-03  Marek Safar  <marek.safar@gmail.com>
4946
4947         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
4948         expression.cs: Refactored binary operators resolve phase and improved speed.
4949         The nullable code is still missing and won't work correctly, more fixes
4950         required.
4951
4952         It also fixes #323726, #324312, #324248, and many other unreported issues.
4953
4954 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4955
4956         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
4957         instead of 'gmcs'.
4958
4959 2008-02-27  Marek Safar  <marek.safar@gmail.com>
4960
4961         * ecore.cs: Clean-up and split BetterConversion.
4962         
4963 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
4964
4965         Fix #363791
4966         * enum.cs (EnumMember.Value): Only access 'value' if
4967         ResolveValue says it's ok.
4968         (EnumMember.DoResolveValue): Don't set prev_member.value.
4969         (Enum.GetDefinition): Reverse arguments of Equals --
4970         EnumMember.Value can return 'null'.
4971
4972         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
4973
4974 2008-02-22  Marek Safar  <marek.safar@gmail.com>
4975
4976         * generic.cs, expression.cs: More ongoing work on expression trees.
4977         
4978 2008-02-21  Marek Safar  <marek.safar@gmail.com>
4979
4980         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
4981         handle missing matches when mutiple operators exist.
4982         
4983 2008-02-20  Marek Safar  <marek.safar@gmail.com>
4984
4985         A fix for bug #363218
4986         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
4987         initializers.
4988         
4989 2008-02-20  Marek Safar  <marek.safar@gmail.com>
4990
4991         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
4992         update. This time to deal correctly with SideEffectConstant expression used
4993         as an argument for another constant folding.
4994
4995 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
4996
4997         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
4998         MethodBuilder.
4999
5000 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5001
5002         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5003
5004 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5005
5006         A fix for bug #328136
5007         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5008         side is a false constant, because we still need to evaluate the right-hand
5009         side.
5010
5011         * statement.cs (If): Emit two types of boolean constants (simple constant,
5012         side-effect constant).
5013
5014 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5015
5016         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5017
5018         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5019         constants.
5020
5021 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5022
5023         A fix for bug #361457
5024         * ecore.cs (IsApplicable): Params methods have lower priority.
5025
5026         * support.cs: Return correct parameter modifier for params types.
5027
5028 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5029
5030         * generic.cs (TypeParameter): Cache attribute target name.
5031
5032         * support.cs: Removed unused variable.
5033
5034         * typemanager.cs: Removed debugging leftover.
5035
5036         * ecore.cs: Use local type instead of a property;
5037
5038         * class.cs (VerifyMembers): Consider also parent to test whether type member
5039         is local or public.
5040
5041         * expression.cs (FullMethodDesc): Removed.
5042
5043         * attribute.cs (IsValidArgumentType): Made static.
5044
5045 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5046
5047         Cleanup to be more readable.
5048         * Makefile (GMCS_PROFILE): Remove.
5049         (COMPILER_NAME): New helper.
5050
5051 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5052
5053         * cs-tokenizer.cs: if a conditional expression happens inside a
5054         (...) this also means that we do not need to de-ambiguate between
5055         an parenthesized expression and a cast.
5056
5057         Fixes 346484.
5058
5059         * constant.cs (SideEffectConstant): a constant value that happens
5060         to have a side effect.
5061
5062         Fixes the build regressions introduced by the fix for #359789
5063
5064 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5065
5066         * expression.cs (Conditional.Emit): when emitting the ternary
5067         operator, use local variables to generate code verifiable code.
5068
5069         The verifier cannot infer that the type on stack before the
5070         stloc.0 is executed is of type ParentB. This happens because the
5071         stack merge algorithm uses only parent types when deciding which
5072         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5073         335.
5074
5075         This code compiled with mcs is not verifiable under MS. The MS
5076         verifier picks the first common interface of Foo and Bar, which is
5077         wrong, but doesn't use a full join type of the 2 interfaces.
5078
5079         CSC uses a clever hack to compile such code in a verifiable
5080         way. It stores the intermediate values in a local variable with
5081         the expected type.
5082
5083         Fixes: #358102
5084
5085 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5086
5087         * expression.cs: Do not fold BitwiseAnd operators when the left
5088         side is a false constant, because we still need to evaluate the
5089         right-hand side.
5090
5091         Fixes #359789
5092
5093         * support.cs: Instead of throwing an InternalErrorException when
5094         the position of the stream is outside the boundary of our buffer,
5095         reset the state of the reader, and restart the reading from the
5096         beginning of the file.
5097
5098 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5099
5100         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5101
5102 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5103
5104         A fix for bug #361686
5105         * decl.cs: A protected types used inside a private class which parents
5106         derives from the protected class are accessible.
5107
5108 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5109
5110         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5111         the parameterless constructor.
5112
5113 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5114
5115         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5116         lookup methods to use standard member cache when doing member lookup.
5117
5118 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5119
5120         * driver.cs: Don't report full path for referenced module as assembly error.
5121
5122 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5123
5124         * Makefile: Fixed `qh' target to work on all machines.
5125
5126         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5127         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5128         and HasElementType with TypeManager implementation.
5129
5130 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5131
5132         A fix for bugs #325134, #359749
5133         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5134         first binds point to non-method member expression.
5135
5136 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5137
5138         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5139
5140 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5141
5142         A fix for bugs #321394, #323028
5143         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5144         Reworked naive IsAccessibleAs implementation to handle nested types.
5145
5146 2008-02-05  Jb Evain  <jbevain@novell.com>
5147
5148         * class.cs: use generic type comparison for parameters
5149         as well.
5150
5151 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5152
5153         A fix for bug #325372
5154         * class.cs: Use generic type comparison when testing method signatures.
5155
5156 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5157
5158         A fix for bug #357047
5159         * ecore.cs: Applied C# 3.0 changes to better conversion.
5160
5161 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5162
5163         A fix for bug #358374
5164         * cs-parser.jay: Correctly set modifiers for all constructor types.
5165
5166 2008-02-04  Marek Safar  <marek.safar@gmail.com>
5167
5168         A fix for bug #355251
5169         * generic.cs: Added base class constraint based type inference.
5170
5171 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5172
5173         A fix for bug #357255
5174         * decl.cs: One more missing visibility check.
5175
5176 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5177
5178         * support.cs: Fixed broken return.
5179
5180 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5181
5182         * report.cs: Correctly reset warnings count after probing.
5183
5184 2008-01-25  Martin Baulig  <martin@ximian.com>
5185
5186         * namespace.cs
5187         (NamespaceEntry.SymbolFileID): Make this work again after
5188         MemberName.ToString() is gone.
5189
5190 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5191
5192         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
5193         expressions.
5194
5195 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5196
5197         * generic.cs: Use full implicit conversion for type inference fixing.
5198
5199 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5200
5201         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
5202         Fixed user operator conversions.
5203
5204 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5205
5206         * generic.cs: Do nullable type to null comparison optimization during
5207         resolve phase.
5208
5209 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5210
5211         A fix for bug #355163
5212         * generic.cs: Enabled l-value resolve on nullable expressions.
5213
5214 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5215
5216         A fix for bug #353986
5217         * class.cs: Ingore static ctors with parameters for any further checks.
5218
5219 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5220
5221         A fix for bug #354310
5222         * namespace.cs: Removed redundant check.
5223
5224 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5225
5226         A fix for bug #354928
5227         * expression.cs: ElementInitializers can be resolved only once.
5228
5229 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5230
5231         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
5232         Condition expressions.
5233
5234 2008-01-23  Marek Safar  <marek.safar@gmail.com>
5235
5236         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
5237
5238 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5239
5240         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
5241         not allowed.
5242
5243         * generic.cs: Implemented coalesce expression.
5244
5245 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5246
5247         A fix for bug #355145
5248         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
5249         expression tree type inference.
5250
5251 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
5252
5253         Fix #354663
5254         * expression.cs (Binary.IsUnsignedType): Fix typo.
5255
5256 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5257
5258         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
5259
5260 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5261
5262         A fix for bug #355161
5263         * ecore.cs, expression.cs: Wider range of extension method supported
5264         expressions.
5265
5266 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
5267
5268         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
5269         AssemblyBuilder to operate in compiler context. Fixes mcs part of
5270         bug #354970.
5271
5272 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5273
5274         A fix for bug #355148
5275         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
5276
5277 2008-01-22  Miguel de Icaza  <miguel@novell.com>
5278
5279         * expression.cs (CreateExpressionTree): Add support for or and
5280         logical or, and indent following the coding conventions.
5281
5282         * typemanager.cs (LinqExpression): renamed from
5283         ExpressionTreeManager, for a shorter name.
5284
5285         Use TypeManager.CoreLookupType to lookup types from our core
5286         assemblies and turn those into "Type" variables.
5287
5288         Consumers that previously used "Namespace" and "Type" from this
5289         class should instead use the TypeExpression which is a type that
5290         is fully resolved (without involving the regular C# resolution
5291         rules). 
5292
5293         This typically looks like this:
5294
5295         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
5296         new MemberAccess (texpr, name, type_arguments, loc)
5297
5298         This avoids the problem in: #355178
5299
5300 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5301
5302         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
5303         feature in parser only as we do in other cases.
5304         
5305 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5306
5307         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
5308         typemanager.cs: A refactoring of params arguments to reuse existing
5309         expressions (params -> array initializer) to emit params argument instead
5310         of specialized handling.
5311         It was required by expression tree implementation and it has other benefits
5312         as well, we now apply same optimization for params arguments as we do for
5313         array initializers.
5314         
5315 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5316
5317         A fix for bug #353526
5318         * generic.cs: A type inference of params arguments may not required any
5319         temporary array creation.
5320         
5321 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5322
5323         A fix for bug #353534
5324         * generic.cs, ecore.cs, expression.cs: A method group type inference is
5325         supported for delegates only.
5326         
5327 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5328
5329         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
5330         type for more than 1 candidates.
5331         
5332 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5333
5334         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
5335         expressions.
5336         
5337 2008-01-16  Marek Safar  <marek.safar@gmail.com>
5338
5339         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
5340         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
5341         operator) expressions. 
5342                 
5343 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5344
5345         * statement.cs: Avoid declaring an IL variable for this_variable since it is
5346         not accessed from the generated IL.
5347
5348 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5349
5350         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
5351         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
5352         statement.cs: The first expression tree implementation drop, mostly
5353         infrastructure work.
5354
5355 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5356
5357         * ecore.cs (IsNestedChild): Refactored.
5358
5359 2008-01-11  Marek Safar  <marek.safar@gmail.com>
5360
5361         * lambda.cs: Don't use a cast on unknown expression statement.
5362
5363 2008-01-10  Geoff Norton  <gnorton@novell.com>
5364
5365         * cs-tokenizer.cs: One more token to distinguish between method and lambda
5366         arguments
5367
5368 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5369
5370         * doc.cs: Report better /doc crash details.
5371         
5372 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5373
5374         A fix for bug #352536
5375         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
5376
5377 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5378
5379         A fix for bug #352287
5380         * ecore.cs, expression.cs: Do `this' access checking in all member access
5381         expressions.
5382         
5383 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5384
5385         * rootcontext.cs, driver.cs: Switch to linq mode by default.
5386         
5387         * report.cs: Reset message stacks.
5388         
5389 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5390
5391         * generic.cs (InferInPhases): Correctly calculate params position.
5392         
5393 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5394
5395         * cs-tokenizer.cs: No need to parse full string when parsing lambda
5396         arguments.
5397
5398 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5399
5400         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
5401         
5402         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
5403         
5404         * driver.cs: Updated --help option.
5405         
5406 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5407
5408         * generic.cs (InferParamsTypeArguments): Removed.
5409         (InferInPhases): Add params type inference.
5410         (LowerBoundInference): Fixed scoring mechanism.
5411         
5412         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
5413         
5414 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
5415
5416         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
5417         byte array for unsigned "baked" assemblies.
5418
5419 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
5420
5421         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
5422         array for assemblies that are not strongnamed.
5423
5424 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5425
5426         A fix for bug #351481
5427         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
5428         declaring type for nested generic types.
5429         
5430 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5431
5432         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
5433         instead of ToString.
5434         
5435 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5436
5437         A fix for bug #351047
5438         * expression.cs (Binary.ResolveOperator): Allow equality operators between
5439         null and structs only when equality and inequality operators are defined
5440         either as an user-operators or predefined operators.
5441         
5442 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5443
5444         A fix for bug #351047
5445         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
5446         
5447 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5448
5449         A fix for bug #351257
5450         * cs-tokenizer.cs: Advance line number for '\r' correctly.
5451         
5452 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5453
5454         A fix for bug #351157
5455         * class.cs (Using): Fixed yet another broken cloning.
5456         
5457         (Block): Put back more sensible default value for statements.
5458         
5459 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
5460
5461         * codegen.cs: Allow AssemblyVersion with only major version component.
5462         Fixes bug #351055.
5463
5464 2007-12-29  Marek Safar  <marek.safar@gmail.com>
5465
5466         A fix for bug #324654
5467         * class.cs: Use FullName property as member name.
5468
5469 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5470
5471         A fix for bug #342117
5472         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
5473         constructor constraint.
5474
5475 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5476
5477         A fix for bug #338273
5478         * class.cs (ProbertyBase): Access modifier checks are required for overrides
5479         only.
5480
5481 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5482
5483         A fix for bug #350839
5484         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
5485
5486 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
5487
5488         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
5489         GHOP:
5490         
5491         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
5492
5493         * statement.cs: Changed some Hashtables to use HybridDictionaries
5494         instead. It was observed that some HashTables only contained a few
5495         items in the vast majority of cases. Since HybridDictionary is
5496         more efficient on small sets (<10 elements), "known_variables"
5497         from class ExplicitBlock as well as "labels" and "constants " from
5498         class Block were changed to HybridDictionaries. 
5499
5500         Atsai results: (56216kb->54987kb)
5501
5502         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
5503
5504
5505 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
5506
5507         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
5508         GHOP:
5509         
5510         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
5511         
5512         * expression.cs: foreach loop to for loop, saved on allocation of
5513         enumerator (59333kb->59141kb)
5514
5515         * statement.cs. Changed foreach loops to for loops, saved on
5516         allocation of enumerator (59141kb->59006kb)
5517
5518         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
5519         when constructed with no specified capacity. This was causing a
5520         few ArrayLists to allocate more memory than they would potentially
5521         need in the Block class and MemberCache class. Setting the
5522         ArrayLists to construct with a capacity of 1 saves some
5523         memory. (56216kb->55585kb)
5524
5525 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5526
5527         A fix for bug #347189 (2nd issue)
5528         * expression.cs (MemberAccess): Nested type can be found in base non-generic
5529         type.
5530
5531 2007-12-27  Miguel de Icaza  <miguel@novell.com>
5532         
5533         * report.cs: Do not use colors if stdout and stderr are not a
5534         terminal.
5535
5536 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5537
5538         A fix for bug #346998
5539         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
5540         overloads.
5541
5542 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5543
5544         A fix for bug #343465
5545         * class.cs: Explicit method name for nested types uses dots only.
5546
5547 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5548
5549         A fix for bug #343707
5550         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
5551
5552 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5553
5554         * ecore.cs: Report type inference errors only when arguments count matches
5555         parameter count.
5556         
5557         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
5558         
5559         * expression.cs, report.cs: New warning.
5560         
5561         * typemanager.cs: Catch anonymous method type too.
5562
5563 2007-12-23  Marek Safar  <marek.safar@gmail.com>
5564
5565         A fix for bug #346379
5566         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
5567
5568 2007-12-23  Marek Safar  <marek.safar@gmail.com>
5569
5570         A fix for bug #347359
5571         * expression.cs (Invocation): Don't resolve already resolved expression.
5572
5573 2007-12-23  Marek Safar  <marek.safar@gmail.com>
5574
5575         A fix for bug #347189
5576         * class.cs (FixedField): Use non-dependent code only in the define phase.
5577
5578 2007-12-23  Marek Safar  <marek.safar@gmail.com>
5579
5580         A fix for bug #348076
5581         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
5582
5583 2007-12-22  Marek Safar  <marek.safar@gmail.com>
5584
5585         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
5586         discovered extension methods.
5587
5588 2007-12-22  Marek Safar  <marek.safar@gmail.com>
5589
5590         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
5591         method.
5592
5593 2007-12-21  Miguel de Icaza  <miguel@novell.com>
5594
5595         * report.cs (ErrorMessage): Add support for using colors on
5596         terminals that support it. 
5597
5598 2007-12-21  Marek Safar  <marek.safar@gmail.com>
5599
5600         * ecore.cs: Use information about expanded params for error reporting.
5601
5602 2007-12-21  Marek Safar  <marek.safar@gmail.com>
5603
5604         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
5605         and logic for params overloads.
5606         
5607 2007-12-15  Miguel de Icaza  <miguel@novell.com>
5608
5609         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
5610         as this is also created from the parser.  Fixes #349034
5611
5612 2007-12-12  Miguel de Icaza  <miguel@novell.com>
5613
5614         * statement.cs (Throw.CloneTo): it is valid to have empty
5615         expressions for throw. 
5616
5617 2007-12-03  Marek Safar  <marek.safar@gmail.com>
5618
5619         * cs-parser.jay: Set delegate constraint parsing region correctly.
5620
5621 2007-12-03  Marek Safar  <marek.safar@gmail.com>
5622
5623         A fix for bug #345467
5624         * typemanager.cs (IsEqual): Compare generic parameters position only.
5625         
5626 2007-11-28  Marek Safar  <marek.safar@gmail.com>
5627
5628         * expression.cs (BaseAccess): Type arguments can be null.
5629
5630 2007-11-27  Raja R Harinath  <harinath@gmail.com>
5631
5632         * statement.cs (Block.Resolve): Ensure flow-branching tree is
5633         consistent even when an error has occured.
5634         (Switch.Resolve): Likewise.
5635
5636 2007-11-22  Marek Safar  <marek.safar@gmail.com>
5637
5638         A fix for bug #334505
5639         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
5640         overrides.
5641         
5642 2007-11-22  Marek Safar  <marek.safar@gmail.com>
5643
5644         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
5645         refactorings required to resolve extension methods correctly when mixing
5646         generics and non-generics members.
5647         
5648 2007-11-20  Marek Safar  <marek.safar@gmail.com>
5649
5650         A fix for bug #342584
5651         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
5652         conversion.
5653         
5654 2007-11-19  Marek Safar  <marek.safar@gmail.com>
5655
5656         A fix for bug #342512
5657         * delegate.cs: Use delegate argument expression when is available. Don't
5658         emit virtual call when class is sealed.
5659         
5660 2007-11-16  Marek Safar  <marek.safar@gmail.com>
5661
5662         A fix for bug #325423
5663         * assign.cs (FieldInitializer): Use resolved expression for emit.
5664         
5665         * class.cs: Print less confusing error message.
5666         
5667 2007-11-16  Marek Safar  <marek.safar@gmail.com>
5668
5669         * cs-tokenizer.cs: Removed GMCS ifdefs.
5670         
5671         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
5672         mcs.
5673         
5674         * cs-parser.jay: Disabled nullable check.
5675         
5676         * generic-mcs: Copied more generic stuff.
5677                 
5678 2007-11-16  Marek Safar  <marek.safar@gmail.com>
5679
5680         * gcs-parser.jay: Merged to cs-parser.jay.
5681         
5682         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
5683         * *.csproj, *.sources: Updated to use only jay parser file.
5684
5685 2007-11-16  Marek Safar  <marek.safar@gmail.com>
5686
5687         * gcs-parser.jay: Added nullable and default expression feature checks.
5688         
5689 2007-11-16  Marek Safar  <marek.safar@gmail.com>
5690
5691         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
5692         it fixes many TODOs and hidden bugs.
5693         
5694         * expression: Removed duplicate error check.
5695
5696 2007-11-15  Marek Safar  <marek.safar@gmail.com>
5697
5698         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
5699         implicitly type local variable only when it is used in a declaration.
5700
5701 2007-11-15  Marek Safar  <marek.safar@gmail.com>
5702
5703         * attribute.cs: Use CS0612 for empty strings.
5704
5705 2007-11-14  Marek Safar  <marek.safar@gmail.com>
5706
5707         * lambda.cs, statement.cs: Contextual return may act as a statement.
5708
5709 2007-11-14  Marek Safar  <marek.safar@gmail.com>
5710
5711         A fix for a regression cause by #324222
5712         * class.cs: Don't report unused even when it implements an interface.
5713         
5714 2007-11-13  Marek Safar  <marek.safar@gmail.com>
5715
5716         A fix for bug #341205
5717         * ecore.cs, expression.cs: Method group expression cannot do static
5718         method access with an instance reference check before overloading takes
5719         a place.
5720         
5721 2007-11-13  Marek Safar  <marek.safar@gmail.com>
5722
5723         A fix for bug #325359
5724         * class.cs: Use predictable name for automatically generated property.
5725         
5726 2007-11-12  Marek Safar  <marek.safar@gmail.com>
5727
5728         A fix for bug #324996
5729         * expression.cs (Is): Handle case where D is nullable and T is not
5730         correctly.
5731         
5732         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
5733         
5734 2007-11-12  Marek Safar  <marek.safar@gmail.com>
5735
5736         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
5737         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
5738         Flush small error reporting changes.
5739         
5740 2007-11-09  Marek Safar  <marek.safar@gmail.com>
5741
5742         A fix for bug #324996
5743         * expression.cs: Rewrote Is expression implementation to work with
5744         generics, nullable types, anonymous method. A const result expression 
5745         uses existing infrastructure instead of custom not fully-featured one.
5746         
5747 2007-11-08  Marek Safar  <marek.safar@gmail.com>
5748
5749         A fix for bug #340202
5750         * class.cs: Consider generics for volatile field.
5751
5752 2007-11-08  Marek Safar  <marek.safar@gmail.com>
5753
5754         A fix for bug #335594
5755         * expression.cs: Use conversion rules when handling string addition.
5756         
5757 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5758
5759         A fix for bug #336651
5760         * expression.cs: Fixed a crash when probing is on.
5761         
5762 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5763
5764         A fix for bug #324242
5765         * covert.cs: Added a conversion from any nullable-type with an 
5766         underlying enum-type to the type System.Enum.
5767         
5768 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5769
5770         A fix for bug #324222
5771         * class.cs: Report all non-used event fields.
5772         
5773 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5774
5775         A fix for bug #325161
5776         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
5777         qualifier for generic types.
5778         
5779 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5780
5781         A fix for bug #322971
5782         * expression.cs, ecore.cs: Added intermediate result value check for
5783         indexers. 
5784         
5785 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5786
5787         A fix for bug #324754
5788         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
5789         when it was requested.
5790
5791 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5792
5793         A fix for bug #325101
5794         * expression.cs: Do type not value comparison for `is' expression.
5795
5796 2007-11-07  Marek Safar  <marek.safar@gmail.com>
5797
5798         A fix for bug #320236
5799         * convert.cs: Don't apply user conversion on underlying target type.
5800
5801 2007-11-06  Marek Safar  <marek.safar@gmail.com>
5802
5803         * expression.cs: Don't use unresolved expression for error reporting.
5804  
5805 2007-11-06  Marek Safar  <marek.safar@gmail.com>
5806
5807         A fix for bugs #337712, #324490
5808         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
5809         overloading resolution too.
5810         
5811         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
5812         the process consistent and more robust.
5813         
5814         * expression.cs, linq.cs, report.cs: Update.
5815
5816 2007-11-02  Marek Safar  <marek.safar@gmail.com>
5817
5818         A fix for bug #332909
5819         * attribute.cs: Resolve attributes in correct context using error
5820         handling procedure.
5821         
5822         * rootcontext.cs: Define Obsolete attribute members as core members.
5823         
5824 2007-11-02  Marek Safar  <marek.safar@gmail.com>
5825
5826         * statement.cs: Removed unused methods.
5827         
5828 2007-10-31  Wade Berrier  <wberrier@novell.com>
5829
5830         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
5831         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
5832         during 'make dist')
5833
5834 2007-10-31  Marek Safar  <marek.safar@gmail.com>
5835
5836         A fix for bug #338102
5837         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
5838         methods registered as non-generics.
5839         
5840 2007-10-31  Marek Safar  <marek.safar@gmail.com>
5841
5842         A fix for bugs #337712, #324490
5843         * delegate.cs: Delegate covariance and contravariance is not allowed for
5844         value types.
5845         
5846 2007-10-31  Marek Safar  <marek.safar@gmail.com>
5847
5848         A fix for bug #337719 
5849         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
5850         `from' keyword.
5851         
5852 2007-10-30  Marek Safar  <marek.safar@gmail.com>
5853  
5854         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
5855
5856 2007-10-29  Marek Safar  <marek.safar@gmail.com>
5857  
5858         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
5859         query expressions.
5860
5861 2007-10-29  Raja R Harinath  <rharinath@novell.com>
5862
5863         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
5864
5865 2007-10-29  Marek Safar  <marek.safar@gmail.com>
5866  
5867         A fix for bug #334652
5868         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
5869         extension methods when we have not found the best candidate in normal
5870         container.
5871
5872 2007-10-27  Marek Safar  <marek.safar@gmail.com>
5873
5874         * AssemblyInfo.cs: Keep up-to-date.
5875
5876 2007-10-27  Marek Safar  <marek.safar@gmail.com>
5877
5878         * Makefile: Fixed generics compiler name.
5879         
5880 2007-10-27  Marek Safar  <marek.safar@gmail.com>
5881
5882         * lambda.test: removed, lambda parsing is done differently.
5883         
5884         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
5885
5886 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
5887
5888         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
5889
5890 2007-10-27  Marek Safar  <marek.safar@gmail.com>
5891
5892         * Makefile, *.sources : All C# compilers are in mcs folder.
5893         
5894         * *.cs: Use existing 2_1 define for smcs.
5895
5896 2007-10-26  Marek Safar  <marek.safar@gmail.com>
5897
5898         A fix for bug #335847
5899         * assign.cs, expression.cs: Couple of changes to avoid creating a
5900         temporary variable for each object initializer assignment statement. It
5901         simplifies struct initialization too, otherwise two temporary variables
5902         would be required.
5903         Implemented optimization of redundant default element initializers.
5904         
5905 2007-10-25  Marek Safar  <marek.safar@gmail.com>
5906
5907         A fix for bug #336766
5908         * expression.cs (Class.CheckBase): Use generic name when method is
5909         generic.
5910         
5911 2007-10-25  Marek Safar  <marek.safar@gmail.com>
5912
5913         A fix for bug #334737
5914         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
5915         variable and not variable argument for prepared copies.
5916
5917 2007-10-24  Marek Safar  <marek.safar@gmail.com>
5918
5919         A fix for bug #325110
5920         * class.cs, expression.cs, attribute.cs: Use open generic method when
5921         checking conditional attribute.
5922         
5923 2007-10-24  Marek Safar  <marek.safar@gmail.com>
5924
5925         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
5926         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
5927         FeatureIsNotAvailable.
5928
5929 2007-10-24  Marek Safar  <marek.safar@gmail.com>
5930
5931         ** C# 3.0 Partial methods
5932         
5933         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
5934         methods support. Because of member cache issue with generics only
5935         non-generics partial methods are fully supported.
5936         
5937 2007-10-23  Marek Safar  <marek.safar@gmail.com>
5938         
5939         * class.cs, decl.cs: Rewrote member overloads check to cope with 
5940         generics and to use member cache for member checking. It also improves
5941         performance and fixes remaining overloads issues.
5942         
5943 2007-10-20  Marek Safar  <marek.safar@gmail.com>
5944         
5945         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
5946         roottypes.cs, typemanager.cs:
5947                 
5948         A member cache creation logic changed to add members immediately and
5949         not rely on fallback. The member cache is now only prefered way
5950         how to access and find type declaration members. It saves 5 MB of memory
5951         during MWF compilation and makes code ready for more optimizations and
5952         clean-ups, it's also a pre-requirement for partial methods.
5953         
5954 2007-10-18  Raja R Harinath  <harinath@gmail.com>
5955
5956         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
5957         handling for generic parameters.
5958
5959 2007-10-15  Marek Safar  <marek.safar@gmail.com>
5960         
5961         * class.cs (FixedField): Removed redundant volatile check.
5962         
5963 2007-10-15  Marek Safar  <marek.safar@gmail.com>
5964         
5965         * class.cs, decl.cs: Fixed overload members verification to do only one
5966         check per possible collision.
5967         
5968 2007-10-13  Marek Safar  <marek.safar@gmail.com>
5969         
5970         A fix for bug #325478
5971         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
5972         and create only one disposable flags container.
5973         
5974 2007-10-12  Marek Safar  <marek.safar@gmail.com>
5975         
5976         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
5977         * statement.cs (Fixed): Fixed variables cloning.
5978         
5979 2007-10-12  Marek Safar  <marek.safar@gmail.com>
5980         
5981         A fix for bug #333342
5982         * class.cs (EventField): Don't mark value type event as synchronized. 
5983         
5984 2007-10-12  Marek Safar  <marek.safar@gmail.com>
5985         
5986         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
5987         inference to identify best candidate method correctly.
5988         (ProperyExpr): A range variable is read only and cannot be modified.
5989         
5990 2007-10-11  Marek Safar  <marek.safar@gmail.com>
5991         
5992         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
5993         logic to identify best candidate method correctly.
5994         
5995 2007-10-11  Marek Safar  <marek.safar@gmail.com>
5996         
5997         * location.cs (Equals, GetHashCode): Removed.
5998         
5999 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6000         
6001         * report.cs: Implemented message recorder. It is used mainly for lambda
6002         expressions to capture otherwise swallowed error messages.
6003         
6004         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6005
6006         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6007         and not at the top.
6008         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6009                 
6010         * expression.cs (MemberAccess): Always report lookup failure.
6011         
6012         * location.cs: Implemented Equals, GetHashCode.
6013         
6014         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6015         
6016 2007-10-10  Jb Evain  <jbevain@novell.com>
6017
6018         * codegen.cs: re-enable assembly version check.
6019
6020 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6021         
6022         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6023         checks.
6024         
6025         * namespace.cs (UsingAlias): Do correct version check.
6026         
6027 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6028         
6029         * expresison.cs, ecore.cs: Issue extension method error message when
6030         appropriate.
6031         
6032         * rootcontext.cs: Added ISO_2 compiler mode option.
6033
6034 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6035         
6036         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6037          message.
6038         
6039 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6040         
6041         * attribute.cs (GetString, GetBoolean): Work with both literal and
6042         constant.
6043         
6044         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6045         Moved method overload specific methods to MethodGroupExpr.
6046         
6047         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6048         it should be less memory consuming.
6049         
6050 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6051
6052         * codegen.cs: remove the assembly version check until the buildbot is
6053         fixed.
6054
6055 2007-10-07  Jb Evain  <jbevain@novell.com>
6056
6057         * attribute.cs (Attribute.GetString): if the value
6058         expression is a StringConstant, return its string value.
6059
6060 2007-10-07  Jb Evain  <jbevain@novell.com>
6061
6062         * typemanager.cs: add `assembly_version_attribute_type`.
6063         * codegen.cs: on attribute emission, check that the
6064         AssemblyVersionAttribute doesn't overflow.
6065
6066 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6067         
6068         A fix for bug #324677
6069         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6070         parent container of a scope container with currently resolved one. 
6071         
6072 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6073         
6074         A fix for bug #325534
6075         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6076         only.
6077         
6078 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6079         
6080         A fix for bug #327504
6081         * class.cs (Operator.Define): Refactored implicit and explicit user
6082         operator conversion rules.
6083         
6084 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6085         
6086         A fix for bug #327520
6087         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6088         
6089 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6090         
6091         A fix for bug #328022
6092         * class.cs (MethodData.Define): Use correct method to check whether
6093         a method implementents an accessor.
6094         
6095 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6096         
6097         A fix for bug #330069
6098         * statement.cs (Fixed.Resolve): Read the first array element only when
6099         an array is instantiated. 
6100         
6101 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6102         
6103         * expression.cs, assign.cs, generics.cs: Print correct operator when
6104         compound assignment is used.
6105         
6106 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6107         
6108         A fix for bug #325841
6109         * expression.cs (ArrayAccess): Use full argument cloning only for
6110         string compound concatenation.
6111         
6112 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6113         
6114         A fix for bug #328774
6115         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6116         assignment.
6117         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6118         assignment.
6119
6120 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6121
6122         Fix #328490
6123         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6124         Event accessibility checks here.  Remove some bogus code that
6125         accidently made GenericMethods work.
6126         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6127
6128 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6129         
6130         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6131         
6132         * statement.cs (Block): Refactored AddVariable to allow error handling
6133         customization.
6134         
6135         * generic.cs: New stub.
6136         
6137 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6138         
6139         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6140         flag.
6141         
6142 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6143
6144         * class.cs: Use partial container to record whether any partial part
6145         contains static field initializer and therefore default contructor has
6146         to be defined.
6147         
6148 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6149
6150         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6151         mono-list when only one of two partial parts has defined accessibility
6152         modifier.
6153         
6154 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6155
6156         A fix for bug #82845
6157         
6158         * class.cs (TypeContainer): Set correct resolve context for all field
6159         initializers.
6160         
6161 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6162
6163         * assign.cs: Fixed a crash when field is resolved twice with an error.
6164         
6165         * codegen.cs: Changed InFieldInitializer to be flag.
6166         
6167         * anonymous.cs, ecore.cs, expression.cs: Update after
6168         IsInFieldInitializer rename.
6169         
6170         * const.cs: Removed unused parameter.
6171         
6172         * class.cs: Changed the way how we resolve and emit field initializers.
6173         The field initilizers have to have access to contructor block to emit
6174         compiler generated code.
6175
6176 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6177
6178         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
6179         generics use TypeContainer instead.
6180         
6181 2007-09-12  Marek Safar  <marek.safar@gmail.com>
6182         
6183         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
6184
6185         * lambda.cs (ResolveParameters): Use more powerful
6186         InflateGenericArgument.
6187         
6188         * parameters.cs: Better exception message.
6189                 
6190 2007-09-10  Marek Safar  <marek.safar@gmail.com>
6191
6192         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
6193         correct expression block type. 
6194         
6195         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
6196         
6197         * expression.cs (Invocation): Extracted method group resolve to
6198         DoResolveOverload.
6199         
6200 2007-09-07  Marek Safar  <marek.safar@gmail.com>
6201
6202         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
6203         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
6204         
6205         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
6206         generic extension methods.
6207
6208 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6209
6210         A fix for bug #82676 (Do I get it right now?)
6211         * convert.cs (Binary.ResolveOperator): An interface is converted to the
6212         object before a standard conversion is applied.
6213         
6214 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6215
6216         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
6217         #82676.
6218         
6219 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6220
6221         A fix for bug #82676
6222         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
6223         non-generic interface types.
6224         
6225 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6226
6227         A fix for bug #82690
6228         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
6229         
6230 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6231
6232         A fix for bug #82571
6233         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
6234         modifier for container based methods.
6235         
6236 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6237
6238         A fix for bug #82676
6239         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
6240         any interface-type T means to any of interface type T.
6241
6242 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6243
6244         * namespace.cs: We have 2 versions of System.Core assembly.
6245
6246 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6247
6248         A fix for bug #82652
6249         * class.cs (Class.GetClassBases): Compare types and not expressions.
6250
6251 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6252
6253         A fix for bug #82620
6254         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
6255         actually never worked before.
6256         (IndexerAccess): Emit prepared arguments before they are modified.
6257         
6258 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6259
6260         A fix for bug #82563
6261         * assign.cs: Revert wrong fix.
6262         
6263         * expression.cs (VariableReference.EmitAssign): Handle ref reference
6264         correctly.
6265         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
6266         Instead of ldelema/stdind we have to use temporary variables to handle
6267         cases like String.Concat (params string[]).
6268         
6269 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6270
6271         * class.cs: EmitAttributes to Emit rename.
6272         
6273         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
6274         null.
6275         (MemberCore.HasClsCompliantAttribute): Don't depend on 
6276         GetClsCompliantAttributeValue execution.
6277         
6278 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6279
6280         * anonymous.cs: Use shorter type prefix.
6281         
6282         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
6283         when exist.
6284         
6285         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
6286         variables when probing is on.
6287         
6288         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
6289         unresolved variables.
6290         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
6291         handle transparent identifiers.
6292         
6293 2007-08-26  Marek Safar  <marek.safar@gmail.com>
6294
6295         * attribute.cs (IsClsCompliant): Add nullable types test.
6296         
6297 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
6298
6299         * doc.cs : catch other types of exception than XmlException to
6300           report CS1570. Fixed bug #82565.
6301
6302 2007-08-23  Marek Safar  <marek.safar@gmail.com>
6303
6304         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
6305         The number of delegate parameters has to match.
6306         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
6307         arrays.
6308
6309 2007-08-21  Marek Safar  <marek.safar@gmail.com>
6310
6311         * anonymous.cs (AnonymousMethod): Generate private anonymous method
6312         to fix problem with private arguments.
6313
6314 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6315
6316         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
6317         
6318         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
6319         
6320         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
6321         empty. Add cloning suport.
6322         
6323         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
6324
6325 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6326
6327         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
6328         to create EmptyCast. It handles EmptyConstantCast specialization for
6329         constants.
6330         
6331 2007-08-18  Marek Safar  <marek.safar@gmail.com>
6332
6333         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
6334         (EmitArrayArgument): One routine for array arguments.
6335         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
6336         
6337 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6338
6339         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
6340
6341 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6342
6343         * anonymous.cs: MemberLookupFinal update.
6344
6345         * class.cs (ConstructorInitializer): Is expression based.
6346         
6347         * delegate.cs: MethodGroupExpr update.
6348         
6349         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
6350         messages.
6351         (Error_MemberLookupFailed): Customizable error override.
6352         (MethodGroupExpr): Keep queried type for later usage.
6353         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
6354         resolve.
6355         
6356         * expression.cs: Error_MemberLookupFailed refactoring.
6357         (New.DoResolve): Resolve as much as possible.
6358         (ElementInitializer.Error_MemberLookupFailed): Object initializer
6359         customization for invalid member types.
6360
6361         * statement.cs: MethodGroupExpr update.
6362         
6363 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6364
6365         * modifier.cs (Check): Check all modifiers and not only accessibility
6366         ones.
6367
6368 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6369
6370         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
6371         type and not an expression.
6372
6373 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6374
6375         * statement.cs (Catch.Clone): Type and variable can be null.
6376
6377 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6378
6379         A fix for bug #81979
6380         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
6381         I am really not sure whether this is the best fix.
6382         
6383         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
6384         only once.
6385         
6386 2007-08-14  Marek Safar  <marek.safar@gmail.com>
6387
6388         ** C# 3.0 Object and collection initializers (major re-write)
6389         
6390         * assign.cs (DoResolve): Initializers are not assign related.
6391         
6392         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
6393         used during collection or object initialization.
6394         
6395         * expression.cs (Error_InvalidArguments): Add initializers specific
6396         messages. More will come later because it requires some general
6397         refactoring.
6398         (New.DoResolve): Better error handling for unsafe types.
6399         (EmptyExpressionStatement): New class.
6400         (ElementInitializer): An object initializer expression.
6401         (CollectionElementInitializer): A collection initializer expression.
6402         (CollectionOrObjectInitializers): A block of object or collection
6403         initializers.
6404         (NewInitialize): New expression with element/object initializers.
6405         
6406         * statement.cs: Reverted object/collection initializer hacks.
6407         
6408         * typemanager.cs (CSharpName): Filter __arglist type.
6409         
6410 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6411
6412         ** C# 3.0 Anonymous Types (update to the latest standard)
6413         
6414         * expression.cs (Binary.ResolveOperator): Threat all null based types
6415         same.
6416         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
6417         (AnonymousTypeParameter): Updated.
6418         
6419         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
6420         (AnonymousTypeClass): New anonymous type container.
6421         
6422         * class.cs (AddField): Return operation result.
6423         
6424         * generic.cs: Another empty TypeArguments overload.
6425         
6426         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
6427         are stored at top of normal hierarchy.
6428         
6429         * typemanager.cs (CSharpName): Filter anonymous types.
6430         
6431 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6432
6433         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
6434         as single Concat call. How could we miss that :-(
6435         
6436 2007-08-08  Marek Safar  <marek.safar@gmail.com>
6437
6438         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
6439         
6440 2007-08-07  Miguel de Icaza  <miguel@novell.com>
6441
6442         * expression.cs: Fix the previous commit, the creation of the
6443         arguments array list needs also to be conditional on the arguments
6444         not being null.
6445
6446         * class.cs: Add a little bit of help to help narrow down problems.
6447
6448         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
6449         not try to copy in that case. 
6450
6451         * driver.cs: When building SMCS, include a new different set of
6452         default assemblies here.   Do this here so we can control whether
6453         to include the default assemblies with /noconfig.
6454
6455 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6456
6457         A fix for bug #81979
6458         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
6459         only.
6460
6461 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6462
6463         A fix for bug #82300
6464
6465         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
6466         we are in probing scope.
6467
6468 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6469
6470         A fix for bug #82301
6471
6472         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
6473         (Statement.CloneTo): Clone and not map children blocks.
6474
6475 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6476
6477         A fix for bug #82299
6478
6479         * expression.cs (LocalVariableReference.CloneTo): Remap local info
6480         variable too.
6481         
6482         * statement.cs (Statement.CloneTo): Clone variables before statements
6483         to allow remaping of local variables.
6484
6485 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6486
6487         A fix for bug #82296
6488
6489         * anonymous.cs,
6490         * report.cs: Log crash details for future clone problems.
6491         
6492         * statement.cs (Return.Clone): Don't clone non-existent expression.
6493
6494 2007-08-03  Raja R Harinath  <harinath@gmail.com>
6495
6496         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
6497         (Class.AddBasesForPart): Move CS0537 check here from ...
6498         * cs-parser.jay (class_declaration): ... here.  Move calling of
6499         'AddBasesForPart' to ...
6500         (class_bases): ... here.
6501         (struct_declaration, interface_declaration): Update to changes.
6502
6503 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6504
6505         A fix for bug #81923
6506
6507         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
6508         conversion is allowed.
6509
6510 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6511
6512         A fix for bug #81564
6513
6514         * ecore.cs (EventExpr): Add IsBase handling.
6515
6516         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
6517         too.    
6518         
6519 2007-08-02  Raja R Harinath  <harinath@gmail.com>
6520
6521         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
6522         * cs-parser.jay: Some whitespace cleanups.
6523         (current_delegate): New.
6524         (type_name): New.
6525         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
6526         a dummy code block, and use 'type_name' instead of 'member_name'.
6527         (interface_declaration, class_declaration): Likewise.
6528         (delegate_declaration): Likewise.  Rearrange slightly and use
6529         'current_delegate'.
6530         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
6531         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
6532
6533 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6534
6535         A fix for bug #82039
6536
6537         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
6538         available.
6539
6540         * typemanager.cs (CSharpName): Split to string overload.
6541
6542 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6543
6544         * expression.cs,
6545         * report.cs: Updated warning CS0472.
6546
6547 2007-08-01  Marek Safar  <marek.safar@gmail.com>
6548
6549         A fix for bug #82181
6550         * cs-parser.jay,
6551         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
6552
6553 2007-08-01  Marek Safar  <marek.safar@gmail.com>
6554
6555         A fix for bug #82277
6556         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
6557
6558 2007-08-01  Marek Safar  <marek.safar@gmail.com>
6559
6560         ** C# 3.0 Type Inference (major bits are working)
6561         
6562         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
6563         (.ImplicitStandardConversionExists): Uses compatible.
6564         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
6565         (.InferReturnType): New method.
6566         (.Compatible): Refactored.
6567         (.ResolveParameters): Uses factory to create resolved parameters.
6568         (.CompatibleMethod): Add probing mode support.
6569         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
6570         clearly distinguish between 2 different operations.
6571         (LambdaMethod): Moved to lambda.cs.
6572         (AnonymousMethod): Removed unused fields and methods.
6573         (AnonymousDelegate): Simplified.
6574         
6575         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
6576         
6577         * convert. cs (ImplicitConversionStandard): Compatible works differently.
6578         
6579         * delegate.cs (Delegate): New mehods to reduce code duplication.
6580         (.GetConstructor): New method.
6581         (.GetInvokeMethod): New method.
6582         (DelegateCreation): Updated.
6583         
6584         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
6585         does not exist.
6586         (OverloadResolve): Made probing little bit faster.
6587         
6588         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
6589         when probing is on.
6590         
6591         * generic.cs (TypeInferenceContext): Dummy implementation.
6592         
6593         * iterators.cs: Updated after Resolve/Define rename.
6594         
6595         * lambda.cs (LambdaExpression)
6596         (.ResolveParameters): Handles both type of arguments and type inference too.
6597         
6598         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
6599         (InflateTypes): Updated.
6600         
6601         * support.cs (InflateTypes): Changed signature and updated.
6602         
6603         * typemanager.cs (LookupMemberCache): Better dynamic type check.
6604         (MemberLookup_FindMembers): More MS tricks.
6605         (GetParameterData): Ditto.
6606         (GetDelegateParameters): Uses quick path for dynamic types.
6607         
6608 2007-08-01  Marek Safar  <marek.safar@gmail.com>
6609
6610         * class.cs (MethodData.Define): EmitContext is required for generic stuff
6611         only.
6612
6613 2007-07-31  Marek Safar  <marek.safar@gmail.com>
6614
6615         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
6616         syntax.
6617         
6618 2007-07-26  Jb Evain  <jbevain@novell.com>
6619
6620         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
6621         which takes a boolean 'report_errors', similar to the GetMethod.
6622         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
6623         in .net 2.1, do not report errors here.
6624
6625         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
6626         System.Runtime.CompilerServices.RequiredAttributeAttribute and
6627         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
6628         in .net 2.1.
6629
6630         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
6631         of the type InternalsVisibleToAttribute before the first call
6632         to CoreLookupType which is allowed to fail (third boolean parameter
6633         to true). Because, during the resolution for a type that is not
6634         immediately found, we try to check if the type is not defined in
6635         a friend assembly, and to do so, we need the
6636         InternalVisibleToAttribute.
6637
6638 2007-07-23  Miguel de Icaza  <miguel@novell.com>
6639
6640         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
6641         feature that allows structs to be compared against null and inline
6642         the result as true or false.
6643
6644         Notice that the same code is not permitted inside a generic block
6645         of code that would do:
6646
6647         class Foo<T> where T : struct {
6648             bool Eval (T x)
6649             {
6650                  return x == null;
6651             }
6652         }
6653
6654         It is only allowed if the type of T is not bound (no where
6655         clause).   In my opinion, this CSC 2 behavior is broken but people
6656         seem to be using it (IronRuby does, a few bug reports on bugzilla
6657         have it and some people have complained about it).
6658
6659         All of the users that depend on this behavior have code that is
6660         very likely broken. 
6661         
6662         * report.cs (Warning, Error): make these take object arguments,
6663         not strings, as that allows us to take advantage of Format.
6664
6665 2007-07-20  William Holmes  <billholmes54@gmail.com>
6666
6667         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
6668           Left member variable for the Count.
6669         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
6670           MemberName.CountTypeArguments to avoid a NRE. 
6671
6672         This code is contributed under the MIT X11 license
6673
6674 2007-07-18  Marek Safar  <marek.safar@gmail.com>
6675
6676         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
6677
6678 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
6679
6680         * doc.cs : generic method arguments are written as ``x while generic
6681           type arguments are `x. Combined with the previous change, fixed bug
6682           #79706.
6683
6684 2007-07-18  Raja R Harinath  <rharinath@novell.com>
6685
6686         Fix #82120
6687         * expression.cs (Binary.ResolveOperator): When converting
6688         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
6689
6690 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
6691
6692         * doc.cs : when T: or whatever x: is specified, it does not really
6693           check the doc comment's syntax correctness. Fixed bug #82006.
6694
6695 2007-07-18  Marek Safar  <marek.safar@gmail.com>
6696
6697         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
6698         LambdaExpression better.
6699         
6700         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
6701         
6702         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
6703         
6704         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
6705         as it can be generated.
6706         
6707         * expression.cs (Invocation.Error_InvalidArguments): Show correct
6708         modifiers.
6709         
6710         * lambda.cs (LambdaExpression): Refactored to share same code with
6711         AnonymousMethodExpression.
6712         
6713 2007-07-17  Marek Safar  <marek.safar@gmail.com>
6714
6715         * anonymous.cs (MakeName): Include host name for easier debugging.
6716         (LambdaMethod): New class for lambda spcecific stuff.
6717         
6718         * attribute.cs: Set EmitContext return type.
6719
6720         * class.cs: Set EmitContext return type.
6721         
6722         * codegen.cs (EmitContext): Return type cannot be null to stop messing
6723         with null/void meaning.
6724         
6725         * iterators.cs (ContainerType): Implemented.
6726         
6727         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
6728         
6729         * statement.cs (Return): Updated to lambda expressions.
6730         (Block.CloneTo): Parent can be null.
6731                 
6732 2007-07-13  Marek Safar  <marek.safar@gmail.com>
6733
6734         A fix for bug #81917
6735         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
6736         
6737         * class.cs (FixedField): Check whether field is in unsafe scope.
6738
6739         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
6740         (FieldExpr.Emit): Fixed buffers cannot be volatile.
6741
6742         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
6743         FieldExpr.
6744         
6745         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
6746                 
6747 2007-07-13  Marek Safar  <marek.safar@gmail.com>
6748
6749         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
6750         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
6751         from Report class.
6752
6753 2007-07-13  Marek Safar  <marek.safar@gmail.com>
6754
6755         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
6756         
6757 2007-07-13  Marek Safar  <marek.safar@gmail.com>
6758
6759         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
6760         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
6761         
6762         * codegen.cs(EmitContext): Add ProbingMode flag.
6763         
6764         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
6765         
6766         * driver.cs: For now set both warning values.
6767         
6768         * ecore.cs (SimpleName): Name is readonly.
6769         (MethodGroup.OverloadResolve): One quick path for probing.
6770         
6771         * expression.cs (Unary): Set Oper r/o.
6772         (Binary): Set Oper r/o.
6773         (ParameterReference): Set few instance variables as r/o.
6774         (ParameterReference.DoResolveBase): Don't capture aruments when 
6775         the probing is on.
6776         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
6777         (Arglist): arguments are private.
6778         (SizeOf): type is private and r/o.
6779         (MemberAccess): arguments are private.
6780
6781         * report.cs: Enhanced reporting on/off capabilities.
6782         
6783         * lambda.cs: Uses ec.IsInProbingMode.
6784         (ContextualReturn): Derives from return.
6785         
6786         * rootcontext.cs: For now set both warning values.
6787         
6788         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
6789         copy if one exists.
6790         (Return.Resolve): Don't die immediately.
6791         (Block.Resolve): Speed-up probing.
6792         (Block.CloneTo): Clone only child blocks.
6793
6794 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6795
6796         * iterators.cs: reverted Miguel's latest change (r81925) as it
6797         breaks the build in System.
6798
6799 2007-07-13  Miguel de Icaza  <miguel@novell.com>
6800
6801         * iterators.cs (Yield.CheckContext): Check for the iterator type
6802         also here as we can call into Yield even in codepaths that are not
6803         directly checked by
6804         (MethodOrOperator is the only path that was checked).
6805
6806         In addition to the standard check, use a more specific check for
6807         constructors to report a more verbose error. 
6808
6809 2007-07-12  Miguel de Icaza  <miguel@novell.com>
6810
6811         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
6812         report the warning and continue 
6813
6814         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
6815         values on the stack on the call to Emit.   Use EmitStatement if
6816         possible, or using Emit + Pop if not possible.   Fixes #82064
6817
6818 2007-07-12  Raja R Harinath  <rharinath@novell.com>
6819
6820         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
6821         avoid try...finally in some cases.
6822
6823 2007-07-10  Marek Safar  <marek.safar@gmail.com>
6824
6825         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
6826         
6827         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
6828         instead of method. Re-use standard error handling.
6829         (ConstructorInitializer.Emit): Simplified.
6830         
6831         * delegate.cs: Updated after Invocation.EmitCall change.
6832         
6833         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
6834         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
6835         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
6836         method and don't permanently changing input arguments.
6837         (MethodGroupExpr): Introduced resolved best_candidate, when method group
6838         is resolved it has one of the candidates is the best one which is later
6839         used to emit. Removed a few unused method.
6840         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
6841
6842         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
6843         (Binary.ResolveOperator): Ditto.
6844         (ConditionalLogicalOperator.DoResolve): Ditto.
6845         (Invocation): Uses method group.
6846         (Invocation.DoResolve): Simplified.
6847         (Invocation.EmitCall): Removed useless is_static.
6848         (Invocation.Emit): Delegate to method group.
6849         (Invocation.EmitStatement): Simplified.
6850         (New): Uses method group.
6851         (MemberAccess.DoResolve): Don't destroy original expression.
6852         
6853         * statement.cs (ForEach.Resolve): Use null for no method arguments.
6854         
6855 2007-07-04  Marek Safar  <marek.safar@gmail.com>
6856
6857         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
6858         
6859         * anonymous.cs,
6860         * lambda.cs: Add custom error message type.
6861
6862 2007-07-03  Marek Safar  <marek.safar@gmail.com>
6863
6864         * lambda.cs: Simplified little bit.
6865         
6866         * parameter.cs: Introduced ImplicitLambdaParameter.
6867         (Parameters.CreateFullyResolved): New factory instead of ctor.
6868         
6869         * anonymous.cs,
6870         * class.cs,
6871         * delegate.cs: Updated parameter creation.
6872         
6873 2007-07-03  Marek Safar  <marek.safar@gmail.com>
6874
6875         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
6876         arguments.
6877         
6878         * generic.cs: Synchronized with gmcs.
6879         
6880 2007-07-03  Marek Safar  <marek.safar@gmail.com>
6881
6882         * class.cs (Indexer): Check return type as soon as possible.
6883         
6884         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
6885         members too.
6886         
6887         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
6888         
6889         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
6890         
6891         * parameter.cs (Parameter): Use expression type when it is available.
6892         
6893         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
6894         method modifier for the first parameter only.
6895
6896 2007-06-24  Marek Safar  <marek.safar@gmail.com>
6897
6898         A fix for bug #81938
6899         * typemanager.cs (ChangeType): Fixed couple of char conversions.
6900         
6901         * constant.cs: Tide up an exception message.
6902
6903 2007-06-22  Marek Safar  <marek.safar@gmail.com>
6904
6905         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
6906         an uninitialized variable is used.
6907         
6908         * expression.cs (LocalVariableReference.DoResolve): Ditto.
6909
6910 2007-06-22  Marek Safar  <marek.safar@gmail.com>
6911
6912         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
6913         not found error handling.
6914
6915         * expression.cs (ArrayCreation): Removed redundant fields and little bit
6916         simplified.
6917         (ArrayCreation.ResolveArrayElement): To be ready to customization.
6918         (ArrayCreation.DoResolve): Simplified.
6919         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
6920         its own resolve process.
6921         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
6922
6923 2007-06-20  Marek Safar  <marek.safar@gmail.com>
6924
6925         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
6926         more error details.
6927         
6928 2007-06-20  Marek Safar  <marek.safar@gmail.com>
6929
6930         * cs-tokenizer.cs: Removed var related stuff.
6931         
6932         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
6933         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
6934         a type and a keyword at same time.
6935         
6936         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
6937         matches to "var".
6938         
6939         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
6940         implicitly typed arrays, more changes will follow.
6941         
6942         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
6943         
6944 2007-06-19  Marek Safar  <marek.safar@gmail.com>
6945
6946         * ecore.cs (VarExpr): Removed Handled field.
6947         
6948         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
6949         build-in assign functionality.
6950         (ForEach.Resolve): Removed all implicitly typed local variable code and
6951         simplified.
6952         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
6953         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
6954
6955 2007-06-18  Marek Safar  <marek.safar@gmail.com>
6956
6957         * assign.cs: Removed implicitly typed local variable check.
6958         
6959         * expression.cs (LocalVariableReference.DoResolve): Add check for self
6960         referencing implicitly typed local variable.
6961         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
6962         variable here.
6963         
6964         * statement.cs (Fixed): Removed unsupported implicitly typed local
6965         variable code.
6966
6967 2007-06-15  Marek Safar  <marek.safar@gmail.com>
6968
6969         * decl.cs (MemberName): Moved all Unbound stuff to parser.
6970
6971 2007-06-14  Marek Safar  <marek.safar@gmail.com>
6972
6973         A fix for bugs #81855 and #76274
6974         * attribute.cs (AttachTo): Always set owner for global attributes to
6975         prefined owner.
6976         
6977         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
6978         usefull too.
6979         
6980         * cs-parser.jay: Assembly and module attributes must precede all other
6981         elements except using clauses and extern alias declarations.
6982
6983 2007-06-13  Marek Safar  <marek.safar@gmail.com>
6984
6985         A fix for bug #81748
6986         * cs-tokenizer.cs,
6987         * expression.cs: More checks for non ISO-1 features.
6988
6989 2007-06-12  Marek Safar  <marek.safar@gmail.com>
6990
6991         A fix for bug #81807
6992         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
6993         present inside switch statement and it is required by nullable check.
6994
6995 2007-06-12  Marek Safar  <marek.safar@gmail.com>
6996
6997         A fix for bug #81840
6998         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
6999         when type matching fails.
7000         
7001         * namespace.cs: Tiny error message change.
7002
7003 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7004
7005         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7006         reporting. Added automatic property check.
7007         
7008         * class.cs: Updated after CheckAbstractAndExtern relocation.
7009         (AEventPropertyAccessor.GetSignatureForError): Customized.
7010         
7011 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7012
7013         * class.cs (DefineBaseTypes): Base type can be undefined.
7014         
7015         * ecore.cs (TypeLookup): Minor refactoring.
7016         (DoResolveAsTypeStep): Removed redundant check.
7017
7018         * namespace.cs (Lookup): Removed redundant check.
7019                 
7020         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7021         ResolveAsTypeTerminal step.
7022         (BootstrapCorlib_*): Simplified.
7023         (PopulateCoreType): Core types can be now external.
7024
7025 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7026
7027         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7028          verification only.
7029          (InferTypeArguments): Infers anonymous expression type arguments.
7030          (Compatible): Split to Compatible and InferTypeArguments. 
7031         
7032         * lambda.cs: Updated.
7033
7034 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7035
7036         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7037
7038 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7039
7040         Fix #80477, cs0135-2.cs, cs0135-3.cs
7041         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7042         names to the "known" variables list.
7043         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7044         parameter names are also "known".
7045         (Block.CheckError136): Remove.
7046         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7047         null.
7048
7049 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7050
7051         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7052
7053 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7054
7055         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7056         internal error not an user error.
7057          
7058         * expression.cs (IsApplicable): Refactored to make debugging easier.
7059
7060         * support.cs: More tricks for non-mono runtimes.
7061         
7062         * typemanager.cs (CoreLookupType): Made public.
7063         (InitSystemCore): All linq specific stuff moved to linq.cs
7064
7065 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7066
7067         * typemanager.cs (CSharpSignature): One more missing build-in types
7068         replacement.
7069         More tricks for non-mono runtime.
7070
7071 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7072
7073         * statement.cs (Block.CheckError136_InParents): Remove.
7074         (Block.AddVariable): Use GetParameterInfo instead.
7075         (ToplevelBlock.ProcessArguments): Likewise.
7076
7077 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7078
7079         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7080         information too.
7081         (ToplevelBlock.GetParameterInfo): Split out of ...
7082         (ToplevelBlock.GetParameterRefernce): ... this.
7083         (ToplevelBlock.ParameterMap): Remove.
7084         * expression.cs (ParameterReference): Update to use
7085         ToplevelParameterInfo.
7086
7087         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7088         regression.
7089
7090         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7091         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7092
7093         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7094         (ToplevelBlock.ProcessParameters) ... here.
7095         (ToplevelBlock..ctor): Invoke it.
7096
7097         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7098         new parameters.
7099
7100         * statement.cs (IKnownVariable): New interface.
7101         (LocalInfo): Implement it.
7102         (ToplevelParameterInfo): New class.
7103         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7104         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7105         GetKnownVariableInfo.
7106
7107 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7108
7109         Partly speed up CS0136 error checks.
7110         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7111         'recurse' parameter.
7112         (Block.DoCheckError136): Only check errors in parameters.  Move
7113         local variable checks ...
7114         (Block.AddVariable): ... here, and ...
7115         (ToplevelBlock.ResolveMeta): ... here.
7116
7117 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7118
7119         * statement.cs (Block.IsChildOf): Remove.
7120
7121         * statement.cs (Statement.Clone): Move special case code ...
7122         (Block.CloneTo): ... here.
7123
7124 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7125
7126         * statement.cs (ToplevelBlock.container): Remove field.  It's
7127         redundant with 'Parent'.
7128         (ToplevelBlock.ContainerBlock): Remove accessor.
7129         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7130         child with parent here, ...
7131         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7132         current_block.
7133         (start_anonymous): Don't save current_block.
7134         (top_current_block): Remove.
7135
7136         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7137         (Block.Resolve): Update to changes.
7138         (Block..ctor): Move setting of "correct" 'Toplevel'
7139         and 'Explicit' fields to ...
7140         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7141
7142 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7143
7144         Kill Block.Implicit
7145         * statement.cs (Block.Implicit): Remove.
7146         (Block): Update to changes.
7147         * flowanalysis.cs: Likewise.
7148
7149         Mildly speed up CheckInvariantMeaningInBlock
7150         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7151         Recursively call AddKnownVariable to all enclosing blocks.
7152         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7153         Remove recursive calls.
7154         (Block): Update to changes.
7155
7156         New ExplicitBlock invariants
7157         * statement.cs (Block.Explicit): New field.  It points to the
7158         immediately enclosing non-implicit block.
7159         (Block..ctor): Maintain the invariant.
7160         * cs-parser.jay: Take advantage of invariant.
7161
7162         Introduce ExplicitBlock
7163         * statement.cs (ExplicitBlock): New.
7164         (ToplevelBlock): Derive from it.
7165         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
7166         sense of flag.
7167         (Block.Implicit): Update to changes.
7168         * cs-parser.jay: Update to changes.
7169
7170         Remove unused field
7171         * codegen.cs (EmitContext.IsLastStatement): Remove.
7172         * statement.cs (Block.DoEmit): Update to changes.
7173
7174 2007-05-25  Raja R Harinath  <rharinath@novell.com>
7175
7176         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
7177         modifying current_block directly.
7178
7179 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
7180         
7181         * class.cs: Implemented automatic properties (C# 3.0)
7182           Thanks to Marek for the help.
7183
7184 2007-05-23  Raja R Harinath  <rharinath@novell.com>
7185
7186         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
7187         variable as assigned, note also that all its components are
7188         assigned too.
7189         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
7190
7191 2007-05-19  Marek Safar  <marek.safar@gmail.com>
7192
7193         * anonymous.cs, class.cs: Emit Compiler generated attribute when
7194         member is marked as compiler generated.
7195         
7196         * decl.cs (MemberCore): Refactored ModFlags into property.
7197
7198         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
7199         (Check): Check only accessibility modifiers.
7200
7201 2007-05-18  Raja R Harinath  <rharinath@novell.com>
7202
7203         Track all assignable slots in one bit array
7204         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
7205         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
7206         logic from VariableMap constructor here.  Use the same 'offset'
7207         variable that's later used for computing offsets of local
7208         variables.
7209         * flowanalysis.cs (UsageVector.parameters): Remove.
7210         (UsageVector): Update to changes.
7211         (VariableMap): Remove.
7212
7213         Avoid creating ParameterMap in every block
7214         * statement.cs (Block.ParameterMap): Move ...
7215         (ToplevelBlock.ParameterMap): ... here.
7216         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
7217         only once.
7218         * flowanalysis.cs (FlowBranching.param_map): Remove.
7219         (FlowBranching.UsageVector): Update to changes.
7220         (FlowBranchingToplevel.CheckOutParameters): Likewise.
7221
7222         * statement.cs (Block.CloneTo): Clone Toplevel field too.
7223
7224         * expression.cs (ParameterReference): Distinguish between block
7225         where parameter was referenced and declared.
7226
7227 2007-05-18  Marek Safar  <marek.safar@gmail.com>
7228
7229         * flowanalysis.cs, statement.cs: Put back improved error handling.
7230
7231 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
7232         
7233         * assign.cs:
7234         * expression.cs:
7235           Imporved object and collection initialization (C# 3.0).
7236
7237 2007-05-15  Marek Safar  <marek.safar@gmail.com>
7238
7239         A fix for bug #81380
7240         * expression.cs (Is.DoResolve): Only value types have constant `is'
7241         behaviour.
7242
7243 2007-05-15  Raja R Harinath  <rharinath@novell.com>
7244
7245         * statement.cs (ToplevelBlock.child): Remove.
7246
7247 2007-05-15  Raja R Harinath  <harinath@gmail.com>
7248
7249         Rationalize ResolveMeta: refactoring
7250         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
7251         out constant handling code into ...
7252         (Block.DoResolveConstants): ... this.
7253
7254         Rationalize ResolveMeta: kill local_map
7255         * statement.cs (Block.local_map, Block.LocalMap): Remove.
7256         (Block.AssignableSlots): New.
7257         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
7258         for locals -- move code from VariableMap here.  Avoid unnecessary
7259         allocations.
7260         * flowanalysis.cs (FlowBranching.local_map): Remove.
7261         (FlowBranching..ctor): Use Block.AssignableSlots.
7262         (VariableMap): Remove unused constructors.
7263
7264 2007-05-11  Raja R Harinath  <rharinath@novell.com>
7265
7266         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
7267
7268 2007-05-11  Marek Safar  <marek.safar@gmail.com>
7269
7270         * typemanager.cs (IsFriendAssembly): Should not be called for building
7271         assembly.
7272
7273 2007-05-09  Marek Safar  <marek.safar@gmail.com>
7274
7275         * literal.cs (NullConstant): Print null in all cases.
7276         
7277         * expression.cs (Binary.ResolveOperator): Implemented delegate
7278          comparison based on C# 2.0 changes.
7279
7280 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
7281
7282         This code is contributed under the MIT X11 license
7283         
7284         The following enables support for several C# 3.0 language features:
7285         
7286         * cs-tokenizer.cs: Added support for the "var" keyword.
7287         
7288         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
7289           Added VarExpr class to facilitate type inferencing.
7290         
7291         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
7292           to support anonymous types.
7293         
7294         * assign.cs: Added support for type inferencing and initialization.
7295         
7296         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
7297         
7298         * expression.cs: Added implicit array support to ArrayCreation.
7299           Added 5 types and 1 interface:
7300           
7301           IInitializable                Implementing classes can inject initializing
7302                                         statements after object instantiation.
7303           
7304           Initializer                   Stores data for object initialization.
7305           
7306           AnonymousType                 An expression for anonymous types.
7307           
7308           AnonymousTypeParameter        Stores data about an anonymous type's field.
7309           
7310           NewInitialize                 An expression for object initialization.
7311           
7312           CollectionInitialize          An expression for collection initialization.
7313         
7314         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
7315           statements.
7316
7317 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7318
7319         A fix for bug #81500
7320         * cs-tokenizer.cs: Add special handling for coalescing operator.
7321
7322 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7323
7324         A fix for bug #81529
7325         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
7326         its value from base class until it is redefined.
7327
7328 2007-05-02  Raja R Harinath  <rharinath@novell.com>
7329
7330         Fix regression in cs0631-3.cs
7331         * cs-parser.jay (operator_declarator): Add opt_attributes to error
7332         fallback.  Make error fallback catch more cases.
7333
7334 2007-05-01  Miguel de Icaza  <miguel@novell.com>
7335
7336         * cs-parser.jay: Allow parameters in operator declarations to have
7337         attributes. 
7338
7339 2007-04-27  Miguel de Icaza  <miguel@novell.com>
7340
7341         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
7342         exists. 
7343
7344         * lambda.cs (ContextualReturn.Resolve): An expression is valid
7345         inside the ContextualReturn, it does not have to be an
7346         ExpressionStatement. 
7347
7348 2007-04-24  Miguel de Icaza  <miguel@novell.com>
7349
7350         * lambda.cs (ContextualReturn.Resolve): if the return type is not
7351         set, set it.
7352
7353 2007-04-23  Miguel de Icaza  <miguel@novell.com>
7354
7355         * anonymous.cs (AnonymousContainer): split the virtual Resolve
7356         method in two methods: ResolveNoDefine and Resolve.
7357
7358         ResolveNoDefine will stop just after ResolveTopBlock has been
7359         called.   
7360
7361         Resolve will then continue by creating a method and issuing the
7362         call to method.Define ().
7363
7364         (AnonymousMethod): Split and implement the new Resolve and
7365         ResolveNoDefine as well.
7366
7367         * lambda.cs (LambdaExpression): Split the anonymous method
7368         resolution code into a separate routine (CoreCompatibilityTest)
7369         from DoCompatibleTest.
7370
7371         (LambdaExpression.TryBuild): New method, this method tries to
7372         build the LambdaExpression with the given set of types to be used
7373         as the types for the various parameters of the lambda expression. 
7374
7375         If the compilation succeed with the given types, the infered type
7376         of the Anonymous method is returned, otherwise null is returned.
7377
7378 2007-04-23  Marek Safar  <marek.safar@gmail.com>
7379
7380         A fix for bug #81414
7381         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
7382
7383 2007-04-22  Miguel de Icaza  <miguel@novell.com>
7384
7385         * cs-tokenizer.cs: Change various identifiers here from the
7386         camelCasing to the recommended Linux-like style for instance
7387         variables from the Coding Guidelines. 
7388
7389 2007-04-19  Martin Baulig  <martin@ximian.com>
7390
7391         * convert.cs
7392         (Convert.ImplicitReferenceConversionCore): Allow conversions from
7393         System.Enum to System.ValueType.
7394
7395 2007-04-13  Martin Baulig  <martin@ximian.com>
7396
7397         Rewrote implicit reference conversions.  We need to distinguish
7398         between implicit reference conversions (13.1.4) and implicit
7399         boxing conversions (13.1.5).
7400
7401         According to the spec, there's an an implicit conversion
7402         "From a one-dimensional array-type S[] to IList<T> and base
7403         interfaces of this interface, provided there is an implicit
7404         reference conversion from S to T."  Note that this does not
7405         include boxing conversions.
7406
7407         * convert.cs
7408         (Convert.ImplicitTypeParameterBoxingConversion): New method.
7409         (Convert.ImplicitReferenceConversion): Split into
7410         ImplicitReferenceConversionCore() and
7411         ImplicitBoxingConversionExist().
7412         (Convert.ImplicitReferenceConversionExists): Use the new
7413         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
7414
7415 2007-04-12  Martin Baulig  <martin@ximian.com>
7416
7417         * convert.cs (Convert.ImplicitReferenceConversion): Move the
7418         `TypeManager.null_type' checks up to the top of the method.
7419
7420 2007-04-11  Marek Safar  <marek.safar@gmail.com>
7421
7422         A fix for bug #81350
7423         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
7424         extension methods.
7425
7426 2007-04-11  Martin Baulig  <martin@ximian.com>
7427
7428         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
7429         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
7430         to make this work for generic classes; fixes #79561.
7431
7432 2007-04-11  Martin Baulig  <martin@ximian.com>
7433
7434         * expression.cs (As): Add support for nullable types; fixes #79371.
7435
7436 2007-04-11  Martin Baulig  <martin@ximian.com>
7437
7438         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
7439         `type.FullName' is null; fixes #80243.
7440
7441 2007-04-11  Martin Baulig  <martin@ximian.com>
7442
7443         * expression.cs (Invocation.IsApplicable): Don't modify the method
7444         if type inference succeeded, but the method was not applicable.
7445         Fixes #81250.
7446
7447 2007-04-10  Marek Safar  <marek.safar@gmail.com>
7448
7449         A fix for bug #81324
7450         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
7451         internal and external namespaces containers.
7452
7453 2007-04-10  Martin Baulig  <martin@ximian.com>
7454
7455         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
7456         TypeManager.DropGenericMethodArguments() so we also call
7457         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
7458
7459 2007-04-10  Martin Baulig  <martin@ximian.com>
7460
7461         * iterators.cs (Iterator.CreateIterator): Don't crash if
7462         `method.ReturnType' is null.  This happens if something went wrong
7463         while resolving that typ (we already reported an error in this case).
7464
7465 2007-04-10  Martin Baulig  <martin@ximian.com>
7466
7467         * expression.cs (New.DoResolve): Don't call CheckComImport() on
7468         generic interfaces; report the CS0144 directly.
7469
7470 2007-04-10  Martin Baulig  <martin@ximian.com>
7471
7472         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
7473         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
7474
7475 2007-04-10  Martin Baulig  <martin@ximian.com>
7476
7477         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
7478
7479 2007-04-09  Raja R Harinath  <rharinath@novell.com>
7480
7481         A better fix
7482         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
7483         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
7484
7485         Fix #81338
7486         * statement.cs (For.Resolve): If resolution fails, use
7487         KillFlowBranching.
7488
7489 2007-04-08  Marek Safar  <marek.safar@gmail.com>
7490
7491         * anonymous.cs (MakeName): Make faster and zero-based.
7492         (VerifyExplicitParameterCompatibility): Back to mode where generic
7493         parameter is ignored.
7494         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
7495
7496         * class.cs (EmitType): Method can emit another new method.
7497
7498         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
7499
7500         * driver.cs: Updated.
7501
7502         * lambda.cs: Reuse predefined empty parameters.
7503
7504         * parameter.cs: Updated
7505
7506         * support.cs: Implemented InflateTypes.
7507
7508         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
7509         (InitSystemCore): Introduced to isolate 3.0 dependencies.
7510
7511 2007-04-03  Martin Baulig  <martin@ximian.com>
7512
7513         Fix #80632.
7514
7515         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
7516         version of TypeManager.IsOverride() which also works with generic
7517         types.  
7518
7519 2007-04-03  Martin Baulig  <martin@ximian.com>
7520
7521         Fix #81044.
7522
7523         * convert.cs
7524         (Convert.ExplicitReferenceConversion): We need to cast when
7525         converting from IList<T> to S[].
7526
7527 2007-04-01  Marek Safar  <marek.safar@gmail.com>
7528
7529         * decl.cs (FindExtensionMethods): Consider all candidates with same name
7530         at this level.
7531         
7532         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
7533
7534 2007-03-31  Marek Safar  <marek.safar@gmail.com>
7535
7536         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
7537         argument and return type inferring.
7538
7539         * codegen.cs (InferReturnType): Flag whether return can be inferred.
7540         (ReturnType): Turned to property.
7541
7542         * statement.cs (Return): Implemented return type inferring.
7543
7544         * support.cs (ReflectionParameters): Use local types if possible.
7545
7546 2007-03-30  Raja R Harinath  <rharinath@novell.com>
7547
7548         * flowanalysis.cs (FlowBranching.Reachability): Remove.
7549         (FlowBranching.UsageVector): Update to changes.
7550
7551         Prepare to kill 'Reachability'
7552         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
7553         argument of constructor.
7554
7555 2007-03-29  Raja R Harinath  <rharinath@novell.com>
7556
7557         Prepare to kill 'Reachability'
7558         * flowanalysis.cs (UsageVector.is_unreachable): New.
7559         (UsageVector): Update to maintain 'is_unreachable' in parallel to
7560         'reachability', and verify they're consistent.
7561
7562         Fix #81121
7563         * expression.cs (New.EmitStatement): Handle type parameters here too.
7564
7565 2007-03-29  Martin Baulig  <martin@ximian.com>
7566
7567         Fix #79148.
7568
7569         * anonymous.cs
7570         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
7571         CompilerGeneratedClass.
7572         (ScopeInfo.EmitScopeInstance): Make this protected.
7573         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
7574         `ec.CurrentAnonymousMethod.Scope == Scope'.
7575
7576         * statement.cs (Block.ScopeInfo): Make this a property.
7577
7578 2007-03-27  Raja R Harinath  <harinath@gmail.com>
7579
7580         Prepare to kill 'Reachability'
7581         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
7582         (FlowBranching.UsageVector.Reachability): Remove property.
7583         (FlowBranching.UsageVector.IsUnreachable): New property.
7584         (FlowBranching.UsageVector.ResetBarrier): New.
7585         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
7586         * codegen.cs, statement.cs: Update to changes.
7587
7588 2007-03-27  Martin Baulig  <martin@ximian.com>
7589
7590         Fix #81209.
7591
7592         * decl.cs
7593         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
7594         generic types.
7595
7596 2007-03-26  Raja R Harinath  <rharinath@novell.com>
7597
7598         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
7599         instead of TriState.  Remove all mention of TriState.
7600
7601         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
7602         replaced by a boolean.  Add boolean 'is_unreachable' field, check
7603         and maintain invariants.
7604
7605 2007-03-25  Marek Safar  <marek.safar@gmail.com>
7606
7607         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
7608
7609 2007-03-25  Marek Safar  <marek.safar@gmail.com>
7610
7611         * expression.cs: Stop using obsolete 2.0 opcodes.
7612
7613 2007-03-25  Marek Safar  <marek.safar@gmail.com>
7614
7615         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
7616         one of the latests Martin's fixes.
7617
7618 2007-03-23  Miguel de Icaza  <miguel@novell.com>
7619
7620         * expression.cs: On BigEndian systems, swap the bytes, temporary
7621         solution until we get a new bitconverter class.
7622
7623 2007-03-23  Martin Baulig  <martin@ximian.com>
7624
7625         Fix #81158.
7626
7627         * decl.cs (MemberCache.AddMembers): Add generic methods both as
7628         "Method" and "Method`1".  Normally, a cache lookup is done on the
7629         "Method" form (ie. without the generic arity), but this one makes
7630         lookups on the full form work as well.
7631
7632 2007-03-22  Raja R Harinath  <rharinath@novell.com>
7633
7634         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
7635         unused properties.
7636
7637 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
7638         * class.cs: 
7639         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
7640         ordered_member_list, to TypeBuilder to store members to be defined
7641         in the order they were parsed in.
7642         - ordered_explicit_member_list contains all properties indexers
7643           and methods that are defined as explicit implementation of an
7644           interface or base class.
7645         - ordered_member_list contains all properties indexers and methods
7646           that are not defined as explicit implementation of an interface
7647           or base class.
7648
7649         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
7650         functionality in these removed classes has been replaced with 
7651         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
7652         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
7653
7654         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
7655         to CheckForDuplications inside GetMethod and SetMethod Define Method
7656         to handle method property and indexer name conflicts.
7657
7658         Fixes #79434
7659
7660         All code is contributed under the MIT/X11 license.
7661
7662 2007-03-20  Martin Baulig  <martin@ximian.com>
7663
7664         * class.cs (TypeContainer.Interfaces): Removed; they're now
7665         included in `TypeContainer.Types'.
7666
7667 2007-03-20  Martin Baulig  <martin@ximian.com>
7668
7669         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
7670
7671         * class.cs (TypeContainer.CreateType): New public method.  This is
7672         now called before DefineType() to create the TypeBuilders.
7673         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
7674         has already been created by CreateType().
7675         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
7676         don't resolve our base classes here; this has been moved into
7677         DefineBaseTypes().  We're now called from CreateType().
7678         (TypeContainer.DefineBaseTypes): New private method; resolve our
7679         base classes here.  We're now called from DefineType().
7680
7681         * rootcontext.cs
7682         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
7683         our types first to create all the TypeBuilders.  After that, call
7684         TypeContainer.DefineType() on all the types which'll resolve their
7685         base classes and setup the resolve order.
7686
7687 2007-03-20  Martin Baulig  <martin@ximian.com>
7688
7689         * class.cs (TypeContainer.Enums): Removed; they're now included in
7690         `TypeContainer.Types'.  
7691
7692 2007-03-20  Martin Baulig  <martin@ximian.com>
7693
7694         * class.cs
7695         (TypeContainer.DefineType): Don't call ResolveMembers() here.
7696         (TypeContainer.DoResolveMembers): Call DefineType() on our
7697         `compiler_generated' classes; moved here from DefineNestedTypes().
7698
7699         * rootcontext.cs
7700         (RootContext.ResolveTree): Call ResolveMembers() on all
7701         TypeContainer's in the `type_container_resolve_order'.
7702
7703 2007-03-19  Marek Safar  <marek.safar@gmail.com>
7704
7705         * class.cs: Use corlib to handle InternalMethodImplAttribute.
7706
7707 2007-03-17  Marek Safar  <marek.safar@gmail.com>
7708
7709         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
7710         implementation flags.
7711
7712 2007-03-17  Marek Safar  <marek.safar@gmail.com>
7713
7714         * class.cs: More optimizations for type parameters.
7715
7716 2007-03-15  Marek Safar  <marek.safar@gmail.com>
7717
7718         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
7719
7720         * ecore.cs, parameter.cs: More common code for both corlibs.
7721
7722         * typemanager.cs (IsGenericMethod): Simplified.
7723
7724 2007-03-15  Raja R Harinath  <rharinath@novell.com>
7725
7726         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
7727         'returns'.
7728         * statement.cs, iterators.cs, lambda.cs: Update to changes.
7729
7730         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
7731         unconditionally.  Simplify explanation.
7732         (Try.Resolve, Using.Resolve): Likewise.
7733
7734 2007-03-15  Martin Baulig  <martin@ximian.com>
7735
7736         Fix #80731.
7737
7738         * decl.cs (DeclSpace): If we're a partial class, use our
7739         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
7740
7741 2007-03-15  Raja R Harinath  <rharinath@novell.com>
7742
7743         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
7744         'throws'.
7745         (FlowBranching.UsageVector): Update to changes.
7746         (FlowBranching.MergeSiblings): Likewise.
7747         * statement.cs: Likewise.
7748
7749 2007-03-15  Martin Baulig  <martin@ximian.com>
7750
7751         Fix #79302.
7752
7753         * decl.cs
7754         (MemberCache): Added a special .ctor for type parameters.
7755
7756         * typemanager.cs
7757         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
7758         `MemberCache'.  
7759
7760 2007-03-09  Martin Baulig  <martin@ximian.com>
7761
7762         * enum.cs (Enum): Make this a TypeContainer.
7763         (EnumMember): Derive from `Const'.
7764
7765         * const.cs
7766         (Const.DoResolveValue): New protected virtual method; move most of
7767         the functionality of ResolveValue() here so we can override it in
7768         `EnumMember'.
7769         (Const.CreateConstantReference): Make this virtual.
7770
7771         * class.cs (Kind): Add `Kind.Enum'.
7772         (TypeContainer.Emit): Don't emit the enums here; they're already
7773         in the `RootContext.typecontainer_resolve_order'.
7774
7775         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
7776         here; they're already in the `typecontainer_resolve_order'.
7777
7778         * ecore.cs (EnumConstant.ConvertImplicitly): Add
7779         TypeManager.DropGenericTypeArguments().
7780
7781         * typemanager.cs
7782         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
7783         (TypeManager.IsEnumType): Likewise.
7784         (TypeManager.EnumToUnderlying): Likewise.
7785         (TypeManager.IsEqual): Add support for enums.
7786
7787 2007-03-12  Raja R Harinath  <rharinath@novell.com>
7788
7789         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
7790         DefaultParameterValueAttribute to be undefined, say if System.dll
7791         is not referenced.
7792
7793 2007-03-11  Marek Safar  <marek.safar@gmail.com>
7794
7795         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
7796         any mscorlib.
7797
7798 2007-03-10  Marek Safar  <marek.safar@gmail.com>
7799
7800         * class.cs, parameter.cs: Unified parameters verification.
7801
7802 2007-03-08  Martin Baulig  <martin@ximian.com>
7803
7804         * cs-parser.jay (constructor_header): Pass the location to the
7805         newly created TopLevelBlock.
7806
7807 2007-03-07  Martin Baulig  <martin@ximian.com>
7808
7809         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
7810
7811 2007-03-06  Miguel de Icaza  <miguel@novell.com>
7812
7813         * convert.cs (ExplicitReferenceConversionExists): Sync this method
7814         with the changes from David, fixes the build.
7815
7816 2007-03-05  David Mitchell  <dmitchell@logos.com>
7817
7818         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
7819         and its base interfaces to a one-dimensional array type S[],
7820         provided there is an implicit or explicit reference conversion
7821         from S to T.
7822
7823 2007-03-03  Marek Safar  <marek.safar@gmail.com>
7824
7825         * cs-tokenizer.cs: Implemented basic linq grammar.
7826
7827         * driver.cs: Set linq lang version on demand.
7828
7829 2007-02-26  Marek Safar  <marek.safar@gmail.com>
7830
7831         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
7832
7833 2007-02-25  Marek Safar  <marek.safar@gmail.com>
7834
7835         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
7836         (Fixes #80455)
7837
7838         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
7839         here.
7840         Check property and event extern attributes.
7841
7842         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
7843         charset.
7844
7845 2007-02-24  Marek Safar  <marek.safar@gmail.com>
7846
7847         A fix for bug #80407
7848         * ecore.cs: Don't report ambiguity error when methods have same parent.
7849
7850 2007-02-23  Marek Safar  <marek.safar@gmail.com>
7851
7852         A fix for bug #80878
7853         * class.cs, cs-parser.jay: Event property can host anonymous methods.
7854
7855 2007-02-22  Marek Safar  <marek.safar@gmail.com>
7856
7857         * attribute.cs: Enable ExtensionAttribute presence test.
7858
7859 2007-02-22  Marek Safar  <marek.safar@gmail.com>
7860
7861         * class.cs: Warn about missing GetHashCode only when Equals is override.
7862
7863         * decl.cs: Check accessibility of type arguments.
7864
7865         * typemanager.cs: Correctly report nullable array.
7866
7867 2007-02-20  Marek Safar  <marek.safar@gmail.com>
7868
7869         * class.cs, report.cs: Capture more details when things go wrong.
7870
7871 2007-02-20  Marek Safar  <marek.safar@gmail.com>
7872
7873         A fix for bug #80650
7874         * cs-parser.jay: Anonymous container starts at constructor declaration
7875         and not at block beginning because it has to be usable in constructor
7876         initializer.
7877
7878         * statement.cs: Use context location and not block one for error reporting.
7879
7880 2007-02-18  Marek Safar  <marek.safar@gmail.com>
7881
7882         A fix for bug #78712
7883         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
7884         too.
7885
7886 2007-02-18  Marek Safar  <marek.safar@gmail.com>
7887
7888         A fix for bug #80493 by Atsushi Enomoto
7889         * cs-parser.jay: Ignore invalid attribute target.
7890
7891 2007-02-18  Marek Safar  <marek.safar@gmail.com>
7892  
7893         * cs-tokenizer.cs: Ignore '\0' as white space character.
7894
7895 2007-02-17  Miguel de Icaza  <miguel@novell.com>
7896
7897         * cs-parser.jay: Add support for lambda expressions to the mcs
7898         compiler as well.
7899
7900         * lambda.cs: Only clone when we are probing, not on the final call
7901         (Compatible is the final call). 
7902
7903         * statement.cs (CloneContext): Introduce class to provide block
7904         remapping during clone.
7905
7906         All statements Clone themselves now.
7907
7908         (Clone): special handling for blocks, when we clone a block, we
7909         register the block inside this routine, as children of the block
7910         might trigger a lookup. 
7911         
7912         * expression.cs: Add support for CloneContext in all expressions. 
7913         
7914 2007-02-17  Marek Safar  <marek.safar@gmail.com>
7915  
7916         A fix for bug #80493
7917         * statement.cs: Report ambiguous warning when interfaces are not related.
7918
7919 2007-02-15  Marek Safar  <marek.safar@gmail.com>
7920
7921         C# 3.0 extension methods.
7922
7923         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
7924         cannot be used directly.
7925
7926         * class.cs (Class.Emit): Emit extension attribute if any class method
7927         is extension method.
7928         (Method.Define): Add basic extension method validation conditions.
7929         (Method.Emit): Emit extension attribute for method.
7930
7931         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
7932         extension method exists. Currently we follow same approach as Microsoft
7933         does, emit even if a method or a class are private but this can change
7934         later.
7935
7936         * cs-parser.jay: Add handling of `this' keyword in method parameters
7937         context.
7938
7939         * decl.cs (DeclSpace.IsStaticClass): New property.
7940         (MemberCache.FindExtensionMethods): Looks for extension methods with
7941         defined name and extension type.
7942
7943         * doc.cs: Updated after OverloadResolve changes.
7944
7945         * driver.cs: Add new soft reference to System.Core.dll.
7946
7947         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
7948         (ExtensionMethodGroupExpr): Represents group of extension methods.
7949
7950         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
7951         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
7952         to MethodGroupExpr and made non-static for easier customization.
7953         (Invocation.DoResolve): Add extension method lookup when no standard
7954         method was found.
7955         (MemberAccess.DoResolve): Try extension methods if no member exists.
7956
7957         * modifiers.cs: Add METHOD_EXTENSION modifier.
7958
7959         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
7960         as well as candidate extension type.
7961         (ComputeNamespaces): When assembly constains extension methods registers
7962         them.
7963         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
7964         extension method lookup.
7965         (Namespace.LookupExtensionMethod): Looks for extension method in this
7966         namespace.
7967         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
7968         find a method which matches name and extensionType.
7969
7970         * parameter.cs (Parameter): Add This modifer.
7971         (HasExtensionMethodModifier): New property.
7972         (Resolve): Add extension parameter check.
7973         (ModFlags): turned to property to exclude this modifier as it is not real
7974         parameter modifier.
7975         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
7976
7977         * support.cs (ParameterData): Add ExtensionMethodType.
7978         (ReflectionParameters): Implemented ExtensionMethodType interface property.
7979
7980         * typemanager.cs: Add type and ctor extension attribute type.
7981
7982 2007-02-15  Miguel de Icaza  <miguel@novell.com>
7983
7984         * report.cs (DisableErrors, EnableErrors): used to prevent error
7985         output when we are "trying" to compile various methods with
7986         different types. 
7987
7988         * ecore.cs (Expression): Add Clone method that calls the virtual
7989         CloneTo method.  The current CloneTo method in Expression throws
7990         an exception so we can track down all the places where this must
7991         be implemented (not using abstract, because that would be a lot of
7992         up-front-work before we can start testing the implementation
7993         idea). 
7994
7995         Important: we only need Clone capabilities for expressions created
7996         by the parser, as the expressions we will be cloning are
7997         expressions in the pre-resolved state.   This vastly simplifies
7998         the work required. 
7999         
8000         (SimpleName): Add CloneTo that does nothing.
8001         (EmptyCast): Add CloneTo.
8002         
8003         * expression.cs (Binary): Implement CloneTo.
8004         (Invocation.IsApplicable): Store the current ec in
8005         EmitContext.TempEc and restore it on return.  This is used so we
8006         do not have to sprinkle hundres of methods with an extra
8007         EmitContext, we know that the only user is the lambda expression
8008         ImplicitConversionExists code. 
8009         
8010         (Argument): Add Cloning capabilities.
8011         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8012         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8013         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8014         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8015         IndexerAccess): Add Clone capability.
8016
8017         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8018
8019         (Argument): Add cloning capability.
8020
8021         * assign.cs (Assign): Implement CloneTo.
8022
8023         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8024         
8025         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8026         version by calling Convert with the EmitContext (that we are
8027         currently storing in ec, this is not great, but will do for now,
8028         to avoid passing EmitContext parameters to hundreds of functions
8029         that do not need them now).
8030
8031         (SetExpression): Remove, it is not needed.
8032         
8033         (ContextualReturn): Implement CloneTo.
8034
8035         * statement.cs (Statement): Implement cloning infrastructure,
8036         similar to expressions.
8037
8038         (Block): Partial implementation of Clone for statements.
8039
8040         (Return): Implement clone.
8041         
8042         * constant.cs (Constant.CloneTo): New method, does nothing.
8043
8044         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8045         solution, until we decide how to exactly do this.  
8046         
8047 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8048  
8049         A fix for bug #80493
8050         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8051         a property is override we need to use second accessor.
8052
8053 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8054  
8055         A fix for bug #80418
8056         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8057         methods.
8058
8059 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8060
8061         Another fix for bug #80749
8062         * pending.cs: Abstract class has priority over interfaces.
8063
8064 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8065
8066         Another fix for bug #80749
8067         * pending.cs: Abstract class has priority over interfaces.
8068
8069 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8070
8071         Another fix for bug #80749
8072         * pending.cs: Abstract class has priority over interfaces.
8073
8074 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8075
8076         Another fix for bug #80749
8077         * pending.cs: Abstract class has priority over interfaces.
8078
8079 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8080
8081         * class.cs Better error message.
8082
8083         * driver.cs: Add shorter versions of -optimize option.
8084
8085 2007-02-13  Martin Baulig  <martin@ximian.com>
8086
8087         * class.cs (Constructor.Emit): Check the return value of
8088         ec.ResolveTopBlock() and return on error.
8089
8090 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8091
8092         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8093         message to fix error message regression.
8094
8095 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8096
8097         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8098
8099 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8100
8101         A fix for bug #80749
8102         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8103         its parent container.
8104
8105         * class.cs (DefineFieldInitializers): Each initializer can has different
8106         resolve context.
8107
8108         * const.cs: Updated.
8109
8110 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8111
8112         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8113         now all the heavy lifting to check that embedded statements or
8114         expressions have the right form is done in the ContextualReturn.
8115
8116         (ContextualReturn): New class.  
8117
8118         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8119         method that can be invoked to report 201, so we do not replicate
8120         this everywhere.
8121
8122         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8123         
8124         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8125         treating tabs as spaces. 
8126
8127 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8128
8129         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8130         * assign.cs: Use full implicit conversion for right side check.
8131
8132 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8133
8134         * statement.cs (Switch): Switch over boolean type is not standardized.
8135
8136 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8137
8138         A fix for bug #80755
8139         * decl.cs (FindBaseEvent): Don't use method cache for events.
8140
8141 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8142
8143         * cs-parser.jay: Better syntax error handling.
8144
8145         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8146         instead of underlying type value.
8147
8148 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8149
8150         * driver.cs: Check define identifier before is registered.
8151
8152         * namespace.cs: Use existing error message.
8153
8154         * report.cs: New warning.
8155
8156 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8157
8158         A fix for bug #80742
8159         * expression.cs: Delegate Invoke method can be called directly.
8160
8161 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8162
8163         A fix for bug #80676
8164         * class.cs (IsEntryPoint): The Main method can have params modifier.
8165
8166 2007-02-04  Miguel de Icaza  <miguel@novell.com>
8167
8168         * parameter.cs (Parameter, Parameters): Add Clone method.
8169
8170         * anonymous.cs (Compatible): Turn method into virtual method, so
8171         LambdaExpression can implement a different behavior.
8172
8173         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
8174         out the basic checking here, so it can be used by
8175         LambdaExpressions.
8176         
8177         * lambda.cs: Introduce "Compatible" function that will do the
8178         heavy lifting.
8179
8180 2007-02-02  Marek Safar  <marek.safar@gmail.com>
8181
8182         * attribute.cs: Unified one error message.
8183
8184         * class.cs (Class): Use type attributes and not properties to test static
8185         class.
8186         (IsEntryPoint): Don's pass local variable.
8187
8188         * convert.cs: Removed duplicate check.
8189
8190         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
8191
8192         * driver.cs: Don't crash when soft reference does not exist.
8193
8194         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
8195         (UsingEntry): Removed redundant allocation.
8196
8197         * parameter.cs: Add fast path for type parameters.
8198
8199         * support.cs: Don't allocate attribute when it's not used.
8200
8201 2007-01-30  Miguel de Icaza  <miguel@novell.com>
8202
8203         * anonymous.cs
8204         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
8205         this into a virtual method, so we can override it in LambdaExpression.
8206
8207         * driver.cs: Improve diagnostics in case of failure. 
8208
8209         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
8210         write a function that is slightly more complex and that parses:
8211
8212         type identifier [, type identifier]* )
8213
8214         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
8215         this expression:
8216
8217                 (canEmpty ? i >= 0 : i > 0)
8218
8219 2007-01-30  Raja R Harinath  <rharinath@novell.com>
8220
8221         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
8222         exception on possibly valid code.
8223
8224 2007-01-29  Raja R Harinath  <rharinath@novell.com>
8225
8226         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
8227         Push/PopPosition.
8228         (parse_opt_type_arguments): Remove.  It's almost the same as
8229         parse_less_than.
8230         (parse_namespace_or_typename): Use parse_less_than.
8231
8232 2007-01-28  Miguel de Icaza  <miguel@novell.com>
8233
8234         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
8235         this bug took a few hours to find, because the state saved and
8236         restored by PushPosition and PopPosition was ignoring the state of
8237         parse_generic_less_than.
8238
8239         I can also now remove the handling of OP_LT and OP_GT, this solves
8240         the big mistery.
8241         
8242         * cs-tokenizer.cs: store the location for the ARROW token, we use
8243         that in the parser.
8244
8245         (PushPosition, PopPosition): save/restore also `current_token',
8246         restore `parse_generic_less_than' (was missing).
8247
8248         (parse_opt_type_arguments): use parse_type, not
8249         parse_namespace_or_typename to parse types.
8250
8251         * lambda.cs: Empty new file, will eventually have the lambda
8252         expression implementation.
8253
8254         * lambda.test: used to test the internal tokenizer. 
8255
8256         * report.cs (FeatureIsNotISO1): Rename from
8257         FeatureIsNotStandardized, because it was about the language level
8258         (1 vs 2) it was not about standarization.
8259
8260         (FeatureRequiresLINQ): New.
8261
8262         * support.cs (SeekableStreamReader): Only require that the reader
8263         is a TextReader, not a StreamReader, so we can plug StringReader. 
8264
8265         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
8266         given position in the input stream the following tokens can be
8267         parsed as a type followed by an identifier.
8268
8269         (is_punct): after a '(' if parse_type_and_parameter returns true,
8270         then return a special token OPEN_PARENS_LAMBDA which is used to
8271         avoid reduce/reduce errors in the grammar for the
8272         lambda_expression rules.
8273
8274         (parse_type): implement a type parser inside the
8275         tokenizer, the parser only returns true or false depending on
8276         whether the input at a given position can be parsed as a type.
8277
8278         (peek_token): new method used during type parsing.
8279
8280 2007-01-28  Raja R Harinath  <rharinath@novell.com>
8281
8282         Fix #80531
8283         * anonymous.cs (ScopeInfo.InflateParameters): New.
8284         (AnonymousContainer.Resolve): Use it to redirect types of
8285         delegate parameters.
8286
8287 2007-01-27  Raja R Harinath  <rharinath@novell.com>
8288
8289         Fix #80530
8290         * expression.cs (Error_InvalidArguments): Don't use two different
8291         messages for CS1503.  Use ExtraInformation and
8292         SymbolRelatedToPreviousError instead.
8293
8294         Fix #80358
8295         * decl.cs (DeclSpace.initialize_type_params): Don't access
8296         'type_params' of a partial class directly.
8297
8298 2007-01-26  Miguel de Icaza  <miguel@novell.com>
8299
8300         * constant.cs: Removed a handful of out-of-range checks that were
8301         not necessary. 
8302
8303 2007-01-25  Marek Safar  <marek.safar@gmail.com>
8304
8305         * expression.cs (CheckUselessComparison): Add additional check for char
8306         constants.
8307
8308         * namespace.cs: Fixed typo.
8309
8310 2007-01-23  Miguel de Icaza  <miguel@novell.com>
8311
8312         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
8313         gone, instead we inline the test, preventing the needless casts to
8314         longs, ulongs and doubles for the parameters, avoiding calls to
8315         methods that overchecked stuff, and instead inlined things
8316         nicely. 
8317
8318 2007-01-20  Marek Safar  <marek.safar@gmail.com>
8319
8320         * cs-parser.jay: Better parameter error handling.
8321
8322 2007-01-17  Marek Safar  <marek.safar@gmail.com>
8323
8324         A fix for bug #80368, #80522
8325         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
8326         whether array initializer contains constants only.
8327         (ArrayCreation.Emit): Use better formula to decide when
8328         are array initializers for static initialization.
8329         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
8330         have to emit even constants otherwise they are pre-initialized.
8331
8332 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
8333             Raja R Harinath  <rharinath@novell.com>
8334
8335         Fix emit order of 'get' vs. 'set'.
8336         * support.cs (Accessors): New.
8337         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
8338         Note the order in which accessors are declared in the source.
8339         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
8340         Refactored from Property.Define and Indexer.Define.
8341         (PropertyBase.DefineAccessors): New helper that calls the above in
8342         appropriate order as noted by the parser.
8343         (Property.Define, Indexer.Define): Update to changes.
8344         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
8345
8346 2007-01-17  Raja R Harinath  <rharinath@novell.com>
8347
8348         Fix cs0029-6.cs and gcs0029-2.cs (regression)
8349         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
8350         there's an implicit conversion from the current type to the target
8351         type before converting the underlying constant.
8352
8353 2007-01-16  Marek Safar  <marek.safar@gmail.com>
8354
8355         * const.cs (ResolveValue): Updated after constant conversion was made more
8356         generic.
8357
8358         * constant.cs (GetAttributableValue): constant to object conversion is
8359         used for attributes only.
8360         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
8361         constant conversions.
8362         (LongConstant.ConvertImplicitly): Ditto.
8363
8364         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
8365         (ImplicitConversionStandard): Handle constant conversion as extra step.
8366         It solves the issue when constant conversion was called indirectly like
8367         inside array initializer and constant folding was skipped.
8368
8369         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
8370         this change.
8371
8372         * statement.cs(ImplicitConversionStandard): Updated after constant
8373         conversion was made more generic.
8374
8375 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
8376
8377         * expression.cs (As.DoResolve): Use GenericConstraints instead of
8378         Constraints, solves the problem where the compiler incorrectly
8379         reported that a type parameter was not constrained to a class (Bug
8380         80518)
8381
8382 2007-01-14  Marek Habersack  <grendello@gmail.com>
8383
8384         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
8385
8386 2007-01-14  Marek Safar  <marek.safar@gmail.com>
8387
8388         A fix for bug #80368
8389         * assign.cs (FieldInitializer): New class implements field
8390         initializer statement.
8391
8392         * attribute.cs: Update after FieldMember rename.
8393
8394         * class.cs (PropertyBasedMember): New common class for property based
8395         types.
8396         (InterfaceMemberBase): New base class for all members which can be used as
8397         an interface members.
8398         (MethodCore): Moved really common code to InterfaceMemberBase.
8399         (Method.Define): Equal and GetHasCode detection is relevant for methods
8400         only.
8401         (MethodData.Define): Don't assume that public event implements an
8402         interface automatically.
8403         (MethodData.DefineMethodBuilder): Issue an error even if only extern
8404         modifier is used.
8405         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
8406         (FieldMember): Merged with FieldBase.
8407         (EventProperty.AEventPropertyAccessor): New specialization to check whether
8408         event extern modifier can be used.
8409         (EventField.EventFieldAccessor): Moved event field specific code here.
8410         (Event.AllowedModifiers): Even event can be extern.
8411         (Event.FindOutBaseMethod): New override specific to events.
8412         (Indexer.parameters): Reintroduce parameters because base class holds
8413         only properties common data.
8414         (Indexer.CheckForDuplications): Indexers are threated as methods so we
8415         need do extra parameters check.
8416
8417         * const.cs: Update after FieldMember rename.
8418
8419         * decl.cs (MemberCache.FindBaseEvent): New method.
8420
8421         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
8422         to reflect that indexer is now derived from PropertyBased.
8423
8424         * ecore.cs (GetMemberType): Made public.
8425         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
8426         obsolete event.
8427
8428         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
8429         
8430         * typemanager.cs (CSharpSignature): Correctly print event accessors.
8431         (RegisterEvent): Removed.
8432         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
8433         (GetPrivateFieldOfEvent): Renamed to GetEventField.
8434
8435 2007-01-11  Raja R Harinath  <rharinath@novell.com>
8436
8437         Fix #80249
8438         * statement.cs (CollectionForeach.TryType): Prefer generic
8439         GetEnumerator over non-generic variant.  Fix code to follow comments.
8440
8441 2007-01-09  Raja R Harinath  <rharinath@novell.com>
8442
8443         Fix #80446
8444         * support.cs (ReflectionParameter): Don't use an invalid index on
8445         the generic parameter data.
8446
8447 2007-01-08  Miguel de Icaza  <miguel@novell.com>
8448
8449         * driver.cs: Just add a tiny bit of infrastructure.
8450
8451 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8452
8453         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
8454         where field type is struct from current assembly.
8455         
8456         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
8457         it is possible.
8458
8459 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8460
8461         A fix for bug #80381
8462         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
8463         the core types.
8464
8465         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
8466         messages.
8467         (Namespace.LookupType): Always use core types from corlib when speficied.
8468
8469         * report.cs: A new warning.
8470
8471         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
8472         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
8473         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
8474
8475         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
8476         (InitCoreTypes): Set expression type of object_type and value_type
8477         immediately after lookup.
8478
8479 2007-01-01  Miguel de Icaza  <miguel@novell.com>
8480
8481         * cs-tokenizer.cs: Accept Pc class characters (Connector
8482         Punctuation) as valid identifiers.  Fixes #78259
8483
8484         * expression.cs (Invocation.DoResolve): Moved the check for the
8485         use of `this' for doing method calls to the Invocation resolution
8486         step, after overload resolution has taken place instead of doing
8487         the check at the low-level `This.DoResolve' level.
8488
8489         The `This.DoResolve'(appens before overload resolution, so it has
8490         no way of knowing if the method that will be called will be
8491         instace or static, triggering an erroneous report for cs0188 (Bug
8492         78113).
8493
8494         We now do the check for instance method invocations after we know
8495         what method will be called.
8496
8497         (This.CheckThisUsage): Move the actual use of this structure
8498         checking into its own method and expose it. 
8499
8500         * Everywhere that called Error_ValueCannotBeConverted: pass a new
8501         EmitContext.
8502
8503         Exceptions: Null.ConvertImplicitly,
8504         Constant.ImplicitConversionRequired as there are too many call
8505         sites for passing the ec. 
8506
8507         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
8508         EmitContext, if the value is null, then we do not try to provide
8509         the extra information from the error (If a userdefined conversion
8510         exists, as UserDefinedConversion requires a non null-EmitContext).
8511
8512         Fixes: #80347
8513
8514 2006-12-30  Raja R Harinath  <rharinath@novell.com>
8515
8516         * flowanalysis.cs (MyBitVector): Document some invariants.
8517         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
8518         introduced below, and add a couple of others, 
8519
8520 2006-12-30  Marek Safar  <marek.safar@gmail.com>
8521
8522         * attribute.cs (GetMethodObsoleteAttribute): Uses new
8523         GetPropertyFromAccessor and GetEventFromAccessor.
8524         
8525         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
8526         overrides non-obsolete one.
8527         (Indexer.Define): Error message has been moved to the parser.
8528
8529         * cs-parser.jay: Better syntax errors handling.
8530
8531         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
8532         when an invocation has no arguments.
8533
8534         * ecore.cs: Removed not used caching.
8535
8536         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
8537         implementation.
8538
8539         * report.cs: Add a new warning.
8540
8541         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
8542
8543         * typemanager.cs (enumeration_type): Removed.
8544         (CSharpSignature): Reuses IsSpecialMethod.
8545         (IsEqual): Hack for MS BCL.
8546         (GetPropertyFromAccessor): New method.
8547         (GetEventFromAccessor): New method.
8548         (IsSpecialMethod): Fixed to handle more cases.
8549
8550 2006-12-30  Marek Safar  <marek.safar@gmail.com>
8551
8552         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
8553         Made white spaces array static.
8554
8555         * ecore.cs (RemoveGenericArity): Optimized.
8556
8557         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
8558         10 times faster).
8559         (MyBitVector.initialize_vector): Simplified.
8560
8561 2006-12-22  Miguel de Icaza  <miguel@novell.com>
8562
8563         * ecore.cs: Am not entirely happy with this hack, but it seems to
8564         address the issue in 80257 (a small test case for
8565         CreativeDocs.NET). 
8566
8567         I set the MethodGroupExpr.Type to an internal compiler type
8568         (itself in this case) to force the resolution to take place.   Why
8569         it does not take place with a null is beyond me.
8570
8571 2006-12-20  Marek Safar  <marek.safar@gmail.com>
8572
8573         A fix for bug #80288
8574         * expression.cs (ResolveOperator): Consider user defined conversion for
8575         logical and operator too.
8576         (EmitBranchable): Optimization for logical and when full constant folding
8577         could not be applied but one operand is constant.
8578
8579 2006-12-19  Marek Safar  <marek.safar@gmail.com>
8580
8581         * class.cs (GetClassBases): Write 5 times every day, will never use
8582         FullName for error reporting.
8583
8584         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
8585
8586 2006-12-19  Martin Baulig  <martin@ximian.com>
8587
8588         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
8589         the symbol file info here.
8590
8591 2006-12-18  Marek Safar  <marek.safar@gmail.com>
8592
8593         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
8594         of `elseif' is taking then following sections are not taking.
8595         Fixes an issue reported on mono mailing list.
8596
8597 2006-12-18  Marek Safar  <marek.safar@gmail.com>
8598
8599         A fix for bug #80300
8600         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
8601         a caller is not taking.
8602
8603 2006-12-18  Raja R Harinath  <rharinath@novell.com>
8604
8605         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
8606         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
8607         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
8608         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
8609         * class.cs: Update to changes.
8610
8611 2006-12-17  Marek Safar  <marek.safar@gmail.com>
8612
8613         A fix for bug #79934
8614         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
8615         partial container.
8616
8617         * class.cs (ResolveMembers): Register an iterator in current container and
8618         not in shared one.
8619
8620 2006-12-16  Raja R Harinath  <rharinath@novell.com>
8621
8622         Fix test-543.cs
8623         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
8624         satisfy a params annotated parameter.
8625
8626 2006-12-16  Marek Safar  <marek.safar@gmail.com>
8627
8628         A fix for bug #77014
8629         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
8630         paramters correctly and not rely on hacks in Parameters class.
8631         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
8632         at any possition.
8633         (Invocation.VerifyArgumentsCompat): Ditto.
8634         (Invocation.EmitArguments): Changed to correctly emit params arguments at
8635         any possition.
8636
8637         * parameter.cs (HasParams): Don't assume that params is the last one.
8638
8639         * support.cs (ReflectionParameters.ctor): Look for params attribute
8640         correctly.
8641         (ReflectionParameters.ParameterType): Removed hack when we returned last
8642         parameter for out of range parameters.
8643         (ParameterName, ParameterModifier): Ditto.
8644
8645 2006-12-14  Marek Safar  <marek.safar@gmail.com>
8646
8647         A fix for bug #79987
8648         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
8649         when assembly is not CLS compliant but type is. I have no idea why is this
8650         allowed.
8651
8652         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
8653
8654 2006-12-13  Miguel de Icaza  <miguel@novell.com>
8655
8656         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
8657         in struct constructors, they are basically no-ops.
8658
8659 2006-12-12  Marek Safar  <marek.safar@gmail.com>
8660
8661         * cs-tokenizer.cs (Position): Save preprocessor status too.
8662
8663 2006-12-12  Marek Safar  <marek.safar@gmail.com>
8664
8665         A fix for bug #77794
8666         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
8667
8668 2006-12-12  Marek Safar  <marek.safar@gmail.com>
8669
8670         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
8671         Fixes #69299.
8672         (pp_expr): Report error for an invalid expression.
8673         (handle_preprocessing_directive): Simplified; add more error checking.
8674
8675 2006-12-11  Marek Safar  <marek.safar@gmail.com>
8676
8677         A fix for bug #74939
8678         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
8679         directives handling.
8680
8681 2006-12-10  Marek Safar  <marek.safar@gmail.com>
8682
8683         A fix for bugs #80093, and #75984
8684         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
8685         logic, it seems to me as it worked before "by coincidence".
8686         (xtoken): Simplified to use reworked handle_preprocessing_directive.
8687         (cleanup): Enabled endif check.
8688
8689 2006-12-09  Marek Safar  <marek.safar@gmail.com>
8690
8691         A fix for bug #80162
8692         * statement.cs (CollectionForeach.TryType): Generics and non-generics
8693         enumerators are never ambiguous.
8694
8695 2006-12-08  Raja R Harinath  <rharinath@novell.com>
8696
8697         Fix #80060
8698         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
8699
8700 2006-12-06  Marek Safar  <marek.safar@gmail.com>
8701
8702         A fix for bug #80144
8703         * class.cs (EventProperty.Define): Explicit implementation means
8704         that an even is used.
8705
8706 2006-12-06  Marek Safar  <marek.safar@gmail.com>
8707
8708         Fixes the operators implementation (part II)
8709
8710         * cfold.cs (DoConstantNumericPromotions): Renamed to
8711         DoBinaryNumericPromotions and simplified.
8712         (BinaryFold): Couple of conversion fixes; simplified.
8713
8714         * constant.cs, ecore.cs, literal.cs
8715         (ToType): Renamed to ConvertImplicitly.
8716         (Reduce): Renamed to ConvertExplicitly.
8717
8718         * class.cs, convert.cs: Updated.
8719
8720         * expression.cs: TryReduce doesn't throw an exception.
8721
8722 2006-12-01  Marek Safar  <marek.safar@gmail.com>
8723
8724         A fix for bug #80108
8725         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
8726         compatible.
8727
8728 2006-11-30  Marek Safar  <marek.safar@gmail.com>
8729
8730         Fixes unary operators implementation (part I)
8731         Also fixes #80026
8732
8733         * cfold.cs (Error_CompileTimeOverflow): Made internal
8734
8735         * const.cs (IConstant): Changed to use reference to constant and
8736         not constant itself.
8737         Updated IConstant implementations.
8738
8739         * constant.cs (CreateConstant): New factory method.
8740         Updated IConstant implementation.
8741
8742         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
8743
8744         * ecore.cs: Updated to use CreateConstantReference.
8745
8746         * enum.cs: Reflects IConstant changes.
8747
8748         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
8749
8750         * literal.cs (NullConstant): Change to be independently usable.
8751
8752 2006-11-29  Martin Baulig  <martin@ximian.com>
8753
8754         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
8755         we need to emit the scope initializer before calling the base .ctor.
8756
8757         * anonymous.cs: Merged back from the new anonymous methods branch.
8758         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
8759
8760         * expression.cs (ParameterReference.DoResolveBase): Create a
8761         "normal" ScopeInfo when capturing parameters rather than using the
8762         root scope; this makes things work with anonymous methods having
8763         parameters.
8764
8765         * statement.cs
8766         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
8767
8768 2006-11-22  Marek Safar  <marek.safar@gmail.com>
8769
8770         A fix for bug #79987
8771         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
8772         check to a base class.
8773         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
8774         only when assembly has missing attribute.
8775         * report.cs: Update.
8776
8777 2006-11-21  Marek Safar  <marek.safar@gmail.com>
8778
8779         * cs-tokenizer.cs: Merged with gmcs version.
8780
8781 2006-11-20  Marek Safar  <marek.safar@gmail.com>
8782
8783         * cs-tokenizer.cs,
8784         * cs-parser.jay: Better error message when partial keyword is misplaced.
8785
8786 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
8787
8788         A fix for bug #79810
8789         report.cs: CS1058 only applies to 2.0 profile (gmcs).
8790         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
8791         a RuntimeWrappedException by default.
8792
8793 2006-11-18  Marek Safar  <marek.safar@gmail.com>
8794
8795         A fix for bug #79843
8796         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
8797         implementation.
8798         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
8799
8800 2006-11-18  Marek Safar  <marek.safar@gmail.com>
8801
8802         * driver.cs, namespace.cs: Uses faster IndexOf version.
8803
8804 2006-11-17  Marek Safar  <marek.safar@gmail.com>
8805
8806         A fix for bug #79941
8807         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
8808         operators.
8809         (Operator.Define): Implicit/Explicit operator of same type is duplicate
8810         even if internal name is different.
8811         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
8812         (UserDefinedConversion): Simplified as the operators cannot be internal.
8813         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
8814         conversions.
8815         (MethodLookup): Replaced EmitContext with parentType.
8816         * expression.cs: Updated.
8817
8818 2006-11-09  Raja R Harinath  <rharinath@novell.com>
8819
8820         * driver.cs (BadAssembly): Handle all the ugliness of
8821         DefineDynamicAssembly.
8822
8823 2006-11-08  Raja R Harinath  <rharinath@novell.com>
8824
8825         Address parts of #58244 -- most of what's left is in the runtime
8826         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
8827         CS1509 error checks, and handle them for all assembly loads, not
8828         just the first invocation.
8829         (LoadModule): Likewise.  Move handling of 'adder_method' ...
8830         * codegen.cs (AssemblyClass.AddModule): ... here.
8831
8832 2006-11-02  Marek Safar  <marek.safar@gmail.com>
8833
8834         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
8835         IEnumerable<T> is ambiguous.
8836
8837 2006-10-31  Marek Safar  <marek.safar@gmail.com>
8838
8839         A fix for bug #67689
8840         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
8841         GetEnumerator is ambiguous.
8842
8843         * report.cs: Add new warning.
8844
8845 2006-10-29  Marek Safar  <marek.safar@gmail.com>
8846
8847         A fix for bug #78602
8848         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
8849         to protected member can be nested type.
8850
8851 2006-10-28  Marek Safar  <marek.safar@gmail.com>
8852
8853         A fix for bug #78965
8854         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
8855         to protected member must derive from current type.
8856
8857 2006-10-27  Marek Safar  <marek.safar@gmail.com>
8858
8859         assign.cs: Reuses error method.
8860
8861         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
8862         instead of type for constants.
8863         (Expression.Error_ValueAssignment): Common error method.
8864
8865         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
8866         for any assignment.
8867
8868 2006-10-27  Marek Safar  <marek.safar@gmail.com>
8869
8870         A fix for bug #79081
8871         * expression.cs (MemberAccess.DoResolve): Check nested type
8872         accessibility.
8873
8874 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
8875
8876         * doc.cs : nested delegates were not handled. Fixed bug #79754.
8877
8878 2006-10-26  Marek Safar  <marek.safar@gmail.com>
8879
8880         A fix for bug #76591
8881         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
8882
8883 2006-10-26  Marek Safar  <marek.safar@gmail.com>
8884
8885         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
8886         type forwarder of the same type multiple times.
8887
8888 2006-10-26  Raja R Harinath  <rharinath@novell.com>
8889
8890         Fix #78820
8891         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
8892         instance as an rvalue, even when we later resolve as an lvalue.
8893
8894 2006-10-25  Martin Baulig  <martin@ximian.com>
8895
8896         * anonymous.cs: Fix #79673.
8897
8898 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
8899
8900         A fix for bug #79666
8901         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
8902         ignored when is optimized (= default value) as its value is already set.
8903
8904 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
8905
8906         A fix for bug #79724
8907         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
8908         TypeContainer for type lookup.
8909
8910 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
8911
8912         A fix for bug #79231
8913         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
8914         * expression.cs (OverloadResolve): Always convert type name for
8915         an error message.
8916         (ResolveNamespaceOrType): Don't confuse a nested type with any 
8917         other member.
8918
8919 2006-10-18  Martin Baulig <martin@ximian.com>
8920
8921         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
8922
8923 2006-10-17  Miguel de Icaza  <miguel@novell.com>
8924
8925         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
8926         an int32, but requesting an int64 from the conversion
8927
8928 2006-10-12  Martin Baulig  <martin@ximian.com>
8929
8930         * anonymous.cs
8931         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
8932         
8933 2006-10-12  Martin Baulig  <martin@ximian.com>
8934
8935         * statement.cs
8936         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
8937
8938 2006-10-11  Miguel de Icaza  <miguel@novell.com>
8939
8940         * convert.cs: Remove broken code: I was doing the "Existance"
8941         tests for Implicit conversions.
8942
8943 2006-10-10  Miguel de Icaza  <miguel@novell.com>
8944
8945         * convert.cs: Added one missing case in
8946         ImplicitStandardConversionExists uint64 to intptr.
8947
8948         Fixes #59800
8949         
8950         * typemanager.cs (uintptr_type): another core known type.   
8951
8952         * ecore.cs (OperatorCast): routine used to do cast operations that
8953         depend on op_Explicit.  We could change some of the Decimal
8954         conversions to use this.
8955
8956         This one has a probe mechanism that checks both types for an op_
8957         which it coudl be used to eliminate two classes: CastToDecimal
8958         and CastFromDecimal.
8959
8960         * convert.cs: Implement the conversions documented in #59800
8961         
8962 2006-10-10  Martin Baulig  <martin@ximian.com>
8963
8964         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
8965         before RootScope.ResolveMembers().
8966
8967         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
8968         `CurrentType' if appropriate.
8969
8970 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
8971
8972         A fix for bug #78568
8973         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
8974         when contains binary operators.
8975         * cs-parser.jay: Updated.
8976
8977 2006-10-09  Martin Baulig  <martin@ximian.com>
8978
8979         * delegate.cs
8980         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
8981         moved that into Define() and also do the other type parameter
8982         checks there.  Fixes #79094.  Added gtest-292.cs.
8983
8984         * expression.cs
8985         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
8986         since that doesn't include type parameters; don't use `Ldelema'
8987         for type parameters.  Fixes #78980.  Added gtest-293.cs.
8988
8989 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
8990
8991         A fix for #77796
8992         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
8993         conversion is allowed.
8994
8995 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
8996
8997         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
8998         error reporting when no error occurs.
8999
9000 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9001
9002         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9003         does not exist.
9004
9005 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9006
9007         Fix #79584
9008         * class.cs (DefineTypeBuilder): Check circular dependencies before
9009         setting the parent of the TypeBuilder.
9010         (CheckRecursiveDefinition): Don't use 'BaseType', since
9011         it may not be valid until after DefineTypeBuilder.  Use
9012         'base_type' instead.
9013
9014 2006-10-04  Martin Baulig  <martin@ximian.com>
9015
9016         Merged the Anonymous Methods patch.
9017
9018         * anonymous.cs, iterators.cs: The new anonymous methods code.
9019
9020         * statement.cs (Variable): New public abstract class.
9021         (LocalInfo.Variable): New public property.
9022         (LocalInfo.ResolveVariable): New public method.
9023         (Block.Flags): Add `IsIterator'.
9024         (Block.AddVariable): Improved the CS0136 check.
9025         (Block.AnonymousChildren): New public property.
9026         (Block.AddAnonymousChild): New public method.
9027         (ToplevelBlock): Update to use the new anonymous method framework.
9028         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9029         `ToplevelBlock'; this is required to correctly implement the
9030         CS0136 check.
9031         (Fixed, Using): Use `TemporaryVariable' instead of directly
9032         creating the `LocalBuilder'.
9033
9034         * parameter.cs (Parameter.ResolveVariable): New public method.
9035         (Parameters.ResolveVariable): Likewise.
9036
9037         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9038
9039         * class.cs (TypeContainer): Replaced the `iterators' list and
9040         corresponding methods with a list of `CompilerGeneratedClass'es.
9041         (TypeContainer.ResolveMembers): New public method.
9042         (Method): `IIteratorContainer' has been replaced by
9043         `IAnonymousHost'.
9044
9045         * expression.cs (VariableReference): New public abstract base
9046         class for `LocalVariableReference', `ParameterReference' and
9047         `This'.
9048
9049         * codegen.cs (EmitContext): Removed `capture_context',
9050         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9051         (EmitContext.EmitThis): Removed.
9052
9053         * cs-parser.jay: Replace `iterator_container' with
9054         `anonymous_host'.       
9055
9056 2006-10-04  Martin Baulig  <martin@ximian.com>
9057
9058         * generic.cs (GenericMethod): Don't make this abstract.
9059         (Constraints.Clone): Added dummy implementation.
9060
9061 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9062
9063         Fix #79577
9064         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9065         'declspaces'.  Avoid allocating arrays willy-nilly.
9066
9067         Fix #79553
9068         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9069         cases out of the switch.
9070
9071 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9072
9073         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9074         message when non-generic type is used with the type arguments.
9075         * expression.cs: Updated.
9076
9077 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9078
9079         Fix #79013
9080         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9081         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9082         Change semantics slightly.  Don't insist on having only one
9083         temporary EmptyExpression -- just throttle the creation of new ones.
9084
9085         Fix #79451
9086         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9087         non-interfaces too.  If no methods are found, don't try to create
9088         a MethodGroupExpr.
9089
9090 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9091
9092         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9093         generic type.
9094
9095         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9096         us produce better error message.
9097
9098 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9099
9100         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9101         of the `|' operator.
9102
9103         * report.cs: A new warning added.
9104
9105 2006-09-27  Martin Baulig  <martin@ximian.com>
9106
9107         * generic.cs (GenericMethod): Don't make this abstract.
9108
9109 2006-09-27  Martin Baulig  <martin@ximian.com>
9110
9111         * report.cs
9112         (InternalErrorException): Added overloaded ctor taking a params array.
9113
9114 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9115
9116         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9117         Fixed the cases when same error was reported twice.
9118
9119         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9120         now report symbol information.
9121
9122 2006-09-25  Martin Baulig  <martin@ximian.com>
9123
9124         * class.cs: Completely unified with the gmcs version.
9125
9126 2006-09-25  Martin Baulig  <martin@ximian.com>
9127
9128         * typemanager.cs (TypeManager.IsNullableType): New public function.
9129         (TypeManager.IsNullableTypeOf): Likewise.
9130         (TypeManager.IsNullableValueType): Likewise.
9131
9132         * class.cs (MethodCore): Added the `GenericMethod' argument from
9133         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9134
9135 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9136
9137         * convert.cs: Unify with gmcs version.
9138
9139 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9140
9141         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9142         verify them as well.
9143
9144         * report.cs: New warning.
9145
9146 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9147
9148         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9149         for anonymous block with out argument.
9150
9151 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9152
9153         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9154         not used private events only.
9155
9156 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9157
9158         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
9159
9160         * const.cs (Const.Define): Check for constant type.
9161         (Const.IsConstantTypeValid): Looks for valid constant types.
9162
9163         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
9164
9165         * ecore.cs (EmptyConstantCast): New common class for all constant based
9166         EmptyCast(s).
9167
9168         * expression.cs (Is.DoResolve): Handle null constant especially.
9169         (New.DoResolve): Check for new void().
9170         (MemberAccess.DoResolve): Cope with all kind of nulls.
9171
9172         * literal.cs (NullConstant): Uses EmptyConstantCast.
9173         (NullDefault): Based on EmptyConstantCast.
9174         (NullLiteral): Uses EmptyConstantCast.
9175
9176         * statement.cs (Block.ResolveMeta): Check for constant type.
9177
9178 2006-09-22  Martin Baulig  <martin@ximian.com>
9179
9180         * delegate.cs, attribute.cs: Merged with the gmcs versions.
9181
9182 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9183
9184         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
9185         not the null type.
9186
9187         Fix part of #79451
9188         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
9189         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
9190         code slightly.
9191
9192 2006-09-22  Martin Baulig  <martin@ximian.com>
9193
9194         * ecore.cs: Merged with the gmcs version.
9195
9196         * generic.cs (ConstructedType): New dummy class.
9197         (TypeArguments): Don't make this abstract.
9198
9199         * typemanager.cs
9200         (TypeManager.IsGenericTypeDefinition): New method.
9201         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
9202
9203 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9204
9205         * expression.cs (ComposedCast): Check for arrays of TypedReference
9206         before creating the type, not after.
9207
9208 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
9209
9210         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
9211         after ToType change.
9212
9213         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
9214         when constant must be implicitly convertible.
9215
9216         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
9217
9218         * ecore.cs (NullCast): Derives from NullConstant.
9219
9220         * expression.cs (Is.DoResolve): Removed useless variables.
9221         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
9222         (New.Constantify): Add enum support.
9223         (MemberAccess.DoResolve): Add warning when accessing null constant or
9224         variable.
9225
9226         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
9227         property.
9228
9229         * literal.cs (NullConstant): New abstract class with common
9230         functionality for all null specializations.
9231         (NullDefault): Represents default(X) when result can be
9232         reduced to null.
9233         (NullLiteral): Updated.
9234
9235         * report.cs: Add new warning.
9236
9237 2006-09-21  Martin Baulig  <martin@ximian.com>
9238
9239         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
9240
9241 2006-09-21  Martin Baulig  <martin@ximian.com>
9242
9243         * generic.cs (GenericConstraints): New dummy class.
9244         (Constraints): Likewise.
9245         (TypeParameter): Likewise.
9246         (TypeParameterName): Likewise.
9247         (GenericMethod): Likewise.
9248
9249         * typemanager.cs (TypeManager.GetGenericArguments): New method.
9250
9251         * decl.cs: Merged with the gmcs version.
9252
9253 2006-09-21  Raja R Harinath  <rharinath@novell.com>
9254
9255         * generic.cs (TypeParameter): Implement IMemberContainer.
9256         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
9257
9258         * rootcontext.cs: Unify with gmcs version.
9259
9260         * report.cs: Unify with gmcs version.
9261         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
9262         from gmcs/generics.cs.
9263         * generics.cs (TypeParameter): New dummy class.
9264
9265         * support.cs: Unify with gmcs version.
9266
9267 2006-09-20  Raja R Harinath  <rharinath@novell.com>
9268
9269         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
9270         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
9271
9272         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
9273         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
9274         * mcs.exe.sources: Add generic.cs.
9275
9276         * codegen.cs: Unify with gmcs version.
9277
9278         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
9279         (EmitContext): Add GenericDeclContainer implementation.
9280         * decl.cs (MemberCore, DeclSpace): Likewise.
9281         * namespace.cs: Remove #ifdef GMCS_SOURCE.
9282
9283         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
9284         MCS TypeManager has a corresponding dummy method.
9285
9286 2006-09-19  Martin Baulig  <martin@ximian.com>
9287
9288         * expression.cs: Completely merged with the gmcs version.
9289
9290 2006-09-19  Martin Baulig  <martin@ximian.com>
9291
9292         * expression.cs (Invocation): Merged with the gmcs version.
9293         (ArrayAccess.GetStoreOpcode): Likewise.
9294
9295 2006-09-19  Martin Baulig  <martin@ximian.com>
9296
9297         * typemanager.cs
9298         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
9299         (TypeManager.IsGenericMethodDefinition): Likewise.
9300
9301 2006-09-19  Martin Baulig  <martin@ximian.com>
9302
9303         * typemanager.cs
9304         (TypeManager.IsEqual): Moved the gmcs implementation here.
9305         (TypeManager.DropGenericTypeArguments): Likewise.
9306         (TypeManager.DropGenericMethodArguments): Likewise.
9307         (TypeManager.GetTypeArguments): Moved here from gmcs.
9308         (TypeManager.HasGenericArguments): Likewise.
9309
9310 2006-09-19  Martin Baulig  <martin@ximian.com>
9311
9312         * expression.cs (Binary): Merged with the gmcs version.
9313
9314 2006-09-19  Martin Baulig  <martin@ximian.com>
9315
9316         * expression.cs (Probe, As, Is): Merged with the gmcs version.
9317
9318 2006-09-19  Martin Baulig  <martin@ximian.com>
9319
9320         * typemanager.cs: Merged with the gmcs version.
9321
9322 2006-09-16  Raja R Harinath  <rharinath@novell.com>
9323
9324         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
9325         * driver.cs: Likewise.
9326
9327 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
9328
9329         A fix for #79401
9330         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
9331         only if parent type is class.
9332         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
9333         update.
9334
9335 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
9336
9337         * cs-parser.jay,
9338         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
9339         keywords are used.
9340         * typemanager.cs(CSharpName): Converts NullType to null.
9341
9342 2006-09-15  Martin Baulig  <martin@ximian.com>
9343
9344         * typemanager.cs
9345         (TypeManager.GetMethodName): Added mcs implementation.
9346         (TypeManager.IsEqual): Likewise.
9347
9348         * ecore.cs
9349         (SimpleName.RemoveGenericArity): Added dummy implementation.
9350
9351         * pending.cs: Merged with the gmcs version.     
9352
9353 2006-09-15  Martin Baulig  <martin@ximian.com>
9354
9355         * statement.cs: Merge with the gmcs version.
9356
9357 2006-09-15  Martin Baulig  <martin@ximian.com>
9358
9359         * statement.cs (Switch): Merge with the gmcs implementation
9360         (without nullables), which is newer.
9361
9362 2006-09-15  Martin Baulig  <martin@ximian.com>
9363
9364         * statement.cs (Block.Variables): Make this public.
9365         (ToplevelBlock.Parameters): Make this a property.
9366         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
9367
9368 2006-09-15  Martin Baulig  <martin@ximian.com>
9369
9370         * namespace.cs: Merge with the gmcs version.
9371
9372 2006-09-15  Martin Baulig  <martin@ximian.com>
9373
9374         * decl.cs (MemberName): Minor code cleanups.
9375
9376 2006-09-15  Martin Baulig  <martin@ximian.com>
9377
9378         * parameter.cs: Merge with the gmcs version.
9379
9380 2006-09-15  Martin Baulig  <martin@ximian.com>
9381
9382         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
9383         and an error in mcs.
9384
9385 2006-09-15  Martin Baulig  <martin@ximian.com>
9386
9387         * flowanalysis.cs: Merged from GMCS; added the generics code into
9388         a `GMCS_SOURCE' conditional so we can share this file.
9389
9390 2006-09-08  Martin Baulig  <martin@ximian.com>
9391
9392         * typemanager.cs (TypeManager.interlocked_type): New public field.
9393         (TypeManager.int_interlocked_compare-exchange): New public field.
9394         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
9395         enumerator types here and call InitGenericCoreTypes().
9396         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
9397         after calling InitEnumUnderlyingTypes().
9398
9399         * rootcontext.cs
9400         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
9401         `classes_second_stage'. 
9402
9403 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
9404
9405         * assign.cs, ecore.cs, expression.cs: Share error message text.
9406         * class.cs (FieldMember.Define): Check for varible of static type.
9407         * driver.cs (LoadAssembly): Uses error output for errors.
9408         * statement.cs: Updated.
9409
9410 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
9411
9412         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
9413         type instance.
9414
9415 2006-09-07  Martin Baulig  <martin@ximian.com>
9416
9417         * driver.cs
9418         (MainDriver): Revert r62663 from Marek; see #70506 for details.
9419
9420 2006-08-29  Miguel de Icaza  <miguel@novell.com>
9421
9422         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
9423         
9424 2006-08-17  Miguel de Icaza  <miguel@novell.com>
9425
9426         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
9427         #52019 and #79064, the use of the \uXXXX sequence in source code
9428         to represent unicode characters.
9429
9430 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
9431
9432         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
9433         support.
9434         * class.cs, ecore.cs, statement.cs: Merged to one error message.
9435
9436 2006-08-13  Miguel de Icaza  <miguel@novell.com>
9437
9438         * assign.cs: Catch attempts to assign to a method groups in += and
9439         report as 1656
9440
9441 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
9442
9443         A fix for #79056
9444         * cs-parser.jay: Don't destroy current array type by typeof of array's.
9445
9446 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
9447
9448         * class.cs (Method.Define): Issue a warning when generic method looks like
9449         an entry point.
9450         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
9451         as well.
9452
9453 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
9454  
9455         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
9456         looking for ctor.
9457         * decl.cs (MemberCache.FindMembers): When container is interface we need to
9458         search all base interfaces as a member can be ambiguous.
9459         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
9460         Constructor member type filter. 
9461         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
9462         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
9463         reporting for returned memberinfos.
9464         * report.cs: Updated.
9465         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
9466         version to work on all runtimes.
9467         (TypeManager.RealMemberLookup): Removed members filtering.
9468
9469 2006-08-08  Raja R Harinath  <rharinath@novell.com>
9470
9471         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
9472         (PropertyExpr.EmitAssign): Likewise.
9473         * expression.cs (Indirection.EmitAssign): Likewise.
9474         (LocalVariableReference.EmitAssign): Likewise.
9475         (ParameterReference.EmitAssign): Likewise.
9476         (Invocation.EmitArguments): Likewise.
9477         (ArrayAccess.EmitAssign): Likewise.
9478         (IndexerAccess.EmitAssign): Likewise.
9479         (This.EmitAssign): Likewise.
9480         (ConditionalLogicalOperator.Emit): Likewise.
9481
9482         Fix #79026
9483         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
9484         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
9485         leave it in after returning it.
9486         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
9487
9488 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
9489
9490         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
9491         message.
9492
9493 2006-08-03  Raja R Harinath  <rharinath@novell.com>
9494
9495         Fix cs0146-3.cs and cs0146-4.cs.
9496         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
9497         enclosing types don't depend on the current type.
9498
9499 2006-08-02  Raja R Harinath  <rharinath@novell.com>
9500
9501         Fix #77963
9502         * class.cs (TypeContainer.DoDefineMembers): Use
9503         FindBaseMemberWithSameName on Parent, since we're interested in
9504         whether we hide inherited members or not.
9505         (FindBaseMemberWithSameName): Make slightly more robust.
9506
9507         Fix the non-generic testcase from #77396
9508         * decl.cs (DeclSpace.DeclContainer): Remove override.
9509
9510         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
9511         declspaces for doppelgangers too.
9512         (UsingEntry): Implement IResolveContext.
9513         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
9514         'this' as the resolve context.
9515         (LocalAliasEntry): Likewise.
9516
9517         Implement parts of #77403
9518         * roottypes.cs (RootDeclSpace): New.  Used to represent the
9519         toplevel declaration space.  Each namespace declaration introduces
9520         a "partial" root declaretion space.
9521         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
9522         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
9523         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
9524         from 'current_namespace.SlaveDeclSpace'.
9525         (namespace_declaration): Likewise.
9526         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
9527         check.  It can't happen now.
9528         * decl.cs (DeclSpace.LookupType): Likewise.
9529         * driver.cs (MainDriver): Sanity check.
9530
9531 2006-08-01  Raja R Harinath  <rharinath@novell.com>
9532
9533         * decl.cs (DeclSpace.FindNestedType): Remove.
9534         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
9535         LookupTypeContainer to get the container of the nested type.
9536         * class.cs (TypeContainer.FindNestedType): Make non-override.
9537
9538 2006-07-31  Raja R Harinath  <rharinath@novell.com>
9539
9540         * decl.cs (DeclSpace.PartialContainer): Move field from ...
9541         * class.cs (TypeContainer.PartialContainer): ... here.
9542         (TypeContainer.AddBasesForPart): New helper.
9543         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
9544         instead.
9545         * cs-parser.jay (current_class): Convert to DeclSpace.
9546         (struct_declaration, interface_declaration, class_declaration):
9547         Use AddBasesForPart instead of .Bases directly.
9548         * const.cs, iterators.cs: Update to changes.
9549
9550 2006-07-28  Raja R Harinath  <rharinath@novell.com>
9551
9552         * class.cs (TypeContainer.AddMemberType): Rename from
9553         AddToTypeContainer.
9554         (TypeContainer.AddMember): Rename from AddToMemberContainer.
9555         (AddTypeContainer): New.  Combine AddClassOrStruct and
9556         AddInterface.
9557         (AddPartial): Update.  Add 'is_partial' argument.
9558         * roottypes.cs: Update to changes.
9559         * cs-parser.jay (push_current_class): New helper for handling
9560         current_container and current_class.
9561         (struct_declaration, interface_declaration, class_declaration):
9562         Use it.
9563
9564 2006-07-26  Raja R Harinath  <rharinath@novell.com>
9565
9566         * roottypes.cs: Rename from tree.cs.
9567
9568         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
9569         * tree.cs (Tree, ITreeDump): Remove types.
9570         * rootcontext.cs (tree, Tree): Remove fields.
9571         (root, ToplevelTypes): New.
9572         * *.cs: Update to rename.
9573
9574         * tree.cs (Tree.RecordDecl): Remove.
9575         (RootTypes.AddToTypeContainer): Record the toplevel type in its
9576         namespace here.
9577         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
9578
9579 2006-07-23  Raja R Harinath  <harinath@gmail.com>
9580
9581         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
9582         DoFlowAnalysis and OmitStructFlowAnalysis here.
9583         (ec.With): Rename from WithUnsafe and generalize.
9584         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
9585         (ec.WithFlowAnalyis): New.
9586         * ecore.cs, expression.cs, statement.cs: Update.
9587
9588 2006-07-22  Raja R Harinath  <harinath@gmail.com>
9589
9590         * statement.cs (Block.ResolveMeta): Simplify slightly.
9591
9592         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
9593         multiple boolean fields.  Convert InUnsafe, constant_check_state,
9594         check_state to flags.
9595         (CheckState, ConstantCheckState): Update.
9596         (InUnsafe): New read-only property.
9597         (FlagsHandle): Rename from CheckStateHandle and convert to handle
9598         arbitrary flags.
9599         (WithUnsafe): New helper similar to WithCheckState.
9600         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
9601         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
9602
9603 2006-07-21  Raja R Harinath  <rharinath@novell.com>
9604
9605         Make comparisons use the same IL irrespective of whether they're
9606         in a 'checked' or 'unchecked' context: one of the issues in #78899
9607         * codegen.cs (EmitContext.CheckState): Make read-only property.
9608         (EmitContext.ConstantCheckState): Likewise.
9609         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
9610         helper that implement a save/restore stack for CheckState
9611         values.  This is the only way to change check-state.
9612         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
9613         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
9614         (CheckedExpr.EmitBranchable): New forwarding method.
9615         (UnCheckedExpr): Likewise.
9616         * statement.cs (Block.ResolveMeta): Use WithCheckState.
9617         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
9618         (Checked.Resolve, checked.DoEmit): Likewise.
9619
9620 2006-07-20  Miguel de Icaza  <miguel@novell.com>
9621
9622         * anonymous.cs: Cache the resolved anonymous delegate, and return
9623         this so that the ResolveTopBlock is only triggered once, not
9624         twice.
9625
9626         Currently we trigger ResolvetopBlock twice due to a first pass of
9627         argument check compatibility, and a second pass that does the
9628         actual resolution.   
9629         
9630 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
9631
9632         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
9633         modifiers.
9634         * rootcontext.cs (Reset): Add helper_classes.
9635
9636 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
9637
9638         A fix for #78860
9639         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
9640         correctly.
9641
9642 2006-07-13  Miguel de Icaza  <miguel@novell.com>
9643
9644         * statement.cs (Lock): Handle expressions of type
9645         TypeManager.null_type specially.  Fixes #78770
9646
9647 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
9648
9649         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
9650         to an event.
9651
9652 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
9653
9654         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
9655         for accessors as well.
9656         * ecore.cs (EventExpr): Add AccessorTable.
9657
9658 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
9659
9660         A fix for #78738
9661         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
9662         for CS0122 where appropriate.
9663         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
9664         level attributes.
9665         (Filter): Assembly can be null in the case of top level attributes.
9666
9667 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
9668
9669         A fix for #78690
9670
9671         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
9672         is done at global level.
9673
9674 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
9675
9676         A fix for #77002, Implemented TypeForwarder support.
9677
9678         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
9679         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
9680         * typemanager.cs (): Add type_forwarder_attr_type.
9681
9682 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
9683
9684         * report.cs: Add CS0469 warning.
9685
9686 2006-06-21  Martin Baulig  <martin@ximian.com>
9687
9688         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
9689         the `try'-block, so we also report CS0016 etc. there.
9690
9691 2006-06-21  Martin Baulig  <martin@ximian.com>
9692
9693         * delegate.cs
9694         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
9695
9696 2006-06-21  Martin Baulig  <martin@ximian.com>
9697
9698         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
9699         also report CS1686 for parameters.
9700
9701 2006-06-21  Martin Baulig  <martin@ximian.com>
9702
9703         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
9704         instead of an error if the value is not implicitly convertible to
9705         the switch types; fixes #77964.
9706
9707 2006-06-21  Raja R Harinath  <rharinath@novell.com>
9708
9709         Fix #78673
9710         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
9711         FieldBuilder is null.
9712
9713         Fix #78662
9714         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
9715         'left' and 'right' before error-checking.
9716
9717 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
9718
9719         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
9720         Fixed bug #78601.
9721         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
9722         (FieldExpr.DoResolve): likewise.
9723         (PropertyExpr.InstanceResolve): likewise.
9724         (EventExpr.InstanceResolve): likewise. 
9725
9726 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
9727
9728         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
9729         attribute applicable tests for attribute argument.
9730
9731 2006-06-02  Raja R Harinath  <rharinath@novell.com>
9732
9733         Fix #78079
9734         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
9735         (Binary.OverloadResolve_PredefinedIntegral): New.
9736         (Binary.OverloadResolve_PredefinedFloating): New.
9737         (Binary.OverloadResolve_PredefinedString): New.
9738         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
9739         Follow the standard more closely, and treat numeric promotions in
9740         terms of overload resolution.
9741         (Binary.CheckShiftArguments): Simplify.
9742
9743 2006-06-01  Raja R Harinath  <rharinath@novell.com>
9744
9745         * flowanalysis.cs (MyBitVector): Simplify representation.
9746         (MyBitVector.Clone): Avoid allocating BitArray.
9747         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
9748         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
9749         (*): Update.  Change all references to MyBitVector.And and
9750         MyBitVector.Or to &= and |=.
9751
9752 2006-05-29  Raja R Harinath  <rharinath@novell.com>
9753
9754         Fix cs0231-[34].cs.
9755         * cs-parser.jay (formal_parameter_list): Extend the pattern below
9756         to param arguments too.
9757
9758 2006-05-26  Miguel de Icaza  <miguel@novell.com>
9759
9760         * cs-parser.jay: Catch another parsing form for arglist being
9761         followed by other arguments.  Fixes #78313.
9762
9763 2006-05-24  Raja R Harinath  <rharinath@novell.com>
9764
9765         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
9766         checking of out parameters to ...
9767         (FlowBranchingToplevel.Merge): ... here.
9768         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
9769         set, propagate the origin upward, and only complain if there was
9770         no other error.
9771         (FlowBranchingException.AddContinueOrigin): Likewise.
9772         (FlowBranchingException.AddReturnOrigin): Likewise.
9773         (FlowBranchingException.AddGotoOrigin): Likewise.       
9774
9775 2006-05-23  Raja R Harinath  <rharinath@novell.com>
9776
9777         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
9778         unreachable, skip it.
9779         (FlowBranchingException.Merge): Always propagate jumps, even if
9780         the finally block renders subsequent code unreachable.
9781
9782 2006-05-18  Raja R Harinath  <rharinath@novell.com>
9783
9784         Fix #77601
9785         * statement.cs (Goto.Resolve): Move responsibility for resolving
9786         'goto' to FlowBranching.AddGotoOrigin.
9787         (Goto.SetResolvedTarget): New.  Callback to set the
9788         LabeledStatement that's the target of the goto.
9789         (Goto.DoEmit): Use Leave instead of Br when crossing an
9790         unwind-protect boundary.
9791         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
9792         LookupLabel and adjust to new semantics.
9793         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
9794         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
9795         Goto.SetResolvedTarget to update target.
9796         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
9797         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
9798         AddBreakOrigin & co.  Delay propagation until ...
9799         (FlowBranchingException.Merge): ... this.
9800
9801         * statement.cs (Block.Resolve): Always depend on flow-branching to
9802         determine unreachability.  Kill workaround that originally emitted
9803         only one statement after an "unreachable" label (see infloop in
9804         test-515.cs).
9805
9806         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
9807         This is still "wrong", but anything better would probably need a
9808         multi-pass algorithm.
9809         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
9810         usage vector.  Force current usage vector to be reachable, to
9811         optimistically signify backward jumps.
9812         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
9813         detected.
9814         (FlowBranchingLabeled.Merge): New.  If no backward jump was
9815         detected, return the original salted-away usage vector instead,
9816         updated with appropriate changes.  Print unreachable warning if
9817         necessary.
9818         * statement.cs (Block.Resolve): Don't print unreachable warning on
9819         a labeled statement.
9820
9821 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
9822
9823         * driver.cs: Pass filename without path to AssemblyBuilder's 
9824         AddResourceFile. Fixes bug #78407.
9825
9826 2006-05-17  Raja R Harinath  <rharinath@novell.com>
9827
9828         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
9829         * flowanalysis.cs (FlowBranchingLabeled): ... here.
9830         (FlowBranching.MergeChild): Overwrite
9831         reachability information from Labeled branchings too.
9832
9833 2006-05-16  Raja R Harinath  <rharinath@novell.com>
9834
9835         * statement.cs (Goto.Resolve): Merge jump origins here ...
9836         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
9837
9838         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
9839         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
9840         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
9841         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
9842         here, ...
9843         * statement.cs (Goto.Resolve): ... not here.
9844         (Goto.Emit): Remove CS1632 check.
9845
9846 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
9847
9848         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
9849         error message.
9850
9851 2006-05-11  Raja R Harinath  <rharinath@novell.com>
9852
9853         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
9854         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
9855         (FlowBranchingException.Label): Likewise.
9856
9857         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
9858         given value.
9859         (MyBitVector.Or): Use it to avoid losing information (Count).
9860         (FlowBranching.MergeOrigins): Likewise.
9861
9862         * flowanalysis.cs (UsageVector.IsDirty): Remove.
9863         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
9864         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
9865         (UsageVector.ToString): Simplify.
9866         (UsageVector.MergeSiblings): Move here from ...
9867         (FlowBranching.Merge): ... here.
9868         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
9869         not a MyBitVector.
9870
9871 2006-05-10  Raja R Harinath  <rharinath@novell.com>
9872
9873         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
9874         null bitvector is treated as all-true.
9875
9876         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
9877         (MyBitVector): Rationalize invariants.  'vector != null' implies
9878         that we have our own copy of the bitvector.  Otherwise,
9879         'InheritsFrom == null' implies all inherited bits are true.
9880
9881 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
9882
9883         * statement.cs (LocalInfo): Add IsConstant.
9884         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
9885         local variable for constants.
9886
9887 2006-05-09  Raja R Harinath  <rharinath@novell.com>
9888
9889         * flowanalysis.cs (MyBitVector.Empty): New.
9890         (MyBitVector): Don't allow InheritedFrom to be null.
9891         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
9892         (UsageVector, FlowBranching): Update to changes.
9893
9894         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
9895         recursion.  The 'Parent == null' condition isn't sufficient for
9896         anonymous methods.
9897         (FlowBranching.AddBreakOrigin): Likewise.
9898         (FlowBranching.AddContinueOrigin): Likewise.
9899         (FlowBranching.AddReturnOrigin): Likewise.
9900         (FlowBranching.StealFinallyClauses): Likewise.
9901         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
9902         (FlowBranching.CheckOutParameters): Likewise.
9903         (FlowBranchingToplevel): Terminate all the above recursions here.
9904         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
9905         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
9906
9907         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
9908         toplevel block.
9909         (FlowBranchingToplevel): New.  Empty for now.
9910         (FlowBranching.MergeTopBlock): Update.
9911         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
9912         branching for the anonymous delegate.
9913         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
9914
9915         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
9916         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
9917         information at the start of the merge.  Reorganize.
9918
9919 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
9920
9921         * class.cs (MethodData.Define): Method cannot implement interface accessor.
9922
9923 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
9924
9925         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
9926         to newly introduced ctor.
9927
9928         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
9929         message to one place.
9930         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
9931         global namespace.
9932
9933 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
9934
9935         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
9936
9937         * ecore.cs (Expression.ResolveAsConstant): Updated.
9938
9939         * statement.cs (ResolveMeta): Updated.
9940
9941 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
9942
9943         * cs-parser.jay: __arglist cannot be used in initializer.
9944
9945 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
9946
9947         A fix for #77879
9948         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
9949         private types.
9950
9951 2006-05-05  Raja R Harinath  <rharinath@novell.com>
9952
9953         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
9954         (LabeledStatement): Add 'name' parameter.
9955         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
9956         (Block.AddLabel): Update to changes.
9957         * cs-parser.jay (labeled_statement): Likewise.
9958
9959         * flowanalysis.cs (BranchingType.Labeled): New.
9960         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
9961         (FlowBranchingLabeled): New.  Does nothing for now, but will
9962         eventually handle 'goto' flows.
9963         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
9964         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
9965         that's terminated ...
9966         (Block.Resolve): ... here.
9967
9968         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
9969         (UsageVector.MergeFinallyOrigins): Likewise.
9970         (FlowBranching.InTryOrCatch): Likewise.
9971         (FlowBranching.AddFinallyVector): Likewise.
9972         (FlowBranchingException): Update to changes.
9973
9974         Fix #78290
9975         * statement.cs (Return.Resolve): Move error checking to ...
9976         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
9977         (FlowBranchingException): Handle return origins like break and
9978         continue origins.
9979         (FlowBranching.UsageVector.CheckOutParameters): Remove.
9980
9981 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
9982
9983         A fix for #76122
9984         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
9985         filter.
9986
9987 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
9988
9989         A fix for #77543
9990         * class.cs (MethodData.Define): Do public accessor check only when method
9991         implements an interface.
9992
9993 2006-05-04  Raja R Harinath  <rharinath@novell.com>
9994
9995         Remove special handling of 'break'
9996         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
9997         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
9998         (UsageVector.Break): Remove.
9999         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10000         reachability.
10001         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10002
10003         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10004         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10005
10006 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10007
10008         A fix for #75726
10009         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10010         be the interface member.
10011
10012 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10013
10014         A fix for #60069
10015         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10016         for emitting small (int) values.
10017
10018 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10019
10020         Fix #59427
10021         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10022         control-flow passes through the 'finally' after merging-in all the
10023         control-flows from 'try' and the 'catch' clauses.
10024
10025         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10026         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10027         always true at the only non-recursive entry point.
10028         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10029         FlowBranchingBreakable.
10030         (FlowBranchingLoop): Remove.
10031         * statement.cs (Return.DoResolve): Update to changes.
10032
10033         Fix #76471, #76665
10034         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10035         (FlowBranching.CreateBranching): Handle it: create a
10036         FlowBranchingContinuable.
10037         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10038         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10039         except that it handles the 'continue' command.
10040         (FlowBranching.UsageVector.MergeOrigins): Rename from
10041         MergeBreakOrigins.
10042         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10043         except that it overrides AddContinueOrigin.
10044         (FlowBranchingException): Override AddContinueOrigin, similar to
10045         AddBreakOrigin.
10046         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10047         Create a new branching around the embedded statement.
10048         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10049         control flow after the embedded statement.
10050         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10051
10052         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10053         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10054         FlowBranchingBreakable.
10055         (FlowBranchingSwitch): Remove.
10056
10057         Fix test-503.cs
10058         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10059         error reporting to ...
10060         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10061         Rename from 'AddBreakVector'.  Add new location argument.  Return
10062         a bool indicating whether the 'break' crosses an unwind-protect.
10063         (FlowBranchingException.AddBreakOrigin): Add.
10064         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10065         flowbranching after updating with the effects of the 'finally'
10066         clause.
10067         (FlowBranchingBreakable): New common base class for
10068         FlowBranchingLoop and FlowBranchingSwitch.
10069
10070         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10071         embedded statement.
10072         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10073
10074 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10075
10076         * statement.cs (Do.Resolve): If the loop is infinite, set the
10077         barrier.
10078         (While.Resolve, For.Resolve): Set a barrier after the embedded
10079         statement.  There's no direct control flow that goes from the end
10080         of the embedded statement to the end of the loop.
10081         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10082         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10083         above ensure that the reachability is correctly computed.
10084
10085         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10086         (UsageVector.MergeBreakOrigins): If the current path is
10087         unreachable, treat it as if all parameters/locals are initialized.
10088         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10089         infinite loops before merging-in break origins.
10090
10091         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10092         (Reachability.Reachable): Split part into ...
10093         (Reachability.Unreachable): ... this.  Simplify.
10094         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10095
10096         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10097         (Reachability.SetThrowsSometimes): Likewise.
10098         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10099         TriState.Always, use corresponding property.
10100         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10101         (Block.Resolve): Likewise.  Remove some redundant checks.
10102
10103 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10104
10105         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10106         (Reachability.Meet): Don't bother checking AlwaysThrows --
10107         barrier is always set.
10108         (FlowBranchingBlock.Merge): Likewise.
10109
10110 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10111
10112         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10113         checks for unreachable.
10114
10115 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10116
10117         A fix for #77980
10118         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10119
10120         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10121         whether field is really assigned.
10122
10123 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10124
10125         * flowanalysis.cs (Reachability): Make 4-argument constructor
10126         private.
10127         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10128         (Reachability.Always): Rename from the highly misleading
10129         'Reachability.Never'.
10130         (FlowBranching.Merge): Update to changes.  Mark an impossible
10131         situation with a 'throw'.
10132         (*): Update to changes.
10133
10134 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10135
10136         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10137         Remove 'Undefined'.
10138         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10139         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10140         (*): Update to changes.
10141         * statement.cs: Update to changes.
10142
10143 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10144
10145         A fix for #78049
10146         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10147
10148 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10149
10150         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10151         dummy UsageVector.
10152
10153         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10154         argument to two arguments: an usage-vector and a bool.  Move call
10155         to FlowBranching.Merge () ...
10156         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10157
10158         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
10159         handling of loop and switch reachability to ...
10160         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
10161
10162 2006-04-27  Raja R Harinath  <harinath@gmail.com>
10163
10164         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
10165         handling to FlowBranchingLoop.InLoop.
10166         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
10167
10168 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
10169
10170         A fix for #78115
10171         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
10172         anonymous method is allowed from AnonymousContainer here.
10173
10174         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
10175
10176 2006-04-24  Raja R Harinath  <rharinath@novell.com>
10177
10178         Fix #78156
10179         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
10180
10181 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
10182
10183         A fix for #49011.
10184         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
10185         (DoubleConstant.Reduce): Ditto.
10186
10187 2006-04-23  Raja R Harinath  <rharinath@novell.com>
10188
10189         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
10190         Remove 'lvalue_right_side' argument.  Move parts to ...
10191         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
10192         (LocalVariable.DoResolveLValue): ... these.
10193
10194 2006-04-21  Raja R Harinath  <rharinath@novell.com>
10195
10196         Fix cs1655.cs
10197         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
10198         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
10199         (LocalVariableReference.DoResolveBase): Use it to implement new
10200         CS1655 check.
10201         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
10202         (Argument.Resolve): Simplify.  Move CS1510 check ...
10203         * ecore.cs (Expression.ResolveLValue): ... here.
10204         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
10205         (PropertyExpr.DoResolveLValue): Likewise.
10206         (FieldExpr.Report_AssignToReadonly): Likewise.
10207         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
10208         LValueMemberAccess or LValueMemberOutAccess on instance depending
10209         on it.
10210         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
10211         DoResolve as appropriate.
10212
10213 2006-04-20  Raja R Harinath  <rharinath@novell.com>
10214
10215         Fix #75800
10216         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
10217         implicit conversions on 'out' and 'ref' arguments.
10218
10219         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
10220         improve clarity.  Remove dead code.
10221
10222         Fix #66031
10223         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
10224         (Catch.Resolve): Resolve VarBlock if it exists.
10225
10226 2006-04-19  Miguel de Icaza  <miguel@novell.com>
10227
10228         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
10229         twice, this was some residual code, the enumerator was emitted
10230         properly in the two branche of if later.
10231
10232 2006-04-19  Raja R Harinath  <rharinath@novell.com>
10233
10234         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
10235         cast is never an lvalue.
10236         (Cast.DoResolve, Cast.ResolveRest): Combine.
10237         (Argument.Emit): Simplify slightly.  Move 'Expr is
10238         IMemoryLocation' check ...
10239         (Argument.Resolve): ... here.
10240         (Argument.Error_LValueRequired): Remove.  Inline into only user.
10241
10242         Simplifications.  Fix cs0191-2.cs
10243         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
10244         CS1649 and CS1651 to ...
10245         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
10246         the actual selection of the error code and message to a lookup
10247         table.  Add a dummy return value to simplify callsites.
10248         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
10249         readonly fields of other instances of the same type.  Move CS0197
10250         warning from ...
10251         * expression.cs (Argument.Resolve): ... here.  Simplify code.
10252         Ensure that ec.InRefOutArgumentResolving is only set during LValue
10253         resolution of an out or ref argument.  The code simplification
10254         above uses this invariant.
10255
10256 2006-04-18  Raja R Harinath  <rharinath@novell.com>
10257
10258         Possibly fix #77752.  Fix cs1690-[4-7].cs.
10259         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
10260         CheckMarshallByRefAccess.  Drop parameter.
10261         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
10262         warning.
10263         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
10264         InstanceExpression.
10265         * report.cs (AllWarnings): Add CS1690.
10266         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
10267         for ref access too.
10268         (LocalVariableReference.DoResolveBase): Update.
10269
10270 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10271
10272         * class.cs (MethodOrOperator): Moved common parts from method class.
10273         detect obsolete attributes.
10274         (Method.Define): Simplified as it reuses code from base.
10275         (Constructor.ValidAttributeTargets): Fixed issue found during
10276         refactoring.
10277         (Destructor.ValidAttributeTargets): Fixed issue found during
10278         refactoring.
10279         (Operator): Finished refactoring set off by #78020. Operator class is now
10280         ordinary method class.
10281
10282         * anonymous.cs: Updated.
10283
10284         * decl.cs (DeclSpace): Add IsGeneric
10285
10286 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10287
10288         * class.cs (Constructor.Emit): Don't emit the attributes twice.
10289
10290 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10291
10292         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
10293         detect obsolete attributes.
10294         (Method.CreateEmitContext): Moved to MethodOrOperator.
10295
10296 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10297
10298         A fix for #78048.
10299         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
10300         customized exception to make crash detection easier.
10301         (MethodOrOperator): Started to work on new base class for methods and
10302         operators.
10303         (Method): Derives from MethodOrOperator.
10304         (Constructor.Emit): Emits its own attributes.
10305         (AbstractPropertyEventMethod.Emit): Ditto.
10306         (Operator): Derives from MethodOrOperator, will refactor fully in extra
10307         patch.
10308         (Operator.Emit): It's temporary more tricky than should be.
10309         
10310         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
10311
10312         * report.cs (InternalErrorException): Add ctor with inner exception.
10313
10314 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
10315
10316         A fix for #76744.
10317         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
10318         only not visible.
10319
10320 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
10321
10322         A fix for #77916.
10323         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
10324         array.
10325
10326 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10327
10328         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
10329         attribute is present and Guid not.
10330         (Interface.ApplyAttributeBuilder): Ditto.
10331
10332         * attribute.cs: Add error message.
10333
10334 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10335
10336         A fix for #78020.
10337
10338         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
10339         sources (it's composite) so hold them in extra array as they are used in
10340         Emit phase only. It worked in the previous versions by mistake.
10341         (Attribute.Emit): Emit attribute for more owners when exist.
10342
10343         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
10344         it has now different behaviour.
10345
10346 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
10347
10348         * constant.cs (Constant.IsDefaultInitializer): New method.
10349
10350         * class.cs: Updated.
10351
10352         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
10353         re-initialize default values. It saves KBs almost for every assembly.
10354         Thanks Zoltan for the idea.
10355         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
10356         (ArrayCreation.DoResolve): Resolve only once.
10357         (ArrayCreation.Emit): Emit static initializer only when it is faster.
10358         (ArrayCreation.GetAttributableValue): Cope with optimized values.
10359
10360 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10361
10362         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
10363         From #77961.
10364
10365 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10366
10367         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
10368         in an embedded statement too.
10369
10370 2006-04-01  Raja R Harinath  <rharinath@novell.com>
10371
10372         Fix #77958
10373         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
10374
10375 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10376
10377         A fix for #77966.
10378
10379         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
10380         was not specified.
10381
10382         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
10383
10384 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
10385
10386         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
10387         phase.
10388
10389         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
10390         LocalTemporary change.
10391
10392         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
10393         TypeContainer.
10394         (ClassOrStruct.DefineFieldInitializers): Implemented static field
10395         initializers optimization.
10396         (ClassOrStruct.TypeAttr): Moved from modifiers.
10397         (Constructor.CheckBase): Don't crash when static ctor has parameters.
10398         (FieldBase.ResolveInitializer): Resolves initializer.
10399         (FieldBase.HasDefaultInitializer): New property.
10400
10401         * cs-parser.jay: Removed message.
10402
10403         * expression.cs (CompilerGeneratedThis): New specialization.
10404
10405         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
10406
10407 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
10408
10409         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
10410
10411 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10412
10413         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
10414         be now EnumConstants only.
10415
10416 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10417
10418         * attribute.cs, driver.cs: Reset more caches.
10419
10420 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10421
10422         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
10423
10424 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10425
10426         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
10427         for easier reuse. Updated all overrides.
10428         (IntegralConstant): New base class for all integral constants.
10429         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
10430         of the constant range, report custom error.
10431         (UIntConstant.Reduce): Fixed uint conversion.
10432
10433         * ecore.cs, literal.cs: Reduce updates.
10434
10435 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10436
10437         A fix for #75813.
10438
10439         * class.cs (Constructor.Define): Removed extra if for default ctors.
10440         A patch from Atsushi Enomoto.
10441
10442 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10443
10444         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
10445         GetAttributableValue.
10446
10447         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
10448         when required.
10449
10450         * convert.cs (ImplicitConversionRequired): Error message moved to
10451         DoubleLiteral.
10452
10453         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
10454         automatic implicit conversion of an output value.
10455         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
10456
10457         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
10458         conversion.
10459         (TypeOf.GetAttributableValue): Add extra handling for object type.
10460
10461         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
10462         special error message.
10463
10464 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
10465
10466         * class.cs (Constructor.Emit): Don't crash when struct ctor is
10467         InternalCall.
10468         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
10469         compatible with MS runtime.
10470
10471 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
10472
10473         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
10474         attribute arguments here.
10475
10476         * class.cs (Indexer.Define): The check was moved to attribute class.
10477
10478 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
10479
10480         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
10481         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
10482         easier.
10483
10484 2006-03-22  Raja R Harinath  <rharinath@novell.com>
10485
10486         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
10487         mcs to keep code differences small.
10488         * attribute.cs (Attribute.GetParameterDefaultValue): New.
10489         * typemanager.cs (parameter_default_value_attribute_type): New.
10490         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
10491         CS1908 check.
10492
10493 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
10494
10495         * expression.cs (StringConcat.Append): Reverted back to no warning state.
10496
10497 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
10498
10499         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
10500
10501         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
10502         the blocks too.
10503
10504 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
10505
10506         * doc-bootstrap.cs : fix build.
10507
10508 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
10509
10510         * expression.cs (StringConcat.Append): Issue a warning when empty string
10511         is going to append.
10512
10513 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
10514
10515         * assign.cs (CompoundAssign.ResolveSource): Removed.
10516
10517         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
10518         clean up.
10519
10520         * class.cs (TypeContainer.FindMethods): Removed.
10521         (TypeContainer.CheckMemberUsage): Made static.
10522
10523         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
10524
10525         * constant.cs (CheckRange): Removed unused type argument.
10526         (CheckUnsigned): Removed unused type argument.
10527
10528         * cs-parser.jay: Updated after MemberAccess clean up.
10529         Uses Length for empty string test.
10530
10531         * cs-tokenizer.cs: Uses Length for empty string test.
10532         (IsCastToken): Made static.
10533         (is_hex): Made static.
10534         (real_type_suffix): Made static.
10535
10536         * decl.cs (SetupCache): Made static.
10537         (OnGenerateDocComment): Removed unused ds argument.
10538
10539         * delegate.cs (VerifyDelegate): Removed unused argument.
10540
10541         * doc.cs: Uses Length for empty string test.
10542
10543         * driver.cs: Uses Length for empty string test.
10544
10545         * enum.cs (IsValidEnumType): Made static
10546
10547         * expression.cs (EnumLiftUp): Removed unused argument.
10548         (ResolveMethodGroup): Ditto.
10549         (BetterConversion): Ditto.
10550         (GetVarargsTypes): Ditto.
10551         (UpdateIndices): Ditto.
10552         (ValidateInitializers): Ditto.
10553         (MemberAccess.ctor): Ditto.
10554         (GetIndexersForType): Ditto.
10555
10556         * flowanalysis.cs: (MergeFinally): Removed unused argument.
10557
10558         * iterators.cs: Updated after MemberAccess clean up.
10559
10560         * location.cs: Uses Length for empty string test.
10561
10562         * namespace.cs: Uses Length for empty string test.
10563
10564          * report.cs (CheckWarningCode): Made static.
10565
10566         * statement.cs (LabeledStatement): Removed unused argument.
10567
10568         * typemanager.cs (FilterNone): Removed.
10569
10570 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
10571
10572         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
10573         obsolete.
10574
10575         * class.cs: Updated.
10576
10577 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
10578
10579         * cs-parser.jay.cs: __arglist is not allowed for delegates.
10580
10581 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
10582
10583         A fix for #77822.
10584
10585         * expression.cs (VerifyArgumentsCompat): Reverted to double error
10586         reporting, it's more tricky than I thought.
10587
10588 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
10589
10590         A fix for #77816.
10591
10592         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
10593         host container.
10594         (AnonymousMethod.ImplicitStandardConversionExists): New method.
10595         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
10596         Add more error reporting; Fixed issue with params.
10597
10598         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
10599
10600         * cs-parser.jay: AnonymousMethod requires host container.
10601
10602         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
10603
10604 2006-03-18  Raja R Harinath  <harinath@gmail.com>
10605
10606         * class.cs: Change 'TypeContainer ds' constructor argument to
10607         'DeclSpace parent'.  Some classes were missed below due to
10608         different naming convention.
10609
10610         * class.cs (MemberCore.Parent): Delete.  This makes the
10611         ParentContainer changes below enforceable by the compiler.
10612
10613         Treat pointers to enclosing declaration space as 'DeclSpace', not
10614         'TypeContainer'.
10615         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
10616         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
10617
10618         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
10619         of TypeContainer.
10620         (Block.AddThisVariable): Likewise.
10621         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
10622         (AbstractPropertyEventMethod.Emit): Likewise.
10623         (AbstractPropertyEventMethod.EmitMethod): Likewise.
10624         (GetMethod.Define, SetMethod.Define): Likewise.
10625         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
10626         (DelegateMethod.EmitMethod): Likewise.
10627
10628         Fix regression test-partial-13.cs.
10629         Rationalize use of PartialContainer.  Ensure that the partial
10630         class semantics can be tied to type-correctness, i.e., any
10631         violation will cause a compile error.
10632         * class.cs, const.cs: Access all fields that belong to class
10633         TypeContainer via ParentContainer.  Arguments of EmitContexts and
10634         Resolve()-like functions still use 'Parent'.
10635
10636         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
10637         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
10638         (PropertyMethod.CheckModifiers): Remove unused argument.
10639         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
10640         DeclSpace.
10641
10642 2006-03-17  Raja R Harinath  <harinath@gmail.com>
10643
10644         Make semantics of PartialContainer simpler.
10645         * decl.cs (DeclSpace.IsPartial): Remove.
10646         * class.cs (TypeContainer.IsPartial): Likewise.
10647         (TypeContainer..ctor): Set PartialContainer to point to self.
10648         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
10649         (TypeContainer.FindNestedType): Likewise.
10650         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
10651
10652 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
10653
10654         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
10655
10656 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
10657
10658         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
10659         classes.
10660
10661 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
10662
10663         * class.cs (Operator.Define): An error for base conversion was not
10664         reported correctly.
10665
10666 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
10667
10668         * iterator.cs : yield break is allowed in try statement which has
10669           catch clauses. Fixed bug #77767.
10670
10671 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
10672
10673         A fix for #77593, #77574.
10674
10675         * class.cs (MethodCore.CheckBase): Another if for operator.
10676
10677 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
10678
10679         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
10680         were not resolved
10681
10682         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
10683         (DelegateCreation.ImplicitStandardConversionExists): New method for just
10684         conversion test.
10685         
10686         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
10687         not needed.
10688
10689         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
10690         Updated after another emitcontext usage was clean up. It should help us to
10691         synchronize with gmcs easier.
10692
10693 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
10694
10695         A fix for #77353.
10696
10697         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
10698         (Event.Define): ditto
10699         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
10700
10701         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
10702         Removed redundant code and set NewSlot for Invoke method too.
10703
10704         * parameter.cs (Parameters.ctor): Add custom, type ctor.
10705         (Parameters.MergeGenerated): New method. Use this method when you merge
10706         compiler generated argument with user arguments.
10707
10708 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
10709
10710         * attribute.cs (ResolveAsTypeTerminal): Removed.
10711
10712         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
10713         specialization for predefined types; 30% speed up.
10714         Finally placed obsolete check to right place.
10715         (Expression.ResolveType): Removed.
10716
10717         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
10718         Updated after ResolveType was removed.
10719
10720         * expression.cs (Cast.ctor): Check void cast.
10721         (Binary.ResolveAsTypeTerminal): Is never type.
10722         (Conditional.ResolveAsTypeTerminal): Is never type.
10723
10724         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
10725
10726 2006-03-01  Raja R Harinath  <rharinath@novell.com>
10727
10728         Fix #77679.
10729         * expression.cs (ParameterReference.DoResolveBase): Change return
10730         type to bool.
10731         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
10732         Update.
10733
10734         Fix #77628.
10735         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
10736
10737         Fix #77642.
10738         * typemanager.cs (GetFullNameSignature): Don't nullref on
10739         protected accessors.
10740
10741 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
10742
10743         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
10744         these two separated members to simplify the code.
10745         (Attribute.Resolve): Refactored to use new fields and methods.
10746         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
10747         implemented obsolete attribute checking.
10748         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
10749         implemented obsolete checking again. It look line never ending quest ;-)
10750         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
10751
10752         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
10753
10754         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
10755
10756         *class.cs (Property.Define): Add RegisterProperty call.
10757
10758         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
10759         argument groups (only 2).
10760
10761         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
10762         encoding expression to arguments.
10763         (Expression.ExprClassToResolveFlags): Just turned to property.
10764
10765         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
10766         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
10767         optimized as well as implemented support for zero-length attributes.
10768
10769         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
10770         Add caching of PropertyInfo's.
10771
10772 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
10773
10774         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
10775         error multiple times.
10776
10777 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
10778
10779         New partial class implementation.
10780         A fix for #77027, #77029, #77403
10781
10782         * attribute.cs (Attributable): Made attributes protected.
10783
10784         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
10785         the replacements of ClassPart and PartialContainer.
10786         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
10787         (TypeContainer.AddInterface): Ditto.
10788         (TypeContainer.AddPartial): The main method for partial classes. It checks
10789         for errors and merges ModFlags and attributes. At the end class is added to
10790         partial_parts list.
10791         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
10792         required here.
10793         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
10794         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
10795         from the rest of partial classes.
10796         (TypeContainer.GetClassBases): Simplified.
10797         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
10798         DefineType.
10799         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
10800         (TypeContainer.HasExplicitLayout): Uses Flags now.
10801         (PartialContainer): Removed.
10802         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
10803         (StaticClass): Was merged with Class.
10804         (Class.GetClassBases): class and static class bases are verified here.
10805         (Class.TypeAttr): Added static attributes when class is static.
10806         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
10807         (MemberBase): In some cases we need to call parent container for partial
10808         class. It should be eliminated but it's not easy now.
10809
10810         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
10811
10812         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
10813         partial classed to accumulate class comments.
10814         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
10815
10816         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
10817
10818         * driver.cs (MainDriver): Tree.GetDecl was removed.
10819
10820         * modifiers.cs (Modifiers): Add partial modifier.
10821
10822         * tree.cs (Tree.decl): Removed.
10823         (RootTypes): Started to use this class more often for root types
10824         specializations.
10825
10826 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
10827
10828         A fix for #77615
10829
10830         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
10831         external interface does not have an attribute.
10832
10833 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
10834
10835         Another prerequisites for new partial classs implementation.
10836         
10837         * attribute.cs (Attribute.Equal): Implemented.
10838         (Attribute.Emit): Changed as attributes can be applied more than twice.
10839         (Attributes.Emit): Check for duplicate attributes here.
10840
10841         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
10842         as a parameter, clean-up.
10843
10844 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
10845
10846         A fix for #77485
10847
10848         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
10849         contains obsolete attribute check which can in some cases look for base
10850         type of current class which is not initialized yet.
10851         (TypeContainer.BaseType): Replacement of ptype.
10852
10853         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
10854
10855 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
10856
10857         First of prerequisites for new partial classs implemention.
10858         
10859         * attribute.cs (Attributable): Extended by ResolveContext;
10860         Attributes finally have correct context for resolving in all cases.
10861         (AttachTo): Attribute owner is assigned here.
10862
10863         * codegen.cs (IResolveContext): Introduce new interface to hold
10864         all information needed in resolving phase.
10865         (EmitContext): Implements IResolveContext; more clean-up needed here.
10866         
10867         * decl.cs (MemberCore): Implemented IResolveContext.
10868
10869         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
10870         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
10871         parameter.cs, statement.cs, tree.cs, typemanager.cs:
10872         Refactored to use new IResolveContext instead of EmitContext; cleanup
10873
10874 2006-02-06  Miguel de Icaza  <miguel@novell.com>
10875
10876         * codegen.cs (EmitScopeInitFromBlock): check here the
10877         capture_context, there is no need to make two calls to the
10878         EmitContext. 
10879
10880         * anonymous.cs: Add some debugging messages that might help me
10881         track other instances of this problem in the future (the
10882         regression of test 467).
10883
10884         * cs-parser.jay: track the variable block, as we need to initalize
10885         any captured variables declared in this block for the "catch"
10886         portion of the "Try" statement.
10887
10888         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
10889         scope initialization for captured variables. 
10890
10891         Also, move the emit for the variables after the block location has
10892         been marked.
10893
10894 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
10895
10896         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
10897
10898 2006-02-02  Miguel de Icaza  <miguel@novell.com>
10899
10900         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
10901         commit yesterday, the initialization for the roots is necessary.
10902         What is not necessary is the scope activation.
10903
10904 2006-02-02  Raja R Harinath  <rharinath@novell.com>
10905
10906         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
10907         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
10908         CS0206 checks.
10909         (Argument.Resolve): Remove CS0206 checks.
10910
10911 2006-02-01  Miguel de Icaza  <miguel@novell.com>
10912
10913         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
10914         scopes for all the roots, the scopes will now be emitted when the
10915         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
10916
10917         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
10918         code.  This reduces a lot of existing cruft.
10919         
10920         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
10921         that the ScopeInfo is generated as we enter the scope, not at the
10922         time of use, which is what we used to do before.
10923
10924         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
10925         every time a Block is about to be emitted if we have a
10926         CaptureContext. 
10927
10928 2006-02-01  Raja R Harinath  <rharinath@novell.com>
10929
10930         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
10931         (Reset): Update.
10932         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
10933
10934         * typemanager.cs (cons_param_array_attribute): Make private.
10935         (Reset): Set it to null.
10936         (InitCoreHelpers): Don't initialize it.
10937         (ConsParamArrayAttribute): New.  Initialize it as needed.
10938         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
10939
10940 2006-01-31  Miguel de Icaza  <miguel@novell.com>
10941
10942         * expression.cs: There might be errors reported during the
10943         selection of applicable methods.  If there are errors, do not
10944         continue execution as it will lead the compiler to crash.
10945
10946 2006-01-30  Miguel de Icaza  <miguel@novell.com>
10947
10948         * expression.cs: Member access is not allowed on anonymous
10949         methods.  Fixes #77402.
10950
10951 2006-01-30  Raja R Harinath  <rharinath@novell.com>
10952
10953         Fix #77401
10954         * cs-parser.jay (VariableDeclaration): Don't set
10955         current_array_type to null.
10956         (field_declaration, event_declaration, declaration_statement):
10957         Set it to null here.
10958
10959 2006-01-28  Raja R Harinath  <harinath@gmail.com>
10960
10961         * typemanager.cs (GenericParameterPosition): New.
10962         * doc.cs: Use it.
10963
10964 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
10965
10966         * doc.cs : To process "include" elements, first we should create
10967           another list than XmlNodeList, because it could result in node
10968           removal, which could result in that the XmlNodeList gives up
10969           yielding next node.
10970
10971           (Also made code identical to gmcs again.)
10972
10973 2006-01-25  Miguel de Icaza  <miguel@novell.com>
10974
10975         * ecore.cs: Introduce an error report that we were not catching
10976         before, if not silent, we must report the error.  Gonzalo ran into
10977         it.
10978
10979 2006-01-23  Miguel de Icaza  <miguel@novell.com>
10980
10981         A fix for bug: #76957
10982         
10983         * iterators.cs (MoveNextMethod.CreateMethodHost): call
10984         ComputeMethodHost before creating the method, this is a new
10985         requirement. 
10986
10987         * anonymous.cs (AnonymousContainer): Now we track all the scopes
10988         that this method references (RegisterScope).  The actual scope
10989         where the method is hosted is computed with the ComputeMethodHost
10990         before we create the method.
10991
10992         Moved the Deepest routine here.
10993
10994         (AnonymousContainer.ComputeMethodHost): New routine used to
10995         compute the proper ScopeInfo that will host the anonymous method.
10996
10997         (ScopeInfo): Deal with multiple roots.  The problem was that we
10998         did not have a unique root where all ScopeInfos could be hanged
10999         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11000         of roots.  
11001
11002         Remove AdjustMethodScope which is now computed at the end.  Remove
11003         LinkScope which did a partial link, instead link all ScopeInfos
11004         before code generation from the new "LinkScopes" routine. 
11005
11006         Simplify all the Add* routines as they no longer need to maintain
11007         the tree, they just need to record that they are using variables
11008         from a ScopeInfo.
11009
11010         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11011         routines to produce the forest of ScopeInfo trees.
11012
11013         * class.cs (TypeContainer.AppendMethod): This is just like
11014         AddMethod, but ensures that an interface implementation method
11015         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11016         methods, but at the end.
11017
11018         We use this functionality to ensure that the generated MoveNext
11019         method in the iterator class is resolved/emitted before the
11020         enumerator methods created.   
11021
11022         This is required because the MoveNext method computes the right
11023         ScopeInfo for the method.  And the other methods will eventually
11024         need to resolve and fetch information computed from the anonymous
11025         method. 
11026
11027 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11028             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11029
11030         Fix rest of #76995.
11031         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11032         the 'aliases' hash.
11033         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11034         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11035
11036 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11037
11038         Fix #76656, cs0231-2.cs.
11039         * cs-parser.jay (formal_parameter_list): Make error case catch
11040         more issues.
11041         (parenthesized_expression_0): Add CS1026 check.
11042         (invocation_expression): Remove unused { $$ = lexer.Location }.
11043
11044 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11045
11046         Fix #76824.
11047         * cs-parser.jay (statement_expression): Don't list out the
11048         individual statement-expressions.  Convert syntax error into
11049         CS0201 check.
11050
11051 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11052
11053         Fix #76874.
11054         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11055         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11056         CheckIntermediateModification.
11057         (FieldExpr.DoResolve): Add new two-argument version that
11058         allows us to resolve the InstanceExpression as an lvalue.
11059         The one-argument variant is now just a wrapper.
11060         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11061         Resolve the lhs as an lvalue if the it has a value type.
11062         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11063         from Assign.DoResolve.
11064         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11065         resolved as an lvalue.
11066         (PropertyExpr.DoResolve): Update.
11067         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11068         has a value type.  Move CS1612 check here from
11069         CheckIntermediateModification.
11070         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11071         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11072         'right_side' of a ResolveLValue on an 'out' argument.
11073         (EmptyExpression.LValueMemberAccess): New.  Used as the
11074         'right_side' of a propagated ResolveLValue on a value type.
11075         (LocalVariableReference.DoResolveBase): Recognize
11076         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11077         Add CS1654 check.
11078         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11079         EmptyExpression.Null.
11080
11081 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11082
11083         * typemanager.cs : added IsGenericParameter(). In mcs it always
11084           return false.
11085         * doc.cs : for generic parameters, use GenericParameterPosition,
11086           not FullName.
11087
11088 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11089
11090         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11091
11092 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11093
11094         This fixes the problem where we used ldfld instead of ldflda to
11095         load the "THIS" pointer on captured parameters, when THIS is a
11096         value type.  See bug #77205.
11097         
11098         * iterators.cs (CapturedThisReference.Emit): Pass false to
11099         EmitThis (we do not need the address).
11100
11101         * codegen.cs (EmitThis): it needs to know whether we need the
11102         address of `this' or not.  This is used by value types.  
11103
11104         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11105         every other call passes false.
11106
11107 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11108
11109         Fix #77221.
11110         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11111         GetOverride.
11112         * expression.cs (Invocation.OverloadResolve): Update.
11113         (Invocation.DoResolve): Avoid double resolution of invocation.
11114
11115 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11116
11117         Fix #77180.
11118         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11119         unary negation of floating point types as 0-expr; negation cannot
11120         overflow in floating point types.
11121
11122         Fix #77204.
11123         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11124         on operands of 'void' type.
11125
11126         Fix #77200.
11127         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11128         and ExclusiveOr for boolean constants too.
11129
11130 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11131
11132         Fix #75636.
11133         * expression.cs (Invocation.OverloadResolve): Replace reflected
11134         override methods with their base virtual methods, rather than
11135         skipping over them.
11136         * typemanager.cs (TypeManager.GetOverride): New.
11137
11138 2006-01-05  Jb Evain  <jbevain@gmail.com>
11139
11140         * class.cs (Property.Define, Indexer.Define): do not tag the
11141         properties as SpecialName | RTSpecialName.
11142
11143 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11144
11145         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11146         doing a low-level comparission of parameter types.  It was lacking
11147         a check for __argslist. 
11148
11149 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11150
11151         * expression.cs (ParameterReference.DoResolveBase): Allow
11152         reference parameters if they are local to this block. 
11153
11154         This allows the ref and out parameters of a delegate to be used in
11155         an anonymous method, for example:
11156
11157         delegate void set (out int x);
11158
11159         set s = delegate (out int x){
11160                 x = 0;
11161         };
11162
11163         This is used by functionality introduced late in the C# language.
11164         
11165         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
11166         method that take ref and out parameters. 
11167
11168         Fixes #77119 which was a late change in the spec.
11169
11170 2005-12-23  Miguel de Icaza  <miguel@novell.com>
11171
11172         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
11173         parent if its the same scope.  Fixes #77060.
11174
11175 2005-12-21  Miguel de Icaza  <miguel@novell.com>
11176
11177         * driver.cs: Report the case of no source files and no -out:
11178         argument provided.
11179
11180 2005-12-20  Raja R Harinath  <rharinath@novell.com>
11181
11182         Fix #77035.
11183         * expression.cs (ComposedCast.GetSignatureForError): Define.
11184
11185 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11186
11187         Fix #76995
11188
11189         * namespace.cs (NamespaceEntry): Add extern_aliases as a
11190         ListDictionary, to contain the ExternAliasEntry entries (in
11191         addition to the NamespaceEntry.aliases hashtable). This field is
11192         shared between the original entry and its doppelganger (bodyless 
11193         copy of it).
11194         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
11195         extern_aliases field.
11196         (NamespaceEntry.Lookup): Move the IsImplicit check after the
11197         lookup in extern_aliases.
11198
11199 2005-12-16  Raja R Harinath  <rharinath@novell.com>
11200
11201         Fix #77006.
11202         * class.cs (TypeContainer.Mark_HasEquals): New.
11203         (TypeContainer.Mark_HasGetHashCode): New.
11204         (ClassPart): Override them.
11205         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
11206
11207         Fix #77008.
11208         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
11209         'parent' argument to the base constructor.
11210
11211         Remove all mention of TypeContainer from decl.cs.
11212         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
11213         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
11214         (DeclSpace.DeclSpace): Likewise.
11215         (DeclSpace.DefineMembers): Remove unused argument.
11216         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
11217         debugging check -- we don't care if the debug code throws an
11218         InvalidCastException instead of an InternalErrorException.
11219         * class.cs (TypeContainer.DefineMembers): Update to changes.
11220         (TypeContainer.DoDefineMembers): Likewise.
11221         (TypeContainer.GetMethods): Likewise.
11222         (PropertyMember.Define): Likewise.
11223         (MemberBase.Parent): New property that forwards to
11224         MemberCore.Parent, but ensures that we get a TypeContainer.
11225         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
11226         (RootContext.PopulateTypes): Likewise.  Remove special case code
11227         for !RootContext.StdLib: DefineMembers is idempotent.
11228
11229 2005-12-14  Miguel de Icaza  <miguel@novell.com>
11230
11231         * convert.cs (ExplicitConversionCore): Check the return value from
11232         ExplicitConversionCore which can return null on failure.  Fixes #76914
11233
11234 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
11235
11236         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
11237
11238 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
11239
11240         * doc.cs : The search for referenced namespace was insufficient to
11241           get global one as it used to do. Fixed bug #76965.
11242
11243 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
11244
11245         * doc.cs : check name in cref in the last phase that whether it is
11246           namespace or not.
11247
11248 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11249
11250         * cs-tokenizer.cs : reverted the latest change: it somehow broke
11251           Mono.C5.
11252
11253 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11254
11255         * doc.cs : so it turned out that we cannot skip override check for 
11256           interface members. Fixed bug #76954.
11257
11258 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11259
11260         * cs-tokenizer.cs : fixed bug #75984:
11261           - #warning and #error should not be handled when the source line
11262             is disabled.
11263           - #line is not checked strictly when the source line is disabled.
11264           - #define and #undef is on the other hand checked strictly at any
11265             state.
11266
11267 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
11268
11269         * cs-tokenizer.cs : missing Location (actually, filename) in one of
11270           CS1027 report.
11271
11272 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11273
11274         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
11275
11276         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
11277         event initializers.
11278         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
11279         (FieldBase.Initializer): Initializer is now optional.
11280         (EventField.Define): Only event field can have initializer.
11281
11282         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
11283
11284         * const.cs (Const): Reuse initializer.
11285
11286         * cs-parser.jay: Updated after FieldBase changes.
11287         Added current_array_type to simplify array initializers.
11288
11289         * ecore.cs (NullCast.IsDefaultValue): Implemented.
11290
11291         * expression.cs, iterators.cs: Updated.
11292
11293         * namespace.cs (NamespaceEntry): Made UsingFound private.
11294
11295 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11296
11297         * parameterCollection.cs: Obsolete, removed.
11298         * parser.cs: Obsolete, removed.
11299
11300 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11301
11302         Fix #76849.
11303         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
11304
11305         * enum.cs (Enum.Define): Set obsolete context here.
11306
11307 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11308
11309         * doc.cs :
11310           - FindDocumentedMember() now expects 1) paramList as null
11311             when "we don't have to check the number of parameters" and
11312             2) Type.EmptyTypes when "there is no arguments".
11313           - Introduced FoundMember struct to hold the exact type which was
11314             used to find the documented member (the above change broke
11315             test-xml-044; it might be better just to use DeclaringType than
11316             what MS does, like this change does, but it depends on usage.)
11317
11318 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11319
11320         * doc.cs : documented member might be from DeclaringType for nested
11321           types. Fixed bug #76782.
11322
11323 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
11324
11325         * anonymous.cs: Have the param code handle leaving copies on the
11326         stack etc. Allows anonymous params to take part in the assignment
11327         code (++, +=, etc). Fixes bug #76550
11328
11329         * expression.cs: Handle the prepare_for_load/leave_copy by passing
11330         it down to the anon code.
11331
11332         * iterators.cs: Use dummy var here
11333
11334         * codegen.cs: Handle new vars
11335
11336 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11337
11338         Fix #76849.
11339         * class.cs (MethodData.Define): Set proper Obsolete context.
11340
11341         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
11342         obsolete context.
11343         (FieldExpr.DoResolve): Ditto.
11344
11345 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11346
11347         Fix #76849.
11348         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
11349         parent is not obsolete.
11350
11351 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
11352
11353         * doc.cs : (FindDocumentedMember) find parameterless members first
11354           and get CS0419 in the early stage. Fixed first case of bug #76727.
11355
11356 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
11357
11358         Fix #76859.
11359         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
11360         no error was reported.
11361
11362         *expression.cs (Binary.DoResolve): left can be null.
11363
11364 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
11365
11366         Fix #76783.
11367         * class.cs (MethodData.Emit): Parameters should be labeled first.
11368
11369 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
11370
11371         Fix #76761.
11372         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
11373
11374 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
11375
11376         * attribute.cs (AreParametersCompliant): Moved to Parameter.
11377
11378         * class.cs (MethodCore): Parameter clean up.
11379         (IMethodData): Added ParameterInfo.
11380         (MethodData): Parameter clean up.
11381         (Indexer.Define): Parameter clean up.
11382
11383         * anonymous.cs,
11384         * codegen.cs,
11385         * cs-parser.jay,
11386         * decl.cs,
11387         * doc.cs,
11388         * ecore.cs,
11389         * flowanalysis.cs,
11390         * iterators.cs,
11391         * pending.cs,
11392         * statement.cs,
11393         * typemanager.cs: Parameter clean up.
11394
11395         * delegate.cs (Define): Get rid of duplicated code.
11396
11397         * expression.cs (ParameterReference): Removed useless parameters
11398         and simplified.
11399         (Invocation): Ditto.
11400
11401         * parameter.cs (ParamsParameter): New class, params specialization.
11402         (ArglistParameter): Attemp to separate arglist.
11403         (Parameter): Refactored to be reusable and faster.
11404         (Parameter.Modifier): Made understandable.
11405         (Parameters): Changed to be used as a class for `this' assembly
11406         parameters. Refactored to use new specialized classes.
11407
11408         * support.cs (ParameterData): Added Types property.
11409         (InternalParameters): Deleted.
11410
11411 2005-08-20  Martin Baulig  <martin@ximian.com>
11412
11413         Merging this patch from GMCS to fix #75867.
11414
11415         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
11416         scope if we don't already have it.
11417
11418 2005-11-17  Martin Baulig  <martin@ximian.com>
11419
11420         * anonymous.cs
11421         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
11422         inherit the scope from our parent.  Fixes #76653.
11423
11424 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11425
11426         * doc.cs : the previous patch does not actually fix the bug.
11427           PropertyInfo override check is now implemented and really fixed it.
11428         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
11429
11430 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11431
11432         * doc.cs : apply "override filter" also to properties.
11433           Fixed bug #76730.
11434
11435 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11436
11437         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
11438           no need to check overrides. For classes, omit those results from 
11439           interfaces since they must exist in the class. Fixed bug #76726.
11440
11441 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11442
11443         * typemanager.cs : (GetFullNameSignature) differentiate indexers
11444           with different parameters. Fixed the second problem in #76685.
11445
11446 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11447
11448         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
11449           get expected 'protected' access in CheckValidFamilyAccess()).
11450           Fixed bug #76692.
11451
11452 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11453
11454         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
11455           Fixed bug #76705.  CS1569 was incorrectly commented out.
11456
11457 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11458
11459         * doc.cs : use Invocation.IsOverride() to do real override check.
11460         * expression.cs : made Invocation.IsOverride() internal.
11461
11462 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11463
11464         * doc.cs : use TypeManager.FindMembers() instead of (possible)
11465           TypeBuilder.FindMembers() and filter overriden base members out.
11466           Fixed bug #76990.
11467
11468 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11469
11470         * doc.cs : ref/out parameters are represented as '@' (instead of
11471           '&' in type FullName). Fixed bug #76630 (additionally crefs).
11472
11473 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11474
11475         * doc.cs : when there was no '.' in cref to methods in doc comment,
11476           then parameters were missing in the output. Fixed bug #76691.
11477
11478 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11479
11480         * driver.cs : don't output docs when there is an error.
11481           Fixed bug #76693.
11482
11483 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11484
11485         * doc.cs :
11486           Now it should detect indexers. Fixed primary concern in bug #76685.
11487           Fixed CS0419 message to not show the identical member signature in
11488           the message.
11489
11490 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11491
11492         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
11493           instead of Type.FindMembers() since it does not handle events.
11494           Fixed bug #71604.
11495
11496 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
11497
11498         * codegen.cs: Fixed typo (speficied -> specified).
11499
11500 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
11501
11502         Fix #76369.
11503         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
11504
11505 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
11506
11507         * attribute.cs: Changed error message.
11508
11509         * cs-tokenizer.cs: One more check.
11510
11511 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
11512
11513         * statement.cs (Block.Resolve): Ignore empty statement.
11514
11515 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
11516
11517         * report.cs: Made error/warning methods more strict to avoid
11518         their misuse.
11519
11520         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
11521         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
11522         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
11523         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
11524
11525 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
11526
11527         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
11528         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
11529
11530         * class.cs (TypeContainer.IsComImport): New property.
11531         (Constructor.Define): Create proper ctor for ComImport types.
11532
11533         * expression.cs (New.CheckComImport): Fixed.
11534
11535 2005-11-07  Miguel de Icaza  <miguel@novell.com>
11536
11537         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
11538         that a parameter has been captured does not mean that we do not
11539         have to do the rest of the processing.  This fixes the second part
11540         of #76592.  If there was another anonymous method capturing
11541         values in the past, the Scope would never be set for the second
11542         method that captured the same parameter.
11543
11544         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
11545         properly manipulate the stack.   Second part of fix for #76592.
11546
11547         * expression.cs (New): Add support for invoking "new" on
11548         interfaces that have been flagged with the ComImport attribute and
11549         the CoClass.  Fixes #76637 
11550
11551         * statement.cs (Try.DoEmit): When a variable is captured, do not
11552         try to emit the vi.LocalBuilder variable as it has been captured.
11553         Create a temporary variable and store the results on the
11554         FieldBuilder.  Fixes #76642
11555
11556 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
11557
11558         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
11559
11560         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
11561
11562         * expression.cs (Binary.DoResolve): Added && optimalization.
11563     
11564         * typemanager.cs (AddUserType): Removed useless argument.
11565
11566 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
11567
11568         * statement.cs (Block.variables): Uses ListDictionary.
11569
11570 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
11571
11572         Fix #75969.
11573         * class.cs (PartialContainer.EmitType): Customized to emit
11574         security attributes.
11575         (ClassPart.ApplyAttributeBuilder): Transform security attribute
11576         for partial classes.
11577
11578 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
11579
11580         Fix #76599.
11581         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
11582         access has to be fixed.
11583         
11584         * typemanager.cs (IsUnmanagedType): Wrong common field type.
11585
11586 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
11587
11588         Fix #76590.
11589         * ecore.cs (NullCast.Reduce): Implemented.
11590
11591         * expression.cs (ArrayCreation.CheckIndices): Correcly check
11592         constant type.
11593         
11594         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
11595         properly.
11596         (Foreach.Resolve): Catch null properly.
11597
11598 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
11599  
11600         * cs-tokenizer.cs: Warning text fix.
11601
11602         * driver.cs: AllWarningNumbers exposed on public interface.
11603
11604         * report.cs (): Reviewed warning numbers.
11605         (IsValidWarning): Use binary search.
11606
11607 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
11608  
11609         * driver.cs: Implemeted resource visibility.
11610         (Resources): New class for code sharing between /res: and
11611         /linkres:
11612  
11613 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
11614
11615         Fix #76568.
11616         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
11617         folding.
11618         
11619         * convert (Convert.ImplicitReferenceConversion): NullCast holds
11620         contants only.
11621         
11622         * ecore.cs (NullCast): Child is contant only.
11623         
11624         * literal.cs (NullLiteral.Reduce): null can be converted to any
11625         reference type.
11626
11627 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
11628
11629         * driver.cs: Use Encoding.Default as default code page instead
11630           of ISO-28591.
11631
11632 2005-10-27  Raja R Harinath  <rharinath@novell.com>
11633
11634         Fix #76085.
11635         * expression.cs (Invocation.Error_InvalidArguments): Handle
11636         __arglist parameters.
11637         (Invocation.VerifyArgumentsCompat): Likewise.
11638         * support.cs (ReflectionParameters.GetSignatureForError): Print
11639         __arglist parameters.
11640         (InternalParamters.GetSignatureForError): Likewise.
11641         * parameter.cs (Parameters.GetSignatureForError): Likewise.
11642
11643 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
11644
11645         * attribute.cs (GetPropertyValue): Made public.
11646
11647         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
11648         Resolve.
11649         Add new property WrapNonExceptionThrows to handle 2.0 assembly
11650         attribute.
11651         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
11652         is not defined.
11653         
11654         * driver.cs: Reflect method name change.
11655         
11656         * statement.cs (Try.Resolve): Warn when try has both general
11657         exception handlers.
11658         
11659         * typemanager.cs: runtime_compatibility_attr_type new predefined
11660         type.
11661
11662 2005-10-26  Raja R Harinath  <harinath@gmail.com>
11663
11664         Fix #76419.
11665         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
11666         treat it as an empty parameter list.
11667
11668 2005-10-26  Raja R Harinath  <rharinath@novell.com>
11669
11670         Fix #76271.     
11671         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
11672         ResolveAsTypeStep silent.
11673         * statement.cs (Block.AddConstant): Mark block as used.
11674         (Block.ResolveMeta): Avoid piling on error messages
11675         if a constant initializer resolution fails.
11676
11677 2005-10-25  Raja R Harinath  <rharinath@novell.com>
11678
11679         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
11680         Remove.
11681         (NamespaceEntry.VerifyAllUsing): New.
11682         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
11683         behaviour.  Delegates actual resolution of alias to ...
11684         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
11685         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
11686         Update.
11687         * driver.cs (Driver.MainDriver): Update.
11688         
11689         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
11690         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
11691         property.
11692         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
11693         Remove.
11694         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
11695         RootNamespace.DefineNamespacesForAll.
11696
11697 2005-10-24  Raja R Harinath  <harinath@gmail.com>
11698
11699         * typemanager.cs (assemblies, external_aliases, modules)
11700         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
11701         (ComputeNamespaces, GetRootNamespace): Remove extra staging
11702         overhead.  Move resposibility ...
11703         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
11704         * driver.cs, attribute.cs, codegen.cs: Update to changes.
11705
11706 2005-10-23  Raja R Harinath  <harinath@gmail.com>
11707
11708         * namespace.cs (RootNamespace.all_namespaces): Renamed from
11709         cached_namespaces.  Improve usage.
11710         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
11711         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
11712         Move from GlobalRootNamespace and simplify.
11713         (RootNamespace.Global): Make instance variable.
11714         (RootNamespace.RootNamespace): Add "alias name" parameter.
11715         (GlobalRootNamespace): Simplify drastically.
11716         (Namespace.Lookup): Don't use GetNamespace.
11717         * typemanager.cs (GetRootNamespace): Rename from
11718         ComputeNamespaceForAlias.
11719         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
11720
11721 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
11722
11723         * anonymous.cs (AnonymousContainer): Don't crash when container
11724         doesn't exist.
11725
11726 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
11727
11728         * expression.cs (Binary.DoResolve): Warn when comparing same
11729         values.
11730
11731 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
11732
11733         Fix #76486.
11734         * expression.cs (Binary.DoResolve): It looks like there are no
11735         convetsion rules in enum context.
11736
11737 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
11738
11739         Add support for extern alias qualifiers.
11740         * typemanager.cs: Move some LookupTypeReflection code
11741         to namespace.cs, to have cleaner code. Added some methods
11742         to help us keep track of the extern aliased references.
11743         * driver.cs: Add suport for extern alias assemblies on command
11744         line and check for their warnings/errors. Also keep track of the
11745         extern aliased assemblies.
11746         * namespace.cs: Move the global functionality of Namespace
11747         to GlobalRootNamespace/RootNamespace. Now the global namespace
11748         is GlobalRootNamespace.Globa. Also the code moved from 
11749         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
11750         Finally added LocalAliasEntry (AliasEntry before) and
11751         ExternAliasEntry, to handle alias statements.
11752         * cs-parser.jay: Add support in the grammar for extern alias
11753         statement.
11754         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
11755         Update callings to Namespace (now in GlobalRootNamespace).
11756
11757 2005-10-18  Raja R Harinath  <rharinath@novell.com>
11758
11759         Fix #76371.
11760         * class.cs (TypeContainer.DefineType): Move updating of
11761         topological sort earlier in the code.
11762         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
11763
11764 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
11765
11766         Fix #76273.
11767         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
11768         
11769         * constant.cs (Constant.TryReduce): Moved from Cast class.
11770         (Reduce): Made little bit more OO and fixed missing conversions.
11771         
11772         * ecore.cs (Reduce): Implemented.
11773         (Binary.EnumLiftUp): New method to upgrade values to enum values.
11774         
11775         * literal.cs (Reduce): Implemented.
11776         
11777         * class.cs: Reverted Miguel's wrong commit.
11778
11779 2005-10-14  Miguel de Icaza  <miguel@novell.com>
11780
11781         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
11782
11783 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
11784
11785         * cs-parser.jay, expression.cs : CS0214 was missing error location
11786           for constants. Fixed bug #76404.
11787
11788 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
11789
11790         Fix #76370.
11791         * convert.cs (ExplicitConversionCore): Fixed object->enum
11792         conversion.
11793
11794 2005-10-10  Raja R Harinath  <rharinath@novell.com>
11795
11796         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
11797         InstanceExpression.
11798         (PropertyExpr.EmitCall): Likewise.
11799         * expression.cs (Invocation.EmitArguments): Handle case where
11800         arguments == null.
11801         (Invocation.EmitCall): Avoid allocating temporary variable if
11802         there are no arguments.
11803
11804 2005-10-07  Raja R Harinath  <rharinath@novell.com>
11805
11806         Fix #76323.
11807         * convert.cs (ImplicitConversionStandard): Move conversion of
11808         void* to arbitrary pointer types ...
11809         (ExplicitConversionStandard): .. here.
11810         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
11811         error to always print typenames.
11812
11813 2005-10-07  Raja R Harinath  <rharinath@novell.com>
11814
11815         * convert.cs (GetConversionOperator): Rename from
11816         GetConversionOperators.  Move operator selection code from ...
11817         (UserDefinedConversion): ... here.
11818
11819 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
11820
11821         * convert.cs (ExplicitConversionCore): Removed duplicate enum
11822         conversion.
11823
11824 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
11825
11826         * assign.cs (Assign.DoResolve): Error method changed.
11827
11828         * cfold.cs (DoConstantNumericPromotions): Error method changed.
11829         
11830         * const.cs (ResolveValue): Reset in_transit immediately.
11831         
11832         * constant.cs: Error method changed.
11833         
11834         * convert.cs: Removed useless location parameter.
11835         (ExplicitNumericConversion): Don't do double enum check.
11836         (ExplicitConversionCore): Renamed from ExplicitConversion.
11837         (ExplicitUnsafe): Extracted from ExplicitConversion.
11838         (ExplicitConversion): Uses for error reporting.
11839         
11840         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
11841         error messages.
11842         (ResolveBoolean): Uses common error method.
11843         (CastToDecimal): Get rid of ec.
11844         (CastFromDecimal): Optimized.
11845         (ConvCast): Get rid of ec.
11846         
11847         * enum.cs (ResolveValue): Reset in_transit immediately.
11848         (Emit): Return after first error.
11849         
11850         * expression.cs: Convert changes.
11851         
11852         * literal.cs: Error method changed.
11853         
11854         * statement.cs: Error method changed.
11855
11856 2005-10-03  Raja R Harinath  <rharinath@novell.com>
11857
11858         * support.cs (SeekableStreamReader.Position): Don't error out when
11859         the requested position is just beyond the end of the current
11860         buffered data.
11861
11862 2005-09-28  Raja R Harinath  <rharinath@novell.com>
11863
11864         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
11865         try to keep in sync with the byte count of the underlying Stream.
11866         However, this limits us to a window size of 2048 characters: i.e.,
11867         the maximum lookahead of our lexer/parser can be 2048 characters.
11868
11869 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
11870
11871         Fix #76255.
11872         * driver.cs: Fix compilation files with full root path.
11873
11874 2005-09-25  Miguel de Icaza  <miguel@novell.com>
11875
11876         * report.cs (SymbolRelatedToPreviousError): Format the output so
11877         it does not use an open parenthesis that is never closed. 
11878
11879         * driver.cs: Follow coding guidelines
11880
11881 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
11882
11883         Fix #72930.
11884         * const.cs (Const.ResolveValue): Check for assigning non-null
11885         value to reference type.
11886
11887 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
11888
11889         * anonymous.cs: Implemented ExprClassName.
11890         
11891         * assign.cs (Assign.DoResolve): Don't chrash when type is not
11892         delegate.
11893         
11894         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
11895         check.
11896         
11897         * class.cs (StaticClass.DefineContainerMembers): Report protected
11898         members as error.
11899         
11900         * codegen.cs: if(ed) PRODUCTION.
11901         
11902         * convert.cs (Error_CannotImplicitConversion): Better error
11903         distinction.
11904         
11905         * cs-parser.jay: More error checks.
11906         
11907         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
11908         
11909         * driver.cs (CSCParseOption): Enabled wrong option check.
11910         
11911         * ecore.cs (Expression.ExprClassName): Turned to property.
11912         (MemberExpr.CheckIntermediateModification): For checking boxed
11913         value types     modification.
11914         
11915         * statement.cs (Fixed.Resolve): Expression type must be
11916         convertible to fixed type.
11917         (CollectionForeach.GetEnumeratorFilter,TryType):
11918         Small refactoring for easier error checking.
11919
11920 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
11921
11922         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
11923         attributes.
11924         
11925         * class.cs (GeneratedBaseInitializer): New class for customization
11926         compiler generated initializers.
11927         (MemberBase.DoDefine): Check Obsolete attribute here.
11928         (FieldMember.DoDefine): Ditto.
11929         
11930         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
11931         constants.
11932         
11933         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
11934         (MemberCore.GetObsoleteAttribute): Removed argument.
11935         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
11936         (MemberCore.CheckObsoleteType): New helper.
11937         
11938         * delegate.cs,
11939         * enum.cs,
11940         * statement.cs: Updates after MemberCore changes.
11941         
11942         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
11943         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
11944         
11945         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
11946         obsolete attribute for compiler construct.
11947         (As.DoResolve): Cache result.
11948         
11949         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
11950
11951 2005-09-26  Raja R Harinath  <rharinath@novell.com>
11952
11953         Fix #76133.
11954         * expression.cs (This.VerifyFixed): In a value type T, the type of
11955         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
11956         value type R, 'this' is treated as a value parameter.
11957
11958 2005-09-22  Miguel de Icaza  <miguel@novell.com>
11959
11960         * statement.cs (Lock): Use the TemporaryVariable class instead of
11961         manually using local variables as those do not work when variables
11962         are captured.
11963
11964         * ecore.cs: Moved the TemporaryVariable class from being a nested
11965         class inside Foreach to be a public class that can be employed in
11966         other places. 
11967
11968 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
11969
11970         * cs-parser.jay: interface_accessors replaced by
11971         accessor_declarations.
11972
11973         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
11974         location.
11975         
11976         * statement.cs (GotoCase.Resolve): Convert null constant to
11977         null case.
11978         (SwitchLabel.ResolveAndReduce): Ditto.
11979         (SwitchLabel.NullStringCase): Custom null stamp.
11980         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
11981         
11982         typemanager.cs (CSharpSignature): Don't skip first argument
11983         for full names.
11984
11985 2005-09-18  Miguel de Icaza  <miguel@novell.com>
11986
11987         * driver.cs: Set InEmacs based on the environment variable EMACS. 
11988
11989         * location.cs (InEmacs): in this mode, do not report column
11990         location as it confuses Emacs.
11991
11992 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
11993
11994         * cfold.cs, constant.cs, convert.cs, ecore.cs,
11995         expression.cs, iterators.cs, literal.cs: Store constants and
11996         literals location.
11997         
11998         * class.cs (MemberBase.ShortName): Pass location.
11999         
12000         * cs-parser.jay: Some location fixes.
12001         
12002         * ecore.cs (Expression.Location): Made virtual.
12003
12004 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12005
12006         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12007         if the underlying types are the same, otherwise we need to produce
12008         code that will do the proper cast.
12009
12010         This was exposed by Marek's constant rewrite which produced
12011         invalid code for the call site:
12012
12013         enum X : long { a }
12014         void Method (X v) {}
12015
12016         Method ((X) 5)
12017
12018         This fixes test-49.cs
12019
12020 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12021
12022         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12023           Type/Object should be allowed as well. Fixed bug #75968.
12024
12025 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12026
12027         * expression.cs : (Binary.DoResolve): when one is enum constant and
12028           another is constant 0, then return enum one *as enum type*.
12029           Fixed bug 74846.
12030
12031 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12032
12033         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12034         internal.
12035
12036         Fix #75941.
12037         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12038         flow-branching for LocalVariableReferences in case we were invoked
12039         from a MemberAccess.
12040         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12041         Carved out of ...
12042         (LocalVariableReference.DoResolveBase): ... this.
12043         (MemberAccess.Resolve): Do the check that was disabled during
12044         SimpleNameResolve.
12045
12046 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12047
12048         * class.cs :
12049           (PartialContainer.Create): check abstract/sealed/static strictly
12050           but abstract/sealed can exist only at one side. Fixed bug #75883.
12051
12052 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12053
12054         Fix #75945.
12055         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12056         specified, don't default to UnmanagedType.I4.
12057
12058 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12059
12060         * expression.cs : conditional operator should check possibly
12061           incorrect assign expression. Fixed bug #75946.
12062
12063 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12064
12065         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12066           Reverting the change. gmcs is much complex than mcs on this matter.
12067
12068 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12069
12070         * cs-tokenizer.cs : To read another token ahead of the actual 
12071           consumption, use new SavedToken and cache token instead of moving
12072           back the stream with SeekableStreamReader (it seemed problematic).
12073         * cs-parser.jay,
12074           driver.cs : Thus use StreamReader directly.
12075         * support.cs : Thus removed SeekableStreamReader.
12076
12077 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12078
12079         Fix #75934.
12080         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12081         (ScopeInfo.EmitScopeType): Use it to construct field names from
12082         names of captured locals.
12083
12084         Fix #75929.
12085         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12086         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12087         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12088         (ExplicitConversion): Remove enum cases already handled by
12089         implicit conversion.  Move implicit conversion check to the beginning.
12090         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12091         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12092         Don't treat System.Enum as a struct.
12093
12094 2005-08-30  Jb Evain  <jbevain@gmail.com>
12095
12096         * attribute.cs: handles as expression in parameters.
12097
12098 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12099
12100         Fix #75802.
12101         * class.cs (TypeContainer.VerifyClsName): Don't use a
12102         PartialContainer when verifying CLS compliance.
12103         (AbstractPropertyEventMethod): Set Parent here, ...
12104         (PropertyMethod): ... not here.
12105
12106 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12107
12108         * attribute.cs : escaped attribute name should not be allowed to be
12109           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12110
12111 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12112
12113         Fix #75927.
12114         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12115         when converting a long constant to unsigned long.
12116         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12117         detect where IsApplicable and VerifyArgumentsCompat disagree.
12118
12119 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12120         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12121
12122         Fix #75848.
12123         * class.cs (TypeContainer.CanElideInitializer): New helper.
12124         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12125         can safely emitting the initializer of a field.
12126
12127 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12128
12129         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12130           allowed inside a switch (without loop). Fixed bug #75433.
12131
12132 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12133
12134         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12135         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12136
12137 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12138
12139         * driver.cs : kinda reverting the default encoding changes (not exact 
12140           revert since I noticed that "codepage:reset" might not work fine).
12141
12142 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12143
12144         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12145           Location. Now getter and setter store location correctly.
12146           (errors/cs0111-12.cs now reports the expected location.)
12147
12148 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12149
12150         * driver.cs : Use default encoding on the environment.
12151           Removed (now that) extra parameter for SeekableStreamReader.
12152         * support.cs : (SeekableStreamReader) third .ctor() argument for
12153           StreamReader is not required (always true). preamble size could
12154           be acquired in simpler and safe way.
12155
12156 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12157
12158         * cs-parser.jay: report CS0642 at warning level 3
12159           and report CS0642 for an if else statement also
12160           fixes bug #74745. Patch by John Luke (and a bit
12161           modified by me).
12162           Removed extra CS0642 warning check for "while",
12163           "for" and "fixed".
12164         * statement.cs: In Block.Resolve(), CS0642 check
12165           is reimplemented to check a sequence of an empty
12166           statement and a block.
12167
12168           Both fix bug #66777.
12169
12170 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
12171
12172         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
12173         detection until I fix it.
12174         
12175         * cs-tokenizer.cs: Changed error message.
12176         
12177         * cs-parser.jay: Fixed 2 error locations.
12178         
12179         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
12180         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
12181         properties.
12182         
12183         * enum.cs (GetSignatureForError): Fixed.
12184         
12185         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
12186         method detection.
12187         
12188         * class.cs,
12189         * typemanager.cs (RegisterProperty): Removed.
12190         
12191         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
12192
12193 2005-08-24  Raja R Harinath  <rharinath@novell.com>
12194
12195         Fix #75874.
12196         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
12197         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
12198
12199 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12200
12201         * expression.cs : tiny fix is required for not warning positive ulong.
12202           See test-441.cs.
12203
12204 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12205
12206         * expression.cs : add CS0652 check for constant and integral
12207           expression. Fixed bug #53974.
12208
12209 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12210
12211         * expression.cs : in DoNumericPromotions(), check if there is implicit
12212           conversion overload for string (to check CS0034). Fixed bug #52492.
12213
12214 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12215
12216         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
12217
12218 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12219
12220         * ecore.cs : report location when it is *not* Null.
12221
12222 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12223
12224         * codegen.cs,
12225           ecore.cs,
12226           flowanalysis.cs,
12227           expression.cs:
12228           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
12229           correctly. Fixed bug #75721.
12230
12231 2005-08-23  Raja R Harinath  <rharinath@novell.com>
12232
12233         * support.cs (SeekableStreamReader.Position): Avoid an expensive
12234         loop that performs 'min (pos, char_count)'.
12235
12236         Fix #75862.
12237         * expression.cs (Unary.ResolveOperator): Don't discard implicit
12238         converted value in Operator.OnesComplement.
12239
12240 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
12241
12242         * anonymous.cs: If the anon method is pulled into a helper class,
12243         it needs to be `internal' not `private'. Fixes runtime behavior on
12244         msft. bug #75704
12245
12246 2005-08-20  Martin Baulig  <martin@ximian.com>
12247
12248         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12249         scope if we don't already have it.
12250
12251         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
12252         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
12253         fixes #75867.
12254
12255 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
12256
12257         Fix #75803
12258         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
12259         is a partial class.
12260
12261 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
12262
12263         The big constants rewrite
12264         Fix #75746, #75685 and more
12265         As a side effect saved 1MB for MWF ;-)
12266         
12267         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
12268         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
12269         enum based for corlib compilation.
12270         
12271         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
12272         subtractions.
12273         
12274         * class.cs (FixedField.Define): Use ResolveAsConstant.
12275         
12276         * const.cs (IConstant): Interface constants and enums.
12277         (Const.ResolveValue): New method for constant resolvning.
12278         (ExternalConstant): Constants from imported assemblies.
12279         
12280         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
12281         conversion; like enums.
12282         (Constant.ToType): Converts this constant to different type.
12283         (Constant.Increment): Adds 1.
12284         
12285         * convert.cs (ImplicitConversionRequired): Simplified.
12286         
12287         * cs-parser.jay: Create EnumMember directly.
12288         
12289         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
12290         
12291         * doc.cs (GenerateEnumDocComment): Removed.
12292         
12293         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
12294         (ConvertIntLiteral): Removed.
12295         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
12296         
12297         * enum.cs (EnumMember): Implement IConstant.
12298         (Enum.IsValidEnumConstant): Removed.
12299         (Enum.GetNextDefaultValue): Removed.
12300         (Enum.FindMembers): Updated.
12301         (Enum.GenerateDocComment): Iterate enum members.
12302         
12303         * expression.cs (Cast.TryReduce): Handle enums correctly.
12304         (New.Constantify): Made public.
12305         (MemberAccess.DoResolve): Removed contant specific if(s).
12306         
12307         * literal.cs (NullLiteral): Implement new abstract methods.
12308         
12309         * statement.cs (GotoCase.Resolve): Use new constant methods.
12310         (SwitchLabel.ResolveAndReduce): Use new constant methods.
12311         
12312         * typemanager.cs (LookupEnum): Removed.
12313         (IsEnumType): Fixed to work with corlib.
12314         (RegisterConstant): Removed.
12315         (LookupConstant): Removed.
12316         (GetConstant): Changed to work with IConstant.
12317
12318 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
12319
12320         * location.cs : Fixed overflown (>255) column number.
12321
12322 2005-08-03  Raja R Harinath  <rharinath@novell.com>
12323
12324         First cut of the qualified-alias-member feature.
12325         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
12326         token.
12327         * cs-parser.jay (DOUBLE_COLON): New token.
12328         (namespace_or_type_name): Add rule for recognizing
12329         qualified-alias-members.
12330         (primary_expression): Likewise.
12331         (element_access): Allow QualifiedAliasMember as a possible
12332         type-bearing expression.
12333         (local_variable_type, local_variable_pointer_type): Likewise.
12334         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
12335         aliases in the current and enclosing namespace declarations.
12336         (NamespaceEntry.UsingAlias): Add CS0440 warning.
12337         * decl.cs (MemberName.is_double_colon): New.
12338         (MemberName.MemberName): Add new constructor for alias-member.
12339         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
12340         * expression.cs (QualifiedAliasMember): New expression type.
12341
12342 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12343
12344         * location.cs : it borked when no argument was specified.
12345
12346 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12347
12348         * location.cs : tiny ToString() format fix.
12349
12350 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12351
12352         * statement.cs : oops, it was missing.
12353
12354 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12355
12356         A set of fixes for precise line/column location.
12357
12358         * location.cs :
12359           "token" field now holds a file/line "delta", a line number offset 
12360           from the segment, and a column number. See also:
12361           http://lists.ximian.com/pipermail/mono-devel-list/2004-
12362           December/009508.html
12363           Removed static IsNull. Use instance IsNull property instead.
12364         * cs-tokenizer.cs :
12365           For some tokens it stores Location. For Identifier it stores
12366           LocatedToken which is a pair of string name and location.
12367           Column numbers are adjusted only at getChar().
12368         * report.cs :
12369           Use Location.ToString() for reporting (it now contains column).
12370         * cs-parser.jay :
12371           Largely modified to use LocatedToken instead of
12372           string (IDENTIFIER), and to acquire Location from some tokens.
12373         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
12374           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
12375           codegen.cs :
12376           Now MemberName holds Location. DeclSpace.ctor() receives Location
12377           as a parameter. Removed extra parameters to all derived classes.
12378           Replaced Location.IsNull() with instance property.
12379         * assign.cs, expression.cs :
12380           Added .ctor() overload that omits Location.
12381         * attribute.cs :
12382           Added "nameEscaped" flag that indicates the identifier was escaped
12383           in the source file. This fixes bug #57047.
12384
12385 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
12386
12387         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
12388         New method, looking for lo-case imported cls type.
12389
12390         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
12391         here.
12392
12393         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
12394
12395         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
12396
12397         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
12398         all_imported_types.
12399         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
12400
12401         Optimized to save 3.5 MB for SWF compilation.
12402
12403 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12404
12405         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
12406         (PartialContainer.Create): Moved logic AddToContainer.
12407         (PartialContainer.MarkForDuplicationCheck): Shares name.
12408         
12409         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
12410         place.
12411         
12412         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
12413         initialization.
12414         (Namespace.GetSignatureForError): New method.
12415         
12416         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
12417         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
12418
12419 2005-08-01  Raja R Harinath  <rharinath@novell.com>
12420
12421         Fix #75669.
12422         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
12423         member lookup rather than qualifier_type, since qualifier_type can
12424         be null.
12425
12426 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12427
12428         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
12429         enum member.
12430
12431 2005-07-31  Miguel de Icaza  <miguel@novell.com>
12432
12433         * statement.cs: Copy the local exception into the exception
12434         captured local.  Fixes 75674
12435
12436 2005-07-31  Raja R Harinath  <harinath@gmail.com>
12437
12438         Fix #75658.
12439         * expression.cs (Invocation.OverloadResolve): Don't report error
12440         CS1501 if error CS1502 has been reported.
12441         (New.DoResolve): Delegate CS1501 reporting to
12442         Invocation.OverloadResolve.
12443
12444         Fix #75656.
12445         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
12446         invariant-meaning-in-block property in an enclosing block if
12447         necessary.
12448
12449 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
12450
12451         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
12452         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
12453         (Switch.CheckSwitch): Just save 50kb for SWF.
12454
12455 2005-07-27  Martin Baulig  <martin@ximian.com>
12456
12457         * anonymous.cs (CaptureContext.AddField): Added
12458         `AnonymousContainer am' argument; compute its toplevel scope if
12459         it's not already computed.  Fixes #75649.
12460
12461 2005-07-26  Raja R Harinath  <rharinath@novell.com>
12462
12463         Fix #75628.
12464         * class.cs (Constructor.Emit): Reset block to null if the block
12465         resolve fails.
12466
12467 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
12468
12469         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
12470
12471 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
12472
12473         * class.cs (MethodData.Define): Check whether accessor implementing
12474         interface is public.
12475
12476         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
12477
12478 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
12479
12480         Fix #57245
12481         * namespace.cs (LookupType): Moved same type check to...
12482         
12483         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
12484         with the same name.
12485
12486 2005-07-21  Raja R Harinath  <rharinath@novell.com>
12487
12488         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
12489         already found a typebuilder.
12490         * class.cs (MethodCore.IsDuplicateImplementation): Compare
12491         MemberNames, not strings.
12492
12493         * const.cs (Error_ExpressionMustBeConst): 
12494         Rename from Error_EpressionMustBeConst.
12495         * const.cs, class.cs, statement.cd: Update.
12496
12497 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
12498
12499         Fix #65573
12500
12501         * const.cs (Const.LookupConstantValue): Report missing contant expression
12502         everytime.
12503         (Error_EpressionMustBeConstant): Only one error method.
12504
12505         * class.cs, statement.c: Updated.
12506
12507 2005-07-20  Raja R Harinath  <rharinath@novell.com>
12508
12509         * statement.cs (Block.Flags): Add back HasVarargs.
12510         (Block.flags): Make protected.
12511         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
12512
12513         * typemanager.cs (types, typecontainers, user_types): Remove.
12514         (UserTypes, TypeContainers): Likewise.
12515         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
12516         (CleanUp, Reset): Update.
12517         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
12518         (GetNestedType): Use Type.GetNestedType.
12519         (CoreLookupType): Take two arguments, the namespace and the
12520         basename of the type.  Update to use the Namespace.Lookup
12521         mechanism.
12522         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
12523         (RealMemberLookup): Use IsNestedChildOf instead of playing with
12524         string concatenation and substring matches.
12525         * class.cs, enum.cs, delegate.cs: Update to changes.
12526
12527 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
12528
12529         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
12530         Expression and made virtual.
12531
12532         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
12533         (ImplicitStandardConversionExists): Fixed `byte' typo ?
12534
12535         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
12536
12537         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
12538         error message.
12539
12540         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
12541         change.
12542
12543 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
12544
12545         Fix #57707
12546         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
12547         AssemblyCultureAttribute is not used on executable.
12548
12549         * rootcontext.cs,
12550         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
12551
12552 2005-07-16  Raja R Harinath  <rharinath@novell.com>
12553
12554         Fix #60638.
12555         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
12556         New.  Reports CS0252/CS0253.
12557         Mostly taken from preliminary patch by Duncak Mak.
12558         (Binary.DoResolveOperator): Store results of operator lookup.
12559         Use them to detect if we need to warn about unintended reference
12560         comparisons.
12561
12562 2005-07-15  Raja R Harinath  <rharinath@novell.com>
12563
12564         Fix #72969.
12565         * namespace.cs (Namespace.Lookup): Add back location parameter.
12566         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
12567         * delegate.cs, ecore.cs, expression.cs: Update to changes.
12568
12569         * codegen.cs (EmitContext.DeclSpace): Make readonly.
12570         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
12571         (Namespace.LookupType): ... this.
12572         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
12573         of namespaces.
12574         * typemanager.cs (LookupTypeReflection): Remove buggy code that
12575         purported to handle pointers.
12576         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
12577         CoreLookupType.
12578
12579 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
12580
12581         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
12582         type as namespace.
12583
12584 2005-07-15  Raja R Harinath  <rharinath@novell.com>
12585
12586         * namespace.cs (Namespace.Lookup): Drop location parameter.
12587         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
12588         (NamespaceEntry.Lookup): ... this.
12589         (NamespaceEntry.Error_AmbiguousTypeReference):
12590         Move here from DeclSpace.
12591         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
12592         names ...
12593         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
12594         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
12595         Move to NamespaceEntry.
12596         * delegate.cs, expression.cs: Update to changes.
12597
12598 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
12599
12600         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
12601         CheckAttributeType and refactored.
12602         (Attribute.ResolvePossibleAttributeType): Changed to reuse
12603         ResolveAsTypeTerminal error handling.
12604         (ResolveAsTypeTerminal): Introduced because of global attributes extra
12605         handling.
12606         (GetSignatureForError): Print errors in same way.
12607
12608         * class.cs,
12609         * codegen.cs: Reflect attribute GetSignatureForError change.
12610
12611         * ecore.cs,
12612         * expression.cs: Add silent parameter to ResolveAsTypeStep.
12613
12614         * namespace.cs (UsingEntry): Refactored to make fields private.
12615
12616         * assign.cs,
12617         statement.cs: Error_UnexpectedKind has extra parameter.
12618
12619 2005-07-14  Raja R Harinath  <rharinath@novell.com>
12620
12621         * ecore.cs (IAlias): Remove.
12622         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
12623         that implement the interface.
12624         * namespace.cs (Namespace): Likewise.
12625         (Namespace.declspaces): Renamed from 'defined_names'.
12626         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
12627         DeclSpace instead of an IAlias.
12628         * tree.cs (Tree.AddDecl): Update.
12629
12630 2005-07-12  Raja R Harinath  <rharinath@novell.com>
12631
12632         * statement.cs (Block.Flags); Remove HasVarargs.
12633         (Block.HasVarargs): Move to ToplevelBlock.
12634         (Block.ThisVariable, Block.AddThisVariable): Likewise.
12635         (Block.Variables): Make protected.  Initialize variable hashtable
12636         if necessary.
12637         (Block.AddVariable): Update.
12638         (Block.Resolve): Update to changes.
12639         (ToplevelBlock.HasVarargs): New boolean.
12640         (ToplevelBlock.ThisVariable): Move here from Block.
12641         (ToplevelBlock.AddThisVariable): Likewise.
12642         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
12643         * expression.cs (This.ResolveBase): Update to changes.
12644         (ArglistAccess.DoResolve): Likewise.
12645
12646 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
12647
12648         Fix #75321
12649         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
12650
12651         * class.cs (TypeContainer.VerifyMembers): Distinguish between
12652         not used and not used & assigned.
12653         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
12654
12655 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
12656
12657         Fix #75053
12658         * expression.cs (Is.DoResolve): null is never provided type.
12659
12660 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
12661
12662         Fix #52496
12663         * cs-parser.jay: Less strict event error rule to catch more errors.
12664
12665 2005-07-08  Martin Baulig  <martin@ximian.com>
12666
12667         Fix test-iter-10.cs - distinguish whether we `yield' in a property
12668         gettter (allowed) or setter (not allowed).
12669
12670         * class.cs (Accessor): Implement IIteratorContainer.
12671         (Accessor.Yields): New public field.
12672         (PropertyBase.PropertyMethod.Define): Handle iterators on a
12673         per-accessor basis.
12674
12675         * cs-parser.jay
12676         (get_accessor_declaration, set_accessor_declaration): Set the
12677         `yields' flag on the accessor, not the property.
12678         (property_declaration): Do the iterators check on a per-accessor
12679         basis and not for the whole property.
12680
12681 2005-07-08  Martin Baulig  <martin@ximian.com>
12682
12683         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
12684         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
12685
12686 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
12687
12688         Fix #74975
12689         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
12690         (ExtractSecurityPermissionSet): Cope with self referencing security
12691         attributes properly.
12692
12693         * driver.cs (SetOutputFile): Made public property OutputFile.
12694
12695 2005-07-07  Raja R Harinath  <rharinath@novell.com>
12696
12697         Fix #75486.
12698         * class.cs (TypeContainer.first_nonstatic_field): Rename from
12699         has_nonstatic_fields.  Make into a FieldBase pointer.
12700         (TypeContainer.AddField): Add CS0282 check.
12701         (TypeContainer.EmitType): Update.
12702
12703 2005-07-06  Miguel de Icaza  <miguel@novell.com>
12704
12705         * cs-tokenizer.cs (consume_identifier): Do not create strings to
12706         compare if they start with __.
12707
12708 2005-07-06  Raja R Harinath  <rharinath@novell.com>
12709
12710         * statement.cs (Switch.SwitchGoverningType): Only look at
12711         UserCasts that don't need implicit standard conversions to one of
12712         the allowed switch types (Fixes test-322.cs).
12713         (LocalInfo.Resolve): Re-enable sanity-test.
12714
12715 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
12716
12717         * cs-tokenizer.cs (consume_identifier): Detect double undescores
12718         
12719         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
12720         
12721         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
12722
12723 2005-07-06  Raja R Harinath  <rharinath@novell.com>
12724
12725         Fix #75472.
12726         * ecore.cs (SimpleName.GetSignatureForError): Add.
12727         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
12728         (MemberAccess.GetSignatureForError): Add.
12729
12730 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
12731  
12732         The big error and warning messages review.
12733         
12734         * anonymous.cs,
12735         * assign.cs,
12736         * attribute.cs,
12737         * class.cs,
12738         * codegen.cs,
12739         * convert.cs,
12740         * cs-parser.jay,
12741         * cs-tokenizer.cs,
12742         * decl.cs,
12743         * delegate.cs,
12744         * doc.cs,
12745         * driver.cs,
12746         * ecore.cs,
12747         * enum.cs,
12748         * expression.cs,
12749         * flowanalysis.cs,
12750         * iterators.cs,
12751         * literal.cs,
12752         * location.cs,
12753         * modifiers.cs,
12754         * namespace.cs,
12755         * parameter.cs,
12756         * pending.cs,
12757         * report.cs,
12758         * rootcontext.cs,
12759         * statement.cs,
12760         * support.cs,
12761         * tree.cs,
12762         * typemanager.cs: Updated.
12763         
12764         * class.cs: (MethodCore.SetYields): Moved here to share.
12765         (PropertyMethod.Define): Moved iterator setup here.
12766         
12767         * iterators.cs: Add orig_method to have full access to parent
12768         container.
12769
12770 2005-07-05  Raja R Harinath  <rharinath@novell.com>
12771
12772         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
12773         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
12774         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
12775         variable of struct type.
12776         * expression.cs (Unary.ResolveOperator): Update to change.
12777         (Indirection.VerifyFixed): Likewise.
12778         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
12779         (ParameterReference.VerifyFixed): Value parameters are fixed.
12780         (This.VerifyFixed): Treat 'this' as a value parameter.
12781         * statement.cs (LocalInfo.IsFixed): Remove.
12782
12783 2005-07-01  Martin Baulig  <martin@ximian.com>
12784
12785         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
12786         `ec.EmitThis ()' to get the correct scope.
12787
12788 2005-07-01  Martin Baulig  <martin@ximian.com>
12789
12790         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
12791         instance is a ParameterReference; fixes #75299.
12792
12793 2005-07-01  Martin Baulig  <martin@ximian.com>
12794
12795         Reverted Marek's latest patch (r46725):
12796         - it contains structural changes which are neither mentioned in
12797           the ChangeLog nor explained anywhere; for example the additional
12798           argument of EmitContext's and Iterator's .ctor's and the
12799           TypeContainer.DefineMembers() change.
12800         - structural changes like this should go in in seperate patches
12801           and not be hidden in a huge patch which just seems to affect
12802           warnings and errors.
12803           a big and hard to understand patch.
12804         - it breaks iterators and causes regressions, for instance in
12805           test-iter-03.cs.      
12806
12807 2005-06-30  Raja R Harinath  <rharinath@novell.com>
12808
12809         Fix #75412.
12810         * expression.cs (Indexers.map): Remove.
12811         (Indexers.Append): Filter out inaccessible setters and getters.
12812         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
12813
12814         Fix #75283.
12815         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
12816         Refactored from ...
12817         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
12818         (FieldExpr.Emit, PropertyExpr.Emit): Update.
12819         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
12820         * expression.cs (Invocation.EmitCall): Add CS0120 check.
12821
12822 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
12823
12824         Fix #75322
12825         * class.cs (FieldBase.GetInitializerExpression): One more field
12826         for backup.
12827
12828 2005-06-28  Miguel de Icaza  <miguel@novell.com>
12829
12830         * pending.cs: Do not define a proxy if the base method is virtual,
12831         it will be picked up by the runtime (bug 75270).
12832
12833 2005-06-08  Martin Baulig  <martin@ximian.com>
12834
12835         The big Iterators rewrite :-)
12836
12837         * iterators.cs: Rewrite this to use the anonymous methods framework.
12838
12839         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
12840         before the TypeContainers; see 2test-21.cs.
12841
12842         * class.cs
12843         (TypeContainer.DefineType): Don't create a new EmitContext if we
12844         already have one (this only happens if we're an Iterator).
12845         (TypeContainer.Define): Also call Define() on all our iterators.
12846         (Method.CreateEmitContext): Added support for iterators.
12847
12848         * anonymous.cs
12849         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
12850         (AnonymousContainer.CreateMethodHost): Moved here from
12851         AnonymousMethod and made abstract.
12852         (AnonymousContainer.CreateScopeType): New abstract method.
12853         (AnonymousContainer.IsIterator): New public property.
12854         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
12855         get the ScopeTypeBuilder rather than manually defining it here. 
12856         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
12857         iterators here.
12858
12859         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
12860         before RootContext.DefineTypes().
12861
12862         * codegen.cs (EmitContext.RemapToProxy): Removed.
12863         (EmitContext.CurrentAnonymousMethod): Changed type from
12864         AnonymousMethod -> AnonymousContainer.
12865         (EmitContext.ResolveTopBlock): Protect from being called twice.
12866         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
12867         (EmitContext.EmitThis): Removed the iterators hacks; use the
12868         anonymous methods framework for that.
12869
12870         * statement.cs
12871         (ToplevelBlock.Container): Make this a property, not a field.
12872         (ToplevelBlock.ReParent): New public method; move the
12873         ToplevelBlock into a new container.
12874         (Foreach.TemporaryVariable): Simplify.
12875
12876 2005-06-05  Martin Baulig  <martin@ximian.com>
12877
12878         * statement.cs (LocalInfo.CompilerGenerated): New flag.
12879         (Block.AddTemporaryVariable): New public method; creates a new
12880         `LocalInfo' for a temporary variable.
12881         (Block.EmitMeta): Create the LocalBuilders for all the temporary
12882         variables here.
12883         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
12884         non-iterator variables.
12885
12886 2005-06-05  Martin Baulig  <martin@ximian.com>
12887
12888         * statement.cs (Foreach.TemporaryVariable): Create the
12889         LocalBuilder in the Emit phase and not in Resolve since in some
12890         situations, we don't have an ILGenerator during Resolve; see
12891         2test-19.cs for an example.
12892
12893 2005-06-04  Martin Baulig  <martin@ximian.com>
12894
12895         **** Merged r45395 from GCS ****
12896
12897         The big Foreach rewrite - Part II.
12898
12899         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
12900         with `PropertyInfo ienumerator_getcurrent'.
12901
12902         * codegen.cs (VariableStorage): Removed.
12903
12904         * statement.cs
12905         (Foreach): Derive from Statement, not ExceptionStatement.
12906         (Foreach.CollectionForeach): New nested class.  Moved all the code
12907         dealing with collection foreach here.
12908         (Foreach.ForeachHelperMethods): Removed.
12909         (Foreach.TemporaryVariable): Implement IMemoryLocation.
12910
12911 2005-05-23  Martin Baulig  <martin@ximian.com>
12912
12913         * statement.cs (Try.DoResolve): Don't create a `finally' if we
12914         don't need to.  Fix #75014.
12915
12916 2005-05-20  Martin Baulig  <martin@ximian.com>
12917
12918         Merged r44808 from GMCS.
12919
12920         * class.cs (TypeContainer.CircularDepException): Removed.
12921         (TypeContainer.DefineType): Removed the `InTransit' stuff.
12922         (TypeContainer.CheckRecursiveDefinition): Check for circular class
12923         (CS0146) and interface (CS0529) dependencies here.
12924
12925 2005-06-21  Raja R Harinath  <rharinath@novell.com>
12926
12927         * expression.cs (Invocation.EmitCall): Fix initialization
12928         'this_call' to reflect current behaviour.  Fix indentation.
12929
12930         * convert.cs (FindMostEncompassedType): Add two trivial special
12931         cases (number_of_types == 0 || number_of_types == 1).
12932         (FindMostEncompasingType): Likewise.
12933
12934 2005-06-17  Raja R Harinath  <rharinath@novell.com>
12935
12936         Some cleanups preparing for the fix of #75283.
12937         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
12938         error testing.
12939         (EventExpr.InstanceResolve): Likewise.
12940         (EventExpr.DoResolve): Remove redundant checks.
12941
12942 2005-06-10  Duncan Mak  <duncan@novell.com>
12943
12944         * cs-tokenizer.cs (process_directives): New flag for controlling
12945         the processing of preprocessor directives.
12946         (x_token): After seeing a '#', return Token.NONE instead of going
12947         to handle_preprocessing_directive() when not processing
12948         directives. This avoids unnecessary processing during the token peek in
12949         is_punct().
12950
12951         This fixes #74939.
12952
12953         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
12954         the existing error reporting methods instead of Report.Error.
12955
12956         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
12957         after Raja's rewrite.
12958
12959 2005-06-08  Miguel de Icaza  <miguel@novell.com>
12960
12961         * class.cs: Small fix.
12962
12963 2005-06-08  Raja R Harinath  <rharinath@novell.com>
12964
12965         Fix #75160.
12966         * class.cs (GetPartialBases): Fix return value check of
12967         part.GetClassBases.
12968
12969 2005-06-07  Raja R Harinath  <rharinath@novell.com>
12970
12971         Ensure that partial classes are registered in their enclosing
12972         namespace.  Initial part of fix of #75160.
12973         * tree.cs (Tree.RecordDecl): Add new namespace argument.
12974         Register declspace with namespace here, not in
12975         DeclSpace.RecordDecl.
12976         * cs-parser.jay: Pass namespace to RecordDecl.
12977         * class.cs (PartialContainer.Create): Likewise.
12978         (ClassPart.DefineType): New sanity-check.  Throws an exception if
12979         called.
12980         * decl.cs (Declspace.RecordDecl): Remove.
12981         * namespace.cs (NamespaceEntry.DefineName): Remove.
12982
12983 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
12984
12985         * rootcontext.cs: Reset TargetExt as well.
12986
12987 2005-06-03  Raja R Harinath  <rharinath@novell.com>
12988
12989         * ecore.cs (Expression.Resolve): Emit CS0654 error when
12990         -langversion:ISO-1.
12991
12992 2005-06-02  Raja R Harinath  <rharinath@novell.com>
12993
12994         Fix #75080, cs0119.cs.
12995         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
12996         of ...
12997         (Expression.Resolve): ... this.  Use it.  Remove bogus code
12998         allowing ExprClass.Type and ExprClass.Namespace for
12999         ResolveFlags.VariableOrValue.
13000         (Expression.Resolve) [1-argument variant]: Change default resolve
13001         flags based on language version.
13002         (Expression.Error_UnexpectedKind): Use a simple string array
13003         rather than an ArrayList.
13004         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13005         not ExprClass.Type.
13006         (TypeOfVoid.DoResolve): Likewise.
13007         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13008         flags argument -- it always has the same value.
13009
13010 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13011
13012         Fix #75081.
13013         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13014         Use it in the error message.
13015         * assign.cs, expression.cs, statement.cs: Update.
13016
13017 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13018
13019         Fix #75088.
13020         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13021         the "almostMatchedMember" case too.
13022         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13023         that failed the accessibility checks to 'almost_match'.
13024
13025 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13026
13027         * attribute.cs: Use internal MethodBuilder methods to set
13028         ExactSpelling and SetLastError on PInvoke methods, instead
13029         of passing them via charset.  Fixes #75060.
13030
13031 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13032
13033         * parameter.cs (Parameter): Remove TODO comment.
13034         (Parameter.DefineParameter): Remove Location parameter.
13035         (Parameters.LabelParameters): Likewise.
13036         * class.cs (Constructor.Emit): Update to change.
13037         (MethodData.Emit): Likewise.
13038         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13039         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13040
13041 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13042
13043         * parameter.cs,
13044           Removed Parameters.Location and added Parameter.Location instead.
13045           Removed Location parameter from Emit() and GetSignature().
13046         * anonymous.cs,
13047           class.cs,
13048           cs-parser.jay,
13049           delegate.cs,
13050           iterators.cs,
13051           statement.cs :
13052           Modified all related calls.
13053
13054 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13055
13056         Improve user-defined conversion handling.
13057         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13058         applicable operators.
13059         (AddConversionOperators): New.  Helper for GetConversionOperators.
13060         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13061         there is only one most encompassed/encompassing type.
13062         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13063         "applicable operator" handling.
13064         (UserConversion): Move cache here from GetConversionOperators.
13065         Directly cache the chosen operator, rather than the whole
13066         MethodGroup.
13067         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13068         case.  Allow conversion of decimal to sbyte and byte too.
13069         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13070         New static methods.  Used to avoid allocating EmptyExpressions in
13071         convert.cs.
13072
13073 2005-05-24  Duncan Mak  <duncan@novell.com>
13074
13075         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13076         another class, used in Convert.ExplicitNumericConversion.
13077         (CastToDecimal): New class, similar to above, but casts to
13078         System.Decimal, used in Convert.ImplicitNumericConversion and also
13079         in explicit convesion from double/float to decimal.
13080
13081         * convert.cs (ImplicitNumericConversion): Handle implicit
13082         conversions to System.Decimal.
13083         (ExplicitNumericConversion): handle explicit conversions to
13084         System.Decimal.
13085
13086         This fixes #68711.
13087         
13088 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13089
13090         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13091         know the type at this stage, just break through.   Fixes #75008 
13092
13093 2005-05-19  Martin Baulig  <martin@ximian.com>
13094
13095         * delegate.cs
13096         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13097         to disable error reporting.
13098
13099         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13100         here since we don't want to report an error; see the new test-336.cs.
13101
13102 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13103
13104         * statement.cs (ToplevelBlock.GetParameterReference)
13105         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13106         Move here from class Block.
13107         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13108         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13109
13110 2005-05-18  Martin Baulig  <martin@ximian.com>
13111
13112         Fix #74978.
13113
13114         * flowanalysis.cs
13115         (FlowBranching.Reachability): Add non-static public And() and Or()
13116         methods.
13117         (FlowBranchingSwitch): New class; do the `break_origins' thing
13118         like in FlowBranchingLoop.
13119         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13120         reachability, not just locals and parameters.
13121         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13122         switch; MergeBreakOrigins() now takes care of that.
13123
13124 2005-05-18  Martin Baulig  <martin@ximian.com>
13125
13126         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13127         a loop and may leave it, reset the barrier; fixes #74974.
13128
13129 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13130         
13131         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13132         is back.
13133         
13134         * cs-parser.jay: Catch more lexical errors.
13135         
13136         * report.cs: Add one more Error method.
13137         
13138         * rootcontext.cs,
13139         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13140
13141 2005-05-17  Martin Baulig  <martin@ximian.com>
13142
13143         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13144         #70970. 
13145
13146 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13147
13148         Fix test-382.cs.  Emit values of decimal constants.
13149         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13150         Carved out of ...
13151         (TypeContainer.AddField): ... this.
13152         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13153         with initializers to include 'Const's.
13154         (ClassPart.RegisterFieldForInitialization): Forward to
13155         PartialContainer.
13156         * const.cs (Const.Const): Pass initializer to base class.
13157         (Const.Define): In case of decimal constants, register them for
13158         initialization in a static constructor.
13159
13160 2005-05-14  Martin Baulig  <martin@ximian.com>
13161
13162         * statement.cs (Block.Resolve): Correctly handle unreachable code;
13163         do not call ResolveUnreachable() on unreachable statements in
13164         here, see the comment in the source code.
13165
13166 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13167
13168         Fix #74934.
13169         * expression.cs (BinaryResolveOperator): If one of the operands of
13170         an equality comparison is 'null' and the other is a pointer type,
13171         convert the null to a NullPointer.
13172         * convert.cs (ImplicitReferenceConversion): If the expression is a
13173         NullLiteral and the target type is a pointer type, return a
13174         NullPointer instead.
13175         (ImplicitConversionStandard): Likewise.
13176
13177 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
13178         
13179         * cs-parser.jay: Set readonly context based on special constructs.
13180         
13181         * expression.cs (LocalVariableReference.DoResolveBase): Improved
13182         readonly variable error handling.
13183         
13184         * rootcontext.cs (EmitCode): Don't verify members when error
13185         occurred.
13186         
13187         * statement.cs (LocalInfo): Add reaodnly context information.
13188         (SetReadOnlyContext, GetReadOnlyContext): New methods.
13189
13190 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13191
13192         * statement.cs (Block.Resolve): Revert change below.  Modify fix
13193         for #74041 to initialize 'resolved' to false only for explicit
13194         blocks.  Fixes #74873.
13195
13196 2005-05-12  Raja R Harinath  <harinath@gmail.com>
13197
13198         Fix #74920.
13199         * typemanager.cs (unmanaged_enclosing_types): New.
13200         (IsUnmanagedType): Avoid infloops by using
13201         'unmanaged_enclosing_types' to talk with recursive invocations.
13202
13203 2005-05-13  Martin Baulig  <martin@ximian.com>
13204
13205         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
13206         instance variable, not a local.  Fix #74873.
13207         (Block.ResolveUnreachable): Set it to true here.
13208
13209 2005-05-11  Duncan Mak  <duncan@novell.com>
13210
13211         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
13212         continuing to process for 'arg'.
13213         (handle_preprocessing_directive): Check the argument of the #endif
13214         directive and report error CS1025 if there are any trailing
13215         characters.
13216
13217         According to the C# spec, having even whitespace after the #endif
13218         directive is illegal; however, because we call arg.TrimEnd ()
13219         beforehand, we have the same behavior as csc, allowing whitespace
13220         after the directive.
13221
13222         Fixes #74892.
13223
13224 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
13225
13226         Fix #74863.
13227         
13228         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
13229         (Constructor.GetObsoleteAttribute): Implemented correctly.
13230
13231 2005-05-10  Martin Baulig  <martin@ximian.com>
13232
13233         * support.cs (ReflectionParameters.ParameterModifier): Use
13234         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
13235         and `ParameterAttributes.In'.  Fixes #74884.
13236
13237 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
13238
13239         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
13240         
13241         * expression.cs (Argument.GetParameterModifier): Turned to property.
13242         (Invocation.Error_InvalidArguments): Add more descriptive errors.
13243         
13244         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
13245         its C# equivalent.
13246         
13247 2005-05-09  Raja R Harinath  <rharinath@novell.com>
13248
13249         Fix #74852.
13250         * decl.cs (MemberCache.AddMethods): Register override methods,
13251         rather than non-override methods.
13252         * typemanager.cs (RegisterOverride): New.
13253         (IsOverride): Update.
13254
13255 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
13256
13257         Fix #73105.
13258         
13259         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
13260         recursive declaration.
13261         
13262         * statement.cs (Block.ResolveMeta): Report any error in resolving.
13263         
13264 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
13265
13266         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
13267         
13268         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
13269
13270 2005-05-05  Raja R Harinath  <rharinath@novell.com>
13271
13272         Fix #74797.
13273         * decl.cs (DeclSpace.FamilyAccessible): 
13274         Use TypeManager.IsNestedFamilyAccessible.
13275
13276         Fix reopened #64812.
13277         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
13278         internal'.
13279
13280 2005-05-04  Raja R Harinath  <rharinath@novell.com>
13281             Abin Thomas  <projectmonokochi@rediffmail.com>
13282             Anoob V E  <projectmonokochi@rediffmail.com>
13283             Harilal P R  <projectmonokochi@rediffmail.com>
13284
13285         Fix #64812.
13286         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
13287         allow access to all static members.
13288
13289 2005-05-04  Martin Baulig  <martin@ximian.com>
13290
13291         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
13292
13293 2005-05-04  Martin Baulig  <martin@ximian.com>
13294
13295         Fix #74655.
13296
13297         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
13298         section at the end; make things work if `default' is not the last
13299         section.        
13300
13301 2005-05-04  Martin Baulig  <martin@ximian.com>
13302
13303         Fix #70400.
13304
13305         * statement.cs (Switch): Replaced the `got_default' field with a
13306         `default_section' one.
13307         (Switch.CheckSwitch): Set `default_section' here.
13308         (Switch.Resolve): If we're a constant switch and the constant is
13309         not found, use the default section.
13310
13311 2005-05-03  Martin Baulig  <martin@ximian.com>
13312
13313         * expression.cs (ArrayAccess.EmitGetLength): New public method.
13314
13315         * statement.cs (Foreach.ArrayForeach): New nested class.
13316         (Foreach.TemporaryVariable): New nested class.
13317         (Foreach.EmitArrayForeach): Removed; this is now in the new
13318         ArrayForeach class.
13319
13320 2005-05-03  Raja R Harinath  <rharinath@novell.com>
13321
13322         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
13323         more conservative.
13324         (VerifyPendingMethods): Revert change below.
13325
13326         * typemanager.cs (IsOverride, RegisterNonOverride): New.
13327         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
13328         that used to trigger warning -28.  Remove warning -28.
13329         * expression.cs (Invocation.OverloadResolve): Use
13330         TypeManager.IsOverride to distinguish override methods.
13331
13332         Fix #74773.
13333         * pending.cs (VerifyPendingMethods): If a base type implements the
13334         requested interface, don't bother checking individual methods of
13335         the base type.  As a side-effect, this prevents the creation of
13336         unnecessary proxies.
13337
13338 2005-05-02  Martin Baulig  <martin@ximian.com>
13339
13340         Fix #70182.
13341
13342         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
13343         Also `And' the locals if the old vector is null.
13344         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
13345         null; in this case we basically reset all the variables.        
13346
13347 2005-05-02  Martin Baulig  <martin@ximian.com>
13348
13349         Fix #74529.
13350
13351         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
13352         Added `FlowBranching branching' argument; always `and' the
13353         variables instead of `or'ing them unless we're an infinite loop.
13354
13355         * statement.cs (While.Resolve): Create a new sibling unless we're
13356         infinite.       
13357
13358 2005-05-02  Martin Baulig  <martin@ximian.com>
13359
13360         Fix #70140.
13361
13362         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
13363         arguments; use it instead of creating a new TopLevelBlock.
13364         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
13365         our ConstructorInitializer.
13366
13367         * statement.cs
13368         (TopLevelBlock.TopLevelBranching): New public property.
13369         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
13370         and create our `TopLevelBranching'.
13371
13372         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
13373         anonymous method host, use `block.TopLevelBranching' rather than
13374         creating a new branching.
13375
13376 2005-04-20  Miguel de Icaza  <miguel@novell.com>
13377
13378         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
13379         a ScopeInfo, if any of the current children is a child of the new
13380         entry, move those children there.
13381
13382 2005-04-30  Martin Baulig  <martin@ximian.com>
13383
13384         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
13385         at the beginning of a SwitchSection.  Fix #73335.
13386
13387 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
13388
13389         Fix #74378
13390         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
13391         
13392         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
13393         (FieldExpr.DoResolve): Obsolete members are ignored for field
13394         initializers.
13395         
13396 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
13397
13398         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
13399         of arrays detection.
13400
13401         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
13402         verification.
13403         (Field.VerifyClsCompliance): Volatile fields are not compliant.
13404
13405         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
13406         arrays report.
13407
13408 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
13409
13410         * cs-parser.jay: Use the prefered version of -unsafe in error
13411         message.
13412
13413 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
13414
13415         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
13416         circumstances.
13417
13418 2005-04-20  John Luke  <john.luke@gmail.com>
13419
13420         * driver.cs: fix typo in error message, --outout to --output
13421
13422 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
13423
13424         * codegen.cs (InRefOutArgumentResolving): New field.
13425         
13426         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
13427         fields outside contructor.
13428         
13429         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
13430         
13431 2005-04-19  Miguel de Icaza  <miguel@novell.com>
13432
13433         * anonymous.cs (CaptureContext.EmitParameterInstance): The
13434         parameter code was not completed ever, so it was not as up-to-date
13435         as local variables.  Must finish it.
13436
13437         The bug fix was to compare the Toplevel of the block, not the
13438         current block.  Thanks for Ben for pointing this out. 
13439
13440 2005-04-19  Raja R Harinath  <rharinath@novell.com>
13441
13442         * decl.cs (AddMethods): Use the declaring type of the problem
13443         method to determine if we want to squash a warning.
13444
13445 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
13446
13447         * attribute.cs: Removed debug output.
13448
13449         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
13450         
13451         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
13452         Report.Stderr.
13453         
13454 2005-04-18  Raja R Harinath  <rharinath@novell.com>
13455
13456         Fix #74481.
13457         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
13458         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
13459         all null comparisons against reference types.
13460
13461 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
13462
13463         Fix# 74565
13464         * class.cs (TypeContainer.CircularDepException) New nested
13465         exception class.
13466         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
13467         (TypeContainer.DefineType): Removed error, reset InTransit before
13468         exit.
13469         (Class.DefineType): Throw exception when is in Transit.
13470         Catch exception and report error.
13471         (Struct.DefineType): Throw exception when is in Transit.
13472         Catch exception and report error.
13473         (Interface.DefineType): Throw exception when is in Transit.
13474         Catch exception and report error.
13475
13476         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
13477         handle nested exception handlers.
13478
13479         * flowanalysis.cs (InTryWithCatch): New method, search for try with
13480         a catch.
13481
13482         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
13483         InFinally and InCatch storage.
13484
13485         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
13486         (Catch.Resolve): Set and Restore ec.InCatch.
13487         (Try.Resolve): Set and Restore ec.InFinally.
13488         (Try.HasCatch): True when try has catch.
13489
13490 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
13491
13492         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
13493           for the same event member, so exclude such cases from warning 419.
13494           Fixed bug #74633.
13495
13496 2005-04-16  Miguel de Icaza  <miguel@novell.com>
13497
13498         * expression.cs (Binary.ResolveOperator): Apply patch from John
13499         Luke to fix bug 59864: operators &, | and ^ on enumerations
13500         require that the same enum type on both sides.
13501
13502         * driver.cs: Add warnings to old flag usage, this is to assist
13503         people who produce Makefiles and hope that the Makefiles will be
13504         used on Windows.
13505
13506         * class.cs (TypeContainer.EmitType): Moved the definition of the
13507         special $PRIVATE$ field from the resolve phase to the Emit phase.
13508         During resolve we do not know if we are a struct with
13509         HasExplicitLayout, we know this only after the attributes for the
13510         type are emitted.
13511
13512         Set the FieldOffset to zero on the dummy field that we create for
13513         the class.   Fixes 74590.
13514
13515 2005-04-16  Raja R Harinath  <rharinath@novell.com>
13516
13517         Fix #73834.
13518         * ecore.cs (PropertyExpr.resolved): New.
13519         (DoResolve): Use it to handle a case of double resolution here.
13520         Handle a case of identical-name-and-type-name.
13521         * expression.cs (ArrayCreation.CheckIndices): Avoid double
13522         resolution by storing the results of expression resolution back
13523         into the "probes" array.
13524
13525 2005-04-15  Raja R Harinath  <rharinath@novell.com>
13526
13527         Fix cs0208-7.cs and cs0208-8.cs.
13528         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
13529         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
13530         error reporting to point out the reason a struct is not unmanaged.
13531
13532 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
13533
13534         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
13535           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
13536
13537 2005-04-13  Raja R Harinath  <rharinath@novell.com>
13538
13539         Fix #74528.
13540         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
13541         IdenticalNameAndTypeName here.
13542         (EventExpr.InstanceResolve): Likewise.
13543
13544 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
13545
13546         C# 2.0 DefaultCharSetAttribute implementation
13547         
13548         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
13549         which allows us to set GlobalNamespace for every resolve.
13550         (Attribute.ResolveArguments): Cut from Resolve.
13551         (Attribute.GetCharSetValue): Returns CharSet named argument.
13552         (Attribute.DefinePInvokeMethod): Gets default charset from
13553         module settings.
13554         (GlobalAttribute.ResolveAsTypeStep): Override.
13555         (GlobalAttribute.ResolveArguments): Override.
13556         
13557         * class.cs (TypeAttr): Is protected.
13558         
13559         * codegen.cs (ModuleClass.DefaultCharSet): New member.
13560         (ModuleClass.DefaultCharSetType): New memeber.
13561         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
13562         
13563         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
13564         charset from module.
13565         
13566         * delegate.cs (TypeAttr): Override.
13567         (Delegate.DefineType): Use this TypeAttr.
13568         
13569         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
13570         at very early stage (before types are defined) to resolve model
13571         module attributes. It will probably not work with corlib but it
13572         should be ok.
13573         
13574         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
13575         charset from module.
13576         
13577         * typemanager.cs (default_charset_type): New type.
13578
13579 2005-04-13  Raja R Harinath  <rharinath@novell.com>
13580
13581         * decl.cs (MemberCache.AddMethods): Don't warn if
13582         System.Object.Finalize has buggy MethodAttributes.
13583
13584         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
13585         removed below.
13586
13587 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
13588
13589         * doc.cs : detect ambiguous reference to overloaded members.
13590           Fixed bug #71603. MS 1.1 csc does not detect it.
13591
13592 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
13593
13594         * doc.cs : delegates must not be referenced with parameters.
13595           Fixed bug #71605.
13596
13597 2005-04-12  Miguel de Icaza  <miguel@novell.com>
13598
13599         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
13600
13601 2005-04-10  Miguel de Icaza  <miguel@novell.com>
13602
13603         * driver.cs (MainDriver): Stop processing if the CLS stage found
13604         errors. 
13605
13606         (CompilerCallableEntryPoint.InvokeCompiler): Always
13607         reset after execution;   Take a TextWriter argument for the
13608         output.
13609
13610         * report.cs: Use the error stream instead of hardcoding stderr. 
13611
13612 2005-04-09  Miguel de Icaza  <miguel@novell.com>
13613
13614         * class.cs: Reduce code paths to test, too small of an
13615         optimization to make it worth the extra testing.  Always perform
13616         it. 
13617
13618 2005-04-08  Raja R Harinath  <rharinath@novell.com>
13619
13620         Fix #74510.
13621         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
13622         operators that had errors reported on them.
13623
13624 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
13625
13626         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
13627         argument types.
13628         (Attribute.Resolve): Add named argument type checking.
13629         
13630         * class.cs (FixedField.Define): Use IsPrimitiveType
13631         
13632         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
13633         
13634         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
13635         unsafe parameter types.
13636         
13637         * statement.cs (Using.ResolveExpression): Add better error description.
13638         
13639         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
13640         
13641 2005-04-08  Raja R Harinath  <rharinath@novell.com>
13642
13643         Fix #74484.
13644         * attribute.cs (Attribute.GetAttributeUsage): Resolve
13645         AttributeUsageAttribute in the emitcontext of the attribute class,
13646         not in the emitcontext of the attributable entity it was attached to.
13647         * cs-parser.jay: Use 'current_class', not 'current_container',
13648         when creating a GlobalAttribute.
13649
13650 2005-04-08  Alp Toker  <alp@atoker.com>
13651
13652         * pending.cs: The fix to #58413 failed to compile methods implementing
13653         interfaces with/without params modifiers and vice versa, even though
13654         params modifiers aren't part of the signature. Make the modifier check
13655         less strict as in csc.
13656
13657 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
13658             Anoob V E  <projectmonokochi@rediffmail.com>
13659             Harilal P R  <projectmonokochi@rediffmail.com>
13660
13661         Fix #58413.
13662         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
13663         modifiers of pending methods.
13664         (PendingImplementation.PendingImplementation): Initialize it.
13665         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
13666         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
13667         with ParameterData.  Add check for modifiers.
13668         * class.cs (MethodData.Define): Update to changes.
13669
13670 2005-04-07  Raja R Harinath  <rharinath@novell.com>
13671
13672         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
13673
13674 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
13675
13676         * class.cs (PropertyMethod.Define): Check private accessor in abstract
13677         property.
13678         
13679         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
13680         
13681         * rootcontext.cs,
13682         * typemanager.cs: Registered RequiredAttributeAttribute.
13683         
13684 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
13685
13686         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
13687         Warning CS0169 is back at level 3.
13688         (IMethodData.SetMemberIsUsed): New method.
13689         
13690         * decl.cs (IsUsed): New value; moved from FieldBase.Status
13691         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
13692         
13693         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
13694
13695         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
13696         contants.
13697         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
13698         is used.
13699         
13700         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
13701         is used.
13702         
13703         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
13704         to avoid the problems with nested types.
13705
13706 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
13707             Anoob V.E  <projectmonokochi@rediffmail.com>
13708             Harilal P.R  <projectmonokochi@rediffmail.com>
13709             Raja R Harinath  <rharinath@novell.com>
13710
13711         Fix #73820.
13712         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
13713         attribute.
13714         * typemanager (GetConstructor): Make public.
13715
13716 2005-04-05  John Luke  <john.luke@gmail.com>
13717             Raja R Harinath  <rharinath@novell.com>
13718
13719         Fix #62232.
13720         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
13721         struct too.  Return false quicker in a few cases.
13722         (VerifyUnManaged): Use it.
13723
13724 2005-04-05  Raja R Harinath  <rharinath@novell.com>
13725
13726         Fix #74041.
13727         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
13728         not 'unreachable_seen'.
13729
13730 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
13731
13732         * attribute.cs (Attribute.GetValue): Removed unused.
13733         
13734         * codegen.cs (CodeGen.TrimExt): Removed unused.
13735         
13736         * cs-parser.jay (output): Removed unused.
13737         
13738         * cs-tokenizer.cs (hex_digits): Removed unused.
13739         
13740         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
13741         
13742         * expression.cs (Indirection.LoadExprValue): Removed unused.
13743         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
13744         
13745         * iterators.cs (Iterator.param_types): Removed unused.
13746         
13747         * statement.cs (Goto.block): Removed unused.
13748         (ToplevelBlock.did): Removed unused.
13749         (Switch.ResolveConstantSwitch): Removed unused.
13750
13751 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
13752
13753         * rootcontext.cs: Allow mcs to bootstrap with the compilation
13754         resetting thingy.
13755
13756 2005-04-01  Raja R Harinath  <rharinath@novell.com>
13757
13758         Fix #74232 and cs0208-3.cs.
13759         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
13760         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
13761         unmanaged type.  Don't use FieldBuilders when 't' is a
13762         TypeBuilder.  Use ModFlags and MemberType fields.
13763         * class.cs (MemberBase.member_type): Rename from MemberType.
13764         (MemberBase.MemberType): New property.  Determines member_type on
13765         demand.
13766         (MemberBase.DoDefine): Don't initialize MemberType here.
13767         (FieldMember.Define): Likewise.
13768
13769 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
13770
13771         Fix #74241
13772         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
13773         Attributes are emitted there.
13774         
13775 2005-04-01  Raja R Harinath  <rharinath@novell.com>
13776
13777         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
13778         keyword in 'partial enum' too.
13779         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
13780         is not allowed).
13781         Report from Kamil Skalski <nazgul@omega.pl>.
13782
13783         Fix #74309.
13784         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
13785         have partial containers too.
13786
13787         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
13788         in block' checks to Block.CheckInvariantMeaningInBlock.
13789         * statement.cs (Block.GetKnownVariableInfo): Make private.
13790         (Block.IsVariableUsedInChildBlock): Remove.
13791         (Block.IsVariableUsedInBlock): Likewise.
13792         (Block.CheckInvariantMeaningInBlock): New.  Show location of
13793         conflicting declaration.
13794         (Block.AddVariable): Make error messages less long-winded and more
13795         specific.  Show location of conflicting declaration.
13796         * parameter.cs (Parameters.Location): New readonly property.
13797
13798 2005-03-31  Raja R Harinath  <rharinath@novell.com>
13799
13800         Clean up semantics of invoking ResolveMemberAccess.
13801         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
13802         can have an instance, ensure that we pass in a non-TypeExpression
13803         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
13804         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
13805         argument.  Update to changes and simplify.
13806         (FieldExpr.Emitinstance): Remove CS0120 check.
13807         (PropertyExpr.EmitInstance): Likewise.
13808         * expression.cs (Argument.Resolve): Likewise.
13809         (Invocation.DoResolve): Update to changes in semantics of
13810         InstanceExpression.
13811
13812 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
13813
13814         Fix #74241
13815         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
13816         customization.
13817         
13818         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
13819
13820 2005-03-31  Raja R Harinath  <rharinath@novell.com>
13821
13822         Fix difference in behaviour with commandline invocation.
13823         * driver.cs (Driver.Reset): New.
13824         (CompilerCallableEntryPoint): Call it.
13825
13826         * statement.cs (If.Resolve): Avoid spurious "uninitialized
13827         variable" warnings if the boolean expression failed to resolve.
13828
13829 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
13830
13831         * attribute.cs: Fix the union of several permissions when some of them
13832         are unrestricted (so the result isn't an unrestricted permission set).
13833         Fix #74036.
13834
13835 2005-03-30  Raja R Harinath  <rharinath@novell.com>
13836
13837         * ecore.cs (MemberExpr): New class.  Convert from interface
13838         IMemberExpr.
13839         (MemberExpr.ResolveMemberAccess): Refactor and move here from
13840         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
13841         error checks.
13842         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
13843         (MethodGroupExpr.IsExplicitImpl): Remove.
13844         (Expression.GetFieldFromEvent): Remove.
13845         (SimpleName.MemberStaticCheck): Remove.
13846         (SimpleName.DoSimpleNameResolve): Update to changes.
13847         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
13848         (MemberAccess.IdenticalNameAndTypeName): Remove.
13849         (MemberAccess.error176): Move to MemberExpr.
13850         (MemberAccess.DoResolve): Update to changes.
13851         (BaseAccess.DoResolve): Likewise.
13852
13853 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
13854
13855         C# 2.0 Conditional attribute class implementation
13856         
13857         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
13858         Analyzes class whether it has attribute which has ConditionalAttribute
13859         and its condition is not defined.
13860         
13861         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
13862         (Class.IsExcluded): New method. Search for at least one defined
13863         condition in ConditionalAttribute of attribute class.
13864
13865 2005-03-30  Raja R Harinath  <rharinath@novell.com>
13866
13867         * ecore.cs (PropertyExpr): Derive from Expression, not
13868         ExpressionStatement.
13869         (PropertyExpr.EmitStatement): Remove.
13870
13871 2005-03-29  Raja R Harinath  <rharinath@novell.com>
13872
13873         Fix #74060.
13874         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
13875         internal field "value__" of an enum be private.  The examples for
13876         "value__" that I found on MSDN all used FieldAttributes.Private.
13877
13878         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
13879         Don't mention IL method attribute names.
13880
13881         Fix #47991.  Remove a TODO.
13882         * statement.cs (Block.Toplevel): Make into a field.
13883         (Block.Parameters): Move into ToplevelBlock.
13884         (Block.known_variables): Rename from child_variable_names.
13885         (Block.Block): Remove variants that take Parameters.  Initialize
13886         'Toplevel' with the immediately surrounding toplevel block.
13887         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
13888         LocalInfo parameter.
13889         (Block.GetKnownVariableInfo): New.
13890         (Block.IsVariableNameUsedInChildBlock): Update.
13891         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
13892         the block, even though it may not be in scope.
13893         (Block.AddVariable): Remove Parameters parameter.  Use
13894         Toplevel.Parameters instead.
13895         (Block.AddConstant): Remove Parameters parameter.
13896         (Block.GetParameterReference): Update to use Toplevel.Parameters.
13897         (Block.IsParamaterReference): Likewise.
13898         (Block.IsLocalParameter): Likewise.  Simplify a lot.
13899         (ToplevelBlock.Parameters): New.  Moved from Block.
13900         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
13901         initialize Parameters to a non-null value.
13902         * cs-parser.jay: Update to changes.
13903         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
13904         simple names that mean different things in the same block.  Use
13905         Block.IsVariableNameUsedInBlock.
13906
13907 2005-03-28  Raja R Harinath  <rharinath@novell.com>
13908
13909         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
13910         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
13911         GetTypeHandle.  It is possible for a reflected type to derive from
13912         a TypeBuilder (e.g., int[] derives from the TypeBuilder
13913         System.Array during mscorlib compilation).
13914         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
13915         contain a method_hash, don't create one either.  Don't create a
13916         deep copy of the base cache's method_hash.
13917         (MemberCache.SetupCache): Rename back from DeepCopy.
13918         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
13919         already initialized.  If we see an override function, add its
13920         underlying base virtual function to the member_hash too.
13921
13922         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
13923
13924 2005-03-26  Raja R Harinath  <harinath@acm.org>
13925
13926         Fix #73038.
13927         * assign.cs (Assign.DoResolve): When the RHS of an assignment
13928         fails to resolve, ensure that the LHS is still resolved as an
13929         lvalue.
13930
13931 2005-03-25  Raja R Harinath  <harinath@acm.org>
13932
13933         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
13934         ec.ContainerType.
13935         (Enum.current_ec): Remove.
13936         (Enum.LookupEnumValue): Remove EmitContext argument.
13937         Just uses the one created during DefineType.
13938         (Enum.FindMembers): Update.
13939         * expression.cs (MemberAccess.DoResolve): Update.
13940
13941 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
13942
13943         * assign.cs (Assign.DoResolve): Check for CS1717 when
13944         source and target are same (uses Equals).
13945
13946         * expression.cs (LocalVariableReference, ParameterReference,
13947         This): Implemented Equals, GetHashCode.
13948
13949         * statement.cs (Block.GetParameterReference): Removed useless
13950         local variable.
13951
13952 2005-03-22  Raja R Harinath  <rharinath@novell.com>
13953
13954         Fix cs0128.cs
13955         * statement.cs (Block.AddVariable): Ensure that we skip implicit
13956         blocks before deciding whether the error is cs0136 or cs0128.
13957
13958         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
13959         (using_alias_directive, using_namespace_directive): Pass
13960         MemberName, not an expression to Namespace.UsingAlias and
13961         Namespace.Using.
13962         (MakeName): Use the MemberName of the namespace.
13963         * namespace.cs (Namespace.MemberName): New.
13964         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
13965         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
13966         Likewise.
13967         * decl.cs (MemberName.Name): Make readonly.
13968         (MemberName.FromDotted): New "constructor".
13969         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
13970         (MemberCore.Name): Compute from MemberName on demand.
13971         (MemberCore.SetMemberName): Provide a way to change the
13972         MemberName.
13973         (MemberCore.AddToContainer): Don't take a fullname parameter.
13974         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
13975         fully qualified name of the container to the member name.
13976         (TypeContainer.AddToTypeContainer): Use a fully qualified name
13977         only if the type is a member of the root container.
13978         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
13979         MemberName.Left rather than searching for an embedded ".".
13980         (PartialContainer.CreatePart): Update to changes in RootContext.
13981         (MemberBase.ShortName): Turn into a property.  Use
13982         MemberCore.SetMemberName.
13983         (MemberBase.ExplicitInterfaceName): Remove.
13984         (MemberBase.UpdateMemberName): Remove.
13985         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
13986         (PropertyBase.SetMemberName): New override.
13987         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
13988         (Tree.GetDecl): New.
13989         (Tree.AllDecls): Rename from Decls.
13990         * attribute.cs, enum.cs, report.cs: Update to changes.
13991         * driver.cs (MainDriver): Use MemberName.FromDotted on
13992         RootContext.MainClass.
13993
13994 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
13995
13996         * class.cs (FixedField.Define): Check for CS1664 and more sanity
13997         checks.
13998
13999         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14000
14001 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14002
14003         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14004         property accessor modifiers.
14005
14006         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14007         fixed buffer attribute (CS1716).
14008         (PropertyMethod.HasCustomAccessModifier): When property accessor
14009         has custom modifier.
14010
14011         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14012         modifiers.
14013         (PropertyExpr.DoResolveLValue): Add CS0272.
14014
14015 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14016
14017         * convert.cs: When converting to a pointer, use the proper Conv.U
14018         or Conv.I depending on the source data type.
14019
14020         * cs-tokenizer.cs: Make the size for large decimal constants,
14021         fixes #72957.
14022
14023 2005-03-17  Martin Baulig  <martin@ximian.com>
14024
14025         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14026         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14027
14028 2005-03-17  Martin Baulig  <martin@ximian.com>
14029
14030         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14031         to bool so we can return an error condition.
14032         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14033         returned an error.
14034
14035 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14036
14037         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14038         attributes.
14039
14040 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14041
14042         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14043         Refactor to avoid traversing the list of assemblies, and to avoid
14044         string concatenation.
14045         * typemanager.cs (guid_attr_type): Remove.
14046         (negative_hits, pointers, references): Remove hashes.
14047         (type_hash): New.
14048         (GetConstructedType): New.  Uses type_hash to handle constructed
14049         types (arrays, references, pointers).
14050         (GetReferenceType, GetPointerType): Use it.
14051         (GetNestedType): New.  Uses type_hash to handle nested types of
14052         reflected types.
14053         (LookupType, LookupTypeDirect): Remove.
14054         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14055         'types' hash and LookupTypeReflection directly.
14056         (params_string, params_object): Use GetConstructedType.
14057         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14058         top-level types.
14059         (Namespace.Lookup): Use cached_types.
14060         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14061         provided by old TypeManager.LookupType.
14062         * rootcontext.cs (MakeFQN): Remove.
14063         * decl.cs (DeclSpace.MakeFQN): Likewise.
14064         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14065         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14066         TypeManager.GetConstructedType.
14067         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14068
14069 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14070
14071         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14072         indexers.
14073
14074         * cs-parser.jay: Reports CS1527 for any namespace element.
14075
14076         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14077         Added CS0407.
14078
14079         * expression.cs (ParameterReference.IsAssigned): Changed error to
14080         CS0269.
14081         (Error_WrongNumArguments): Moved CS0245 detection here.
14082
14083         * statement.cs (Return.Resolve): Add CS1622 report.
14084
14085 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14086
14087         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14088
14089 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14090
14091         * attribute.cs expression.cs: Get rid of some allocations.
14092
14093 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14094
14095         * doc.cs : just eliminate the latest change.
14096
14097 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14098
14099         * doc.cs : commented out the latest change. It breaks xml-030.cs
14100
14101 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14102
14103         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14104           fail. So invoke CreateType() in FindDocumentedType().
14105
14106 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14107
14108         * cs-tokenizer.cs : added IsKeyword().
14109         * doc.cs : Detect keyword incorrectly used as identifier.
14110           Allow identifiers prefixed by @.
14111
14112 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14113
14114         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14115         It caused exception in namespace resolving (again!).
14116         
14117         * class.cs (Class.ctor): Removed exit.
14118         (PropertyMethod.ctor): ditto.
14119         
14120         * codegen.cs (Codegen.Reset): Reset static data.
14121         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14122         
14123         * cs-tokenizer.cs (Cleanup): Removed.
14124         
14125         * driver.cs (GetSystemDir): Rewrote to one line command.
14126         It caused problem with unloaded dynamic modules.
14127         (UnixParseOption): Removed Exit.
14128         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14129         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14130         Now can be mcs used as library.
14131         
14132         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14133         empty location.
14134         
14135         * location.cs (Reset): Reset static data.
14136         
14137         * namespace.cs (Reset): Reset static data.
14138         
14139         * report.cs (Report.Reset): Reset static data.
14140         
14141         * rootcontext.cs (RootContext.Reset): Reset static data.
14142         
14143         * tree.cs (RootTypes.ctor): Use Location.Null
14144         
14145         * typemanager.cs (TypeManager.Reset): Reset static data.
14146         (CoreLookupType): Removed Exit.
14147         (TypeHandle.Reset): Reset static data.
14148         
14149 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14150
14151         Fix #73516.
14152         * typemanager.cs (ComputeNamespaces): Import namespaces from
14153         referenced modules too.
14154
14155 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14156
14157         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
14158         than '.'.
14159
14160 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14161
14162         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
14163         enclosing DeclSpace.  This ensures that a name-lookup populates
14164         more caches and there are fewer 'TypeExpression's.  Carve out
14165         nested type lookup into ...
14166         (LookupNestedTypeInHierarchy): ... this.
14167
14168 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14169
14170         Clean up a few partial-class semantics.  
14171         Fixes test-357.cs and cs1618-2.cs.
14172         * cs-parser.jay (struct_declaration): Use 'current_class' as
14173         parent of newly-created struct.  Remove call to Register ().
14174         Use 'pop_current_class' to complete handing the current struct.
14175         (interface_declaration): Likewise.
14176         (class_declaration): Likewise.
14177         (enum_declaration): Use 'current_class' as parent of newly created
14178         enum.
14179         (delegate_declaration): Likewise.
14180         (pop_current_class): New function.  This is used to handle closing
14181         up the 'current_class' and 'current_container', and pointing them
14182         to the enclosing class/container.
14183         (CSharpParser): Initialize 'current_class' too.
14184         * decl.cs (MemberCore): Add check for invariant: a partial
14185         container is not a parsed entity, and thus does not enclose any
14186         parsed members.
14187         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
14188         (DeclSpace.BaseTypeExpr): Use it.
14189         (DeclSpace.LookupType): Add check for invariant.
14190         * class.cs (TypeContainer): Add check for invariant: a nested
14191         class should have the same NamespaceEntry as its enclosing class.
14192         (TypeContainer.EmitFieldInitializers): Make virtual.
14193         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
14194         MemberCore.
14195         (TypeContainer.Register): Remove.
14196         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
14197         null.  Use TypeResolveEmitContext for resolving base types and
14198         interfaces.  Move initialization of Parts.TypeBuilder here from
14199         ...
14200         (TypeContainer.DefineNestedTypes): ... here.
14201         (PartialContainer): Take a Namespace not a NamespaceEntry.
14202         (PartialContainer.Create): Don't use Register.  Call the
14203         appropriate Add... function directly.
14204         (ClassPart): Take both the PartialContainer and the enclosing
14205         class as constructor arguments.
14206         (ClassPart.EmitFieldInitializers): Override.
14207         (ClassPart.PartFindNestedTypes): Remove.
14208         (FieldBase.GetInitializerExpression): Resolve the initializer
14209         expression in the emit context of the enclosing class.
14210         * tree.cs (RootTypes): Remove Register ().
14211         
14212 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
14213
14214         * cs-parser.jay: Removed CS0134.
14215         
14216         * driver.cs: Removed CS1901.
14217         
14218         * expression.cs (SizeOf.DoResolve): Don't report CS0233
14219         for predefined types.
14220
14221 2005-03-07  Duncan Mak  <duncan@novell.com>
14222
14223         * codegen.cs (Save):  Catch UnauthorizedAccessException as
14224         well. Fixes bug #73454.
14225
14226 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
14227
14228         * cs-tokenizer.cs (xtoken): Add CS1035.
14229         
14230         * class.cs (MethodData.Define): Add CS0683.
14231         (FieldMember.ctor): Add CS0681.
14232
14233 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14234
14235         * ecore.cs (SimpleName.DoResolve): Rename from
14236         SimpleName.DoResolveAllowStatic.
14237         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
14238         Pass 'intermediate' flag to MemberStaticCheck.
14239         (SimpleName.MemberStaticCheck): Skip "static check" only in case
14240         of "intermediate" lookups via MemberAccess.
14241         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
14242         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
14243
14244 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14245
14246         Fix #73394.
14247         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
14248         slipped in because of variable names that are identical to a
14249         builtin type's BCL equivalent ('string String;', 'int Int32;').
14250         (PropertyExpr.EmitInstance): Likewise.
14251
14252 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
14253
14254         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
14255         
14256         * report.cs (warning_ignore_table): Made public.
14257
14258 2005-03-04  Raja R Harinath  <rharinath@novell.com>
14259
14260         Fix #73282.
14261         * class.cs (MethodData.Emit): Pass 'container' to
14262         container.GetObsoleteAttribute instead of 'container.Parent'.
14263
14264 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
14265
14266         * cs-parser.jay: Add 1534 error test.
14267
14268         * iterators.cs (Yield.CheckContext): Add error 1629.
14269         (Iterator.ctor): Save unsafe modifier.
14270         (MoveNextMethod.DoEmit): Restore unsafe context.
14271
14272         * namespace.cs (UsingAlias): Better error message.
14273
14274 2005-03-03  Dan Winship  <danw@novell.com>
14275
14276         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
14277         the warning message [#73219]
14278
14279 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14280
14281         Fix compile with MCS 1.0.0.0.
14282         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
14283         w_restore to not depend on string constant folding.
14284
14285 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14286
14287         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
14288         CS0246 check to users who passed 'silent = false'.
14289         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
14290         check.
14291         (SimpleName.SimpleNameResolve): Update.
14292         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
14293         (MemberAccess.IdenticalNameAndTypeName): Update.
14294         * doc.cs (FindDocumentedTypeNonArray): Update.
14295
14296 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
14297
14298         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
14299         * parameters.cs (ComputeAndDefineParameters): Remove.
14300         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
14301         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
14302         Use GetParameterInfo.
14303
14304 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
14305
14306         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
14307
14308 2005-03-02  Raja R Harinath  <rharinath@novell.com>
14309
14310         Unify DeclSpace.LookupType and DeclSpace.FindType.
14311         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
14312         is in charge of defining nested types on demand.
14313         (DeclSpace.LookupType): Use it when the current_type is a
14314         TypeBuilder.  Use LookupTypeDirect for reflected types.
14315         (DeclSpace.FindType): Remove.
14316         (DeclSpace.LookupInterfaceOrClass): Likewise.
14317         (DeclSpace.DefineTypeAndParents): Likewise.
14318         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
14319         DeclSpace.LookupType.
14320         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
14321         * typemanager.cs (LookupType): Simplify.
14322         (AddUserType): Remove type from negative_hits.
14323         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
14324         * class.cs (TypeContainer.FindMembers): Move handling of nested
14325         types ...
14326         (TypeContainer.FindMembers_NestedTypes): ... here.
14327         (TypeContainer.FindNestedType): Implement override.
14328         (ClassPart.FindNestedType): Delegate to PartialContainer.
14329         (ClassPart.PartFindNestedType): Looks up the nested types of the
14330         part alone.
14331
14332 2005-03-02  Martin Baulig  <martin@ximian.com>
14333
14334         * class.cs (TypeContainer.DoDefineMembers): We also need a default
14335         static constructor in static classes.
14336
14337 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
14338
14339         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
14340         sizeParamIndex is not specified.
14341
14342 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
14343
14344         Fix #73117
14345         * report.cs (WarningMessage.IsEnabled): Missing null check.
14346
14347 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14348
14349         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
14350         in the fields and not in the properties.
14351
14352 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
14353
14354         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
14355         fields as well.
14356
14357 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14358
14359         * attribute.cs: Small refactoring (improved robustness).
14360         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
14361         (ValidateGuid): Removed.
14362         (Resolve): Removed referenced to above mentioned.
14363         (GetAttributeUsage): Made private and changed to work without
14364         class assistance.
14365         (GetIndexerAttributeValue): Don't crash.
14366         (GetConditionalAttributeValue): Ditto.
14367         (GetClsCompliantAttributeValue): Ditto.
14368         (ExtractSecurityPermissionSet): All attributes exceptions are
14369         error 648.
14370         (GetPropertyValue): New helper.
14371         (GetMethodImplOptions): New method.
14372         (DefinePInvokeMethod): Reuse common code. Implemented handling of
14373         some missing properties.
14374         
14375         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
14376         (Method.ApplyAttributeBuilder): Updated.
14377         
14378         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
14379         exception.
14380
14381 2005-02-28  Raja R Harinath  <rharinath@novell.com>
14382
14383         Fix #73052.
14384         * report.cs (Report.SymbolRelatedToPreviousError): Handle
14385         non-simple types (array, pointer, reference).
14386
14387 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14388
14389         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
14390
14391         * class.cs (MethodCore.IsDuplicateImplementation): Special error
14392         for operators.
14393         (Method.CheckBase): Catch wrong destructor here.
14394         (MethodData.Define): Add errors 550, 668.
14395
14396         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
14397
14398         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
14399
14400         * pending.cs (VerifyPendingMethods): Add error 551.
14401
14402         * typemanager.cs (CSharpName): Next error report helper.
14403
14404 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
14405
14406         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
14407         attributes. Removed useless attribute double check.
14408         It saves almost 2MBs for corlib.
14409
14410 2005-02-25  Raja R Harinath  <rharinath@novell.com>
14411
14412         Fix #72924.
14413         * statement.cs (ExpressionStatement.Resolve): Make robust to being
14414         called twice in case of error.
14415
14416 2005-02-23  Chris Toshok  <toshok@ximian.com>
14417
14418         Fix compiler portions of #72827.
14419         * statement.cs (Block.Emit): call Begin/EndScope on the
14420         EmitContext instead of the ILGenerator.
14421
14422         * codegen.cs (EmitContext.BeginScope): new method, call
14423         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
14424         we have one.)
14425         (EmitContext.BeginScope): same, but EndScope and CloseScope
14426
14427         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
14428         offset and call the superclass's OpenScope(int) with it.
14429         (SymbolWriter.CloseScope): get the current il
14430         offset and call superclass's CloseScope(int) with it.
14431
14432 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
14433
14434         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
14435         CS1677 for out and ref as well.
14436
14437         * class.cs (Method.Define): Add error CS1599 detection.
14438         
14439         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
14440         
14441         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
14442         
14443         * delegate.cs (Delegate.Define): Add error CS1599 detection.
14444         
14445         * support.cs.cs (ModifierDesc): New helper method.
14446
14447 2005-02-23  Raja R Harinath  <rharinath@novell.com>
14448             Abin Thomas  <projectmonokochi@rediffmail.com>
14449             Anoob V E  <projectmonokochi@rediffmail.com>
14450             Harilal P R  <projectmonokochi@rediffmail.com>
14451
14452         Fix #57851, #72718.
14453         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
14454         MemberLookup (used for error reporting) actually returns a result.
14455         Fix error report number (122, not 112).
14456
14457 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
14458             Anoob V E  <projectmonokochi@rediffmail.com>
14459             Harilal P R  <projectmonokochi@rediffmail.com>
14460
14461         Fix #71134.
14462         * pending.cs (PendingImplementation.GetAbstractMethods):
14463         Find NonPublic members too.
14464
14465 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
14466
14467         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
14468         Fixed error 217.
14469         
14470         * class.cs (MethodCore.CheckMethodAgainstBase):
14471         Add error 239 report.
14472
14473 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14474
14475         Fix #68955.
14476         * expression.cs (Invocation.IsApplicable): Make public.
14477         (Invocation.IsParamsMethodApplicable): Likewise.
14478         * delegate.cs (Delegate.VerifyApplicability): Don't use
14479         Invocation.VerifyArgumentCompat for parameter applicability
14480         testing.  Use Invocation.IsApplicable and
14481         Invocation.IsParamsMethodApplicable.
14482
14483 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
14484
14485         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
14486         
14487         * class.cs (Operator.Define): Add error 217 report.
14488         
14489 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14490
14491         * namespace.cs (UsingEntry.Resolve): Undo change below.
14492
14493 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14494
14495         Fix #72756.
14496         * ecore.cs (Expression.MemberLookupFailed): Add argument to
14497         disable the error message when the extended MemberLookup also
14498         fails.
14499         (Expression.MemberLookupFinal): Update.
14500         (SimpleName.DoSimpleNameResolve): Update.
14501         * expression.cs (MemberAccess.ResolveNamespaceOrType):
14502         Don't use MemberLookupFinal.
14503         (New.DoResolve): Update.
14504         (BaseAccess.CommonResolve): Update.
14505
14506 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14507
14508         Fix #72732.
14509         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
14510         occured previously, don't resolve again.
14511
14512 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
14513
14514         Fix #69949
14515         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
14516         argument. Call ResolveAttributeUsage for unresolved.
14517         when types doesn't match ctor arguments.
14518         
14519         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
14520         for nested attribute classes.
14521         (Class.attribute_usage): Removed.
14522         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
14523         for attribute class.
14524         
14525         * ecore.cs (IsAttribute): Removed.
14526         
14527         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
14528         
14529         * rootcontext.cs (RegisterAttribute): Removed, attributes are
14530         now normal types.
14531         (attribute_types): Removed.
14532         (EmitCode): Global attributes are emited as the latest.
14533
14534 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
14535
14536         * class.cs (EmitFieldInitializers): Don't emit field initializer
14537         for default values when optimilization is on.
14538         
14539         * constant.cs (Constant.IsDefaultValue): New property.
14540         
14541         * driver.cs: Add /optimize handling.
14542         
14543         * constant.cs,
14544         * ecore.cs,
14545         * literal.cs: Implement new IsDefaultValue property.
14546         
14547         * rootcontext.cs (Optimize): New field, holds /optimize option.
14548
14549 2005-02-18  Raja R Harinath  <rharinath@novell.com>
14550
14551         Fix crasher in re-opened #72347.
14552         * namespace.cs (Namespace.Lookup): Return null if
14553         DeclSpace.DefineType returns null.
14554
14555         Fix #72678.
14556         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
14557
14558 2005-02-18  Raja R Harinath  <rharinath@novell.com>
14559
14560         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
14561         now returns null if it cannot resolve to an lvalue.
14562         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
14563         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
14564         returned null.  Remove check for SimpleName.
14565         (EventExpr.DoResolveLValue): New.
14566         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
14567         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
14568         error from ...
14569         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
14570         avoid CS0131 error.
14571         (Unary.ResolveOperator): Move CS0211 check ...
14572         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
14573         CS0131 error.
14574         (Unary.DoResolveLValue): Simplify.
14575         (AddressOf.DoResolveLValue): New.
14576         (ArrayAccess.DoResolveLValue): New.
14577
14578 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
14579
14580         * attribute.cs (Attribute.Resolve): Add arguments casting for
14581         when types doesn't match ctor arguments.
14582
14583 2005-02-16  Raja R Harinath  <rharinath@novell.com>
14584
14585         Fix parts of #63202.
14586         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
14587         lookup of operator in base type.  Ensure that all checks happen
14588         when the operator resolves to an "op_..." method.
14589
14590 2005-02-15  Raja R Harinath  <rharinath@novell.com>
14591
14592         Fix #71992.
14593         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
14594         'ignore_cs0104' parameter.  Pass it to ...
14595         (NamespaceEntry.Lookup): ... this.
14596         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
14597         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
14598         (TypeLookupExpression.DoResolveAsTypeStep): Update.
14599         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
14600         Update.  Request that cs0104 errors be ignored.
14601         (ComposedCast.ResolveAsTypeStep): Update.
14602
14603 2005-02-14  Raja R Harinath  <rharinath@novell.com>
14604
14605         Fix #59209.
14606         * expression.cs (Invocation.BetterFunction): Remove support for
14607         comparing virtual functions and their overrides.
14608         (Invocation.IsOverride): New.
14609         (Invocation.OverloadResolve): Don't consider 'override' functions
14610         during candidate selection.  Store them in a lookaside list.
14611         If the selected method is a 'virtual' function, use the list to
14612         find any overrides that are closer to the LHS type.
14613
14614 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
14615
14616         * expression.cs (New.DoResolve): Add complex core type reduction.
14617         (New.Constantify): Converts complex core type syntax like 'new int ()'
14618         to simple constant.
14619         
14620 2005-02-14  Raja R Harinath  <rharinath@novell.com>
14621
14622         * decl.cs (EntryType.EntryType): New constructor to create an
14623         updated copy of a cache entry.
14624         (MemberCache.AddMethods): Use it.
14625         (MemberCache.ClearDeclaredOnly): Remove.
14626         (MemberCache.MemberCache): Update.
14627
14628 2005-02-11  Miguel de Icaza  <miguel@novell.com>
14629
14630         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
14631         variable.  This one is represents the actual low-level declaration
14632         of the method, as opposed to the semantic level `IsStatic'.   
14633
14634         An anonymous method which is hosted into a static method might be
14635         actually an instance method.  IsStatic would reflect the
14636         container, while MethodIsStatic represents the actual code
14637         generated.
14638
14639         * expression.cs (ParameterReference): Use the new MethodIsStatic
14640         instead of IsStatic.
14641
14642         * anonymous.cs (AnonymousMethod.Compatible): Pass the
14643         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
14644         set on the current EmitContext. 
14645
14646         * expression.cs (Cast): Overload DoResolveLValue so we can pass
14647         resolve our casted expression as an LValue.  This triggers the
14648         proper LValue processing that is later required by Assign.
14649
14650         This fixes 72347.
14651
14652         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
14653
14654 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
14655
14656         C# 2.0 Fixed buffer implementation
14657
14658         * anonymous.cs: Update after RegisterHelperClass renaming.
14659
14660         * attribute.cs (AttributeTester.fixed_buffer_cache):
14661         Cache of external fixed buffers.
14662         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
14663         implementation if field is fixed buffer else null.
14664
14665         * class.cs
14666         (TypeContainer.AddField): Accept FieldMember instead of Field.
14667         (FieldBase.IsFieldClsCompliant): Extracted code from
14668         VerifyClsCompliance descendant customization.
14669         (FixedField): New class handles fixed buffer fields.
14670         (FixedFieldExternal): Keeps information about imported fixed
14671         buffer.
14672         (IFixedField): Make access to internal or external fixed buffer
14673         same.
14674
14675         * cs-parser.jay: Add fixed buffer parsing.
14676
14677         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
14678         buffer.
14679
14680         * expression.cs (Indirection): Extended implementation to accept
14681         fixed buffer field.
14682         (PointerArithmetic.Emit): Get element from fixed buffer as well.
14683         (ElementAccess.MakePointerAccess): Get type as parameter.
14684         (DoResolve): Add fixed buffer field expression conversion.
14685         (DoResolveLValue): Ditto.
14686         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
14687         (ArrayPtr): Derives from FixedBufferPtr.
14688         (ArrayPtr.Emit): Add extra emit for array elements.
14689
14690         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
14691
14692         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
14693         for compiler generated types.
14694         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
14695
14696         * statement.cs (Fixed): Refactored to be easier add fixed buffer
14697         and consume less memory.
14698         (Fixed.Resolve): Add fixed buffer case.
14699
14700         * typemanager.cs (compiler_generated_attr_ctor,
14701         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
14702         (HasElementType): Add our own implementation to work on every
14703         runtime.
14704
14705 2005-02-11  Miguel de Icaza  <miguel@novell.com>
14706
14707         * anonymous.cs (CaptureContext): Track whether `this' has been
14708         referenced.   
14709
14710         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
14711         only captured `this' if it was implicitly done (instance
14712         methods/variables were used). 
14713
14714         * codegen.cs (EmitContext.CaptureThis): New method to flag that
14715         `this' must be captured.
14716
14717 2005-01-30  Miguel de Icaza  <miguel@novell.com>
14718  
14719         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
14720         is null it means that there has been no need to capture anything,
14721         so we just create a sibling.
14722
14723         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
14724
14725         Just a partial fix.  The other half is fairly elusive.
14726         
14727 2005-02-10  Raja R Harinath  <rharinath@novell.com>
14728
14729         Fix #52586, cs0121-4.cs.
14730         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
14731         and return a hashtable.
14732         (MemberCache.ClearDeclaredOnly): New.
14733         (MemberCache.MemberCache): Update to change.  Make a deep copy of
14734         the method_hash of a base type too.
14735         (MemberCache.AddMethods): Adapt to having a deep copy of the base
14736         type methods.  Overwrite entries with the same MethodHandle so
14737         that the ReflectedType is correct.  The process leaves in base
14738         virtual functions and their overrides as distinct entries.
14739         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
14740         matters since it was boxed in a ArrayList before.
14741         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
14742         modifier.
14743         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
14744         case of a virtual function and its override (choose the overload
14745         as better).
14746         (Invocation.OverloadResolve): Avoid 'override' members during
14747         'applicable_type' calculation.
14748
14749 2005-02-09  Raja R Harinath  <rharinath@novell.com>
14750
14751         Combine two near-redundant caches.
14752         * typemanager.cs (method_params): Rename from method_internal_params.
14753         (TypeManager.GetParameterData): New.  Replace
14754         Invocation.GetParameterData.
14755         (TypeManager.LookupParametersByBuilder): Remove.
14756         * expression.cs (Invocation.method_parameter_cache): Remove.
14757         (Invocation.GetParameterData): Remove.
14758         Update to changes.
14759         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
14760         Update to changes.
14761
14762 2005-02-08  Raja R Harinath  <rharinath@novell.com>
14763
14764         Fix #72015.
14765         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
14766         TypeManager.multicast_delegate_type is null, resolve it by looking
14767         up "System.MulticastDelegate".
14768         * rootcontext.cs (RootContext.ResolveCore): Simplify.
14769
14770 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
14771             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
14772             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
14773
14774         Fix cs0164.cs.
14775         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
14776         (LabeledStatement.AddReference): New.  Set 'referenced'.
14777         (Goto.Resolve): Use it.
14778
14779 2005-02-05  John Luke  <john.luke@gmail.com>
14780
14781         * driver.cs: remove duplicate -doc line in Usage ()
14782
14783 2005-02-04  Raja R Harinath  <rharinath@novell.com>
14784
14785         * location.cs (Location.AddFile): Fix CS2002 error report.
14786
14787 2005-02-02  Martin Baulig  <martin@ximian.com>
14788
14789         * delegate.cs (Delegate.DefineType): Report an internal error if
14790         TypeManager.multicast_delegate_type is null.  See bug #72015 for
14791         details.        
14792
14793 2005-02-02  Raja R Harinath  <rharinath@novell.com>
14794
14795         Fix a crasher in a variant of #31984.
14796         * const.cs (Constant.CheckBase): New override that defers the
14797         new-or-override check in case the base type hasn't been populated
14798         yet.
14799         (Constant.Define): Ensure the new-or-override check is performed.
14800
14801 2005-02-01  Duncan Mak  <duncan@ximian.com>
14802
14803         * const.cs (LookupConstantValue): Check that `ce' is not null
14804         before calling GetValue ().
14805
14806 2005-02-01  Raja R Harinath  <rharinath@novell.com>
14807
14808         Fix test-334.cs (#69519).
14809         * cs-parser.jay (using_alias_directive): Pass in an expression to
14810         NamespaceEntry.UsingAlias.
14811         (using_namespace_directive): Pass in an expression to
14812         NamespaceEntry.Using.
14813         (namespace_name): Don't flatten to a string.
14814         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
14815         (NamespaceEntry.AliasEntry.Resolve): Lookup using
14816         ResolveAsTypeStep.
14817         (NamespaceEntry.UsingEntry): Likewise.
14818         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
14819         changes.
14820         (NamespaceEntry.LookupForUsing): Remove.
14821         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
14822         names.
14823         (NamespaceEntry.Lookup): Remove support for dotted names.
14824
14825 2005-02-01  Raja R Harinath  <rharinath@novell.com>
14826
14827         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
14828         split into two.
14829         (NamespaceEntry.ImplicitParent): Compute on demand.
14830         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
14831         parallels the current.
14832         (NamespaceEntry.LookupForUsing): Use it.
14833         (NamespaceEntry.Lookup): If the current namespace-entry is
14834         implicit, don't search aliases and using tables.
14835
14836 2005-02-01  Raja R Harinath  <rharinath@novell.com>
14837
14838         Fix #31984.
14839         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
14840         BaseCache here.
14841         (TypeContainer.BaseCache): Compute on demand.
14842         (TypeContainer.FindMembers): Define constants and types if they're
14843         not already created.
14844         (FieldMember.Define): Move resetting of ec.InUnsafe before error
14845         check.
14846         * const.cs (Constant.Define): Make idempotent.
14847
14848 2005-01-29  Miguel de Icaza  <miguel@novell.com>
14849
14850         * pending.cs: Produce better code (no nops produced by using Ldarg
14851         + value).
14852         
14853         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
14854         i - 1' it should be arg + 1.
14855
14856         Fixes bug #71819.
14857
14858 2005-01-28  Raja R Harinath  <rharinath@novell.com>
14859
14860         * attribute.cs (Attribute.CheckAttributeType): Make private
14861         non-virtual.
14862         (Attribute.ResolveType): Make virtual.
14863         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
14864         handling of RootContext.Tree.Types.
14865
14866 2005-01-27  Raja R Harinath  <rharinath@novell.com>
14867
14868         Update attribute-handling to use the SimpleName/MemberAccess
14869         mechanisms.
14870         * cs-parser.jay (attribute): Pass in an expression to the
14871         constructors of Attribute and GlobalAttribute.
14872         * attribute.cs (Attribute): Take an expression for the name.
14873         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
14874         passed in attribute name expression.
14875         (Attribute.CheckAttributeType): Use it.
14876         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
14877         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
14878         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
14879         argument to prevent error messages if the lookup fails.
14880
14881 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
14882
14883         * expression.cs (Indirection): Implemented IVariable interface
14884         to support indirection in AddressOf operator.
14885         (PointerArithmetic.Emit): Add optimalization for case where
14886         result can be precomputed.
14887
14888 2005-01-26  Martin Baulig  <martin@ximian.com>
14889
14890         * class.cs (TypeContainer.AttributeTargets): Return the correct
14891         AttributeTargets depending on our `Kind' instead of throwing an
14892         exception; fixes #71632.
14893
14894 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
14895
14896         Fix #71257
14897         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
14898         constant members.
14899
14900 2005-01-25  Raja R Harinath  <rharinath@novell.com>
14901
14902         Fix #71602.
14903         * expression.cs (MemberAccess.DoResolve): Don't complain with
14904         cs0572 when the LHS of a member access has identical name and type
14905         name.
14906
14907 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
14908
14909         Fix #71651, #71675
14910         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
14911         CreatePermission.
14912         Create custom PermissionSet only for PermissionSetAttribute.
14913
14914 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
14915
14916         Fix #71649
14917         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
14918         delegates in static class.
14919
14920 2005-01-24  Martin Baulig  <martin@ximian.com>
14921
14922         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
14923         merging an implicit block, just use its reachability.
14924
14925         * statement.cs (Block.Resolve): Make the unreachable code check
14926         work wrt. implicit blocks; see test-337 from #63842.
14927
14928 2005-01-21  Alp Toker  <alp@atoker.com>
14929  
14930         * cs-parser.jay: destructor_declaration's container is PartialContainer
14931         not Class when partial types are used, so use Kind prop instead of
14932         'is'.
14933         
14934 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
14935
14936         * cs-parser.jay: Improve error reporting when an interface
14937         declares new types.
14938
14939 2005-01-20  Dick Porter  <dick@ximian.com>
14940
14941         * support.cs: SeekableStreamReader fix from Sandor Dobos
14942         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
14943         chars are read.  Fixes bug 70369.
14944
14945 2005-01-20  Raja R Harinath  <rharinath@novell.com>
14946
14947         * cs-parser.jay (catch_clause): Simplify current_block handling
14948         somewhat.
14949
14950 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
14951
14952         * convert.cs (ImplicitStandardConversionExists): Synchronize the
14953         code with ImplicitStandardConversion to handle the implicit
14954         conversion of method groups into valid delegate invocations. 
14955
14956         The problem is that in parameter handling we were using this code
14957         path.  Fixes bug #64698
14958
14959 2005-01-19  Raja R Harinath  <rharinath@novell.com>
14960
14961         * cs-parser.jay: Fix several infelicities.
14962         - Avoid assigning to the parser value stack.  Code like 
14963           '$3 = null' is unclean.  Synthesize a value for the code block
14964           instead. 
14965         - Avoid using oob_stack for storing location information.  Use ...
14966         (_mark_): ... this.  New (empty) rule.  Saves the current location
14967         in $$.
14968         (foreach_statement): Avoid using oob_stack for current_block
14969         handling.  Use technique used in for_statement and
14970         using_statement.  Synthesize a value for the code block to store
14971         additional intermediate information.
14972
14973 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
14974
14975         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
14976         of a different type is only allowed to private fields of a
14977         containing type, not on fields of a base class.
14978
14979         See test-174.cs and error cs0122-9.cs
14980
14981 2005-01-13  Raja R Harinath  <rharinath@novell.com>
14982
14983         Fix test-335.cs (bug #58126).
14984         * cs-parser.jay (argument): Split out non-expression parts of the
14985         rule into 'non_simple_argument'.
14986         (invocation_expression): Support parenthesized invocations with
14987         multiple arguments, and with single non-simple arguments.
14988
14989 2005-01-13  Raja R Harinath  <rharinath@novell.com>
14990
14991         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
14992         places.
14993
14994 2005-01-12  Raja R Harinath  <rharinath@novell.com>
14995
14996         Fix cs0038-1.cs, cs1640-6.cs.
14997         * ecore.cs (Expression.Resolve): Remove special-case for
14998         SimpleName in error-handling.
14999         (Expression.almostMatchedMembers): Relax access permission to
15000         protected.
15001         (Expression.MemberLookupFailed): Handle duplicates in
15002         almostMatchedMembers list.
15003         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15004         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15005         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15006         overload if the passed in MemberInfo is a MethodBase.
15007
15008 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15009
15010         Fix #70749
15011         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15012         for non-CAS & merge permission sets properly.
15013
15014 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15015
15016         Improve standard-compliance of simple name and member access 
15017         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15018         * ecore.cs (FullNamedExpression): New abstract base class 
15019         for Namespaces and TypeExpressions.
15020         (ResolveFlags.SimpleName): Remove.
15021         (SimpleName): Remove support for dotted names.
15022         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15023         DeclSpace.FindType and DeclSpace.LookupType.
15024         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15025         (Expression.ExprClassName): Make member function.
15026         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15027         a namespace.  Remove creation of dotted "SimpleName"s.
15028         (MemberAccess.DoResolve): Likewise.
15029         * decl.cs (DeclSpace.Cache): Make private.
15030         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15031         (DeclSpace.FindType): Update.
15032         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15033         FullNamedExpression.
15034         * namespace.cs (Namespace): Derive from FullNamedExpression
15035         so that it can be part of expression resolution.
15036         (Namespace.Lookup): Return an FullNamedExpression.
15037         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15038         namespace.
15039         * rootcontext.cs (NamespaceLookup): Remove.
15040         (LookupType): Move to DeclSpace.
15041         * attribute.cs (CheckAttributeType): Update.
15042         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15043         (FindDocumentedTypeNonArray): Likewise.
15044
15045 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15046
15047         Fix cs0509.cs, cs1632.cs.
15048         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15049         is the same as IsInterface.
15050         (TypeContainer.GetClassBases): Likewise.
15051         * statement.cs (LabeledStatement.ig): New field.
15052         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15053         label.
15054         (LabeledStatement.DoEmit): Check that the label was created with
15055         the same ILGenerator.
15056
15057 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15058
15059         Fix #71058
15060         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15061         accessors to its properties.
15062
15063         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15064         from accessors to property.
15065         
15066 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15067
15068         Fix #70722
15069         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15070         only for overrides.
15071         
15072 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15073
15074         * attribute.cs: Check for null and empty strings.  
15075
15076         I have lost another battle to Paolo.
15077
15078 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15079
15080         Fix #70942
15081         * class.cs (PropertyMethod): Set Parent field in ctors.
15082         (SetMethod.InternalParameters): Add unsafe switch hack.
15083         Override MarkForDuplicationCheck where it is appropriate.
15084
15085         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15086         It says whether container allows members with the same name.
15087         Base default is no.
15088         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15089         Removed is_method parameter.
15090
15091 2005-01-06  Duncan Mak  <duncan@ximian.com>
15092
15093         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15094         because the previous change led to incorrect reporting of CS1032
15095         ("Cannot define/undefine preprocessor symbols after first token in
15096         file"). Instead of using `tokens_seen' as the only flag that
15097         triggers CS1040, introduce `comments_seen'. This new flag is used
15098         to signify having seen comments on the current line, so it is
15099         unset after a newline.
15100
15101 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15102
15103         * doc.cs : When searching for a type, find nested type too.
15104           This fixes bug #71040.
15105
15106 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15107
15108         * doc.cs :
15109           - Warn missing member comment on those classes which also does not
15110             have doc comments. Fixed bug #71041.
15111           - Don't warn missing doc comment on default constructor.
15112             Fixed bug #71042.
15113
15114 2005-01-06  Duncan Mak  <duncan@ximian.com>
15115
15116         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15117         comments, set `tokens_seen' to true. This allows us to detect
15118         misplaced preprocessor directives (i.e. not at the beginning of
15119         the a line, nor after whitespaces). In that case, report error
15120         CS1040. This fixes bug #56460.
15121
15122         * cs-parser.jay (interface_member_declaration): Add checks for
15123         IsExplicitImpl, and report CS0541 error if an interface member is
15124         defined as an explicit interface declaration.
15125
15126 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15127
15128         Fix #70817
15129         * class.cs (PropertyMethod): Set Parent field in ctors.
15130         (SetMethod.InternalParameters): Add unsafe switch hack.
15131         
15132         * decl.cs (MemberCore.Parent): Cannot be readonly.
15133
15134 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15135
15136         * decl.cs (DeclSpace.ResolveType): Remove.
15137         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15138         Merge in code from ...
15139         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15140         * class.cs, enum.cs: Update to changes.
15141
15142 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15143
15144         * anonymous.cs: Ensure that we init the scope of our parent if it
15145         has not been initialized yet.
15146
15147 2004-12-30  Duncan Mak  <duncan@ximian.com>
15148
15149         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15150         if field.FieldBuilder is null. Fixes #70758.
15151
15152         * convert.cs: Fixed some typos and updated some of the comments.
15153         (ImplicitStandardConversionExists):
15154         (TryImplicitIntConversion): If `target_type' is an interface and
15155         the type of `ic' implements this interface, return true or a new
15156         BoxedCast instead of null. This fixes #70468.
15157
15158 2004-12-29  Duncan Mak  <duncan@ximian.com>
15159
15160         * expression.cs (Argument.Emit): Check that Expr is
15161         IMemoryLocation before casting to it, and report CS1510 otherwise.
15162
15163         This fixes #70402.
15164
15165 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15166
15167         * statement.cs (Block.ThisVariable): remove the recursion here, to
15168         make the --profile more sane.
15169
15170 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
15171
15172         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
15173         assembly, by JB Evain.
15174
15175 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15176
15177         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
15178           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
15179         "parent" refers to enclosing type/class.  "base" refers to superclass.
15180
15181 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15182
15183         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15184         Ensure that we only have GlobalAttributes.
15185         * attribute.cs (Attribute.Emit): Make non-virtual.
15186         (GlobalAttribute.Emit): Remove.
15187         (Attribute.Resolve): Make virtual.
15188         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
15189         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
15190         the argument. Don't create one.
15191         (Attribute.GetObsoleteAttribute): Likewise.
15192         (Attribute.GetClsCompliantAttributeValue): Likewise.
15193         * class.cs, decl.cs: Update to changes.
15194
15195 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
15196
15197         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
15198         
15199         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
15200         
15201         * statement.cs (Foreach.Resolve): Add error 186 report.
15202
15203 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
15204
15205         * expression.cs (Conditional.DoResolve): Add warning 429.
15206         
15207         * statement.cs (If.Resolve): Add warning 665.
15208
15209 2004-12-16  Raja R Harinath  <rharinath@novell.com>
15210
15211         New invariant: RootContext.Tree.Types.NamespaceEntry == null
15212         except when in the parser, and in GlobalAttribute.
15213         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
15214         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
15215         RootContext.Tree.Types.NamespaceEntry once work is done.
15216         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
15217         and resets RootContext.Tree.Types.NamespaceEntry.
15218
15219 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
15220
15221         * cs-parser.jay: Don't create a block for every variable.
15222
15223 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
15224
15225         * location.cs: Provide extra information.
15226
15227         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
15228         variables from the captured environment, it is the ldarg_0.
15229
15230 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15231
15232         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
15233         find a conclusion.
15234         
15235         * class.cs: Changed warning level for 169 to avoid developer
15236         displeasure from warning flooding. It will be changed back when they
15237         fix most of current BCL warnings.
15238         
15239         * RootContext.cs: Pushed default WarningLevel to 3.
15240         
15241         * statement.cs: Removed unused variable.
15242
15243 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15244
15245         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
15246         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
15247         Add error 502 report.
15248         (StaticClass.DefineType): Add error 441 report.
15249         (Class.AllowedModifiersProp): New virtual property as temporary
15250         extension to AllowedModifiers.
15251         (Class.DefineType): Add error 418 report. Moved ModFlags check here
15252         to share implementation with StaticClass and don't call virtual
15253         methods from ctor.
15254         
15255         * driver.cs (MainDriver): Add error 1558 test.
15256
15257         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
15258         report. Moved error 36 test here.
15259
15260         * statement.cs (Throw.Resolve): Add error 724 report.
15261
15262         * typemanager.cs: Add out_attribute_type core type.
15263         
15264 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
15265
15266         * class.cs (TypeContainer.VerifyClsCompliance): Add error
15267         3018 report.
15268         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
15269
15270         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
15271         3017 report.
15272         
15273         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
15274
15275         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
15276         Add error 3023 report.
15277         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
15278
15279         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
15280         implementation.
15281
15282 2004-12-12  John Luke  <john.luke@gmail.com>
15283
15284         * driver.cs (AddArgs): take -- into account when
15285         adding arguments, fixes bug 65710 
15286
15287 2004-12-12  Martin Baulig  <martin@ximian.com>
15288
15289         * expression.cs (Unary.TryReduceNegative): Added support for
15290         SByteConstant and ByteConstant.
15291         (Unary.Reduce): Check error values from TryReduceNegative().
15292
15293 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
15294
15295         * attributes.cs (Attribute.Resolve): Avoid multiple error report
15296         and report exception as error 182.
15297
15298 2004-12-10  Raja R Harinath  <rharinath@novell.com>
15299
15300         * driver.cs (Main): Fix message when there are warnings.
15301
15302 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
15303
15304         * delegate.cs: Fixed my fix from yesterday, sorry about that.
15305
15306 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
15307
15308         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
15309         Reduced number of warnings.
15310         
15311         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
15312
15313 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
15314
15315         * driver.cs: Removed message.
15316
15317         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
15318
15319 2004-12-08    <vargaz@freemail.hu>
15320
15321         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
15322
15323 2004-12-08  Martin Baulig  <martin@ximian.com>
15324
15325         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
15326         instead of a CS3002 for properties and indexer.
15327
15328 2004-12-08  Martin Baulig  <martin@ximian.com>
15329
15330         * decl.cs (MemberName.ToString): Make this work again.
15331
15332 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
15333
15334         * attribute.cs (Resolve): Add error 591 detection.
15335
15336         * class.cs (FieldMember.Define): Add error 1547 detection.
15337         (Indexer.Define): Add error 620 detection.
15338         (Operator.Define): Add error 590 detection.
15339
15340         * ecore.cs: Missing argument for error 79.
15341
15342         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
15343         detection.
15344
15345 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
15346
15347         Fix #70106
15348         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
15349         only.
15350
15351 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
15352
15353         * cs-parser.jay : handle doc comments on implicit/explicit operators.
15354           Some operator comments were suppressed.
15355         * doc.cs : Implicit/explicit operator name in doc comments are like
15356           "op_Explicit(type)~returnType", so added suffix handling.
15357
15358 2004-12-07  Martin Baulig  <martin@ximian.com>
15359
15360         * decl.cs
15361         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
15362         (MemberCore.GetClsCompliantAttributeValue): Likewise.
15363         (DeclSpace.ec): New protected field; store the EmitContext here.
15364         (DeclSpace.EmitContext): New public property; moved here from
15365         `TypeContainer'.
15366         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
15367         EmitContext.
15368
15369         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
15370         (Enum.Emit): Don't create a new EmitContext.
15371
15372         * delegate.cs (Delegate.DefineType): Always create the
15373         EmitContext.
15374
15375         * iterators.cs (Iterators.DefineIterator): Create a new
15376         EmitContext and store it in `ec'.
15377
15378 2004-08-24  Martin Baulig  <martin@ximian.com>
15379
15380         * typemanager.cs
15381         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
15382         this for accessibility checks.
15383         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
15384         IsNestedFamilyAccessible.
15385         (TypeManager.IsSubclassOf): New method, do what the name actually
15386         says.   
15387
15388 2004-12-06  Raja R Harinath  <rharinath@novell.com>
15389
15390         Fix crash on cs0657-17.cs.
15391         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15392         Use RootContext.Tree.Types, not 'new RootTypes ()'.
15393         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
15394         the case where the NamespaceEntry gets overwritten.
15395
15396 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
15397
15398         Fixed #69195, #56821
15399         * ecore.cs (ResolveBoolean): Tiny refactoring.
15400
15401         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
15402         of right expression resolving when left is false constant and
15403         operator is LogicalAnd OR true constant and operator is LogicalOr.
15404
15405         * statement.cs (ResolveUnreachable): Always reports warning.
15406
15407 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
15408
15409         * class.cs: Distinguish between 1721 and 1722 (just a little help
15410         for the programmer).
15411
15412 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
15413
15414         * delegate.cs: Only allow this on new versions of the language. 
15415
15416 2004-12-02  Duncan Mak  <duncan@ximian.com>
15417
15418         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
15419         Expression class.
15420         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
15421         here as a static method. Take an additional bool out parameter
15422         `must_do_cs1540_check' for signaling to InstanceResolve.
15423         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
15424         member field from PropertyExpr class and made it an argument of
15425         the method instead.
15426         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
15427         check for MarshalByRefObject, and report CS0122 instead of CS1540.
15428         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
15429         and `remove_accessor' as well as InstanceResolve: report CS0122
15430         where applicable.
15431
15432         Fixes #70129.
15433
15434 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15435
15436         Fix test-327.cs, test-328.cs, and put in early infrastructure
15437         for eventually fixing #52697.
15438         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
15439         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
15440         from other methods.
15441         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
15442         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
15443         (VerifyUsing, error246): Update.
15444         * rootcontext.cs (RootContext.NamespaceLookup): Just use
15445         'NamespaceEntry.LookupNamespaceOrType'.
15446
15447 2004-12-03  Martin Baulig  <martin@ximian.com>
15448
15449         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15450         method as our child, call AnonymousMethod.Compatible() on it.
15451
15452 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15453
15454         Disable XML documentation support in 'basic' profile.
15455         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
15456         Redirect XmlElement to System.Object.
15457         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
15458         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
15459         * mcs.exe.sources: Add doc-bootstrap.cs.
15460         * doc-bootstrap.cs: New file.  Contains empty stub implementation
15461         of doc.cs.
15462
15463 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
15464
15465         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
15466           comments are allowed.
15467
15468 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15469
15470         * delegate.cs: Add checks for subtypes in paramaters and return values
15471         in VerifyMethod () to add support for Covariance/Contravariance
15472         in delegates.
15473         
15474 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
15475
15476         * report.cs: Remove extra closing parenthesis.
15477
15478         * convert.cs (Error_CannotImplicitConversion): If the name of the
15479         types are the same, provide some extra information.
15480
15481         * class.cs (FieldBase): Use an unused bit field from the field to
15482         encode the `has_offset' property from the FieldMember.  This saves
15483         a couple of Ks on bootstrap compilation.
15484
15485         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15486         method as our child, return the AnonymousMethod resolved
15487         expression.
15488
15489         * expression.cs (New.DoResolve): Allow return values from
15490         NewDelegate to also include AnonymousMethods.
15491
15492         Fixes #70150.
15493
15494 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
15495
15496         Fix bug #70102
15497         * attribute.cs (Resolve): Improved implementation of params
15498         attribute arguments.
15499
15500         * support.cs (ParameterData): Add HasParams to be faster.
15501
15502 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
15503
15504         all things are for /doc support:
15505
15506         * doc.cs: new file that supports XML documentation generation.
15507         * mcs.exe.sources: added doc.cs.
15508         * driver.cs:
15509           Handle /doc command line option.
15510           Report error 2006 instead of 5 for missing file name for /doc.
15511           Generate XML documentation when required, after type resolution.
15512         * cs-tokenizer.cs:
15513           Added support for picking up documentation (/// and /** ... */),
15514           including a new XmlCommentState enumeration.
15515         * cs-parser.jay:
15516           Added lines to fill Documentation element for field, constant,
15517           property, indexer, method, constructor, destructor, operator, event
15518           and class, struct, interface, delegate, enum.
15519           Added lines to warn incorrect comment.
15520         * rootcontext.cs :
15521           Added Documentation field (passed only when /doc was specified).
15522         * decl.cs:
15523           Added DocComment, DocCommentHeader, GenerateDocComment() and
15524           OnGenerateDocComment() and some supporting private members for
15525           /doc feature to MemberCore.
15526         * class.cs:
15527           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
15528         * delegate.cs:
15529           Added overriden DocCommentHeader.
15530         * enum.cs:
15531           Added overriden DocCommentHeader and GenerateDocComment().
15532
15533 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
15534
15535         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
15536         unwrapping the enumeration values, chain to
15537         DoConstantNumericPromotions again, so we can promote things to the
15538         fundamental types (takes care of enums that are bytes, sbytes).
15539
15540         Fixes bug #62054.
15541
15542 2004-12-01  Raja R Harinath  <rharinath@novell.com>
15543
15544         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
15545         Fix long-standing bug in type-lookup.  Use FindType instead of
15546         LookupType when ec.ResolvingTypeTree.
15547         (Attribute.ResolveType, Attribute.Resolve)
15548         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
15549         Update to changes.
15550         (Attributes.Search): Remove internal version.  Update.
15551         (Attributes.SearchMulti): Update.
15552         (Attributes.GetClsCompliantAttribute): Remove.
15553         (Attributes.GetIndexerNameAttribute): Remove.
15554         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
15555         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
15556         * class.cs (Indexer.Define): Likewise.
15557
15558 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
15559
15560         Fix bug #68790
15561         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
15562         MarshallByReference members access.
15563
15564         * expression.cs: Use CheckMarshallByRefAccess;
15565         Better error CS0197 message.
15566
15567         * report.cs: Print whole related error message.
15568
15569 2004-11-30  Raja R Harinath  <rharinath@novell.com>
15570
15571         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
15572         the current directory to help debugging.
15573
15574 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
15575
15576         * class (GetClassBases): Better error 60 report.
15577         (EventProperty): Disabled warning 67 detection.
15578
15579 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
15580
15581         Fix bug #60324
15582         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
15583
15584         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
15585         precise values.
15586
15587 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
15588
15589         Fix bug #49488
15590         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
15591
15592         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
15593
15594 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
15595
15596         * attribute.cs (Attribute.Resolve): Refine error reporting and
15597         report a cs0117 if the identifier does not exist, to distinguish
15598         from 0617 which is a miss-use of the actual identifier.
15599
15600         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
15601         between cs0070 and cs0079.
15602
15603         * class.cs (MemberBase.DoDefine): When reporting a wrong
15604         accessibility level, we use MethodCore to compare instead of
15605         Method (this was a regression in some refactoring effort).
15606
15607         So now we correctly report cs0056 again.
15608
15609         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
15610         testing the target_type (which was known to be object_type) and
15611         not the source type (which is anonymous_method).
15612
15613         Fixed reporting of error cs1660.
15614
15615         * expression.cs (UserCast.Source): Expose the underlying cast.
15616
15617         * statement.cs (Switch.SwitchGoverningType): Sort the list of
15618         allowed types to find a match to int32 first (most common).
15619
15620         In addition, it ignores any ImplicitUserConversions that did an
15621         internal implicit conversion (as the switch statement allows only
15622         one integral conversion to exist).
15623
15624         * class.cs (PartialContainer.Create): rename `name' to
15625         `member_name' for clarity.  Then replace the string calls with a
15626         call to MemberName.GetPartialName, as now using
15627         MemberName.ToString is an error (this is due to the side effects
15628         it had, that were fixed in the past).
15629
15630         This will restore the error reporting on a number of partial class
15631         errors that were missusing this (and getting an exception as a
15632         results, which is now just a plain textual warning, because
15633         yyparse debug output would crash otherwise).
15634
15635 2004-11-26  Raja R Harinath  <rharinath@novell.com>
15636
15637         * Makefile (PROGRAM_INSTALL_DIR): Remove.
15638
15639 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
15640
15641         * rootcontext.cs (LookupType): Make sure to cache lookups that
15642         don't give us a negative result. This saves about 5% of corlib
15643         compilation time.
15644
15645 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
15646
15647         * report.cs (AbstractMessage.Print): messages are sent to stderr
15648
15649         * class.cs (TypeContainer.GetClassBases): It is an error to have a
15650         non-interface in the list of interfaces (at this point, either
15651         parent was properly set, or a base class is being listed in the
15652         interfaces section).
15653
15654         This flags error 1722, and resolves the crash from bug 69259.
15655
15656 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
15657
15658         * statement.cs (Using.EmitExpressionFinally): make this work right
15659         for valuetypes. Fixes 69926.
15660
15661 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
15662
15663         * const.cs (Const.ChangeType): Cope with the "0 literal can be
15664         converted to an enum" here, before we try to change the underlying
15665         type.  This code exists, but it is a different code path than the
15666         one used while encoding constants.
15667
15668         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
15669         old bug: when converting from the null literal to a pointer,
15670         return an EmptyCast, not the NullLiteral.
15671
15672         This fixes #69921, the recent null_type changes probably made this
15673         bug more prominent.
15674
15675         (ImplicitReferenceConversionExists): In addition, resynchronized
15676         the code here, so it matches the same code in
15677         ImplicitReferenceConversionExists for the `from any class-type S
15678         to any interface-type T'.
15679         
15680
15681 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
15682
15683         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
15684
15685 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
15686
15687         * cs-parser.jay: Use verbosity accordingly. 
15688
15689 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
15690
15691         * expression.cs (Unary.ResolveOperator): Do not report warning;
15692         AddressOf reads from variable.
15693         
15694         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
15695
15696 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
15697
15698         Fix bug #69462
15699
15700         * attribute.cs (Attributable): Removed CheckTargets.
15701         (Attributes.Emit): Explicit attribute targets are tested here.
15702
15703         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
15704         not enabled for interfaces.
15705
15706         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
15707         (GetAssemblyName): Ouch next bug there.
15708
15709 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15710
15711         * expression.cs: Error 275 added.
15712         
15713 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
15714
15715         Fix bug #69177 (Implemented decimal constant support)
15716
15717         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
15718         (BinaryFold): Add DecimalConstant.
15719
15720         * const.cs (Define): Decimal constant 
15721         (is not constant.
15722         (ChangeType): Add decimal type handling.
15723         (LookupConstantValue): Don't set value for decimal type but
15724         emit DecimalConstantAttribute. Needed for constant optimization.
15725
15726         * constant.cs (ToDecimal): New method.
15727         (ConvertToDecimal): New method.
15728         (IntConstant): Implemented ConvertToDecimal.
15729         (DecimalConstant.Emit): Emit optimized version for decimals in
15730         int range.
15731
15732         * expression.cs (ResolveOperator): Changed order of constant
15733         reduction to work correctly with native types which have
15734         overloaded operators.
15735         (ResolveMemberAccess): Extract constant value from attribute
15736         for decimal type.
15737
15738         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
15739
15740         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
15741         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
15742         (ChangeType): Decimal is special.
15743         (TypeToCoreType): Add decimal type.
15744
15745 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
15746
15747         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
15748         decimal types.
15749
15750 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
15751
15752         * class.cs (EventField.ApplyAttributeBuilder): Fix error
15753         test cs1667-5.cs.
15754
15755 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
15756
15757         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
15758
15759         * pending.cs (PendingImplementation): Grab only interfaces.
15760
15761 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
15762
15763         * statement.cs (ForeachHelperMethods): Add location member and
15764         error 202 detection.
15765
15766 2004-11-19  Raja R Harinath  <rharinath@novell.com>
15767
15768         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
15769         automatically handled by executable.make.
15770         (PROGRAM): Make profile-specific.
15771
15772 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
15773
15774         * expression.cs (DoResolveBase): Fixed wrong warning for out
15775         variables.
15776
15777 2004-11-18  Martin Baulig  <martin@ximian.com>
15778
15779         Merged latest changes into gmcs.  Please keep this comment in
15780         here, it makes it easier for me to see what changed in MCS since
15781         the last time I merged.
15782
15783 2004-11-17  Raja R Harinath  <rharinath@novell.com>
15784
15785         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
15786         (TypeHandle.GetMemberCache): New.
15787         (TypeHandle.TypeHandle): Update.
15788         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
15789         (TypeManager.LookupParentInterfacesCache):
15790         Rename from LookupInterfaceCache.  Optimize slightly.
15791         (TypeManager.MemberLookup_FindMembers): Update.
15792         * decl.cs (MemberCache.MemberCache): Set Container to null in the
15793         multi-type variant.
15794         (AddCacheContents): Rename from AddHashtable.
15795         * class.cs (TypeContainer.parent_container): Remove.
15796         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
15797         (TypeContainer.DoDefineMembers): Don't initialize it.
15798         Update to name changes.
15799         
15800 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
15801
15802         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
15803         that factors the code to check access modifiers on override.  
15804
15805         (PropertyBase): Use the code here.
15806
15807         Patch from Lluis S'anchez, fixes bug #69361.
15808
15809 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
15810
15811         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
15812         routine that is used to report the use of a captured variable
15813         whose address has been taken.
15814
15815         There are two checks: one when variables are being captured and
15816         the other check is when the address of a variable is taken. 
15817         
15818         (because an anonymous methods might be resolved before *or* after
15819         the address has been taken) and 
15820
15821         * expression.cs (Conditional.DoResolve): Remove the special
15822         casing that Martin added to trueExpr and falseExpr being both
15823         NullLiteral.  We get the right behavior now just by introducing
15824         the null_type into the compiler. 
15825
15826         * convert.cs (ExplicitConversion): Change the code to use
15827         null_type instead of testing `expr is NullLiteral'.
15828         (ImplicitConversionStandard): use null_type too.
15829         (ImplicitReferenceConversionExists): use null_type too.
15830         (ImplicitReferenceConversion): use null_type too.
15831
15832         * literal.cs: The type of `NullLiteral' is now null_type instead
15833         of object_type. 
15834         (Resolve): Set the type here.
15835
15836         * typemanager.cs: Introduce null_type.
15837
15838 2004-11-17  Martin Baulig  <martin@ximian.com>
15839
15840         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
15841         direction, like FindMembers() does.  Fixes #69546, testcase is in
15842         test-315.cs.    
15843
15844 2004-11-16  Martin Baulig  <martin@ximian.com>
15845
15846         This is based on a patch from Marek Safar, see bug #69082.
15847         Fixes bugs #63705 and #67130.
15848
15849         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
15850         method; create a MemberCache for an interface type and cache the
15851         result.
15852
15853         * decl.cs (IMemberContainer.ParentContainer): Removed.
15854         (IMemberContainer.ParentCache): New property.
15855         (MemberCache.SetupCacheForInterface): Removed.
15856         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
15857         to create a cache for an interface's "parent".
15858
15859         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
15860         interfaces too.
15861
15862 2004-11-16  Martin Baulig  <martin@ximian.com>
15863
15864         Merged back from gmcs; these changes already went into gmcs a
15865         couple of weeks ago.
15866
15867         * typemanager.cs
15868         (TypeManager.AddUserType): Removed the `ifaces' argument.
15869         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
15870         `TypeExpr []'.
15871         (TypeManager.AddUserInterface): Removed.
15872         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
15873         `TypeExpr []'.
15874         (TypeManager.GetInterfaces): Likewise.
15875         (TypeManager.GetExplicitInterfaces): Likewise.
15876
15877         * ecore.cs (TypeExpr.GetInterfaces): Removed.
15878
15879         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
15880         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
15881
15882 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
15883
15884         * statement.cs: Avoid adding bools to a hashtable.
15885
15886 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
15887
15888         * expression.cs (Invocation.OverloadResolve): Flag error if we are
15889         calling an unsafe method from a safe location.
15890
15891 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
15892
15893         Fix #69167
15894         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
15895
15896 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
15897
15898         * namespace.cs (VerifyUsing): use GetPartialName instead of
15899         ToString. 
15900
15901 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
15902
15903         * statement.cs (Return.Resolve): Fix regression in typo: if
15904         `in_exc', we have to request a NeedReturnLabel, this was a typo
15905         introduced in the anonymous method check-in.  Fixes #69131.
15906
15907         * Indexers were using the ShortName when defining themselves,
15908         causing a regression in the compiler bootstrap when applying the
15909         patch from 2004-11-02 (first part), now they use their full name
15910         and the bug is gone.
15911
15912 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
15913
15914         * driver.cs: Strip the path from the names of embedded resources. Fixes
15915         #68519.
15916
15917 2004-11-04  Raja R Harinath  <rharinath@novell.com>
15918
15919         Fix error message regression: cs0104-2.cs.
15920         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
15921         (AliasEntry.Resolve): Update.
15922         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
15923         'silent' flag.
15924         (RootContext.LookupType): Update.
15925
15926 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
15927
15928         * cs-parser.jay: Add support for handling accessor modifiers
15929         * class: Add support port accessor modifiers and error checking,
15930         define PropertyMethod.Define as virtual (not abstract anymore)
15931         * ecore.cs: Add checking for proeprties access with access modifiers
15932         * iterators.cs: Modify Accessor constructor call based in the modified
15933         constructor
15934 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
15935
15936         * expression.cs (StringConcat): Handle being called twice,
15937         as when we have a concat in a field init with more than two
15938         ctors in the class
15939
15940 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
15941
15942         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
15943         special case explicit implementations, we should always produce
15944         the .property or .event declaration.
15945         
15946         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
15947         since it will not return correct data if people use this
15948         unresolved in the presence of using statements (see test-313).
15949
15950         * class.cs (MethodData.Define): If we are an explicit interface
15951         implementation, set the method name to the full name of the
15952         interface plus the name of the method.  
15953
15954         Notice that using the method.MethodName.GetFullName() does not
15955         work, as it will only contain the name as declared on the source
15956         file (it can be a shorthand in the presence of using statements)
15957         and not the fully qualifed type name, for example:
15958
15959         using System;
15960
15961         class D : ICloneable {
15962                 object ICloneable.Clone ()  {
15963                 }
15964         }
15965
15966         Would produce a method called `ICloneable.Clone' instead of
15967         `System.ICloneable.Clone'.
15968
15969         * namespace.cs (Alias.Resolve): Use GetPartialName.
15970         
15971 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
15972
15973         * cs-parser.jay: Add error 1055 report.
15974
15975 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
15976
15977         * assign.cs (Assign.DoResolve): Only do the transform of
15978         assignment into a New if the types are compatible, if not, fall
15979         through and let the implicit code deal with the errors and with
15980         the necessary conversions. 
15981
15982 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
15983
15984         * cs-parser.jay: Add error 1031 report.
15985
15986         * cs-tokenizer.cs: Add location for error 1038.
15987
15988 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
15989
15990         * cs-parser.jay: Add error 1016 report.
15991
15992 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
15993
15994         * cs-parser.jay: Add errors 1575,1611 report.
15995
15996 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
15997
15998         * cs-parser.jay: Add error 1001 report.
15999
16000 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16001
16002         Fix #68850
16003         * attribute.cs (GetMarshal): Add method argument for
16004         caller identification.
16005
16006         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16007         agument for GetMarshal and RuntimeMissingSupport.
16008
16009 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16010
16011         * attribute.cs (ExtractSecurityPermissionSet): Removed
16012         TypeManager.code_access_permission_type.
16013
16014         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16015
16016 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16017
16018         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16019         for obsolete use of a variable here.   Fixes regression on errors
16020         cs0619-25 and cs0619-26.
16021
16022 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16023
16024         Fix #62358, implemented security attribute encoding.
16025
16026         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16027         Tests permitted SecurityAction for assembly or other types.
16028         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16029         data from SecurityPermissionAttribute to PermisionSet class.
16030
16031         * class.cs (ApplyAttributeBuilder): Added special handling
16032         for System.Security.Permissions.SecurityAttribute based types.
16033
16034         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16035         special handling for System.Security.Permissions.SecurityAttribute
16036         based types.
16037
16038         * enum.cs (ApplyAttributeBuilder): Added special handling
16039         for System.Security.Permissions.SecurityAttribute based types.
16040
16041         * parameter.cs (ApplyAttributeBuilder): Added special handling
16042         for System.Security.Permissions.SecurityAttribute based types.
16043
16044         * rootcontext.cs: Next 2 core types.
16045
16046         * typemanager.cs (TypeManager.security_permission_attr_type):
16047         Built in type for the SecurityPermission Attribute.
16048         (code_access_permission_type): Build in type.
16049
16050 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16051
16052         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16053         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16054         all of this information into
16055         EmitContext.EmitCapturedVariableInstance.
16056         
16057         * codegen.cs (EmitCapturedVariableInstance): move here the
16058         funcionality of emitting an ldarg.0 in the presence of a
16059         remapping.   This centralizes the instance emit code.
16060
16061         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16062         then emit a load of this: it means that we have reached the
16063         topmost ScopeInfo: the one that contains the pointer to the
16064         instance of the class hosting the anonymous method.
16065
16066         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16067         captures to the topmost CaptureContext.
16068
16069 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16070
16071         * expression.cs (LocalVariableReference): Move the knowledge about
16072         the iterators into codegen's EmitCapturedVariableInstance.
16073
16074 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16075
16076         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16077         all code paths return a value from an anonymous method (it is the
16078         same as the 161 error, but for anonymous methods).
16079
16080 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16081
16082         The introduction of anonymous methods in the compiler changed
16083         various ways of doing things in the compiler.  The most
16084         significant one is the hard split between the resolution phase
16085         and the emission phases of the compiler.
16086
16087         For instance, routines that referenced local variables no
16088         longer can safely create temporary variables during the
16089         resolution phase: they must do so from the emission phase,
16090         since the variable might have been "captured", hence access to
16091         it can not be done with the local-variable operations from the runtime.
16092         
16093         * statement.cs 
16094
16095         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16096         is a toplevel block.
16097
16098         (ToplevelBlock): A new kind of Block, these are the blocks that
16099         are created by the parser for all toplevel method bodies.  These
16100         include methods, accessors and anonymous methods.
16101
16102         These contain some extra information not found in regular blocks:
16103         A pointer to an optional CaptureContext (for tracking captured
16104         local variables and parameters).  A pointer to the parent
16105         ToplevelBlock.
16106         
16107         (Return.Resolve): Catch missmatches when returning a value from an
16108         anonymous method (error 1662).
16109         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16110         phase.
16111
16112         (Break.Resolve): ditto.
16113
16114         (SwitchLabel): instead of defining the labels during the
16115         resolution phase, we now turned the public ILLabel and ILLabelCode
16116         labels into methods called GetILLabelCode() and GetILLabel() that
16117         only define the label during the Emit phase.
16118
16119         (GotoCase): Track the SwitchLabel instead of the computed label
16120         (its contained therein).  Emit the code by using
16121         SwitchLabel.GetILLabelCode ().
16122
16123         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16124         whether the Local has been captured or not.
16125
16126         (LocalInfo.IsCaptured): New property, used to tell whether the
16127         local has been captured.
16128         
16129         * anonymous.cs: Vastly updated to contain the anonymous method
16130         support.
16131
16132         The main classes here are: CaptureContext which tracks any
16133         captured information for a toplevel block and ScopeInfo used to
16134         track the activation frames for various local variables.   
16135
16136         Each toplevel block has an optional capture context associated
16137         with it.  When a method contains an anonymous method both the
16138         toplevel method and the anonymous method will create a capture
16139         context.   When variables or parameters are captured, they are
16140         recorded on the CaptureContext that owns them, for example:
16141
16142         void Demo () {
16143              int a;
16144              MyDelegate d = delegate {
16145                  a = 1;
16146              }
16147         }
16148
16149         Here `a' will be recorded as captured on the toplevel
16150         CapturedContext, the inner captured context will not have anything
16151         (it will only have data if local variables or parameters from it
16152         are captured in a nested anonymous method.
16153
16154         The ScopeInfo is used to track the activation frames for local
16155         variables, for example:
16156
16157         for (int i = 0; i < 10; i++)
16158                 for (int j = 0; j < 10; j++){
16159                    MyDelegate d = delegate {
16160                         call (i, j);
16161                    }
16162                 }
16163
16164         At runtime this captures a single captured variable `i', but it
16165         captures 10 different versions of the variable `j'.  The variable
16166         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
16167         recorded on a child.  
16168
16169         The toplevel ScopeInfo will also track information like the `this'
16170         pointer if instance variables were referenced (this is necessary
16171         as the anonymous method lives inside a nested class in the host
16172         type of the method). 
16173
16174         (AnonymousMethod): Expanded to track the Toplevel, implement
16175         `AnonymousMethod.Compatible' to tell whether an anonymous method
16176         can be converted to a target delegate type. 
16177
16178         The routine now also produces the anonymous method content
16179
16180         (AnonymousDelegate): A helper class that derives from
16181         DelegateCreation, this is used to generate the code necessary to
16182         produce the delegate for the anonymous method that was created. 
16183
16184         * assign.cs: API adjustments for new changes in
16185         Convert.ImplicitStandardConversionExists.
16186
16187         * class.cs: Adjustments to cope with the fact that now toplevel
16188         blocks are of type `ToplevelBlock'. 
16189
16190         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
16191         insteda of standard blocks.
16192
16193         Flag errors if params arguments are passed to anonymous methods.
16194
16195         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
16196         `CurrentAnonymousMethod' which points to the current Anonymous
16197         Method.  The variable points to the AnonymousMethod class that
16198         holds the code being compiled.  It is set in the new EmitContext
16199         created for the anonymous method.
16200
16201         (EmitContext.Phase): Introduce a variable and an enumeration to
16202         assist in enforcing some rules about when and where we are allowed
16203         to invoke certain methods (EmitContext.NeedsReturnLabel is the
16204         only one that enfonces this right now).
16205
16206         (EmitContext.HaveCaptureInfo): new helper method that returns
16207         whether we have a CapturedContext initialized.
16208
16209         (EmitContext.CaptureVariable): New method used to register that a
16210         LocalInfo must be flagged for capturing. 
16211
16212         (EmitContext.CapturedParameter): New method used to register that a
16213         parameters must be flagged for capturing. 
16214         
16215         (EmitContext.CapturedField): New method used to register that a
16216         field must be flagged for capturing. 
16217
16218         (EmitContext.HaveCapturedVariables,
16219         EmitContext.HaveCapturedFields): Return whether there are captured
16220         variables or fields. 
16221
16222         (EmitContext.EmitMethodHostInstance): This is used to emit the
16223         instance for the anonymous method.  The instance might be null
16224         (static methods), this (for anonymous methods that capture nothing
16225         and happen to live side-by-side with the current method body) or a
16226         more complicated expression if the method has a CaptureContext.
16227
16228         (EmitContext.EmitTopBlock): Routine that drives the emission of
16229         code: it will first resolve the top block, then emit any metadata
16230         and then emit the code.  The split is done so that we can extract
16231         any anonymous methods and flag any captured variables/parameters.
16232         
16233         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
16234         during this phase, the ILGenerator should not be used as labels
16235         and local variables declared here might not be accessible to any
16236         code that is part of an anonymous method.  
16237
16238         Exceptions to this include the temporary variables that are
16239         created by some statements internally for holding temporary
16240         variables. 
16241         
16242         (EmitContext.EmitMeta): New routine, in charge of emitting all the
16243         metadata for a cb
16244
16245         (EmitContext.TemporaryReturn): This method is typically called
16246         from the Emit phase, and its the only place where we allow the
16247         ReturnLabel to be defined other than the EmitMeta.  The reason is
16248         that otherwise we would have to duplicate a lot of logic in the
16249         Resolve phases of various methods that today is on the Emit
16250         phase. 
16251
16252         (EmitContext.NeedReturnLabel): This no longer creates the label,
16253         as the ILGenerator is not valid during the resolve phase.
16254
16255         (EmitContext.EmitThis): Extended the knowledge in this class to
16256         work in anonymous methods in addition to iterators. 
16257
16258         (EmitContext.EmitCapturedVariableInstance): This emits whatever
16259         code is necessary on the stack to access the instance to a local
16260         variable (the variable will be accessed as a field).
16261
16262         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
16263         EmitContext.EmitAddressOfParameter): Routines to support
16264         parameters (not completed at this point). 
16265         
16266         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
16267         will also remove the parameters.
16268
16269         * convert.cs (Convert): Define a `ConstantEC' which points to a
16270         null.  This is just to prefity some code that uses
16271         ImplicitStandardConversion code and do not have an EmitContext
16272         handy.
16273
16274         The idea is to flag explicitly that at that point in time, it is
16275         known that the conversion will not trigger the delegate checking
16276         code in implicit conversions (which requires a valid
16277         EmitContext). 
16278
16279         Everywhere: pass new EmitContext parameter since
16280         ImplicitStandardConversionExists now requires it to check for
16281         anonymous method conversions. 
16282
16283         (Convert.ImplicitStandardConversionExists): If the type of an
16284         expression is the anonymous_method_type, and the type is a
16285         delegate, we invoke the AnonymousMethod.Compatible method to check
16286         whether an implicit conversion is possible. 
16287
16288         (Convert.ImplicitConversionStandard): Only do implicit method
16289         group conversions if the language level is not ISO_1.
16290
16291         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
16292         MethodInfo for the Invoke method.  used by Delegate and
16293         AnonymousDelegate.
16294
16295         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
16296         method conversions if the target type is a delegate.
16297
16298         Removed extra debugging nops.
16299
16300         (LocalVariableReference): Turn the `local_info' into a public
16301         field. 
16302
16303         Add `prepared' field, the same hack used for FieldExprs to cope
16304         with composed assignments, as Local variables do not necessarily
16305         operate purely on the stack as they used to: they can be captured
16306         fields. 
16307
16308         Add `temp' for a temporary result, like fields.
16309
16310         Refactor DoResolve and DoResolveLValue into DoResolveBase.
16311
16312         It now copes with Local variables that are captured and emits the
16313         proper instance variable to load it from a field in the captured
16314         case. 
16315
16316         (ParameterReference.DoResolveBase): During the resolve phase,
16317         capture parameters if we are in an anonymous method.
16318
16319         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
16320         anonymous method, use the EmitContext helper routines to emit the
16321         parameter reference.
16322
16323         * iterators.cs: Set RemapToProxy to true/false during the
16324         EmitDispose class.
16325
16326         * parameters.cs (GetParameterByName): New helper method. 
16327
16328         * typemanager.cs (anonymous_method_type) a new type that
16329         represents an anonyous method.  This is always an internal type,
16330         used as a fencepost to test against the anonymous-methodness of an
16331         expression. 
16332         
16333 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
16334
16335         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
16336         561 report.
16337         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
16338
16339 2004-10-18  Martin Baulig  <martin@ximian.com>
16340
16341         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
16342         `Type' directly, but call ResolveType() on it.
16343         (Catch.Resolve): Likewise.
16344         (Foreach.Resolve): Likewise.
16345
16346 2004-10-18  Martin Baulig  <martin@ximian.com>
16347
16348         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
16349         `Type' directly, but call ResolveType() on it.
16350         (Probe.DoResolve): Likewise.
16351         (ArrayCreation.LookupType): Likewise.
16352         (TypeOf.DoResolve): Likewise.
16353         (SizeOf.DoResolve): Likewise.
16354
16355 2004-10-18  Martin Baulig  <martin@ximian.com>
16356
16357         * expression.cs (Invocation.BetterFunction): Put back
16358         TypeManager.TypeToCoreType().
16359
16360 2004-10-18  Raja R Harinath  <rharinath@novell.com>
16361
16362         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
16363         the ResolveType.
16364
16365 2004-10-18  Martin Baulig  <martin@ximian.com>
16366
16367         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
16368         `Type' directly, but call ResolveType() on it.
16369
16370 2004-10-18  Martin Baulig  <martin@ximian.com>
16371
16372         * class.cs (FieldMember.Define): Don't access the TypeExpr's
16373         `Type' directly, but call ResolveType() on it.
16374         (MemberBase.DoDefine): Likewise.
16375
16376         * expression.cs (New.DoResolve): Don't access the TypeExpr's
16377         `Type' directly, but call ResolveType() on it.
16378         (ComposedCast.DoResolveAsTypeStep): Likewise.
16379
16380         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
16381         `Type' directly, but call ResolveType() on it.
16382
16383 2004-10-17  John Luke  <john.luke@gmail.com>
16384
16385         * class.cs (Operator.GetSignatureForError): use CSharpName
16386
16387         * parameter.cs (Parameter.GetSignatureForError): Returns
16388         correct name even if was not defined.
16389
16390 2004-10-13  Raja R Harinath  <rharinath@novell.com>
16391
16392         Fix #65816.
16393         * class.cs (TypeContainer.EmitContext): New property.
16394         (DefineNestedTypes): Create an emitcontext for each part.
16395         (MethodCore.DoDefineParameters): Use container's emitcontext.
16396         Pass type array to InternalParameters.
16397         (MemberBase.DoDefine): Use container's emitcontext.
16398         (FieldMember.Define): Likewise.
16399         (Event.Define): Likewise.
16400         (SetMethod.GetParameterInfo): Change argument to EmitContext.
16401         Pass type array to InternalParameters.
16402         (SetIndexerMethod.GetParameterInfo): Likewise.
16403         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
16404         * delegate.cs (Define): Pass emitcontext to
16405         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
16406         array to InternalParameters.
16407         * expression.cs (ParameterReference.DoResolveBase): Pass
16408         emitcontext to GetParameterInfo.
16409         (ComposedCast.DoResolveAsTypeStep): Remove check on
16410         ec.ResolvingTypeTree.
16411         * parameter.cs (Parameter.Resolve): Change argument to
16412         EmitContext.  Use ResolveAsTypeTerminal.
16413         (Parameter.GetSignature): Change argument to EmitContext.
16414         (Parameters.ComputeSignature): Likewise.
16415         (Parameters.ComputeParameterTypes): Likewise.
16416         (Parameters.GetParameterInfo): Likewise.
16417         (Parameters.ComputeAndDefineParameterTypes): Likewise.
16418         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
16419         * support.cs (InternalParameters..ctor): Remove variant that takes
16420         a DeclSpace.
16421         * typemanager.cs (system_intptr_expr): New.
16422         (InitExpressionTypes): Initialize it.
16423
16424 2004-10-12  Chris Toshok  <toshok@ximian.com>
16425
16426         * cs-parser.jay: fix location for try_statement and catch_clause.
16427
16428 2004-10-11  Martin Baulig  <martin@ximian.com>
16429
16430         * report.cs: Don't make --fatal abort on warnings, we have
16431         -warnaserror for that.
16432
16433 2004-10-07  Raja R Harinath  <rharinath@novell.com>
16434
16435         More DeclSpace.ResolveType avoidance.
16436         * decl.cs (MemberCore.InUnsafe): New property.
16437         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
16438         with newly created EmitContext.
16439         (FieldMember.Define): Likewise.
16440         * delegate.cs (Delegate.Define): Likewise.
16441         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
16442         only if normal name-lookup fails.
16443         (TypeExpr.DoResolve): Enable error-checking.
16444         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
16445         (SizeOf.DoResolve): Likewise.
16446         (ComposedCast.DoResolveAsTypeStep): Likewise.
16447         (StackAlloc.DoResolve): Likewise.
16448         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
16449         (Block.Unsafe): New property.
16450         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
16451         (Unsafe): Set 'unsafe' flag of contained block.
16452         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
16453         (Fixed.Resolve): Likewise.
16454         (Catch.Resolve): Likewise.
16455         (Using.ResolveLocalVariableDecls): Likewise.
16456         (Foreach.Resolve): Likewise.
16457
16458 2004-10-05  John Luke <john.luke@gmail.com>
16459
16460         * cs-parser.jay: add location to error CS0175
16461
16462 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
16463
16464         * ecore.cs (Expression.Constantity): Add support for turning null
16465         into a constant.
16466
16467         * const.cs (Const.Define): Allow constants to be reference types
16468         as long as the value is Null.
16469
16470 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
16471
16472         * namespace.cs (NamespaceEntry.Using): No matter which warning
16473         level is set, check if this namespace name has already been added.
16474
16475 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
16476
16477         * expression.cs: reftype [!=]= null should always use br[true,false].
16478         # 67410
16479
16480 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
16481
16482         Fix #67108
16483         * attribute.cs: Enum conversion moved to 
16484         GetAttributeArgumentExpression to be applied to the all
16485         expressions.
16486
16487 2004-10-01  Raja R Harinath  <rharinath@novell.com>
16488
16489         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
16490         * class.c (TypeContainer.DefineType): Flag error if
16491         base types aren't accessible due to access permissions.
16492         * decl.cs (DeclSpace.ResolveType): Move logic to
16493         Expression.ResolveAsTypeTerminal.
16494         (DeclSpace.ResolveTypeExpr): Thin layer over
16495         Expression.ResolveAsTypeTerminal.
16496         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
16497         Refactor code into NestedAccess.  Use it.
16498         (DeclSpace.NestedAccess): New.
16499         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
16500         argument to silence errors.  Check access permissions.
16501         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
16502         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
16503         (Cast.DoResolve): Likewise.
16504         (New.DoResolve): Likewise.
16505         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
16506         (TypeOf.DoResolve): Likewise.
16507
16508         * expression.cs (Invocation.BetterConversion): Return the Type of
16509         the better conversion.  Implement section 14.4.2.3 more faithfully.
16510         (Invocation.BetterFunction): Make boolean.  Make correspondence to
16511         section 14.4.2.2 explicit.
16512         (Invocation.OverloadResolve): Update.
16513         (Invocation): Remove is_base field.
16514         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
16515         (Invocation.Emit): Likewise.
16516
16517 2004-09-27  Raja R Harinath  <rharinath@novell.com>
16518
16519         * README: Update to changes.
16520
16521 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
16522
16523         * cs-parser.jay: Reverted 642 warning fix.
16524
16525 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16526
16527         Fix bug #66615
16528         * decl.cs (FindMemberWithSameName): Indexer can have more than
16529         1 argument.
16530
16531 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16532
16533         * expression.cs (LocalVariableReference.DoResolveLValue):
16534         Do not report warning 219 for out values.
16535         (EmptyExpression.Null): New member to avoid extra allocations.
16536
16537 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16538
16539         * cs-parser.jay: Fix wrong warning 642 report.
16540
16541         * cs-tokenizer.cs (CheckNextToken): New helper;
16542         Inspect next character if is same as expected.
16543
16544 2004-09-23  Martin Baulig  <martin@ximian.com>
16545
16546         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
16547         (Convert.ImplicitReferenceConversionExists): Likewise.
16548
16549 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16550
16551         * class.cs (Operator.Define): Add error 448 and 559 report.
16552
16553 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
16554
16555         * class.cs (MemberBase.IsTypePermitted): New protected
16556         method for checking error CS0610.
16557
16558 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
16559
16560         * class.cs (TypeContainer.HasExplicitLayout): New property
16561         Returns whether container has StructLayout attribute set Explicit.
16562         (FieldMember): New abstract class for consts and fields.
16563         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
16564         (Field): Reuse FieldMember.
16565
16566         * const.cs (Const): Reuse FieldMember.
16567
16568         * rootcontext.cs: EmitConstants call moved to class.
16569
16570 2004-09-22  Martin Baulig  <martin@ximian.com>
16571
16572         Thanks to Peter Sestoft for this bug report.
16573
16574         * expression.cs (Conditional): If both the `trueExpr' and the
16575         `falseExpr' is a NullLiteral, return a NullLiteral.
16576
16577 2004-09-22  Martin Baulig  <martin@ximian.com>
16578
16579         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
16580         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
16581         for the "get_Current" call.
16582
16583 2004-09-22  Martin Baulig  <martin@ximian.com>
16584
16585         Marek and me just fixed one of our oldest bugs: #28562 :-)
16586
16587         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
16588
16589         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
16590         we're an EnumConstant, just return that.
16591         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
16592         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
16593         to get the value which'll actually be written into the attribute.
16594         However, we have to use GetValue() to access the attribute's value
16595         in the compiler.        
16596
16597 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
16598
16599         * constant.cs (Constant.IsNegative): New abstract property
16600         IsNegative.
16601
16602         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
16603         (StackAlloc.DoResolve): Reused IsNegative.
16604
16605 2004-09-21  Martin Baulig  <martin@ximian.com>
16606
16607         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
16608         if we're used in an iterator, we may be called from different
16609         methods.
16610
16611         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
16612         we actually have an exception block.
16613
16614 2004-09-20  John Luke <jluke@cfl.rr.com>
16615
16616         * class.cs, cs-parser.jay: Improve the error report for 1520:
16617         report the actual line where the error happens, not where the
16618         class was declared.
16619
16620         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
16621         Pass location information that was available elsewhere.
16622
16623 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
16624
16625         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
16626         runtime to delay sign assemblies.
16627
16628 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
16629
16630         * cs-parser.jay: Do not report the stack trace, this is barely
16631         used nowadays.
16632
16633 2004-08-22  John Luke  <john.luke@gmail.com>
16634  
16635         * driver.cs : check that a resource id is not already used
16636         before adding it, report CS1508 if it is, bug #63637
16637
16638 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
16639
16640         * ecore.cs: Removed dead code.
16641
16642 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
16643
16644         * class.cs: Do not report warning CS0067 on the interfaces.
16645
16646 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
16647
16648         * cs-parser.jay: Add error 504 report.
16649
16650 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
16651
16652         * rootcontext.cs: WarningLevel is 4 by default now.
16653
16654         * statement.cs (Fixed.Resolve): Do not null
16655         VariableInfo.
16656
16657 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
16658
16659         Fixed bug #55780
16660         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
16661         deep search when property is not virtual.
16662         (PropertyExpr.ResolveAccessors): Make one call for both
16663         accessors.
16664
16665 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
16666
16667         Fixed bug #65766
16668         * statement.cs: Error 152 report constains also location.
16669
16670 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
16671
16672         Fixed bug #65766
16673         * const.cs: Explicitly set constant as static.
16674
16675 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
16676
16677         Fixed bug #64226
16678         * cs-parser.jay: Add error 1017 report.
16679
16680 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
16681
16682         Fixed bug #59980, #64224
16683         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
16684
16685         * typemanager.cs (IsSpecialMethod): Simplified
16686
16687 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
16688
16689         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
16690         condition with better params.
16691
16692 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
16693
16694         Fixed bug #65238
16695         * attribute.cs (Resolve): Property has to have both
16696         accessors.
16697
16698 2004-09-14  Martin Baulig  <martin@ximian.com>
16699
16700         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
16701
16702 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
16703
16704         Fixed bug #61902
16705         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
16706         called and is obsolete then this member suppress message
16707         when call is inside next [Obsolete] method or type.
16708
16709         * expression.cs: Use TestObsoleteMethodUsage member.
16710
16711 2004-09-14  Martin Baulig  <martin@ximian.com>
16712
16713         * cs-parser.jay: Sync a bit with the GMCS version.
16714
16715 2004-09-14  Martin Baulig  <martin@ximian.com>
16716
16717         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
16718         (CSharpParser.yacc_verbose_flag): New public field.
16719
16720         * genericparser.cs: Removed.
16721
16722 2004-09-14  Raja R Harinath  <rharinath@novell.com>
16723
16724         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
16725
16726 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
16727
16728         * class.cs (MethodCore.CheckBase): Fix bug #65757.
16729
16730 2004-09-10  Martin Baulig  <martin@ximian.com>
16731
16732         Backported my MemberName changes from GMCS into MCS.
16733
16734         - we are now using a special `MemberName' class instead of using
16735         strings; in GMCS, the `MemberName' also contains the type
16736         arguments.
16737
16738         - changed the grammar rules a bit:
16739           * the old `member_name' is now a `namespace_or_type_name':
16740             The rule is that we use `namespace_or_type_name' everywhere
16741             where we expect either a "member name" (GetEnumerator) or a
16742             "member name" with an explicit interface name
16743             (IEnumerable.GetEnumerator).
16744             In GMCS, the explicit interface name may include type arguments
16745             (IEnumerable<T>.GetEnumerator).
16746           * we use `member_name' instead of just `IDENTIFIER' for
16747             "member names":
16748             The rule is that we use `member_name' wherever a member may
16749             have type parameters in GMCS.       
16750
16751         * decl.cs (MemberName): New public class.
16752         (MemberCore.MemberName): New public readonly field.
16753         (MemberCore.ctor): Take a `MemberName' argument, not a string.
16754         (DeclSpace): Likewise.
16755
16756         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
16757         * enum.cs (Enum.ctor): Likewise.
16758
16759         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
16760         MemberName.     
16761         (AliasEntry.ctor): Take a MemberName, not an Expression.
16762         (AliasEntry.UsingAlias): Likewise.
16763
16764         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
16765         (IMethodData.MemberName): Changed type from string to MemberName.
16766         (MemberBase.ExplicitInterfaceName): Likewise.
16767         (AbstractPropertyEventMethod.SetupName): Make this private.
16768         (AbstractPropertyEventMethod.ctor): Added `string prefix'
16769         argument; compute the member name here.
16770         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
16771         on the `member.MemberName' and the `prefix'.
16772
16773         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
16774         not `type_name'.
16775         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
16776         thus, we get a `MemberName' instead of a `string'.  These
16777         declarations may have type parameters in GMCS.
16778         (interface_method_declaration, delegate_declaration): Likewise.
16779         (class_declaration, interface_declaration): Likewise.
16780         (method_header): Use `namespace_or_type_name' instead of
16781         `member_name'.  We may be an explicit interface implementation.
16782         (property_declaration, event_declaration): Likewise.
16783         (member_name): This is now just an `IDENTIFIER', not a
16784         `namespace_or_type_name'.
16785         (type_name, interface_type): Removed.
16786         (namespace_or_type_name): Return a MemberName, not an Expression.
16787         (primary_expression): Use `member_name' instead of `IDENTIFIER';
16788         call GetTypeExpression() on the MemberName to get an expression.
16789         (IndexerDeclaration.interface_type): Changed type from string to
16790         MemberName.
16791         (MakeName): Operate on MemberName's instead of string's.
16792
16793 2004-09-13  Raja R Harinath  <rharinath@novell.com>
16794
16795         Fix bug #55770.
16796         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
16797         (NamespaceEntry.Lookup): Add new argument to flag if we want the
16798         lookup to avoid symbols introduced by 'using'.
16799         * rootcontext.cs (NamespaceLookup): Update.
16800
16801 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
16802
16803         * class.cs (TypeContainer.DoDefineMembers): Do not call
16804         DefineDefaultConstructor for static classes.
16805
16806 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
16807
16808         * attribute.cs (Attribute.Resolve): Add error 653 report.
16809
16810         * class.cs (Class.ApplyAttributeBuilder): Add error 641
16811         report.
16812         (Method.ApplyAttributeBuilder): Add error 685 report.
16813         (Operator.Define): Add error 564 report.
16814
16815         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
16816
16817         * expression.cs (Invocation.DoResolve): Add error
16818         245 and 250 report.
16819
16820         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
16821         error 674 report.
16822
16823 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
16824
16825         * class.cs (ConstructorInitializer.Resolve):
16826         Wrong error number (515->516).
16827
16828 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
16829
16830         * class.cs (Indexer.Define): Add error 631 report.
16831
16832 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
16833
16834         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
16835
16836 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
16837
16838         * expression.cs (Probe.DoResolve): Add error CS0241 report.
16839
16840 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
16841
16842         * cs-parser.jay: Added error CS0241 report.
16843
16844 2004-09-10  Raja R Harinath  <rharinath@novell.com>
16845
16846         * cs-parser.jay (fixed_statement): Introduce a scope for the
16847         declaration in the 'fixed' statement.
16848
16849 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
16850
16851         * cs-parser.jay: Added CS0230 error report.
16852
16853 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
16854
16855         * cs-parser.jay: Added errors CS0231 and CS0257 report.
16856
16857 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
16858
16859         * expression.cs (Argument.Resolve): Added error CS0192 and
16860         CS0199 report.
16861
16862 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
16863
16864         C# 2.0 #pragma warning feature
16865
16866         * cs-tokenizer.cs (PreProcessPragma): New method; 
16867         Handles #pragma directive.
16868
16869         * report.cs (WarningRegions): New class; Support
16870         class for #pragma warning directive. It tests whether
16871         warning is enabled for a given line.
16872
16873 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
16874
16875         * const.cs: Add more descriptive error report, tahnks to
16876         Sebastien. 
16877
16878 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
16879
16880         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
16881
16882 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
16883
16884         * expression.cs: Apply patch from Ben: Remove dead code from
16885         ArrayCreation, and remove the TurnintoConstant call in const.cs,
16886         as that code just threw an exception anwyays.
16887
16888         * const.cs: Remove the call to the turnintoconstant, for details
16889         see bug: #63144
16890         
16891         * literal.cs: The type of the null-literal is the null type;  So
16892         we use a placeholder type (literal.cs:System.Null, defined here)
16893         for it.
16894
16895         * expression.cs (Conditional.DoResolve): Remove some old code that
16896         is no longer needed, conversions have been fixed.
16897
16898         (ArrayCreationExpression.DoResolve): Return false if we fail to
16899         resolve the inner expression.
16900
16901 2004-09-07  Raja R Harinath  <rharinath@novell.com>
16902
16903         Fix test-290.cs.
16904         * cs-parser.jay (delegate_declaration): Record a delegate
16905         declaration as a type declaration.
16906         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
16907
16908 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
16909
16910         * parameter.cs: Do not crash if the type can not be resolved. 
16911
16912         * expression.cs: Report errors with unsafe pointers, fixes #64896
16913
16914 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
16915
16916         * expression.cs: Pointer arith always needs to do a conv.i
16917         if the operand is a long. fix 65320
16918
16919 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
16920
16921         Fixed cs0619-37.cs, cs0619-38.cs
16922
16923         * enum.cs (GetObsoleteAttribute): Removed.
16924
16925         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
16926         on Enum member is double staged. The first is tested member
16927         and then enum.
16928
16929 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
16930
16931         Fixed #56986, #63631, #65231
16932
16933         * class.cs: (TypeContainer.AddToMemberContainer): New method,
16934         adds member to name container.
16935         (TypeContainer.AddToTypeContainer): New method, adds type to
16936         name container.
16937         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
16938         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
16939         AddOperator): Simplified by reusing AddToMemberContainer.
16940         (TypeContainer.UserDefinedStaticConstructor): Changed to property
16941         instead of field.
16942         (Method.CheckForDuplications): Fixed implementation to test all
16943         possibilities.
16944         (MemberBase): Detection whether member is explicit interface
16945         implementation is now in constructor.
16946         (MemberBase.UpdateMemberName): Handles IndexerName.
16947         (Accessor): Changed to keep also location information.
16948         (AbstractPropertyEventMethod): Is derived from MemberCore.
16949         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
16950         will be emited or not.
16951         (PropertyBase.AreAccessorsDuplicateImplementation):
16952         Tests whether accessors are not in collision with some method.
16953         (Operator): Is derived from MethodCore to simplify common
16954         operations.
16955
16956         * decl.cs (Flags.TestMethodDuplication): Test for duplication
16957         must be performed.
16958         (DeclSpace.AddToContainer): Adds the member to defined_names
16959         table. It tests for duplications and enclosing name conflicts.
16960
16961         * enum.cs (EnumMember): Clean up to reuse the base structures
16962
16963 2004-09-03  Martin Baulig  <martin@ximian.com>
16964
16965         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
16966         into TypeContainer, to make partial classes work again.
16967
16968 2004-09-03  Martin Baulig  <martin@ximian.com>
16969
16970         * rootcontext.cs (RootContext.V2): Removed.
16971
16972 2004-03-23  Martin Baulig  <martin@ximian.com>
16973
16974         * expression.cs (Invocation.OverloadResolve): Added `bool
16975         may_fail' argument and use it instead of the Location.IsNull() hack.
16976
16977 2004-09-03  Martin Baulig  <martin@ximian.com>
16978
16979         Merged latest changes into gmcs.  Please keep this comment in
16980         here, it makes it easier for me to see what changed in MCS since
16981         the last time I merged.
16982
16983 2004-09-03  Raja R Harinath  <rharinath@novell.com>
16984
16985         Fix #61128.
16986         * expression.cs (BetterConversion): Don't allow either conversion 
16987         to be null.  Remove redundant implicit conversion test when 'q ==
16988         null' -- when this function is invoked, we already know that the
16989         implicit conversion exists.
16990         (BetterFunction): Assume that 'best' is non-null.  Remove
16991         redundant reimplementation of IsApplicable when 'best' is null.
16992         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
16993         number of arguments.
16994         (IsAncestralType): Extract from OverloadResolve.
16995         (OverloadResolve): Make robust to the MethodGroupExpr being
16996         unsorted.  Implement all the logic of Section 14.5.5.1, and
16997         support overloading of methods from multiple applicable types.
16998         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
16999
17000         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17001         (RealError, Warning): Append type of report to related symbol.
17002
17003 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17004
17005         * enum.cs: Fixed CLS-Compliance checks for enum members.
17006         Error tests cs3008-8.cs, cs3014-8.cs
17007
17008 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17009
17010         Fixed bug #62342, #63102
17011         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17012         like ImplementMethod.
17013
17014 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17015
17016         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17017         Fixed bug #65170.
17018
17019 2004-09-02  Martin Baulig  <martin@ximian.com>
17020
17021         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17022         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17023         on the MethodBase.
17024
17025 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17026
17027         C# 2.0 Static classes implemented
17028
17029         * class.cs (TypeContainer): instance_constructors,
17030         initialized_fields, initialized_static_fields,
17031         default_constructor, base_inteface_types are protected to be
17032         accessible from StaticClass.
17033         (TypeContainer.DefineDefaultConstructor): New virtual method
17034         for custom default constructor generating
17035         (StaticClass): New class to handle "Static classes" feature.
17036
17037         * cs-parser.jay: Handle static keyword on class like instance
17038         of StaticClass.
17039
17040         * driver.cs: Added "/langversion" command line switch with two
17041         options (iso-1, default).
17042
17043 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17044
17045         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17046
17047 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17048
17049         * delegate.cs: Style.
17050
17051 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17052
17053         * delegate.cs: Add seperate instance expr field for miguel.
17054
17055 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17056
17057         * PointerArithmetic (Resolve): make sure we are not doing
17058         pointer arith on void*. Also, make sure we are resolved
17059         by not setting eclass until resolve.
17060
17061         All callers: Make sure that PointerArithmetic gets resolved.
17062
17063 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17064
17065         * ArrayCreation (LookupType): If the type does not resolve 
17066         to an array, give an error.
17067
17068 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17069
17070         * statement.cs (Try.Resolve): Fixed bug #64222
17071
17072 2004-08-27  Martin Baulig  <martin@ximian.com>
17073
17074         * class.cs
17075         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17076         crash here.     
17077
17078 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17079
17080         * ecore.cs (Constantify): Get underlying type via
17081         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17082         Windows in special cases.
17083
17084 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17085
17086         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17087         for obtaining also private methods.
17088         (GetRemoveMethod): Used GetRemoveMethod (true)
17089         for obtaining also private methods.
17090
17091 2004-08-24  Martin Baulig  <martin@ximian.com>
17092
17093         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17094         MethodAttributes.HideBySig for operators.
17095
17096 2004-08-23  Martin Baulig  <martin@ximian.com>
17097
17098         Back to the old error reporting system :-)
17099
17100         * report.cs (Message): Removed.
17101         (Report.MessageData, ErrorData, WarningData): Removed.
17102         (Report.Error, Warning): Back to the old system.
17103
17104 2004-08-23  Martin Baulig  <martin@ximian.com>
17105
17106         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17107
17108         * class.cs (TypeContainer.ParentContainer): New public virtual
17109         method; replaces the explicit interface implementation.
17110         (ClassPart.ParentContainer): Override.
17111
17112 2004-08-23  Martin Baulig  <martin@ximian.com>
17113
17114         * statement.cs (Switch): Added support for constant switches; see
17115         #59428 or test-285.cs.
17116
17117 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17118
17119         Fixed bug #62740.
17120         * statement.cs (GetEnumeratorFilter): Removed useless
17121         logic because C# specs is strict. GetEnumerator must be
17122         public.
17123
17124 2004-08-22  Martin Baulig  <martin@ximian.com>
17125
17126         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17127         a switch and may break, reset the barrier.  Fixes #59867.
17128
17129 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17130
17131         CLS-Compliance speed up (~5% for corlib)
17132
17133         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17134         New method. Tests container for CLS-Compliant names
17135
17136         * class.cs (TypeContainer.VerifyClsName): New method.
17137         Checks whether container name is CLS Compliant.
17138         (Constructor): Implements IMethodData.
17139
17140         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17141         low-case table for CLS Compliance test.
17142         (MemberCache.VerifyClsParameterConflict): New method.
17143         Checks method parameters for CS3006 error.
17144
17145         * enum.cs (EnumMember): Is derived from MemberCore.
17146         (Enum.VerifyClsName): Optimized for better performance.
17147
17148 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17149
17150         * report.cs: Renamed Error_T to Error and changed all
17151         references.
17152
17153 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17154
17155         * class.cs (TypeContainer.IndexerArrayList): New inner class
17156         container for indexers.
17157         (TypeContainer.DefaultIndexerName): New constant for default
17158         indexer name. Replaced all "Item" with this constant.
17159         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
17160
17161         * typemanager.cs (TypeManager.default_member_ctor): Cache here
17162         DefaultMemberAttribute constructor.
17163
17164 2004-08-05  Martin Baulig  <martin@ximian.com>
17165
17166         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
17167         Fix bug #59429.
17168
17169 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
17170
17171         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
17172         multi platforms problem.
17173
17174         * compiler.csproj: Included shared files.
17175
17176 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17177
17178         Fix bug 60333, 55971 in the more general way
17179         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17180         Added arg_type argument for constant conversion.
17181         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
17182
17183 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17184
17185         Fix bug #59760
17186         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
17187         OperatorArrayList, MethodCoreArrayList for typecontainer
17188         containers. Changed class member types to these new types.
17189         (MethodArrayList.DefineMembers): Added test for CS0659.
17190
17191 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
17192
17193         * cfold.cs: Synchronize the folding with the code in expression.cs
17194         Binary.DoNumericPromotions for uint operands.
17195
17196         * attribute.cs: Revert patch from Raja, it introduced a regression
17197         while building Blam-1.2.1 (hard to isolate a test case).
17198
17199 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17200
17201         Fix for #55382
17202         * class.cs:
17203         (TypeContainer.Define): Renamed to DefineContainerMembers because of
17204         name collision.
17205         (MethodCore.parent_method): New member. The method we're overriding
17206         if this is an override method.
17207         (MethodCore.CheckBase): Moved from Method class and made common.
17208         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
17209         private.
17210         (MethodCore.CheckForDuplications): New abstract method. For custom
17211         member duplication search in a container
17212         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
17213         method and its return type.
17214         (Event.conflict_symbol): New member. Symbol with same name in the
17215         parent class.
17216
17217         * decl.cs:
17218         (MemberCache.FindMemberWithSameName): New method. The method
17219         is looking for conflict with inherited symbols.
17220
17221 2004-08-04  Martin Baulig  <martin@ximian.com>
17222
17223         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
17224
17225         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
17226
17227 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17228
17229         * report.cs (Message): New enum for better error, warning reference in
17230         the code.
17231         (MessageData): New inner abstract class. It generally handles printing of
17232         error and warning messages.
17233         Removed unused Error, Warning, Message methods.
17234
17235 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17236
17237         Fix for cs0592-8.cs test
17238         * attribute.cs
17239         (Attributable.ValidAttributeTargets): Made public.
17240         (Attribute.ExplicitTarget): New member for explicit target value.
17241         (Attribute.CheckTargets): Now we translate explicit attribute
17242         target to Target here.
17243
17244 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
17245
17246         * ecore.cs (MethodGroupExpr): new IsBase property.
17247
17248         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
17249
17250         * delegate.cs (DelegateCreation): store a MethodGroupExpr
17251         rather than an instance expr.
17252
17253         (DelegateCreation.Emit): Use the method group rather than
17254         the instance expression. Also, if you have base.Foo as the
17255         method for a delegate, make sure to emit ldftn, not ldftnvirt.
17256
17257         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
17258
17259         (NewDelegate.DoResolve): Only check for the existance of Invoke
17260         if the method is going to be needed. Use MethodGroupExpr.
17261
17262         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
17263
17264         * expression.cs: For pointer arith., make sure to use
17265         the size of the type, not the size of the pointer to
17266         the type.
17267
17268 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17269
17270         Fix for #60722
17271         * class.cs (Class): Added error CS0502 test.
17272
17273 2004-08-03  John Luke  <jluke@cfl.rr.com>
17274             Raja R Harinath  <rharinath@novell.com>
17275
17276         Fix for #60997.
17277         * attribute.cs (Attribute.complained_before): New flag.
17278         (Attribute.ResolveType, Attribute.Resolve),
17279         (Attribute.DefinePInvokeMethod): Set it.
17280         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
17281         
17282 2004-08-03  Martin Baulig  <martin@ximian.com>
17283
17284         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
17285         use a user-defined operator; we still need to do numeric
17286         promotions in case one argument is a builtin type and the other
17287         one has an implicit conversion to that type.  Fixes #62322.
17288
17289 2004-08-02  Martin Baulig  <martin@ximian.com>
17290
17291         * statement.cs (LocalInfo.Flags): Added `IsThis'.
17292         (LocalInfo.IsThis): New public property.
17293         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
17294
17295 2004-08-01  Martin Baulig  <martin@ximian.com>
17296
17297         * class.cs (TypeContainer.GetClassBases): Don't set the default
17298         here since we may get called from GetPartialBases().
17299         (TypeContainer.DefineType): If GetClassBases() didn't return a
17300         parent, use the default one.
17301
17302 2004-07-30  Duncan Mak  <duncan@ximian.com>
17303
17304         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
17305
17306 2004-07-30  Martin Baulig  <martin@ximian.com>
17307
17308         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
17309
17310         * class.cs (SourceMethod): New public class, derive from the
17311         symbol writer's ISourceMethod.
17312         (Method): Use the new symbol writer API.
17313
17314         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
17315         as argument and use the new symbol writer.
17316
17317         * location.cs
17318         (SourceFile): Implement the symbol writer's ISourceFile.
17319         (Location.SymbolDocument): Removed.
17320         (Location.SourceFile): New public property.
17321
17322         * symbolwriter.cs: Use the new symbol writer API.
17323
17324 2004-07-30  Raja R Harinath  <rharinath@novell.com>
17325
17326         * Makefile (install-local): Remove.  Functionality moved to
17327         executable.make.
17328
17329 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17330
17331         * Makefile: Install mcs.exe.config file together with mcs.exe.
17332         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
17333         correct runtime version.
17334         
17335 2004-07-25  Martin Baulig  <martin@ximian.com>
17336
17337         * class.cs
17338         (TypeContainer.RegisterOrder): Removed, this was unused.
17339         (TypeContainer, interface_order): Removed.
17340         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
17341         TypeContainer as argument since we can also be called with a
17342         `PartialContainer' for a partial class/struct/interface.
17343         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
17344         of checking whether we're an `Interface' - we could be a
17345         `PartialContainer'.
17346         (PartialContainer.Register): Override; call
17347         AddClass()/AddStruct()/AddInterface() on our parent.
17348
17349         * cs-parser.jay (interface_member_declaration): Add things to the
17350         `current_container', not the `current_class'.
17351
17352         * rootcontext.cs (RegisterOrder): The overloaded version which
17353         takes an `Interface' was unused, removed.
17354
17355         * typemanager.cs (TypeManager.LookupInterface): Return a
17356         `TypeContainer', not an `Interface'.
17357         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
17358         contain a `PartialContainer' for an interface, so check it's
17359         `Kind' to figure out what it is.
17360
17361 2004-07-25  Martin Baulig  <martin@ximian.com>
17362
17363         * class.cs (Class.DefaultTypeAttributes): New public constant.
17364         (Struct.DefaultTypeAttributes): Likewise.
17365         (Interface.DefaultTypeAttributes): Likewise.
17366         (PartialContainer.TypeAttr): Override this and add the
17367         DefaultTypeAttributes.
17368
17369 2004-07-25  Martin Baulig  <martin@ximian.com>
17370
17371         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
17372         we can just use the `Parent' field instead.
17373
17374 2004-07-25  Martin Baulig  <martin@ximian.com>
17375
17376         * class.cs (TypeContainer.Emit): Renamed to EmitType().
17377
17378 2004-07-25  Martin Baulig  <martin@ximian.com>
17379
17380         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
17381         our parts before defining any methods.
17382         (TypeContainer.VerifyImplements): Make this virtual.
17383         (ClassPart.VerifyImplements): Override and call VerifyImplements()
17384         on our PartialContainer.
17385
17386 2004-07-25  Martin Baulig  <martin@ximian.com>
17387
17388         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
17389
17390         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
17391         argument, we can just use the `Parent' field instead.
17392
17393         * class.cs
17394         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
17395         (MemberBase.DoDefine): Likewise.
17396
17397 2004-07-24  Martin Baulig  <martin@ximian.com>
17398
17399         * decl.cs (MemberCore.Parent): New public field.
17400         (DeclSpace.Parent): Moved to MemberCore.
17401
17402         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
17403         (MemberBase.ctor): Added TypeContainer argument, pass it to our
17404         parent's .ctor.
17405         (FieldBase, Field, Operator): Likewise.
17406         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
17407         (EventField, Event): Likewise.
17408
17409 2004-07-23  Martin Baulig  <martin@ximian.com>
17410
17411         * class.cs (PartialContainer): New public class.
17412         (ClassPart): New public class.
17413         (TypeContainer): Added support for partial classes.
17414         (TypeContainer.GetClassBases): Splitted some of the functionality
17415         out into GetNormalBases() and GetPartialBases().
17416
17417         * cs-tokenizer.cs (Token.PARTIAL): New token.
17418         (Tokenizer.consume_identifier): Added some hacks to recognize
17419         `partial', but only if it's immediately followed by `class',
17420         `struct' or `interface'.
17421
17422         * cs-parser.jay: Added support for partial clases.
17423
17424 2004-07-23  Martin Baulig  <martin@ximian.com>
17425
17426         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
17427         a `DeclSpace' and also made it readonly.
17428         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
17429         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
17430         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
17431
17432         * cs-parser.jay: Pass the `current_class', not the
17433         `current_container' (at the moment, this is still the same thing)
17434         to a new Method, Property, Event, Indexer or Constructor.
17435
17436 2004-07-23  Martin Baulig  <martin@ximian.com>
17437
17438         * cs-parser.jay (CSharpParser): Added a new `current_class' field
17439         and removed the `current_interface' one.
17440         (struct_declaration, class_declaration, interface_declaration):
17441         Set `current_class' to the newly created class/struct/interface;
17442         set their `Bases' and call Register() before parsing their body.
17443
17444 2004-07-23  Martin Baulig  <martin@ximian.com>
17445
17446         * class.cs (Kind): New public enum.
17447         (TypeContainer): Made this class abstract.
17448         (TypeContainer.Kind): New public readonly field.
17449         (TypeContainer.CheckDef): New public method; moved here from
17450         cs-parser.jay.
17451         (TypeContainer.Register): New public abstract method.
17452         (TypeContainer.GetPendingImplementations): New public abstract
17453         method.
17454         (TypeContainer.GetClassBases): Removed the `is_class' and
17455         `is_iface' parameters.
17456         (TypeContainer.DefineNestedTypes): Formerly known as
17457         DoDefineType().
17458         (ClassOrStruct): Made this class abstract.
17459
17460         * tree.cs (RootTypes): New public type. 
17461
17462 2004-07-20  Martin Baulig  <martin@ximian.com>
17463
17464         * tree.cs (Tree.RecordNamespace): Removed.
17465         (Tree.Namespaces): Removed.
17466
17467         * rootcontext.cs (RootContext.IsNamespace): Removed.
17468
17469         * cs-parser.jay (namespace_declaration): Just create a new
17470         NamespaceEntry here.
17471
17472 2004-07-20  Martin Baulig  <martin@ximian.com>
17473
17474         * statement.cs (ExceptionStatement): New abstract class.  This is
17475         now used as a base class for everyone who's using `finally'.
17476         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
17477         our local variables before using them.
17478
17479         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
17480         virtual method.  This is used by Yield.Resolve() to "steal" an
17481         outer block's `finally' clauses.
17482         (FlowBranchingException): The .ctor now takes an ExceptionStatement
17483         argument.
17484
17485         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
17486         version which takes an ExceptionStatement.  This version must be
17487         used to create exception branchings.
17488
17489         * iterator.cs
17490         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
17491         (Iterator.EmitMoveNext): Added exception support; protect the
17492         block with a `fault' clause, properly handle 'finally' clauses.
17493         (Iterator.EmitDispose): Run all the `finally' clauses here.
17494
17495 2004-07-20  Martin Baulig  <martin@ximian.com>
17496
17497         * iterator.cs: This is the first of a set of changes in the
17498         iterator code.  Match the spec more closely: if we're an
17499         IEnumerable, then GetEnumerator() must be called.  The first time
17500         GetEnumerator() is called, it returns the current instance; all
17501         subsequent invocations (if any) must create a copy.
17502
17503 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
17504
17505         * expression.cs: Resolve the constant expression before returning
17506         it. 
17507
17508 2004-07-19  Martin Baulig  <martin@ximian.com>
17509
17510         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
17511         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
17512         the return type of the new EmitContext.
17513
17514 2004-07-18  Martin Baulig  <martin@ximian.com>
17515
17516         * class.cs (Property.Define): Fix iterators.
17517
17518         * iterators.cs (Iterator.Define): Moved the
17519         `container.AddInterator (this)' call here from the .ctor; only do
17520         it if we resolved successfully.
17521
17522 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
17523
17524         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
17525         `true' for preprocessing directives that we parse.  The return
17526         value indicates whether we should return to regular tokenizing or
17527         not, not whether it was parsed successfully.
17528
17529         In the past if we were in: #if false ... #line #endif, we would
17530         resume parsing after `#line'.  See bug 61604.
17531
17532         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
17533         building: IsEnumType should return true only for enums, not for
17534         enums or System.Enum itself.  This fixes #61593.
17535
17536         Likely what happened is that corlib was wrong: mcs depended on
17537         this bug in some places.  The bug got fixed, we had to add the
17538         hack, which caused bug 61593.
17539
17540         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
17541         that was a workaround for the older conditions.
17542
17543 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
17544
17545         * assign.cs: IAssignMethod has a new interface, as documented
17546         inline. All assignment code now uses this new api.
17547
17548         * ecore.cs, expression.cs: All classes which implement
17549         IAssignMethod now use the new interface.
17550
17551         * expression.cs (Invocation): add a hack to EmitCall so that
17552         IndexerAccess can be the target of a compound assignment without
17553         evaluating its arguments twice.
17554
17555         * statement.cs: Handle changes in Invocation api.
17556
17557 2004-07-16  Martin Baulig  <martin@ximian.com>
17558
17559         * iterators.cs: Rewrote this.  We're now using one single Proxy
17560         class for both the IEnumerable and the IEnumerator interface and
17561         `Iterator' derives from Class so we can use the high-level API.
17562
17563         * class.cs (TypeContainer.AddIterator): New method.
17564         (TypeContainer.DoDefineType): New protected virtual method, which
17565         is called from DefineType().
17566         (TypeContainer.DoDefineMembers): Call DefineType() and
17567         DefineMembers() on all our iterators.
17568         (TypeContainer.Emit): Call Emit() on all our iterators.
17569         (TypeContainer.CloseType): Call CloseType() on all our iterators.
17570
17571         * codegen.cs (EmitContext.CurrentIterator): New public field.
17572
17573 2004-07-15  Martin Baulig  <martin@ximian.com>
17574
17575         * typemanager.cs
17576         (TypeManager.not_supported_exception_type): New type.   
17577
17578 2004-07-14  Martin Baulig  <martin@ximian.com>
17579
17580         * iterators.cs: Use real error numbers.
17581
17582 2004-07-14  Martin Baulig  <martin@ximian.com>
17583
17584         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
17585         requires this to be a System.Collection.IEnumerable and not a
17586         class implementing that interface.
17587         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
17588
17589 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
17590
17591         * class.cs: Fixed previous fix, it broke some error tests.
17592
17593 2004-07-12  Martin Baulig  <martin@ximian.com>
17594
17595         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
17596         Fixes #61293.
17597
17598 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
17599
17600         * assign.cs (LocalTemporary): Add new argument: is_address,If
17601         `is_address' is true, then the value that we store is the address
17602         to the real value, and not the value itself.
17603         
17604         * ecore.cs (PropertyExpr): use the new local temporary
17605         stuff to allow us to handle X.Y += z (where X is a struct)
17606
17607 2004-07-08  Martin Baulig  <martin@ximian.com>
17608
17609         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
17610         not always return, just like we're doing in Using.Resolve().
17611
17612 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
17613
17614         * cs-parser.jay (fixed_statement): flag this as Pinned.
17615
17616 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
17617
17618         * typemanager.cs (TypeManager): Removed MakePinned method, this
17619         mechanism is replaced with the .NET 2.x compatible mechanism of
17620         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
17621
17622         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
17623         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
17624         `IsFixed' property which has a different meaning.
17625
17626 2004-07-02  Raja R Harinath  <rharinath@novell.com>
17627
17628         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
17629         visible from inside a nested class, not just the names of the
17630         immediately enclosing class.
17631         Fix for bug #60730.
17632
17633 2004-06-24  Raja R Harinath  <rharinath@novell.com>
17634
17635         * expression.cs (BetterConversion): Remove buggy special-case
17636         handling of "implicit constant expression conversions".  At this
17637         point, we already know that the conversion is possible -- we're
17638         only checking to see which is better.
17639
17640 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
17641
17642         * cs-parser.jay: Added error CS0210 test.
17643
17644 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
17645
17646         * cs-parser.jay: Added error CS0134 test.
17647
17648 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
17649
17650         Fix bug #52507
17651         * cs-parser.jay: Added error CS0145 test.
17652
17653 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
17654
17655         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
17656
17657 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
17658         
17659         * expression.cs (StackAlloc.Resolve): The argument may not
17660         be a constant; deal with this case.
17661         
17662 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
17663
17664         * attribute.cs (IndexerName_GetIndexerName): Renamed to
17665         GetIndexerAttributeValue.
17666         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
17667
17668         * class.cs (Indexer.Define): Added error tests for CS0415,
17669         CS0609.
17670
17671 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
17672
17673         * attribute.cs (Attribute.Resolve): Keep field code in sync with
17674         property code.
17675
17676 2004-06-23  Martin Baulig  <martin@ximian.com>
17677
17678         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
17679         neither return nor throw, reset the barrier as well.  Fixes #60457.
17680
17681 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
17682
17683         * class.cs : EventAttributes is now set to None by default.
17684           This fixes bug #60459.
17685
17686 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
17687
17688         Fix bug #60219
17689         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
17690         Don't throw exception but return null (it's sufficient now).
17691
17692 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
17693
17694         * typemanager.cs (GetArgumentTypes): Faster implementation.
17695
17696 2004-06-18  Martin Baulig  <martin@ximian.com>
17697
17698         * attribute.cs (Attribute.Resolve): Check whether we're an
17699         EmptyCast which a Constant child.  Fixes #60333.
17700
17701 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
17702
17703         * statement.cs (EmitCollectionForeach): Account for the fact that
17704         not all valuetypes are in areas which we can take the address of.
17705         For these variables, we store to a temporary variable. Also, make
17706         sure that we dont emit a `callvirt' on a valuetype method.
17707
17708 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
17709
17710         * expression.cs (StackAlloc.DoReSolve): Added test for
17711         negative parameter (CS0247).
17712
17713 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
17714
17715         Fix bug #59792
17716         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
17717
17718 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
17719
17720         Fix bug #59781
17721         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
17722         ulong.
17723
17724 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
17725
17726         Fix bug #58254 & cs1555.cs, cs1556.cs
17727         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
17728
17729 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
17730
17731         * cs-parser.jay: Added error CS1669 test for indexers.
17732
17733 2004-06-11  Martin Baulig  <martin@ximian.com>
17734
17735         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
17736         call this twice: for params and varargs methods.
17737
17738 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
17739
17740         * class.cs:
17741         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
17742
17743 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
17744
17745         * attribute.cs (Attribute.GetValidTargets): Made public.
17746
17747         * class.cs: 
17748         (AbstractPropertyEventMethod): New class for better code sharing.
17749         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
17750         CS1667 report.
17751         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
17752
17753 2004-06-11  Raja R Harinath  <rharinath@novell.com>
17754
17755         Fix bug #59477.
17756         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
17757         that the call to Resolve is part of a MemberAccess.
17758         (Expression.Resolve): Use it for SimpleName resolution.
17759         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
17760         Add 'intermediate' boolean argument.
17761         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
17762         error message when the SimpleName can be resolved ambiguously
17763         between an expression and a type.
17764         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
17765         public.
17766         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
17767         call on the left-side.
17768
17769 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
17770
17771         * class.cs:
17772         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
17773
17774 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
17775
17776         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
17777
17778 2004-06-11  Martin Baulig  <martin@ximian.com>
17779
17780         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
17781         varargs methods if applicable.
17782
17783 2004-06-11  Martin Baulig  <martin@ximian.com>
17784
17785         * expression.cs (Invocation.EmitCall): Don't use
17786         `method.CallingConvention == CallingConventions.VarArgs' since the
17787         method could also have `CallingConventions.HasThis'.
17788
17789 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
17790
17791         * class.cs (Event.GetSignatureForError): Implemented.
17792         Fixed crash in error test cs3010.cs
17793
17794 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
17795
17796         * cs-tokenizer.cs: Change the way we track __arglist to be
17797         consistent with the other keywords.
17798
17799 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
17800
17801         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
17802         tomorrow.
17803
17804 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
17805
17806         * codegen.cs: Check that all referenced assemblies have a strongname
17807         before strongnaming the compiled assembly. If not report error CS1577.
17808         Fix bug #56563. Patch by Jackson Harper.
17809         * typemanager.cs: Added a method to return all referenced assemblies.
17810         Fix bug #56563. Patch by Jackson Harper.
17811
17812 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
17813
17814         * class.cs:
17815         (Method.ApplyAttributeBuilder): Moved and added conditional
17816         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
17817
17818         * delegate.cs:
17819         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
17820
17821 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
17822
17823         Fixed #59640
17824         * class.cs: (EventField.attribute_targets): Changed default target.
17825
17826 2004-06-08  Martin Baulig  <martin@ximian.com>
17827
17828         * expression.cs (Invocation.EmitCall): Enable varargs methods.
17829
17830 2004-06-08  Martin Baulig  <martin@ximian.com>
17831
17832         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
17833
17834 2004-06-07  Martin Baulig  <martin@ximian.com>
17835
17836         Added support for varargs methods.
17837
17838         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
17839         keyword.
17840
17841         * cs-parser.jay: Added support for `__arglist'.
17842
17843         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
17844
17845         * expression.cs (Argument.AType): Added `ArgList'.
17846         (Invocation): Added support for varargs methods.
17847         (ArglistAccess): New public class.
17848         (Arglist): New public class.
17849
17850         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
17851
17852         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
17853         a method's top-level block if the method has varargs.
17854
17855         * support.cs (ReflectionParameters, InternalParameters): Added
17856         support for varargs methods.    
17857
17858 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
17859
17860         * class.cs: Provide location in indexer error report.
17861
17862         * driver.cs: Use standard names.
17863
17864         * namespace.cs: Catch the use of using after a namespace has been
17865         declared also on using aliases.
17866
17867 2004-06-03  Raja R Harinath  <rharinath@novell.com>
17868
17869         Bug #50820.
17870         * typemanager.cs (closure_private_ok, closure_invocation_type)
17871         (closure_qualifier_type, closure_invocation_assembly)
17872         (FilterWithClosure): Move to ...
17873         (Closure): New internal nested class.
17874         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
17875         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
17876         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
17877         (MemberLookup, MemberLookupFailed): Use it.
17878         * expression.cs (New.DoResolve): Treat the lookup for the
17879         constructor as being qualified by the 'new'ed type.
17880         (Indexers.GetIndexersForTypeOrInterface): Update.
17881
17882 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
17883
17884         * attribute.cs
17885         (GetConditionalAttributeValue): New method. Returns
17886         condition of ConditionalAttribute.
17887         (SearchMulti): New method.  Returns all attributes of type 't'.
17888         Use it when attribute is AllowMultiple = true.
17889         (IsConditionalMethodExcluded): New method.
17890
17891         * class.cs
17892         (Method.IsExcluded): Implemented. Returns true if method has conditional
17893         attribute and the conditions is not defined (method is excluded).
17894         (IMethodData): Extended interface for ConditionalAttribute support.
17895         (PropertyMethod.IsExcluded): Implemented.
17896
17897         * decl.cs
17898         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
17899
17900         * expression.cs
17901         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
17902         on the method.
17903
17904 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
17905
17906         * expression.cs (ArrayCreationExpression): Make this just an
17907         `expression'. It can't be a statement, so the code here was
17908         dead.
17909
17910 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
17911
17912         Fixed #59072
17913         * typemanager.cs (GetFullNameSignature): New method for
17914         MethodBase types.
17915
17916 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
17917
17918         Fixed #56452
17919         * class.cs (MemberBase.GetSignatureForError): New virtual method.
17920         Use this method when MethodBuilder is null.
17921         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
17922         Added test for error CS0626 (MONO reports error for this situation).
17923         (IMethodData.GetSignatureForError): Extended interface.
17924
17925 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
17926
17927         * attribute.cs
17928         (AttributeTester.GetObsoleteAttribute): Returns instance of
17929         ObsoleteAttribute when type is obsolete.
17930
17931         * class.cs
17932         (TypeContainer.VerifyObsoleteAttribute): Override.
17933         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
17934         (MethodCode.VerifyObsoleteAttribute): Override.
17935         (MemberBase.VerifyObsoleteAttribute): Override.
17936
17937         * decl.cs
17938         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
17939         and report proper error.
17940
17941         *delegate.cs
17942         Delegate.VerifyObsoleteAttribute): Override.
17943
17944         * ecore.cs
17945         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
17946         and report proper error.
17947         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
17948
17949         * enum.cs
17950         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
17951         and enum member.
17952
17953         * expression.cs
17954         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
17955         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
17956         Added test for ObsoleteAttribute.
17957
17958         * statement.cs
17959         (Catch): Derived from Statement.
17960
17961 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
17962  
17963         Fixed bug #59071 & cs0160.cs
17964  
17965         * statement.cs (Try.Resolve): Check here whether order of catch
17966         clauses matches their dependencies.
17967
17968 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
17969
17970         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
17971         caused a regression: #59343.  Referencing nested classes from an
17972         assembly stopped working.
17973
17974 2004-05-31  Martin Baulig  <martin@ximian.com>
17975
17976         MCS is now frozen for beta 2.
17977
17978 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
17979
17980         * convert.cs: add a trivial cache for overload operator resolution.
17981
17982 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
17983
17984         * decl.cs: If possible, use lookuptypedirect here. We can only do
17985         this if there is no `.' after the namespace. Avoids using
17986         LookupType, which does lots of slow processing.
17987         (FindNestedType) New method, does what it says :-).
17988         * namespace.cs: use LookupTypeDirect.
17989         * rootcontext.cs: use membercache, if possible.
17990         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
17991
17992 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
17993
17994         * expression.cs:
17995         According to the spec, 
17996
17997         In a member access of the form E.I, if E is a single identifier,
17998         and if the meaning of E as a simple-name (§7.5.2) is a constant,
17999         field, property, localvariable, or parameter with the same type as
18000         the meaning of E as a type-name (§3.8), then both possible
18001         meanings of E are permitted.
18002
18003         We did not check that E as a simple-name had the same type as E as
18004         a type name.
18005
18006         This trivial check gives us 5-7% on bootstrap time.
18007
18008 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18009
18010         * expression.cs (Invocation.OverloadResolve): Avoid the
18011         use of hashtables and boxing here by allocating on demand.
18012
18013 2004-05-30  Martin Baulig  <martin@ximian.com>
18014
18015         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18016         we're doing a silent lookup.  Don't try to lookup nested types in
18017         TypeManager.object_type (thanks to Ben Maurer).
18018
18019 2004-05-30  Martin Baulig  <martin@ximian.com>
18020
18021         Committing a patch from Ben Maurer.
18022
18023         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18024
18025 2004-05-29  Martin Baulig  <martin@ximian.com>
18026
18027         * class.cs (IMethodData.ShouldIgnore): New method.
18028
18029         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18030         `Location' argument, we don't need it anywhere.  Use
18031         `IMethodData.ShouldIgnore ()' instead of
18032         `MethodData.GetMethodFlags ()'.
18033         (TypeManager.AddMethod): Removed.
18034         (TypeManager.AddMethod2): Renamed to AddMethod.
18035
18036 2004-05-29  Martin Baulig  <martin@ximian.com>
18037
18038         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18039
18040         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18041         converting from a class type S to an interface type and we already
18042         have an object on the stack, don't box it again.  Fixes #52578.
18043
18044 2004-05-29  Martin Baulig  <martin@ximian.com>
18045
18046         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18047         Added support for `params' parameters.  Fixes #59267.
18048
18049 2004-05-29  Martin Baulig  <martin@ximian.com>
18050
18051         * literal.cs (NullPointer): Provide a private .ctor which sets
18052         `type' to TypeManager.object_type.  Fixes #59048.
18053
18054 2004-05-29  Martin Baulig  <martin@ximian.com>
18055
18056         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18057         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18058
18059         * ecore.cs (EventExpr.instance_expr): Make the field private.
18060
18061 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18062
18063         Fixed bug #50080 & cs0214-2.cs
18064         * expression.cs (Cast.DoResolve): Check unsafe context here.
18065         
18066         * statement.cs (Resolve.DoResolve): Likewise.
18067
18068 2004-05-26  Martin Baulig  <martin@ximian.com>
18069
18070         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18071
18072         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18073         (RootContext.LookupType): Pass down the `silent' flag.
18074
18075 2004-05-25  Martin Baulig  <martin@ximian.com>
18076
18077         * expression.cs
18078         (MethodGroupExpr.IdenticalTypeName): New public property.
18079         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18080         expression actually refers to a type.
18081
18082 2004-05-25  Martin Baulig  <martin@ximian.com>
18083
18084         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18085         for #56176 and made it actually work.
18086
18087 2004-05-25  Martin Baulig  <martin@ximian.com>
18088
18089         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18090         (FieldExpr, PropertyExpr): Override and implement
18091         CacheTemporaries.  Fixes #52279.
18092
18093 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18094
18095         * location.cs: In the new compiler listing a file twice is a
18096         warning, not an error.
18097
18098 2004-05-24  Martin Baulig  <martin@ximian.com>
18099
18100         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18101         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18102
18103 2004-05-24  Martin Baulig  <martin@ximian.com>
18104
18105         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18106         walking the `using' list.  Fixes #53921.
18107
18108 2004-05-24  Martin Baulig  <martin@ximian.com>
18109
18110         * const.cs (Const.LookupConstantValue): Added support for
18111         EmptyCast's; fixes #55251.
18112
18113 2004-05-24  Martin Baulig  <martin@ximian.com>
18114
18115         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18116         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18117         which does the CS0135 check.  The reason is that we first need to
18118         check whether the variable actually exists.
18119
18120 2004-05-24  Martin Baulig  <martin@ximian.com>
18121
18122         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18123         than RootContext.LookupType() to find the explicit interface
18124         type.  Fixes #58584.
18125
18126 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18127
18128         * Makefile: Simplify.  Use executable.make.
18129         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18130
18131 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18132
18133         * decl.cs:
18134         * enum.cs:
18135         Use the invariant culture when doing String.Compare for CLS case
18136         sensitivity.
18137         
18138 2004-05-23  Martin Baulig  <martin@ximian.com>
18139
18140         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18141         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18142
18143         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18144         
18145 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18146
18147         * class.cs (MemberBase.Define): Reuse MemberType member for 
18148         resolved type. Other methods can use it too.
18149
18150 2004-05-23  Martin Baulig  <martin@ximian.com>
18151
18152         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18153         the variable also exists in the current block (otherwise, we need
18154         to report a CS0103).  Fixes #58670.
18155
18156 2004-05-23  Martin Baulig  <martin@ximian.com>
18157
18158         * flowanalysis.cs (Reachability.Reachable): Compute this
18159         on-the-fly rather than storing it as a field.
18160
18161 2004-05-23  Martin Baulig  <martin@ximian.com>
18162
18163         * flowanalysis.cs (Reachability.And): Manually compute the
18164         resulting `barrier' from the reachability.      
18165        
18166 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18167
18168         Fix bug #57835
18169         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
18170         instance of ObsoleteAttribute when symbol is obsolete.
18171
18172         * class.cs
18173         (IMethodData): Extended interface for ObsoleteAttribute support.
18174
18175 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18176
18177         * attribute.cs: Fix bug #55970
18178
18179 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18180
18181         Fix bug #52705
18182         * attribute.cs
18183         (GetObsoleteAttribute): New method. Creates the instance of
18184         ObsoleteAttribute.
18185         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
18186         ObsoleteAttribute when member is obsolete.
18187         (AttributeTester.Report_ObsoleteMessage): Common method for
18188         Obsolete error/warning reporting.
18189
18190         * class.cs
18191         (TypeContainer.base_classs_type): New member for storing parent type.
18192
18193         * decl.cs
18194         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
18195         for this MemberCore.
18196
18197 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18198
18199         * attribute.cs, const.cs: Fix bug #58590
18200
18201 2004-05-21  Martin Baulig  <martin@ximian.com>
18202
18203         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
18204         out parameters if the end of the method is unreachable.  Fixes
18205         #58098. 
18206
18207 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18208
18209         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
18210         Hari was right, why extra method.
18211
18212 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18213
18214         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
18215
18216 2004-05-20  Martin Baulig  <martin@ximian.com>
18217
18218         Merged this back from gmcs to keep the differences to a minumum.
18219
18220         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
18221         instead of a Declspace.
18222         (Attribute.ResolveType): Likewise.
18223         (Attributes.Search): Likewise.
18224         (Attributes.Contains): Likewise.
18225         (Attributes.GetClsCompliantAttribute): Likewise.
18226
18227         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
18228         argument.
18229         (MethodData.ApplyAttributes): Take an EmitContext instead of a
18230         DeclSpace.
18231
18232 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
18233
18234         Fix bug #58688 (MCS does not report error when the same attribute
18235         is assigned twice)
18236
18237         * attribute.cs (Attribute.Emit): Distinction between null and default.
18238
18239 2004-05-19  Raja R Harinath  <rharinath@novell.com>
18240
18241         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
18242         of a top-level attribute without an attribute target.
18243         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
18244         Make non-static.
18245         (Attribute.Conditional_GetConditionName), 
18246         (Attribute.Obsolete_GetObsoleteMessage): Update.
18247         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
18248         part of ScanForIndexerName.
18249         (Attribute.CanIgnoreInvalidAttribute): New function.
18250         (Attribute.ScanForIndexerName): Move to ...
18251         (Attributes.ScanForIndexerName): ... here.
18252         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
18253         (Attributes.Search): New internal variant that can choose not to
18254         complain if types aren't resolved.  The original signature now
18255         complains.
18256         (Attributes.GetClsCompliantAttribute): Use internal variant, with
18257         complaints suppressed.
18258         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
18259         only if it not useful.
18260         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
18261         top-level for attributes that are shared between the assembly
18262         and a top-level class.
18263         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
18264         * class.cs: Update to reflect changes.
18265         (DefineIndexers): Fuse loops.
18266         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
18267         a couple more variants of attribute names.
18268
18269 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
18270
18271         Fix bug #52585 (Implemented explicit attribute declaration)
18272
18273         * attribute.cs:
18274         (Attributable.ValidAttributeTargets): New abstract method. It gets
18275         list of valid attribute targets for explicit target declaration.
18276         (Attribute.Target): It holds target itself.
18277         (AttributeSection): Removed.
18278         (Attribute.CheckTargets): New method. It checks whether attribute
18279         target is valid for the current element.
18280
18281         * class.cs:
18282         (EventProperty): New class. For events that are declared like
18283         property (with add and remove accessors).
18284         (EventField): New class. For events that are declared like field.
18285         class.cs
18286
18287         * cs-parser.jay: Implemented explicit attribute target declaration.
18288
18289         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
18290         Override ValidAttributeTargets.
18291
18292         * parameter.cs:
18293         (ReturnParameter): Class for applying custom attributes on 
18294         the return type.
18295         (ParameterAtribute): New class. Class for applying custom
18296         attributes on the parameter type.
18297
18298 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
18299
18300         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
18301         definitions. 
18302
18303         (Method): Allow UNSAFE here.
18304
18305         * modifiers.cs: Support unsafe reporting.
18306
18307 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
18308
18309         * decl.cs: Fix bug #58478.
18310
18311 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18312
18313         * statement.cs: When checking for unreachable code on an EmptyStatement,
18314         set the location. Fixes bug #58488.
18315
18316 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
18317
18318         * driver.cs: Add -pkg handling.
18319
18320         From Gonzalo: UseShelLExecute=false
18321
18322 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
18323
18324         * attribute.cs:
18325         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
18326         for attribute.
18327         (Attribute.IsClsCompliaceRequired): Moved to base for better
18328         accesibility.
18329         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
18330         when attribute is AttributeUsageAttribute.
18331         (Attribute.GetValidTargets): Simplified.
18332         (Attribute.GetAttributeUsage): New method returns AttributeUsage
18333         attribute for this type.
18334         (Attribute.ApplyAttributes): Method renamed to Emit and make
18335         non-static.
18336         (GlobalAttributeSection): New class for special handling of global
18337         attributes (assembly, module).
18338         (AttributeSection.Emit): New method.
18339
18340         * class.cs: Implemented Attributable abstract methods.
18341         (MethodCore.LabelParameters): Moved to Parameter class.
18342         (Accessor): Is back simple class.
18343         (PropertyMethod): Implemented Attributable abstract class.
18344         (DelegateMethod): Implemented Attributable abstract class.
18345         (Event): New constructor for disctintion between normal Event
18346         and Event with accessors.
18347
18348         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
18349
18350         * codegen.cs, const.cs, decl.cs, delegate.cs:
18351         (CommonAssemblyModulClass): Implemented Attributable abstract class
18352         and simplified.
18353
18354         * enum.cs: Implement IAttributeSupport interface.
18355         (EnumMember): New class for emum members. Implemented Attributable
18356         abstract class
18357
18358         * parameter.cs:
18359         (ParameterBase): Is abstract.
18360         (ReturnParameter): New class for easier [return:] attribute handling.
18361
18362         * typemanager.cs: Removed builder_to_attr.
18363
18364 2004-05-11  Raja R Harinath  <rharinath@novell.com>
18365
18366         Fix bug #57151.
18367         * attribute.cs (Attribute.GetPositionalValue): New function.
18368         * class.cs (TypeContainer.VerifyMembers): New function.
18369         (TypeContainer.Emit): Use it.
18370         (ClassOrStruct): New base class for Class and Struct.
18371         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
18372         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
18373         class.
18374         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
18375         then each non-static field should have a FieldOffset attribute.
18376         Otherwise, none of the fields should have a FieldOffset attribute.
18377         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
18378         and FieldOffset attributes.
18379         * typemanager.cs (TypeManager.struct_layout_attribute_type)
18380         (TypeManager.field_offset_attribute_type): New core types.
18381         (TypeManager.InitCoreTypes): Initialize them.
18382
18383 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
18384
18385         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
18386         Return correct type.
18387         From bug #58270.
18388
18389 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
18390
18391         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
18392         be implicitly converted to ulong.
18393         
18394         * expression.cs: The logic for allowing operator &, | and ^ worked
18395         was wrong, it worked before because we did not report an error in
18396         an else branch.  Fixes 57895.
18397
18398         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
18399         allow volatile fields to be reference types.
18400
18401 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
18402
18403         * driver.cs: Add support for /debug-
18404
18405 2004-05-07  Raja R Harinath  <rharinath@novell.com>
18406
18407         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
18408         Add a 'complain' parameter to silence errors.
18409         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
18410         silently overlooked type-resolutions.
18411         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
18412         to reflect changes.
18413         (Attributes.Search): New function.
18414         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
18415         (Attributes.GetAttributeFullName): Remove hack.
18416         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
18417         Update to reflect changes.
18418         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
18419         Use Attributes.Search instead of nested loops.
18420
18421 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
18422
18423         * decl.cs:
18424         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
18425         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
18426         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
18427
18428         * report.cs: (Report.Warning): Renamed to Warning_T because of
18429         parameter collision.
18430
18431 2004-05-05  Raja R Harinath  <rharinath@novell.com>
18432
18433         * expression.cs (MemberAccess.ResolveMemberAccess):
18434         Exit with non-zero status after Report.Error.
18435         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
18436         Likewise.
18437         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
18438
18439 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18440
18441         * support.cs: Don't hang when the file is empty.
18442
18443 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18444
18445         * support.cs: In SeekableStreamReader, compute the preamble size of the
18446           underlying stream. Position changes should take into account that initial
18447           count of bytes.
18448
18449 2004-05-03  Todd Berman  <tberman@sevenl.net>
18450
18451         * driver.cs: remove unused GetSysVersion function.
18452
18453 2004-05-03  Todd Berman  <tberman@sevenl.net>
18454
18455         * driver.cs: Remove the hack from saturday, as well as the hack
18456         from jackson (LoadAssemblyFromGac), also adds the CWD to the
18457         link_paths to get that bit proper.
18458
18459 2004-05-01  Todd Berman  <tberman@sevenl.net>
18460
18461         * driver.cs: Try a LoadFrom before a Load, this checks the current
18462         path. This is currently a bug in mono that is be fixed, however, this
18463         provides a workaround for now. This will be removed when the bug
18464         is fixed.
18465
18466 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
18467
18468         * CryptoConvert.cs: Updated to latest version. Fix issue with 
18469         incomplete key pairs (#57941).
18470
18471 2004-05-01  Todd Berman  <tberman@sevenl.net>
18472
18473         * driver.cs: Remove '.' from path_chars, now System.* loads properly
18474         from the GAC
18475
18476 2004-04-30  Jackson Harper  <jackson@ximian.com>
18477
18478         * codegen.cs: Open keys readonly.
18479         
18480 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18481
18482         * typemanager.cs: don't report cyclic struct layout when a struct
18483         contains 2 or more fields of the same type. Failed for Pango.AttrShape
18484         which has 2 Pango.Rectangle fields.
18485
18486 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
18487
18488         * expression.cs: Handle IntPtr comparisons with IL code
18489         rather than a method call.
18490
18491 2004-04-29  Martin Baulig  <martin@ximian.com>
18492
18493         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
18494         the list of PropertyInfo's in class hierarchy and find the
18495         accessor.  Fixes #56013.
18496
18497 2004-04-29  Martin Baulig  <martin@ximian.com>
18498
18499         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
18500
18501 2004-04-29  Martin Baulig  <martin@ximian.com>
18502
18503         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
18504
18505         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
18506
18507 2004-04-29  Martin Baulig  <martin@ximian.com>
18508
18509         * class.cs (ConstructorInitializer.Resolve): Check whether the
18510         parent .ctor is accessible.  Fixes #52146.
18511
18512 2004-04-29  Martin Baulig  <martin@ximian.com>
18513
18514         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
18515
18516         * statement.cs (Using.EmitLocalVariableDecls): Use
18517         TypeManager.idisposable_type, not typeof (IDisposable).
18518         (Foreach.EmitCollectionForeach): Added support for valuetypes.
18519
18520 2004-04-29  Martin Baulig  <martin@ximian.com>
18521
18522         * class.cs (Event.Define): Don't emit the field and don't set
18523         RTSpecialName and SpecialName for events on interfaces.  Fixes
18524         #57703. 
18525
18526 2004-04-29  Raja R Harinath  <rharinath@novell.com>
18527
18528         Refactor Attribute.ApplyAttributes.
18529         * attribute.cs (Attributable): New base class for objects that can
18530         have Attributes applied on them.
18531         (Attribute): Make AttributeUsage fields public.
18532         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
18533         (Attribute.IsInternalCall): New property.
18534         (Attribute.UsageAttr): Convert to a public read-only property.
18535         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
18536         (Attribute.ResolveType, Attribute.Resolve)
18537         (Attribute.ScanForIndexerName): Update to reflect changes.
18538         (Attribute.CheckAttributeTarget): Re-format.
18539         (Attribute.ApplyAttributes): Refactor, to various
18540         Attributable.ApplyAttributeBuilder methods.
18541         * decl.cs (MemberCore): Make Attributable.
18542         * class.cs (Accessor): Make Attributable.
18543         (MethodData.ApplyAttributes): Use proper attribute types, not
18544         attribute names.
18545         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
18546         (TypeContainer.ApplyAttributeBuilder)
18547         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
18548         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
18549         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
18550         (Operator.ApplyAttributeBuilder): New factored-out methods.
18551         * const.cs (Const.ApplyAttributeBuilder): Likewise.
18552         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
18553         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
18554         * parameter.cs (ParameterBase): New Attributable base class
18555         that can also represent Return types.
18556         (Parameter): Update to the changes.
18557
18558 2004-04-29  Jackson Harper  <jackson@ximian.com>
18559
18560         * driver.cs: Prefer the corlib system version when looking for
18561         assemblies in the GAC. This is still a hack, but its a better hack
18562         now.
18563         
18564 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
18565
18566         * decl.cs, enum.cs: Improved error 3005 reporting.
18567   
18568         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
18569         (related_symbols): New private member for list of symbols
18570         related to reported error/warning.
18571         
18572         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
18573
18574 2004-04-29  Martin Baulig  <martin@ximian.com>
18575
18576         * ecore.cs (Expression.Constantify): If we're an enum and
18577         TypeManager.TypeToCoreType() doesn't give us another type, use
18578         t.UnderlyingSystemType.  Fixes #56178.  
18579
18580 2004-04-29  Martin Baulig  <martin@ximian.com>
18581
18582         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
18583         interfaces and for each interface, only add members directly
18584         declared in that interface.  Fixes #53255.
18585
18586 2004-04-28  Martin Baulig  <martin@ximian.com>
18587
18588         * expression.cs (ConditionalLogicalOperator): Use a temporary
18589         variable for `left' to avoid that we evaluate it more than once;
18590         bug #52588.
18591
18592 2004-04-28  Martin Baulig  <martin@ximian.com>
18593
18594         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
18595         `void[]' (CS1547).
18596
18597 2004-04-28  Martin Baulig  <martin@ximian.com>
18598
18599         * statement.cs (LocalInfo.Resolve): Check whether the type is not
18600         void (CS1547).
18601
18602         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
18603         whether the type is not void (CS1547).
18604
18605 2004-04-28  Martin Baulig  <martin@ximian.com>
18606
18607         * expression.cs (Unary.DoResolveLValue): Override this and report
18608         CS0131 for anything but Operator.Indirection.
18609
18610 2004-04-28  Martin Baulig  <martin@ximian.com>
18611
18612         Committing a patch from Ben Maurer; see bug #50820.
18613
18614         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
18615         check for classes.
18616
18617         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
18618         classes.        
18619
18620 2004-04-28  Martin Baulig  <martin@ximian.com>
18621
18622         Committing a patch from Ben Maurer; see bug #50820.
18623
18624         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
18625         check for classes.
18626
18627         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
18628         classes.        
18629
18630 2004-04-28  Martin Baulig  <martin@ximian.com>
18631
18632         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
18633         (Block.AddLabel): Call DoLookupLabel() to only search in the
18634         current block.
18635
18636 2004-04-28  Martin Baulig  <martin@ximian.com>
18637
18638         * cfold.cs (ConstantFold.BinaryFold): Added special support for
18639         comparing StringConstants and NullLiterals in Equality and Inequality.
18640
18641 2004-04-28  Jackson Harper  <jackson@ximian.com>
18642
18643         * driver.cs: Attempt to load referenced assemblies from the
18644         GAC. This is the quick and dirty version of this method that
18645         doesnt take into account versions and just takes the first
18646         canidate found. Will be good enough for now as we will not have more
18647         then one version installed into the GAC until I update this method.
18648
18649 2004-04-28  Martin Baulig  <martin@ximian.com>
18650
18651         * typemanager.cs (TypeManager.CheckStructCycles): New public
18652         static method to check for cycles in the struct layout.
18653
18654         * rootcontext.cs (RootContext.PopulateTypes): Call
18655         TypeManager.CheckStructCycles() for each TypeContainer.
18656         [Note: We only need to visit each type once.]
18657
18658 2004-04-28  Martin Baulig  <martin@ximian.com>
18659
18660         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
18661
18662         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
18663         success and added `out object value'.  Use a `bool resolved' field
18664         to check whether we've already been called rather than
18665         `ConstantValue != null' since this breaks for NullLiterals.
18666
18667 2004-04-28  Raja R Harinath  <rharinath@novell.com>
18668
18669         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
18670         setting of this flag, since the 'set' method may be non-public.
18671
18672 2004-04-28  Raja R Harinath  <rharinath@novell.com>
18673
18674         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
18675         check on current_vector.Block.
18676
18677 2004-04-27  Martin Baulig  <martin@ximian.com>
18678
18679         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
18680         a field initializer.  Fixes #56459.
18681
18682 2004-04-27  Martin Baulig  <martin@ximian.com>
18683
18684         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
18685         we're not attempting to use an indexer.  Fixes #52154.
18686
18687 2004-04-27  Martin Baulig  <martin@ximian.com>
18688
18689         * statement.cs (Return): Don't create a return label if we don't
18690         need it; reverts my change from January 20th.  Thanks to Ben
18691         Maurer for this.
18692
18693 2004-04-27  Martin Baulig  <martin@ximian.com>
18694
18695         According to the spec, `goto' can only leave a nested scope, but
18696         never enter it.
18697
18698         * statement.cs (Block.LookupLabel): Only lookup in the current
18699         block, don't recurse into parent or child blocks.
18700         (Block.AddLabel): Check in parent and child blocks, report
18701         CS0140/CS0158 if we find a duplicate.
18702         (Block): Removed this indexer for label lookups.
18703         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
18704         this already does the error reporting for us.
18705
18706         * flowanalysis.cs
18707         (FlowBranching.UsageVector.Block): New public variable; may be null.
18708         (FlowBranching.CreateSibling): Added `Block' argument.
18709         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
18710         label for the target of a `goto' and check whether we're not
18711         leaving a `finally'.
18712
18713 2004-04-27  Martin Baulig  <martin@ximian.com>
18714
18715         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
18716         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
18717         just for returns).
18718
18719 2004-04-27  Martin Baulig  <martin@ximian.com>
18720
18721         * statement.cs (Block.AddLabel): Also check for implicit blocks
18722         and added a CS0158 check.
18723
18724 2004-04-27  Martin Baulig  <martin@ximian.com>
18725
18726         * flowanalysis.cs (FlowBranchingLoop): New class.
18727         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
18728         UsageVector's instead of an ArrayList.
18729         (FlowBranching.Label): Likewise.
18730         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
18731         (FlowBranching.AddBreakVector): New method.
18732
18733 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
18734
18735         * attribute.cs: Small regression fix: only convert the type if we
18736         the type is different, fixes System.Drawing build.
18737
18738 2004-04-27  Martin Baulig  <martin@ximian.com>
18739
18740         * attribute.cs (Attribute.Resolve): If we have a constant value
18741         for a named field or property, implicity convert it to the correct
18742         type.
18743
18744 2004-04-27  Raja R Harinath  <rharinath@novell.com>
18745
18746         * statement.cs (Block.Block): Implicit blocks share
18747         'child_variable_names' fields with parent blocks.
18748         (Block.AddChildVariableNames): Remove.
18749         (Block.AddVariable): Mark variable as "used by a child block" in
18750         every surrounding block.
18751         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
18752         been used in a child block, complain about violation of "Invariant
18753         meaning in blocks" rule.
18754         * cs-parser.jay (declare_local_variables): Don't use
18755         AddChildVariableNames.
18756         (foreach_statement): Don't create an implicit block: 'foreach'
18757         introduces a scope.
18758
18759 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
18760
18761         * convert.cs (ImplicitNumericConversion): 0 is also positive when
18762         converting from 0L to ulong.  Fixes 57522.
18763
18764 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
18765
18766         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
18767         derived class hides via 'new' keyword field from base class (test-242.cs).
18768         TODO: Handle this in the more general way.
18769         
18770         * class.cs (CheckBase): Ditto.
18771
18772 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
18773
18774         * decl.cs (caching_flags): New member for storing cached values
18775         as bit flags.
18776         (MemberCore.Flags): New enum where bit flags for caching_flags
18777         are defined.
18778         (MemberCore.cls_compliance): Moved to caching_flags.
18779         (DeclSpace.Created): Moved to caching_flags.
18780
18781         * class.cs: Use caching_flags instead of DeclSpace.Created
18782         
18783 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
18784
18785         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
18786         if we are only a derived class, not a nested class.
18787
18788         * typemanager.cs: Same as above, but do this at the MemberLookup
18789         level (used by field and methods, properties are handled in
18790         PropertyExpr).   Allow for the qualified access if we are a nested
18791         method. 
18792
18793 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
18794
18795         * class.cs: Refactoring.
18796         (IMethodData): New inteface; Holds links to parent members
18797         to avoid member duplication (reduced memory allocation).
18798         (Method): Implemented IMethodData interface.
18799         (PropertyBase): New inner classes for get/set methods.
18800         (PropertyBase.PropertyMethod): Implemented IMethodData interface
18801         (Event): New inner classes for add/remove methods.
18802         (Event.DelegateMethod): Implemented IMethodData interface.
18803
18804         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
18805         EmitContext (related to class.cs refactoring).
18806
18807 2004-04-21  Raja R Harinath  <rharinath@novell.com>
18808
18809         * delegate.cs (Delegate.VerifyApplicability): If the number of
18810         arguments are the same as the number of parameters, first try to
18811         verify applicability ignoring  any 'params' modifier on the last
18812         parameter.
18813         Fixes #56442.
18814
18815 2004-04-16  Raja R Harinath  <rharinath@novell.com>
18816
18817         * class.cs (TypeContainer.AddIndexer): Use
18818         'ExplicitInterfaceName' to determine if interface name was
18819         explicitly specified.  'InterfaceType' is not initialized at this time.
18820         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
18821         Indexers array is already in the required order.  Initialize
18822         'IndexerName' only if there are normal indexers.
18823         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
18824         (TypeContainer.Emit): Emit DefaultMember attribute only if
18825         IndexerName is initialized.
18826         Fixes #56300.
18827
18828 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
18829
18830         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
18831         Fixes #57007
18832
18833 2004-04-15  Raja R Harinath  <rharinath@novell.com>
18834
18835         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
18836         attributes.
18837         Fix for #56456.
18838
18839         * attribute.cs (Attribute.Resolve): Check for duplicate named
18840         attributes.
18841         Fix for #56463.
18842
18843 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
18844
18845         * iterators.cs (MarkYield): track whether we are in an exception,
18846         and generate code accordingly.  Use a temporary value to store the
18847         result for our state.
18848
18849         I had ignored a bit the interaction of try/catch with iterators
18850         since their behavior was not entirely obvious, but now it is
18851         possible to verify that our behavior is the same as MS .NET 2.0
18852
18853         Fixes 54814
18854
18855 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
18856
18857         * iterators.cs: Avoid creating temporaries if there is no work to
18858         do. 
18859
18860         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
18861         Enumerations, use TypeManager.EnumToUnderlying and call
18862         recursively. 
18863
18864         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
18865         bug #57013
18866
18867         (This.Emit): Use EmitContext.EmitThis to emit our
18868         instance variable.
18869
18870         (This.EmitAssign): Ditto.
18871
18872         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
18873         codepaths, we will move all the functionality into
18874         Mono.CSharp.This 
18875
18876         (FieldExpr.EmitAssign): Ditto.
18877
18878         This fixes several hidden bugs that I uncovered while doing a code
18879         review of this today.
18880
18881         * codegen.cs (EmitThis): reworked so the semantics are more clear
18882         and also support value types "this" instances.
18883
18884         * iterators.cs: Changed so that for iterators in value types, we
18885         do not pass the value type as a parameter.  
18886
18887         Initialization of the enumerator helpers is now done in the caller
18888         instead of passing the parameters to the constructors and having
18889         the constructor set the fields.
18890
18891         The fields have now `assembly' visibility instead of private.
18892
18893 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
18894
18895         * expression.cs (Argument.Resolve): Check if fields passed as ref
18896         or out are contained in a MarshalByRefObject.
18897
18898         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
18899         another compiler type.
18900
18901 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
18902
18903         * class.cs (Indexer.Define): use the new name checking method.
18904         Also, return false on an error.
18905         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
18906         (is_identifier_[start/part]_character): make static.
18907
18908 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
18909
18910         * expression.cs (Binary.ResolveOperator): Do no append strings
18911         twice: since we can be invoked more than once (array evaluation)
18912         on the same concatenation, take care of this here.  Based on a fix
18913         from Ben (bug #56454)
18914
18915 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
18916
18917         * codegen.cs: Fix another case where CS1548 must be reported (when 
18918         delay-sign isn't specified and no private is available #56564). Fix
18919         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
18920         error when MCS is used on the MS runtime and we need to delay-sign 
18921         (which seems unsupported by AssemblyBuilder - see #56621).
18922
18923 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
18924
18925         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
18926         (TypeManager.ComputeNamespaces): Faster implementation for
18927         Microsoft runtime.
18928
18929         * compiler.csproj: Updated AssemblyName to mcs.
18930
18931 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
18932
18933         * rootcontext.cs: Add new types to the boot resolution.
18934
18935         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
18936         MulticastDelegate is not allowed.
18937
18938         * typemanager.cs: Add new types to lookup: System.TypedReference
18939         and ArgIterator.
18940
18941         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
18942         check for TypedReference or ArgIterator, they are not allowed. 
18943
18944         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
18945         makes us properly catch 1510 in some conditions (see bug 56016 for
18946         details). 
18947
18948 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
18949
18950         * CryptoConvert.cs: update from corlib version
18951         with endian fixes.
18952
18953 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
18954
18955         * class.cs (Indexer.Define): Check indexername declaration
18956
18957 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
18958
18959         * attribute.cs (IsClsCompliant): Fixed problem with handling
18960         all three states (compliant, not-compliant, undetected).
18961
18962 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
18963
18964         * attribute.cs (Attribute): Location is now public.
18965         (Resolve): Store resolved arguments (pos_values) in attribute class.
18966         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
18967         (GetClsCompliantAttributeValue): New method that gets
18968         CLSCompliantAttribute value.
18969         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
18970         if exists else null.
18971         (AttributeTester): New class for CLS-Compliant verification routines.
18972
18973         * class.cs (Emit): Add CLS-Compliant verification.
18974         (Method.GetSignatureForError): Implemented.
18975         (Constructor.GetSignatureForError): Implemented
18976         (Constructor.HasCompliantArgs): Returns if constructor has
18977         CLS-Compliant arguments.
18978         (Constructor.Emit): Override.
18979         (Construcor.IsIdentifierClsCompliant): New method; For constructors
18980         is needed to test only parameters.
18981         (FieldBase.GetSignatureForError): Implemented.
18982         (TypeContainer): New member for storing base interfaces.
18983         (TypeContainer.FindMembers): Search in base interfaces too.
18984
18985         * codegen.cs (GetClsComplianceAttribute): New method that gets
18986         assembly or module CLSCompliantAttribute value.
18987         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
18988         for assembly.
18989         (ModuleClass.Emit): Add error 3012 test.
18990
18991         * const.cs (Emit): Override and call base for CLS-Compliant tests.
18992
18993         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
18994         state for all decl types.
18995         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
18996         if CLS-Compliant tests are required.
18997         (IsClsCompliaceRequired): New method. Analyze whether code
18998         must be CLS-Compliant.
18999         (IsExposedFromAssembly): New method. Returns true when MemberCore
19000         is exposed from assembly.
19001         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19002         value or gets cached value.
19003         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19004         is explicitly marked with CLSCompliantAttribute.
19005         (IsIdentifierClsCompliant): New abstract method. This method is
19006         used to testing error 3005.
19007         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19008         for identifier and parameters CLS-Compliant testing.
19009         (VerifyClsCompliance): New method. The main virtual method for
19010         CLS-Compliant verifications.
19011         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19012         null. I don't know why is null (too many public members !).
19013         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19014         and get value of first CLSCompliantAttribute that found.
19015
19016         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19017         (VerifyClsCompliance): Override and add extra tests.
19018
19019         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19020         clscheck- disable CLS-Compliant verification event if assembly is has
19021         CLSCompliantAttribute(true).
19022
19023         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19024         ApllyAttribute is now called in emit section as in the other cases.
19025         Possible future Emit integration.
19026         (IsIdentifierClsCompliant): New override.
19027         (VerifyClsCompliance): New override.
19028         (GetEnumeratorName): Returns full enum name.
19029
19030         * parameter.cs (GetSignatureForError): Implemented.
19031
19032         * report.cs (WarningData): New struct for Warning message information.
19033         (LocationOfPreviousError): New method.
19034         (Warning): New method. Reports warning based on the warning table.
19035         (Error_T): New method. Reports error based on the error table.
19036
19037         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19038         verifications are done here.
19039
19040         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19041
19042         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19043         CLSCompliantAttribute.
19044         (all_imported_types): New member holds all imported types from other
19045         assemblies.
19046         (LoadAllImportedTypes): New method fills static table with exported types
19047         from all referenced assemblies.
19048         (Modules): New property returns all assembly modules.
19049
19050 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19051
19052         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19053         throwing a parser error.
19054
19055         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19056         which removes the hardcoded get_/set_ prefixes for properties, as
19057         IL allows for the properties to be named something else.  
19058
19059         Bug #56013
19060
19061         * expression.cs: Do not override operand before we know if it is
19062         non-null.  Fix 56207
19063
19064 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19065
19066         * typemanager.cs: support for pinned variables.
19067
19068 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19069
19070         * decl.cs, typemanager.cs: Avoid using an arraylist
19071         as a buffer if there is only one result set.
19072
19073 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19074
19075         * expression.cs: Make sure you cant call a static method
19076         with an instance expression, bug #56174.
19077
19078 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19079
19080         * class.cs (IsDuplicateImplementation): Improve error reporting to
19081         flag 663 (method only differs in parameter modifier).
19082
19083         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19084         in preprocessor directives.
19085
19086         * location.cs (LookupFile): Allow for the empty path.
19087
19088         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19089         better approach for some of that patch, but its failing with the
19090         CharSet enumeration.  For now try/catch will do.
19091
19092         * typemanager.cs: Do not crash if a struct does not have fields.
19093         Fixes 56150.
19094
19095 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19096
19097         * expression.cs: cs0213, cant fix a fixed expression.
19098         fixes 50231.
19099
19100 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19101
19102         * cs-parser.jay: detect invalid embeded statements gracefully.
19103         bug #51113.
19104
19105 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19106
19107         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19108         As a regex:
19109         s/
19110         the invocation type may not be a subclass of the tye of the item/
19111         The type of the item must be a subclass of the invocation item.
19112         /g
19113
19114         Fixes bug #50820.
19115
19116 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19117
19118         * attribute.cs: Added methods to get a string and a bool from an
19119         attribute. Required to information from AssemblyKeyFileAttribute,
19120         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19121         * codegen.cs: Modified AssemblyName creation to include support for
19122         strongnames. Catch additional exceptions to report them as CS1548.
19123         * compiler.csproj: Updated include CryptoConvert.cs.
19124         * compiler.csproj.user: Removed file - user specific configuration.
19125         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19126         Mono.Security assembly. The original class is maintained and tested in
19127         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19128         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19129         like CSC 8.0 (C# v2) supports.
19130         * Makefile: Added CryptoConvert.cs to mcs sources.
19131         * rootcontext.cs: Added new options for strongnames.
19132
19133 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19134
19135         * driver.cs: For --expect-error, report error code `2'
19136         if the program compiled with no errors, error code `1' if
19137         it compiled with an error other than the one expected.
19138
19139 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19140
19141         * compiler.csproj: Updated for Visual Studio .NET 2003.
19142         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19143         * compiler.sln: Updated for Visual Studio .NET 2003.
19144
19145 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19146
19147         * expression.cs: Fix bug #47234. We basically need to apply the
19148         rule that we prefer the conversion of null to a reference type
19149         when faced with a conversion to 'object' (csc behaviour).
19150
19151 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19152
19153         * statement.cs: Shorter form for foreach, eliminates
19154         a local variable. r=Martin.
19155
19156 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19157
19158         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
19159         checks if we can use brtrue/brfalse to test for 0.
19160         * expression.cs: use the above in the test for using brtrue/brfalse.
19161         cleanup code a bit.
19162
19163 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19164
19165         * expression.cs: Rewrite string concat stuff. Benefits:
19166
19167         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
19168         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
19169         rather than a concat chain.
19170
19171         * typemanager.cs: Add lookups for more concat overloads.
19172
19173 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19174
19175         * expression.cs: Emit shorter il code for array init.
19176
19177         newarr
19178         dup
19179         // set 1
19180
19181         // set 2
19182
19183         newarr
19184         stloc.x
19185
19186         ldloc.x
19187         // set 1
19188
19189         ldloc.x
19190         // set 2
19191
19192 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
19193
19194         * statement.cs: Before, two switch blocks would be merged if the
19195         total size of the blocks (end_item - begin_item + 1) was less than
19196         two times the combined sizes of the blocks.
19197
19198         Now, it will only merge if after the merge at least half of the
19199         slots are filled.
19200
19201         fixes 55885.
19202
19203 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
19204
19205         * class.cs : csc build fix for GetMethods(). See bug #52503.
19206
19207 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19208
19209         * expression.cs: Make sure fp comparisons work with NaN.
19210         This fixes bug #54303. Mig approved this patch a long
19211         time ago, but we were not able to test b/c the runtime
19212         had a related bug.
19213
19214 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
19215
19216         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
19217
19218 2004-03-19  Martin Baulig  <martin@ximian.com>
19219
19220         * class.cs (MemberCore.IsDuplicateImplementation): Report the
19221         error here and not in our caller.
19222
19223 2004-03-19  Martin Baulig  <martin@ximian.com>
19224
19225         * interface.cs: Completely killed this file.
19226         (Interface): We're now a TypeContainer and live in class.cs.
19227
19228         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
19229         argument; we're now also called for interfaces.
19230         (TypeContainer.DefineMembers): Allow this method being called
19231         multiple times.
19232         (TypeContainer.GetMethods): New public method; formerly known as
19233         Interface.GetMethod().  This is used by PendingImplementation.
19234         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
19235         it's now private and non-static.
19236         (Interface): Moved this here; it's now implemented similar to
19237         Class and Struct.
19238         (Method, Property, Event, Indexer): Added `bool is_interface'
19239         argument to their .ctor's.
19240         (MemberBase.IsInterface): New public field.
19241
19242         * cs-parser.jay: Create normal Method, Property, Event, Indexer
19243         instances instead of InterfaceMethod, InterfaceProperty, etc.
19244         (opt_interface_base): Removed; we now use `opt_class_base' instead.
19245         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
19246
19247 2004-03-19  Martin Baulig  <martin@ximian.com>
19248
19249         * class.cs (MethodCore.IsDuplicateImplementation): New private
19250         method which does the CS0111 checking.
19251         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
19252         Use IsDuplicateImplementation().
19253
19254 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19255
19256         * decl.cs (FindMemberToOverride): New method to find the correct
19257         method or property to override in the base class.
19258         * class.cs
19259             - Make Method/Property use the above method to find the
19260               version in the base class.
19261             - Remove the InheritableMemberSignatureCompare as it is now
19262               dead code.
19263
19264         This patch makes large code bases much faster to compile, as it is
19265         O(n) rather than O(n^2) to do this validation.
19266
19267         Also, it fixes bug 52458 which is that nested classes are not
19268         taken into account when finding the base class member.
19269
19270         Reviewed/Approved by Martin.
19271
19272 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
19273
19274         * interface.cs: In all interface classes removed redundant
19275         member initialization.
19276
19277 2004-03-16  Martin Baulig  <martin@ximian.com>
19278
19279         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
19280
19281 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
19282
19283         * decl.cs (DefineTypeAndParents): New helper method to define a
19284         type's containers before the type itself is defined;  This is a
19285         bug exposed by the recent changes to Windows.Forms when an
19286         implemented interface was defined inside a class that had not been
19287         built yet.   
19288
19289         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
19290
19291         (Check): Loop correctly to report errors modifiers
19292         (UNSAFE was not in the loop, since it was the same as TOP).
19293
19294         * interface.cs: Every interface member now takes a ModFlags,
19295         instead of a "is_new" bool, which we set on the base MemberCore. 
19296
19297         Every place where we called "UnsafeOk" in the interface, now we
19298         call the proper member (InterfaceMethod.UnsafeOK) instead to get
19299         the unsafe settings from the member declaration instead of the
19300         container interface. 
19301
19302         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
19303
19304         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
19305         `set_indexer_name' to the pending bits (one per type).
19306
19307         We fixed a bug today that was picking the wrong method to
19308         override, since for properties the existing InterfaceMethod code
19309         basically ignored the method name.  Now we make sure that the
19310         method name is one of the valid indexer names.
19311
19312 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
19313  
19314         * support.cs (SeekableStreamReader): Keep track of stream byte
19315         positions and don't mix them with character offsets to the buffer.
19316
19317         Patch from Gustavo Giráldez
19318
19319 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
19320
19321         * interface.cs (InterfaceSetGetBase): Removed double member
19322         initialization, base class does it as well.
19323
19324 2004-03-13  Martin Baulig  <martin@ximian.com>
19325
19326         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
19327         when compiling corlib.
19328
19329 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
19330
19331         * convert.cs (ExplicitConversion): We were reporting an error on
19332         certain conversions (object_type source to a value type, when the
19333         expression was `null') before we had a chance to pass it through
19334         the user defined conversions.
19335
19336         * driver.cs: Replace / and \ in resource specifications to dots.
19337         Fixes 50752
19338
19339         * class.cs: Add check for duplicate operators.  Fixes 52477
19340
19341 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
19342
19343         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
19344         that are in the middle of the statements, not only at the end.
19345         Fixes #54987
19346
19347         * class.cs (TypeContainer.AddField): No longer set the
19348         `HaveStaticConstructor' flag, now we call it
19349         `UserDefineStaticConstructor' to diferentiate the slightly
19350         semantic difference.
19351
19352         The situation is that we were not adding BeforeFieldInit (from
19353         Modifiers.TypeAttr) to classes that could have it.
19354         BeforeFieldInit should be set to classes that have no static
19355         constructor. 
19356
19357         See:
19358
19359         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
19360
19361         And most importantly Zoltan's comment:
19362
19363         http://bugzilla.ximian.com/show_bug.cgi?id=44229
19364
19365         "I think beforefieldinit means 'it's ok to initialize the type sometime 
19366          before its static fields are used', i.e. initialization does not need
19367          to be triggered by the first access to the type. Setting this flag
19368          helps the JIT to compile better code, since it can run the static
19369          constructor at JIT time, and does not need to generate code to call it
19370          (possibly lots of times) at runtime. Unfortunately, mcs does not set
19371          this flag for lots of classes like String. 
19372          
19373          csc sets this flag if the type does not have an explicit static 
19374          constructor. The reasoning seems to be that if there are only static
19375          initalizers for a type, and no static constructor, then the programmer
19376          does not care when this initialization happens, so beforefieldinit
19377          can be used.
19378          
19379          This bug prevents the AOT compiler from being usable, since it 
19380          generates so many calls to mono_runtime_class_init that the AOT code
19381          is much slower than the JITted code. The JITted code is faster, 
19382          because it does not generate these calls if the vtable is type is
19383          already initialized, which is true in the majority of cases. But the
19384          AOT compiler can't do this."
19385
19386 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
19387
19388         * class.cs (MethodData.Emit): Refactor the code so symbolic
19389         information is generated for destructors;  For some reasons we
19390         were taking a code path that did not generate symbolic information
19391         before. 
19392
19393 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
19394
19395         * class.cs: Create a Constructor.CheckBase method that
19396         takes care of all validation type code. The method
19397         contains some code that was moved from Define.
19398
19399         It also includes new code that checks for duplicate ctors.
19400         This fixes bug #55148.
19401
19402 2004-03-09  Joshua Tauberer <tauberer@for.net>
19403
19404         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
19405         a { ... }-style array creation invokes EmitStaticInitializers
19406         which is not good for reference-type arrays.  String, decimal
19407         and now null constants (NullCast) are not counted toward
19408         static initializers.
19409
19410 2004-03-05  Martin Baulig  <martin@ximian.com>
19411
19412         * location.cs (SourceFile.HasLineDirective): New public field;
19413         specifies whether the file contains or is referenced by a "#line"
19414         directive.
19415         (Location.DefineSymbolDocuments): Ignore source files which
19416         either contain or are referenced by a "#line" directive.        
19417
19418 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
19419
19420         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
19421         direct access to our parent, so check the method inline there.
19422
19423 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19424
19425         * expression.cs (Invocation.EmitCall): Miguel's last commit
19426         caused a regression. If you had:
19427
19428             T t = null;
19429             t.Foo ();
19430
19431         In Foo the implict this would be null.
19432
19433 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
19434
19435         * expression.cs (Invocation.EmitCall): If the method is not
19436         virtual, do not emit a CallVirt to it, use Call.
19437
19438         * typemanager.cs (GetFullNameSignature): Improve the method to
19439         cope with ".ctor" and replace it with the type name.
19440
19441         * class.cs (ConstructorInitializer.Resolve): Now the method takes
19442         as an argument the ConstructorBuilder where it is being defined,
19443         to catch the recursive constructor invocations.
19444
19445 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
19446
19447         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
19448         routines to check if a type is an enumerable/enumerator allow
19449         classes that implement the IEnumerable or IEnumerator interfaces.
19450
19451         * class.cs (Property, Operator): Implement IIteratorContainer, and
19452         implement SetYields.
19453
19454         (Property.Define): Do the block swapping for get_methods in the
19455         context of iterators.   We need to check if Properties also
19456         include indexers or not.
19457
19458         (Operator): Assign the Block before invoking the
19459         OperatorMethod.Define, so we can trigger the Iterator code
19460         replacement. 
19461
19462         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
19463         Property and Operator classes are not created when we parse the
19464         declarator but until we have the block completed, so we use a
19465         singleton SimpleIteratorContainer.Simple to flag whether the
19466         SetYields has been invoked.
19467
19468         We propagate this setting then to the Property or the Operator to
19469         allow the `yield' to function.
19470
19471 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
19472
19473         * codegen.cs: Implemented attribute support for modules.
19474         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
19475         Assembly/Module functionality.
19476
19477         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
19478         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
19479         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
19480
19481 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
19482
19483         * interface.cs (FindMembers): The operation is performed on all base
19484         interfaces and not only on the first. It is required for future CLS Compliance patch.
19485
19486 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
19487
19488         * statement.cs, codegen.cs:
19489         This patch deals with patterns such as:
19490
19491         public class List : IEnumerable {
19492
19493                 public MyEnumerator GetEnumerator () {
19494                         return new MyEnumerator(this);
19495                 }
19496
19497                 IEnumerator IEnumerable.GetEnumerator () {
19498                         ...
19499                 }
19500                 
19501                 public struct MyEnumerator : IEnumerator {
19502                         ...
19503                 }
19504         }
19505
19506         Before, there were a few things we did wrong:
19507         1) we would emit callvirt on a struct, which is illegal
19508         2) we emited ldarg when we needed to emit ldarga
19509         3) we would mistakenly call the interface methods on an enumerator
19510         type that derived from IEnumerator and was in another assembly. For example:
19511
19512         public class MyEnumerator : IEnumerator
19513
19514         Would have the interface methods called, even if there were public impls of the
19515         method. In a struct, this lead to invalid IL code.
19516
19517 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
19518
19519         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
19520           renamed to Emit.
19521
19522         * delegate.cs (Define): Fixed crash when delegate type is undefined.
19523
19524 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
19525
19526         * cs-parser.jay: Fix small regression: we were not testing V2
19527         compiler features correctly.
19528
19529         * interface.cs: If the emit context is null, then create one
19530
19531 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
19532
19533         * decl.cs (GetSignatureForError): New virtual method to get full name
19534           for error messages.
19535
19536         * attribute.cs (IAttributeSupport): New interface for attribute setting.
19537           Now it is possible to rewrite ApplyAttributes method to be less if/else.
19538
19539         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
19540           Duplicated members and code in these classes has been removed.
19541           Better encapsulation in these classes.
19542
19543 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
19544
19545         * assign.cs (Assign.DoResolve): When dealing with compound
19546         assignments, there is a new rule in ECMA C# 2.4 (might have been
19547         there before, but it is documented here) that states that in:
19548
19549         a op= b;
19550
19551         If b is of type int, and the `op' is a shift-operator, then the
19552         above is evaluated as:
19553
19554         a = (int) a op b 
19555
19556         * expression.cs (Binary.ResolveOperator): Instead of testing for
19557         int/uint/long/ulong, try to implicitly convert to any of those
19558         types and use that in pointer arithmetic.
19559
19560         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
19561         method to print information for from the type, not from the
19562         null-method we were given.
19563
19564 2004-02-01  Duncan Mak  <duncan@ximian.com>
19565
19566         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
19567         parsing for cmd, fixes bug #53694.
19568
19569 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
19570
19571         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
19572         in the member name duplication tests. Property and operator name duplication
19573         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
19574
19575 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
19576
19577         * interface.cs (PopulateMethod): Fixed crash when interface method
19578         returns not existing type (error test cs0246-3.cs).
19579
19580 2004-02-02  Ravi Pratap M <ravi@ximian.com>
19581
19582         * cs-parser.jay (interface_accessors): Re-write actions to also
19583         store attributes attached to get and set methods. Fix spelling
19584         while at it.
19585
19586         (inteface_property_declaration): Modify accordingly.
19587
19588         (InterfaceAccessorInfo): New helper class to store information to pass
19589         around between rules that use interface_accessors.
19590
19591         * interface.cs (Emit): Apply attributes on the get and set
19592         accessors of properties and indexers too.
19593
19594         * attribute.cs (ApplyAttributes): Modify accordingly to use the
19595         right MethodBuilder when applying attributes to the get and set accessors.
19596
19597 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
19598
19599         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
19600
19601 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
19602
19603         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
19604
19605 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
19606
19607         * cs-parser.jay: Remove YIELD token, instead use the new grammar
19608         changes that treat `yield' specially when present before `break'
19609         or `return' tokens.
19610
19611         * cs-tokenizer.cs: yield is no longer a keyword.
19612
19613 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
19614
19615         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
19616         setting for default constructors.
19617         For default constructors are almost every time set wrong Modifier. The
19618         generated IL code has been alright. But inside mcs this values was
19619         wrong and this was reason why several of my CLS Compliance tests
19620         failed.
19621
19622 2004-01-22  Martin Baulig  <martin@ximian.com>
19623
19624         * cs-parser.jay (namespace_or_type_name): Return an Expression,
19625         not a QualifiedIdentifier.  This is what `type_name_expression'
19626         was previously doing.
19627         (type_name_expression): Removed; the code is now in
19628         `namespace_or_type_name'.
19629         (qualified_identifier): Removed, use `namespace_or_type_name'
19630         instead.
19631         (QualifiedIdentifier): Removed this class.      
19632
19633 2004-01-22  Martin Baulig  <martin@ximian.com>
19634
19635         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
19636         not a string as alias name.
19637
19638 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
19639
19640         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
19641         #52730 bug, and instead compute correctly the need to use a
19642         temporary variable when requesting an address based on the
19643         static/instace modified of the field and the constructor.
19644  
19645 2004-01-21  Martin Baulig  <martin@ximian.com>
19646
19647         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
19648         class and namespace before looking up aliases.  Fixes #52517.
19649
19650 2004-01-21  Martin Baulig  <martin@ximian.com>
19651
19652         * flowanalysis.cs (UsageVector.Merge): Allow variables being
19653         assinged in a 'try'; fixes exception4.cs.
19654
19655 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
19656         * class.cs : Implemented parameter-less constructor for TypeContainer
19657
19658         * decl.cs: Attributes are now stored here. New property OptAttributes
19659
19660         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
19661
19662         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
19663
19664 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
19665
19666         * typemanager.cs (CSharpSignature): Now reports also inner class name.
19667           (CSharpSignature): New method for indexer and property signature.
19668
19669 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
19670
19671         * pending.cs (IsVirtualFilter): Faster implementation.
19672
19673 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
19674
19675         * typemanager.cs: Avoid inclusion of same assembly more than once.
19676
19677 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
19678
19679         * cs-parser.jay: Fixed problem where the last assembly attribute
19680           has been applied also to following declaration (class, struct, etc.)
19681           
19682 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
19683
19684         * class.cs: Added error CS0538, CS0539 reporting.
19685         Fixed crash on Microsoft runtime when field type is void.
19686
19687         * cs-parser.jay: Added error CS0537 reporting.
19688
19689         * pending.cs: Added error CS0535 reporting.
19690         Improved error report for errors CS0536, CS0534.
19691
19692 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
19693
19694         Merge a few bits from the Anonymous Method MCS tree.
19695
19696         * statement.cs (ToplevelBlock): New class for toplevel methods,
19697         will hold anonymous methods, lifted variables.
19698
19699         * cs-parser.jay: Create toplevel blocks for delegates and for
19700         regular blocks of code. 
19701
19702 2004-01-20  Martin Baulig  <martin@ximian.com>
19703
19704         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
19705         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
19706         and `NeedExplicitReturn'; added `IsLastStatement'.
19707         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
19708         have a `ReturnLabel' or we're not unreachable.
19709
19710         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
19711         child's reachability; don't just override ours with it.  Fixes
19712         #58058 (lluis's example).
19713         (FlowBranching): Added public InTryOrCatch(), InCatch(),
19714         InFinally(), InLoop(), InSwitch() and
19715         BreakCrossesTryCatchBoundary() methods.
19716
19717         * statement.cs (Return): Do all error checking in Resolve().
19718         Unless we are the last statement in a top-level block, always
19719         create a return label and jump to it.
19720         (Break, Continue): Do all error checking in Resolve(); also make
19721         sure we aren't leaving a `finally'.
19722         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
19723         statement in a top-level block.
19724         (Block.Flags): Added `IsDestructor'.
19725         (Block.IsDestructor): New public property.
19726
19727 2004-01-20  Martin Baulig  <martin@ximian.com>
19728
19729         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
19730
19731 2004-01-20  Martin Baulig  <martin@ximian.com>
19732
19733         * statement.cs (Statement.ResolveUnreachable): New public method.
19734         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
19735         (Block.Resolve): Resolve unreachable statements.
19736
19737 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
19738
19739         * expression.cs: We need to fix the case where we do
19740         not have a temp variable here.
19741
19742         * assign.cs: Only expression compound assignments need
19743         temporary variables.
19744
19745 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
19746
19747         * flowanalysis.cs: Reduce memory allocation in a few ways:
19748           - A block with no variables should not allocate a bit
19749             vector for itself.
19750           - A method with no out parameters does not need any tracking
19751             for assignment of the parameters, so we need not allocate
19752             any data for it.
19753           - The arrays:
19754                 public readonly Type[] VariableTypes;
19755                 public readonly string[] VariableNames;
19756             Are redundant. The data is already stored in the variable
19757             map, so we need not allocate another array for it.
19758           - We need to add alot of checks for if (params | locals) == null
19759             due to the first two changes.
19760
19761 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
19762
19763         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
19764         implement IMemoryLocation, we store a copy on a local variable and
19765         take the address of it.  Patch from Benjamin Jemlich
19766
19767         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
19768         to use a special "type_name_expression" rule which reduces the
19769         number of "QualifiedIdentifier" classes created, and instead
19770         directly creates MemberAccess expressions.
19771
19772 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
19773
19774         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
19775         that fixes #52853.  Null literal assignment to ValueType
19776
19777         * class.cs (MethodData.Emit): Instead of checking the name of the
19778         method to determine if its a destructor, create a new derived
19779         class from Method called Destructor, and test for that.  
19780
19781         * cs-parser.jay: Create a Destructor object instead of a Method.  
19782
19783         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
19784
19785         Fixes: 52933
19786
19787 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
19788
19789         * expression.cs (Binary.ResolveOperator): Perform an implicit
19790         conversion from MethodGroups to their delegate types on the
19791         Addition operation.
19792
19793         * delegate.cs: Introduce a new class DelegateCreation that is the
19794         base class for `NewDelegate' and `ImplicitDelegateCreation',
19795         factor some code in here.
19796
19797         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
19798         conversion from MethodGroups to compatible delegate types. 
19799
19800         * ecore.cs (Expression.Resolve): Do not flag error 654
19801         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
19802         we allow conversions from MethodGroups to delegate types now.
19803
19804         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
19805         assignments in v2 either.
19806
19807 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
19808
19809         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
19810         static read-only fields in ctors.
19811
19812         Applied patch from Benjamin Jemlich 
19813
19814         * expression.cs (UnaryMutator): Avoid leaking local variables. 
19815
19816 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
19817
19818         * cs-tokenizer.cs (IsCastToken): Allow the various native types
19819         here to return true, as they can be used like this:
19820
19821                 (XXX) int.MEMBER ()
19822
19823         Fixed 49836 and all the other dups
19824
19825 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
19826
19827         * driver.cs: Implement /win32res and /win32icon.
19828
19829 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
19830
19831         * cs-parser.jay: Add a rule to improve error handling for the
19832         common mistake of placing modifiers after the type.
19833
19834 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
19835
19836         * cs-parser.jay (interface_event_declaration): Catch
19837         initialization of events on interfaces, and report cs0068
19838
19839         * cs-parser.jay (interface_event_declaration): Catch
19840         initialization of events. 
19841
19842         * ecore.cs: Better report missing constructors.
19843
19844         * expression.cs (Binary.ResolveOperator): My previous bug fix had
19845         the error reporting done in the wrong place.  Fix.
19846
19847         * expression.cs (Binary.ResolveOperator): Catch the 
19848         operator + (E x, E y) error earlier, and later allow for implicit
19849         conversions in operator +/- (E e, U x) from U to the underlying
19850         type of E.
19851
19852         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
19853         52596, if the container class is abstract, the default constructor
19854         is protected otherwise its public (before, we were always public).
19855
19856         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
19857         fixed statement.
19858
19859         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
19860         Jemlich that fixes bug #52597, MCS was generating invalid code for
19861         idisposable structs.   Thanks to Ben for following up with this
19862         bug as well.
19863
19864 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
19865
19866         * driver.cs: Allow assemblies without code to be generated, fixes
19867         52230.
19868
19869 2004-01-07  Nick Drochak <ndrochak@gol.com>
19870
19871         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
19872
19873 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
19874
19875         * cs-parser.jay: Add rules to improve error reporting if fields or
19876         methods are declared at the namespace level (error 116)
19877
19878         * Add rules to catch event add/remove
19879
19880 2004-01-04  David Sheldon <dave-mono@earth.li>
19881
19882   * expression.cs: Added matching ")" to error message for 
19883   CS0077
19884
19885 2004-01-03 Todd Berman <tberman@gentoo.org>
19886
19887         * ecore.cs, attribute.cs:
19888         Applying fix from #52429.
19889
19890 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
19891
19892         * ecore.cs, expression.cs, statement.cs:
19893         Total rewrite of how we handle branching. We
19894         now handle complex boolean expressions with fewer
19895         jumps. As well if (x == 0) no longer emits a ceq.
19896
19897         if (x is Foo) is much faster now, because we generate
19898         better code.
19899
19900         Overall, we get a pretty big improvement on our benchmark
19901         tests. The code we generate is smaller and more readable.
19902
19903         I did a full two-stage bootstrap. The patch was reviewed
19904         by Martin and Miguel.
19905
19906 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
19907
19908         * cs-parser.jay: Make primary_expression not take a QI.
19909         we dont need this because the member_access rule covers
19910         us here. So we replace the rule with just IDENTIFIER.
19911
19912         This has two good effects. First, we remove a s/r conflict.
19913         Second, we allocate many fewer QualifiedIdentifier objects.
19914
19915 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
19916
19917         * attribute.cs: Handle MarshalAs attributes as pseudo, and
19918         set the correct information via SRE. This prevents
19919         hanging on the MS runtime. Fixes #29374.
19920
19921 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
19922
19923         * convert.cs: correctly handle conversions to value types
19924         from Enum and ValueType as unboxing conversions.
19925
19926         Fixes bug #52569. Patch by Benjamin Jemlich.
19927
19928 2004-01-02  Ravi Pratap  <ravi@ximian.com>
19929
19930         * expression.cs (BetterConversion): Prefer int -> uint
19931         over int -> ulong (csc's behaviour). This fixed bug #52046.
19932
19933 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
19934
19935         * decl.cs (MemberCache.FindMembers): now returns a
19936         MemberInfo [].
19937
19938         * typemanager.cs: In general, go with with ^^.
19939         (CopyNewMethods): take an IList.
19940         (RealMemberLookup): Only allocate an arraylist
19941         if we copy from two sets of methods.
19942
19943         This change basically does two things:
19944         1) Fewer array lists allocated due to CopyNewMethods.
19945         2) the explicit cast in MemberList costed ALOT.
19946
19947 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
19948
19949         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
19950         a hashtable to avoid needless string allocations when an identifier is
19951         used more than once (the common case).
19952
19953 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
19954
19955         * pending.cs: MS's TypeBuilder.GetInterfaces ()
19956         is broken, it will not return anything. So, we
19957         have to use the information we have in mcs to
19958         do the task.
19959
19960         * typemanager.cs: Add a cache for GetInterfaces,
19961         since this will now be used more often (due to ^^)
19962
19963         (GetExplicitInterfaces) New method that gets the
19964         declared, not effective, interfaces on a type
19965         builder (eg, if you have interface IFoo, interface
19966         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
19967         { IBar }.
19968
19969         This patch makes MCS able to bootstrap itself on
19970         Windows again.
19971
19972 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
19973
19974         * expression.cs: Remove the Nop's that Miguel put
19975         in by mistake.
19976
19977 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
19978
19979         * report.cs, codegen.cs: Give the real stack trace to
19980         the error when an exception is thrown.
19981
19982 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
19983
19984         * decl.cs: only allocate hashtables for ifaces if 
19985         it is an iface!
19986
19987 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
19988
19989         * expression.cs: fix the error from cs0121-2.cs
19990         (a parent interface has two child interfaces that
19991         have a function with the same name and 0 params
19992         and the function is called through the parent).
19993
19994 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
19995
19996         * class.cs, rootcontext.cs, typmanager.cs: do not
19997         leak pointers.
19998
19999 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20000
20001         * codegen.cs: remove stack for the ec flow branching.
20002         It is already a linked list, so no need.
20003
20004 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20005
20006         * Makefile: Allow custom profiler here.
20007
20008 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20009
20010         * typemanager.cs (LookupType):
20011           - Use a static char [], because split takes
20012             a param array for args, so it was allocating
20013             every time.
20014           - Do not store true in a hashtable, it boxes.
20015
20016 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20017
20018         * flowanalysis.cs: bytify common enums.
20019
20020 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20021
20022         * modifiers.cs: Add a new set of flags for the
20023         flags allowed on explicit interface impls.
20024         * cs-parser.jay: catch the use of modifiers in
20025         interfaces correctly.
20026         * class.cs: catch private void IFoo.Blah ().
20027
20028         All related to bug #50572.
20029
20030 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20031
20032         * decl.cs: Rewrite the consistant accessability checking.
20033         Accessability is not linear, it must be implemented in
20034         a tableish way. Fixes #49704.
20035
20036 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20037
20038         * expression.cs: Handle negation in a checked context.
20039         We must use subtraction from zero. Fixes #38674.
20040
20041 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20042
20043         * class.cs: Ignore static void main in DLLs.
20044         * rootcontext.cs: Handle the target type here,
20045         since we are have to access it from class.cs
20046         * driver.cs: account for the above.
20047
20048 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20049
20050         * report.cs: Give line numbers and files if available.
20051
20052 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20053
20054         * driver.cs: Implement /addmodule.
20055
20056         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20057         ModuleBuilders.
20058
20059 2003-12-20  Martin Baulig  <martin@ximian.com>
20060
20061         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20062         (FieldBase.IsAssigned): Removed this field.
20063         (FieldBase.SetAssigned): New public method.
20064         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20065
20066 2003-12-20  Martin Baulig  <martin@ximian.com>
20067
20068         * expression.cs (LocalVariableReference.DoResolve): Don't set
20069         `vi.Used' if we're called from DoResolveLValue().
20070
20071         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20072         returns the usage vector it just merged into the current one -
20073         pass this one to UsageWarning().
20074         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20075         of the `EmitContext', don't call this recursively on our children.
20076
20077 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20078
20079         * driver.cs: Implement /target:module.
20080
20081 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20082
20083         * support.cs (CharArrayHashtable): New helper class.
20084
20085         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20086         char arrays, not strings, so we can avoid creating a string in
20087         consume_identifier if the identifier is a keyword.
20088
20089 2003-12-16  Martin Baulig  <martin@ximian.com>
20090
20091         * statement.cs (LocalInfo.Assigned): Removed this property.
20092         (LocalInfo.Flags): Removed `Assigned'.
20093         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20094         and uses flow analysis.
20095         (Block.UsageWarning): Made this method private.
20096         (Block.Resolve): Call UsageWarning() if appropriate.
20097
20098         * expression.cs (LocalVariableReference.DoResolve): Always set
20099         LocalInfo.Used here.
20100
20101 2003-12-13  Martin Baulig  <martin@ximian.com>
20102
20103         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20104         any value here; we're now using flow analysis to figure out
20105         whether a statement/block returns a value.
20106
20107 2003-12-13  Martin Baulig  <martin@ximian.com>
20108
20109         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20110         working again.
20111         (FlowBranching.MergeFinally): Don't call
20112         `branching.CheckOutParameters()' here, this is called in
20113         MergeTopBlock().
20114         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20115         when adding the `finally' vector.       
20116
20117 2003-12-13  Martin Baulig  <martin@ximian.com>
20118
20119         * flowanalysis.cs
20120         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20121         actually work and also fix #48962.
20122
20123 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20124
20125         * decl.cs: Do not check System.Object for nested types,
20126         since we know it does not have any. Big bang for buck:
20127
20128         BEFORE:
20129            Run 1:   8.35 seconds
20130            Run 2:   8.32 seconds
20131            corlib:  17.99 seconds
20132         AFTER:
20133            Run 1:   8.17 seconds
20134            Run 2:   8.17 seconds
20135            corlib:  17.39 seconds
20136
20137 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20138
20139         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20140         time we are returning 0 members, so we save alot here.
20141
20142 2003-12-11  Martin Baulig  <martin@ximian.com>
20143
20144         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20145         `MergeChild()', also just take the `FlowBranching' as argument;
20146         call Merge() on it and return the result.
20147         (FlowBranching.Merge): We don't need to do anything if we just
20148         have one sibling.
20149
20150 2003-12-11  Martin Baulig  <martin@ximian.com>
20151
20152         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20153         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20154         Maurer for this idea.
20155
20156 2003-12-11  Martin Baulig  <martin@ximian.com>
20157
20158         * flowanalysis.cs (MergeResult): This class is now gone; we now
20159         use the `UsageVector' for this.  The reason for this is that if a
20160         branching just has one sibling, we don't need to "merge" them at
20161         all - that's the next step to do.
20162         (FlowBranching.Merge): We now return a `UsageVector' instead of a
20163         `MergeResult'.
20164
20165 2003-12-11  Martin Baulig  <martin@ximian.com>
20166
20167         Reworked flow analyis and made it more precise and bug-free.  The
20168         most important change is that we're now using a special `Reachability'
20169         class instead of having "magic" meanings of `FlowReturns'.  I'll
20170         do some more cleanups and optimizations and also add some more
20171         documentation this week.
20172
20173         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
20174         largely reworked this class.
20175         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
20176         the new `Reachability' class instead of having "magic" values here.
20177         (FlowBranching): We're now using an instance of `Reachability'
20178         instead of having separate `Returns', `Breaks' etc. fields.
20179
20180         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
20181         based on flow analysis; ignore the return value of block.Emit ().
20182
20183 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
20184
20185         * driver.cs typemanager.cs: Find the mono extensions to corlib even
20186         if they are private.
20187
20188 2003-12-09  Martin Baulig  <martin@ximian.com>
20189
20190         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
20191         call them directly on the UsageVector.
20192
20193 2003-12-09  Martin Baulig  <martin@ximian.com>
20194
20195         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
20196         Changed return type from `FlowReturns' to `Reachability'.
20197
20198 2003-12-09  Martin Baulig  <martin@ximian.com>
20199
20200         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
20201         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
20202         `Reachable' fields with a single `Reachability' one.
20203
20204 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20205
20206         * class.cs (FindMembers): Remove foreach's.
20207
20208         Bootstrap times:
20209
20210         BEFORE
20211                 Run 1:   8.74 seconds
20212                 Run 2:   8.71 seconds
20213
20214         AFTER
20215                 Run 1:   8.64 seconds
20216                 Run 2:   8.58 seconds
20217
20218
20219 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20220
20221         * cs-parser.jay:
20222         * gen-treedump.cs:
20223         * statement.cs:
20224         This patch does a few things:
20225                 1. EmptyStatement is now a singleton, so it is never reallocated.
20226                 2. All blah is EmptyStatement constructs have been changed to
20227                    blah == EmptyStatement.Value, which is much faster and valid
20228                    now that EmptyStatement is a singleton.
20229                 3. When resolving a block, rather than allocating a new array for
20230                    the non-empty statements, empty statements are replaced with
20231                    EmptyStatement.Value
20232                 4. Some recursive functions have been made non-recursive.
20233         Mainly the performance impact is from (3), however (1) and (2) are needed for
20234         this to work. (4) does not make a big difference in normal situations, however
20235         it makes the profile look saner.
20236
20237         Bootstrap times:
20238
20239         BEFORE
20240         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20241         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20242         Total memory allocated: 56397 KB
20243
20244         AFTER
20245         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
20246         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
20247         Total memory allocated: 55666 KB
20248
20249 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20250
20251         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
20252         than the hashtable in a hashtable version
20253
20254         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
20255         we always end up concating a string. This results in a huge perf
20256         loss, because many strings have to be tracked by the GC. In this
20257         patch, we first use a hashtable that works with two keys, so that
20258         the strings do not need to be concat'ed.
20259
20260         Bootstrap times:
20261         BEFORE
20262                 Run 1:   8.74 seconds
20263                 Run 2:   8.71 seconds
20264
20265         AFTER
20266                 Run 1:   8.65 seconds
20267                 Run 2:   8.56 seconds
20268
20269 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20270
20271         * Makefile: Add a new target `do-time' that does a quick and simple
20272         profile, leaving easy to parse output.
20273
20274 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20275
20276         * codegen.cs (Init): Create the dynamic assembly with 
20277         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
20278
20279 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20280
20281         * support.cs: Make the PtrHashtable use only one
20282         instance of its comparer.
20283
20284 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
20285
20286         * typemanager.cs: Fix lookup of GetNamespaces.
20287
20288 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
20289
20290         * expression.cs: Removed redundant line.
20291
20292         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
20293         ArrayLists, use for loops with bounds.  
20294
20295         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
20296         arraylist.
20297
20298         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
20299         arraylists, use for loop with bounds.
20300
20301         The above three changes give us a 0.071 second performance
20302         improvement out of 3.294 seconds down to 3.223.  On my machine
20303         the above changes reduced the memory usage by 1,387 KB during
20304         compiler bootstrap.
20305
20306         * cs-parser.jay (QualifiedIdentifier): New class used to represent
20307         QualifiedIdentifiers.  Before we created a new string through
20308         concatenation, and mostly later on, the result would be
20309         manipulated by DecomposeQI through string manipulation.
20310
20311         This reduced the compiler memory usage for bootstrapping from
20312         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
20313         compile times in 0.05 seconds.
20314
20315 2003-11-28  Dick Porter  <dick@ximian.com>
20316
20317         * support.cs: Do string compares with the Invariant culture.
20318
20319         * rootcontext.cs: 
20320         * gen-treedump.cs: 
20321         * expression.cs: 
20322         * driver.cs: 
20323         * decl.cs: 
20324         * codegen.cs: 
20325         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
20326         the comparison is done with the Invariant culture.
20327
20328 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
20329
20330         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
20331         GetEnumerator method.
20332
20333         (ProbeCollectionType): Iterate starting at the most specific type
20334         upwards looking for a GetEnumerator
20335
20336         * expression.cs: Shift count can be up to 31 for int/uint and 63
20337         for long/ulong.
20338
20339 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
20340
20341         * statement.cs (Block.LookupLabel): Also look for the label on the
20342         children blocks.  Use a hash table to keep track of visited
20343         nodes. 
20344
20345         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
20346         we actually did transform the other operand, otherwise fall back
20347         to the common codepath that casts to long.
20348
20349         * cs-tokenizer.cs: Use the same code pattern as the int case.
20350         Maybe I should do the parsing myself, and avoid depending on the
20351         Parse routines to get this done.
20352
20353 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
20354
20355         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20356         which fixes bug 51347.  This time test it.
20357
20358         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
20359         attributes for example can not tell the difference between these.
20360         The difference was only a syntax feature of the language. 
20361
20362         * attribute.cs: Apply attributes to delegates.
20363
20364         * delegate.cs: Call the apply attributes method.
20365
20366 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
20367
20368         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
20369         comparing 0 vs Byte.MinValue, not the value
20370
20371         (ImplicitConversionRequired): When reporting a conversion error,
20372         use error 31 to print out the constant error instead of the
20373         simpler 29.
20374
20375         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20376         which fixes bug 51347.
20377
20378 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
20379
20380         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
20381         which fixes the -warnaserror command line option.
20382
20383 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
20384
20385         * cfold.cs (DoNumericPromotions): During constant folding of
20386         additions on UIntConstant, special case intconstants with
20387         IntConstants like we do on the expression binary operator. 
20388
20389 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
20390
20391         * convert.cs (ImplicitReferenceConversion): We were missing a case
20392         (System.Enum are not value types or class types, so we need to
20393         classify them separatedly).
20394
20395         * driver.cs: We do not support error 2007.
20396
20397 2003-11-12 Jackson Harper <jackson@ximian.com>
20398
20399         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
20400         system directory. Also use the full file name so users can
20401         libraries names mscorlib-o-tron.dll in a non system dir.
20402
20403 2003-11-10  Martin Baulig  <martin@ximian.com>
20404
20405         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
20406         (TypeManager.InitCoreTypes): Initialize them here, but instead of
20407         calling `ResolveType()' on them, directly assign their `Type'.
20408
20409 2003-11-08  Martin Baulig  <martin@ximian.com>
20410
20411         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
20412         return value and the `out parent' parameter.
20413         (TypeContainer.DefineType): Moved the CS0644 check into
20414         GetClassBases().  Don't pass the interface types to the
20415         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
20416         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
20417
20418         * ecore.cs (TypeExpr.IsAttribute): New property.
20419         (TypeExpr.GetInterfaces): New method.
20420
20421         * interface.cs (Interface.GetInterfaceTypeByName): Return a
20422         TypeExpr instead of a Type.
20423         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
20424         (Interface.DefineType): Don't pass the interface types to the
20425         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
20426         them later and then call `TypeBulider.AddInterfaceImplementation()'.
20427
20428         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
20429         instead of a `Type[]'.
20430         (TypeManager.RegisterBuilder): Likewise.
20431         (TypeManager.AddUserInterface): Likewise.
20432         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
20433         `Type[]' and also return a `TypeExpr[]'.
20434         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
20435
20436 2003-11-08  Martin Baulig  <martin@ximian.com>
20437
20438         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
20439         Expression.     
20440
20441 2003-11-08  Martin Baulig  <martin@ximian.com>
20442
20443         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
20444         TypeManager.ResolveExpressionTypes().
20445
20446         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
20447         instead of an Expression.
20448         (TypeExpr): This is now an abstract base class for `TypeExpression'.
20449         (TypeExpression): New public class; formerly known as `TypeExpr'.
20450
20451         * expression.cs (ComposedCast): Derive from TypeExpr.
20452
20453         * typemanager.cs (TypeManager.system_*_expr): These are now
20454         TypExpr's instead of Expression's.
20455         (TypeManager.ResolveExpressionTypes): New public static function;
20456         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
20457         of them.        
20458
20459 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
20460
20461         * expression.cs (New.DoResolve): Do not dereference value that
20462         might be a null return.
20463
20464         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
20465         sure that the constant value has the right type.  Fixes an
20466         unreported bug, similar to 50425.
20467
20468         * const.cs (Const.LookupConstantValue): Call
20469         ImplicitStandardConversionExists before doing a conversion to
20470         avoid havng the TypeManager.ChangeType do conversions.
20471
20472         Reduced the number of casts used
20473
20474         (Const.ChangeType): New routine to enable reuse of the constant
20475         type changing code from statement.
20476
20477         * typemanager.cs (ChangeType): Move common initialization to
20478         static global variables.
20479
20480         Fixes #50425.
20481
20482         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
20483         every value type to go through, even if it was void.  Fix that. 
20484
20485         * cs-tokenizer.cs: Use is_identifier_start_character on the start
20486         character of the define, and the is_identifier_part_character for
20487         the rest of the string.
20488
20489 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
20490
20491         * expression.cs (UnaryMutator.EmitCode): When I updated
20492         LocalVariableReference.DoResolve, I overdid it, and dropped an
20493         optimization done on local variable references.
20494
20495 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
20496
20497         * ecore.cs: Convert the return from Ldlen into an int.
20498
20499 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
20500
20501         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
20502         the accessibility, this is a special case for toplevel non-public
20503         classes (internal for instance).
20504
20505 2003-10-20  Nick Drochak <ndrochak@gol.com>
20506
20507         * ecore.cs: Fix typo and build.  Needed another right paren.
20508
20509 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
20510
20511         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
20512         `internal' case regular and protected, but not allowing protected
20513         to be evaluated later.  Bug 49840
20514
20515 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
20516
20517         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
20518         to kb.Nlast, and not the kb.nFirst to isolate the switch
20519         statement.
20520
20521         Extract the underlying type, so enumerations of long/ulong are
20522         treated like long/ulong.
20523
20524 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
20525
20526         * expression.cs (New): Overload the meaning of RequestedType to
20527         track the possible creation of the NewDelegate type, since
20528         DoResolve is invoked more than once for new constructors on field
20529         initialization.
20530
20531         See bugs: #48800 and #37014
20532
20533         * cs-parser.jay (declare_local_constants): Take an arraylist
20534         instead of a single constant.
20535
20536         (local_constant_declaration): It should take a
20537         constant_declarators, not a constant_declarator.  Fixes 49487
20538
20539         * convert.cs: Fix error report.
20540
20541 2003-10-13 Jackson Harper <jackson@ximian.com>
20542
20543         * typemanager.cs (TypeToCoreType): Add float and double this fixes
20544         bug #49611
20545
20546 2003-10-09  Martin Baulig  <martin@ximian.com>
20547
20548         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
20549         to the .ctor.
20550         (MethodCore.DoDefineParameters): Removed the TypeContainer
20551         argument; use the DeclSpace which was passed to the .ctor instead.
20552         (MethodCore.CheckParameter): Take a DeclSpace instead of a
20553         TypeContainer; we only need a DeclSpace here.
20554
20555 2003-10-09  Martin Baulig  <martin@ximian.com>
20556
20557         * class.cs (MethodData): Added additional `DeclSpace ds' argument
20558         to the .ctor.
20559         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
20560         EmitContext's .ctor.    
20561
20562 2003-10-09  Martin Baulig  <martin@ximian.com>
20563
20564         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
20565         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
20566         AsAccessible(), moved them as well.
20567
20568         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
20569
20570 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
20571
20572         * cs-parser.jay : Renamed yyName to yyNames related to jay.
20573
20574 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
20575
20576         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
20577         generation for >=, as spotted by Paolo, bug 48679.  
20578         Patch from David Waite.
20579
20580         * cs-tokenizer.cs: Add handling for #pragma.
20581
20582         * cs-parser.jay: Allow for both yield and yield return in the
20583         syntax.  The anti-cobolization of C# fight will go on!
20584
20585         * class.cs (TypeBuilder.DefineType): Catch error condition here
20586         (Parent.DefineType erroring out and returning null).
20587
20588         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
20589         coping with enumerations variables, we were mistakenly processing
20590         them as a regular value type instead of built-in types.  Fixes the
20591         bug #48063
20592
20593         * typemanager.cs (IsBuiltinOrEnum): New method.
20594
20595 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
20596
20597         * cs-parser.jay: Upgrade: yield now needs the return clause.
20598
20599 2003-09-19  Martin Baulig  <martin@ximian.com>
20600
20601         * decl.cs (MemberCache.SetupCacheForInterface): Take a
20602         `MemberCache parent' argument.  Normally, an interface doesn't
20603         have a parent type except System.Object, but we use this in gmcs
20604         for generic type parameters.
20605
20606 2003-09-18  Martin Baulig  <martin@ximian.com>
20607
20608         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
20609         on `type.IsInterface'; don't check whether the type has a parent
20610         to determine whether it's an interface.
20611
20612 2003-09-15  Martin Baulig  <martin@ximian.com>
20613
20614         * class.cs (TypeContainer.DefineType): Added an error flag to
20615         avoid reporting duplicate CS0146's ("class definition is
20616         circular.").
20617
20618         * driver.cs (Driver.MainDriver): Abort if
20619         RootContext.ResolveTree() reported any errors.
20620
20621 2003-09-07  Martin Baulig  <martin@ximian.com>
20622
20623         * report.cs (Error, Warning): Added overloaded versions which take
20624         a `params object[] args' and call String.Format().
20625
20626 2003-09-07  Martin Baulig  <martin@ximian.com>
20627
20628         * decl.cs (DeclSpace..ctor): Don't call
20629         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
20630         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
20631         (DeclSpace.RecordDecl): New method.
20632
20633         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
20634
20635 2003-09-02  Ravi Pratap  <ravi@ximian.com>
20636
20637         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
20638         value attributes to be applied to ParameterBuilders.
20639
20640         * class.cs (MethodCore.LabelParameters): Make static and more
20641         generic so that it can be used from other places - like interface
20642         methods, for instance.
20643
20644         * interface.cs (Interface.Emit): Call LabelParameters before
20645         emitting attributes on the InterfaceMethod.
20646
20647 2003-08-26  Martin Baulig  <martin@ximian.com>
20648
20649         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
20650         resolving aliases; fixes #47927.
20651
20652 2003-08-26  Martin Baulig  <martin@ximian.com>
20653
20654         * statement.cs (Using.DoResolve): This is internally emitting a
20655         try/finally clause, so we need to set ec.NeedExplicitReturn if we
20656         do not always return.  Fixes #47681.
20657
20658 2003-08-26  Martin Baulig  <martin@ximian.com>
20659
20660         * decl.cs (MemberCore): Moved WarningNotHiding(),
20661         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
20662         into MemberBase.
20663         (AdditionResult): Make this nested in DeclSpace.
20664         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
20665         argument; call NamespaceEntry.Define() unless we're nested in a
20666         class or struct.
20667
20668         * namespace.cs (Namespace.DefineName): New public function.  This
20669         is called from DeclSpace's .ctor to add 
20670         (Namespace.Lookup): Include DeclSpaces in the lookup.
20671
20672         * class.cs (Operator): Derive from MemberBase, not MemberCore.
20673
20674         * const.cs (Const): Derive from MemberBase, not MemberCore.     
20675
20676 2003-08-25  Martin Baulig  <martin@ximian.com>
20677
20678         * convert.cs (Convert.ExplicitReferenceConversion): When
20679         converting from an interface type to a class, unbox if the target
20680         type is a struct type.  Fixes #47822.
20681
20682 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20683
20684         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
20685         #47854.
20686
20687 2003-08-22  Martin Baulig  <martin@ximian.com>
20688
20689         * class.cs (TypeManager.DefineType): When defining a nested type,
20690         call DefineType() on our parent; fixes #47801.
20691
20692 2003-08-22  Martin Baulig  <martin@ximian.com>
20693
20694         * class.cs (MethodData.Define): While checking if a method is an
20695         interface implementation, improve the test a bit more to fix #47654.
20696
20697 2003-08-22  Martin Baulig  <martin@ximian.com>
20698
20699         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
20700         correctly; fixes #47722.
20701
20702 2003-08-22  Martin Baulig  <martin@ximian.com>
20703
20704         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
20705         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
20706
20707         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
20708
20709 2003-08-22  Martin Baulig  <martin@ximian.com>
20710
20711         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
20712         can only be assigned in static constructors.  Fixes #47161.
20713
20714 2003-08-22  Martin Baulig  <martin@ximian.com>
20715
20716         Rewrote and improved the flow analysis code.
20717
20718         * flowbranching.cs (FlowBranching): Make this class abstract.
20719         (FlowBranching.CreateBranching): New static function to create a
20720         new flow branching.
20721         (FlowBranchingBlock, FlowBranchingException): New classes.
20722         (FlowBranching.UsageVector.Type): New public readonly field.
20723         (FlowBranching.UsageVector.Breaks): Removed the setter.
20724         (FlowBranching.UsageVector.Returns): Removed the setter.
20725         (FlowBranching.UsageVector): Added Break(), Return(),
20726         NeverReachable() and Throw() methods to modify the reachability.
20727         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
20728         done by FlowBranching.Merge().
20729         (FlowBranching.UsageVector.MergeChild): New method; merges the
20730         merge result into the current vector.
20731         (FlowBranching.Merge): New abstract method to merge a branching.
20732
20733 2003-08-12  Martin Baulig  <martin@ximian.com>
20734
20735         * expression.cs (Indirection.CacheTemporaries): Create the
20736         LocalTemporary with the pointer type, not its element type.
20737
20738 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
20739
20740         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
20741         token was a keyword or not.
20742
20743         Add `error' options where an IDENTIFIER was expected;  Provide
20744         CheckToken and CheckIdentifierToken convenience error reporting
20745         functions. 
20746
20747         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
20748
20749         * decl.cs: Rename `NamespaceEntry Namespace' public field into
20750         NameSpaceEntry NameSpaceEntry.
20751
20752         (LookupInterfaceOrClass): Avoid creating a full qualified name
20753         from namespace and name: avoid doing lookups when we know the
20754         namespace is non-existant.   Use new Tree.LookupByNamespace which
20755         looks up DeclSpaces based on their namespace, name pair.
20756
20757         * driver.cs: Provide a new `parser verbose' to display the
20758         exception thrown during parsing.  This is turned off by default
20759         now, so the output of a failure from mcs is more graceful.
20760
20761         * namespace.cs: Track all the namespaces defined in a hashtable
20762         for quick lookup.
20763
20764         (IsNamespace): New method
20765
20766 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
20767
20768         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
20769         we know that we need to concatenate (full typename can never be
20770         null). 
20771
20772         * class.cs: ditto.
20773
20774         * statement.cs: Use a bitfield;  Do not initialize to null things
20775         which are done by the constructor by default.
20776
20777         * cs-parser.jay: bug fix, parameter was 4, not 3.
20778
20779         * expression.cs: Just use the property;
20780
20781         * statement.cs: No need for GetVariableInfo method.
20782
20783 2003-08-08  Martin Baulig  <martin@ximian.com>
20784
20785         * flowanalysis.cs (FlowReturns): This is now nested in the
20786         `FlowBranching' class.
20787         (MyBitVector): Moved this here from statement.cs.
20788         (FlowBranching.SiblingType): New enum type.
20789         (FlowBranching.CreateSibling): Added `SiblingType' argument.
20790
20791 2003-08-07  Martin Baulig  <martin@ximian.com>
20792
20793         * flowanalysis.cs (FlowBranchingType): This is now nested in the
20794         `FlowBranching' class and called `BranchingType'.
20795
20796 2003-08-07  Martin Baulig  <martin@ximian.com>
20797
20798         * flowanalysis.cs: Moved all the control flow analysis code into
20799         its own file.
20800
20801 2003-08-07  Martin Baulig  <martin@ximian.com>
20802
20803         * assign.cs (Assign.DoResolve): `target' must either be an
20804         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
20805         #37319.
20806
20807 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
20808
20809         * expression.cs (BinaryMethod): This kind of expression is created by the
20810         Binary class if it determines that the operator has to be handled
20811         by a method.
20812
20813         (BinaryDelegate): This kind of expression is created if we are
20814         dealing with a + or - operator on delegates.
20815
20816         (Binary): remove method, argumetns, and DelegateOperator: when
20817         dealing with methods, 
20818
20819         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
20820
20821         * statement.cs (Block): use bitfields for the three extra booleans
20822         we had in use.   Remove unused topblock parameter.
20823
20824         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
20825
20826         * assign.cs: Drop extra unneeded tests.
20827
20828 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
20829
20830         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
20831
20832         * statement.cs (Foreach): Use VariableStorage instead of
20833         LocalBuilders.   
20834
20835         * codegen.cs (VariableStorage): New class used by clients that
20836         require a variable stored: locals or fields for variables that
20837         need to live across yield.
20838
20839         Maybe provide a convenience api for EmitThis+EmitLoad?
20840
20841         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
20842         these bad boys.
20843
20844 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
20845
20846         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
20847         RemapParameterLValue): New methods that are used to turn a
20848         precomputed FieldInfo into an expression like this:
20849
20850                 instance.FieldInfo
20851
20852         The idea is to use this instead of making LocalVariableReference
20853         have more than one meaning.
20854
20855         * cs-parser.jay: Add error production to BASE.
20856
20857         * ecore.cs: Deal with TypeManager.GetField returning null, which
20858         is now a valid return value.
20859
20860         (FieldExprNoAddress): New expression for Fields whose address can
20861         not be taken.
20862
20863         * expression.cs (LocalVariableReference): During the resolve
20864         phases, create new expressions if we are in a remapping context.
20865         Remove code that dealt with remapping here.
20866
20867         (ParameterReference): same.
20868
20869         (ProxyInstance): New expression, like the `This' expression, but
20870         it is born fully resolved.  We know what we are doing, so remove
20871         the errors that are targeted to user-provided uses of `this'.
20872
20873         * statement.cs (Foreach): our variable is now stored as an
20874         Expression;  During resolution, follow the protocol, dont just
20875         assume it will return this.
20876
20877 2003-08-06  Martin Baulig  <martin@ximian.com>
20878
20879         * support.cs (SeekableStreamReader.cs): New public class.
20880
20881         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
20882         SeekableStreamReader instead of the normal StreamReader.
20883
20884 2003-08-04  Martin Baulig  <martin@ximian.com>
20885
20886         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
20887         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
20888         deambiguate casts and delegate invocations.
20889         (parenthesized_expression): Use the new tokens to ensure this is
20890         not a cast of method invocation.
20891
20892         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
20893         when reading a `)' and Deambiguate_CloseParens () was previously
20894         called.
20895
20896         * expression.cs (ParenthesizedExpression): New class.  This is
20897         just used for the CS0075 test.
20898         (Binary.DoResolve): Check for CS0075.   
20899
20900 2003-07-29  Ravi Pratap  <ravi@ximian.com>
20901
20902         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
20903         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
20904         reference comparison.
20905
20906         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
20907         examine the ReturnType for equality - this is necessary in the
20908         cases of implicit and explicit operators whose signature also
20909         includes the return type.
20910
20911 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
20912
20913         * namespace.cs: Cache the result of the namespace computation,
20914         instead of computing it every time.
20915
20916 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
20917
20918         * decl.cs: Use a global arraylist that we reuse over invocations
20919         to avoid excesive memory consumption.  Reduces memory usage on an
20920         mcs compile by one meg (45 average).
20921
20922         * typemanager.cs (LookupTypeReflection): In .NET pointers are
20923         private, work around that.
20924
20925 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
20926
20927         * literal.cs (IntLiteral): Define Zero and One static literals. 
20928
20929         * cs-parser.jay (integer_literal): use static literals to reduce
20930         memory usage for the most used literals (0, 1 and -1).  211kb
20931         reduced in memory usage.
20932
20933         Replace all calls to `new ArrayList' with `new
20934         ArrayList(4)' which is a good average number for most allocations,
20935         and also requires only 16 bytes of memory for its buffer by
20936         default. 
20937
20938         This reduced MCS memory usage in seven megabytes for the RSS after
20939         bootstrapping.
20940
20941 2003-07-28  Ravi Pratap  <ravi@ximian.com>
20942
20943         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
20944         handle params methods the correct way by forming only one
20945         applicable set with params and normal methods in them. Earlier we
20946         were looking at params methods only if we found no normal methods
20947         which was not the correct thing to do.
20948
20949         (Invocation.BetterFunction): Take separate arguments indicating
20950         when candidate and the best method are params methods in their
20951         expanded form.
20952
20953         This fixes bugs #43367 and #46199.
20954
20955         * attribute.cs: Documentation updates.
20956
20957         (CheckAttribute): Rename to CheckAttributeTarget.
20958         (GetValidPlaces): Rename to GetValidTargets.
20959
20960         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
20961         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
20962
20963         Fixes bug #44468.
20964
20965 2003-07-28  Martin Baulig  <martin@ximian.com>
20966
20967         * class.cs (TypeContainer.DefineMembers): Use the base type's full
20968         name when looking up the base class of a nested class.  Fixes #46977.
20969
20970 2003-07-26  Martin Baulig  <martin@ximian.com>
20971
20972         * expression.cs (Indexers.Indexer): New nested struct; contains
20973         getter, setter and the indexer's type.
20974         (Indexers.Properties): This is now an ArrayList of
20975         Indexers.Indexer's.
20976         (IndexerAccess.DoResolveLValue): Correctly set the type if the
20977         indexer doesn't have any getters.
20978
20979         * assign.cs (Assign.DoResolve): Also do the implicit conversions
20980         for embedded property and indexer assignments.
20981
20982 2003-07-26  Martin Baulig  <martin@ximian.com>
20983
20984         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
20985         preprocessor directive is not the first non-whitespace character
20986         on a line.
20987
20988 2003-07-26  Martin Baulig  <martin@ximian.com>
20989
20990         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
20991         namespace parsing, follow the spec more closely.
20992
20993         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
20994         NamespaceEntry.Lookup().
20995
20996 2003-07-25  Martin Baulig  <martin@ximian.com>
20997
20998         * MethodCore.cs (OverridesSomething): New public field; it's set
20999         from TypeContainer.DefineMembers if this method overrides
21000         something (which doesn't need to be a method).  Fix #39462.
21001
21002 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21003
21004         * typemanager.cs (GetMembers): Ensure that the list of members is
21005         reversed. This keeps things in sync.
21006
21007         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21008         find an AttributeUsage attribute.
21009
21010         * expression.cs (Invocation.OverloadResolve): Perform the check
21011         which disallows Invoke to be directly called on a Delegate.
21012
21013         (Error_InvokeOnDelegate): Report error cs1533.
21014
21015 2003-07-25  Martin Baulig  <martin@ximian.com>
21016
21017         * expression.cs (Indexers.GetIndexersForType): Only look in the
21018         interface hierarchy if the requested type is already an
21019         interface.  Fixes #46788 while keeping #46502 fixed.
21020
21021 2003-07-25  Martin Baulig  <martin@ximian.com>
21022
21023         * class.cs (TypeContainer.DefineMembers): Check whether all
21024         readonly fields have been assigned and report warning CS0649 if
21025         not.
21026
21027         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21028         a valuetype.
21029
21030 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21031
21032         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21033         returned from GetMethods to make things consistent with the
21034         assumptions MCS makes about ordering of methods.
21035
21036         This should comprehensively fix bug #45127 and it does :-)
21037
21038         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21039         ordering is actually reverse.
21040
21041         * Clean up some debug messages I left lying around.
21042
21043         * interface.cs (Populate*): Get rid of code which emits attributes
21044         since the stage in which we emit attributes is the 'Emit' stage,
21045         not the define stage.
21046
21047         (Emit): Move attribute emission for interface members here.
21048
21049 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21050
21051         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21052         closely: we eliminate methods in base types when we have an
21053         applicable method in a top-level type.
21054
21055         Please see section 14.5.5.1 for an exact description of what goes
21056         on. 
21057
21058         This fixes bug #45127 and a host of other related to corlib compilation.
21059
21060         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21061         array is the method corresponding to the top-level type (this is
21062         because of the changes made to icall.c) so we change this
21063         accordingly.
21064
21065         (MethodGroupExpr.Name): This too.
21066
21067         * typemanager.cs (GetElementType): New method which does the right
21068         thing when compiling corlib. 
21069
21070         * everywhere: Make use of the above in the relevant places.
21071
21072 2003-07-22  Martin Baulig  <martin@ximian.com>
21073
21074         * cs-parser.jay (invocation_expression): Moved
21075         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21076         `cast_expression', but create a InvocationOrCast which later
21077         resolves to either an Invocation or a Cast.
21078
21079         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21080         method; call this before EmitStatement() to make sure that this
21081         expression can be used as a statement.
21082
21083         * expression.cs (InvocationOrCast): New class; resolves to either
21084         an Invocation or a Cast.
21085
21086         * statement.cs (StatementExpression): Call ResolveStatement() on
21087         the ExpressionStatement before emitting it.
21088
21089 2003-07-21  Martin Baulig  <martin@ximian.com>
21090
21091         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21092         `ref' and `out' attributes match; fixes #46220.
21093         (MemberAccess.ResolveMemberAccess): You can't reference a type
21094         through an expression; fixes #33180.
21095         (Indexers.GetIndexersForType): Don't return the indexers from
21096         interfaces the class implements; fixes #46502.
21097
21098 2003-07-21  Martin Baulig  <martin@ximian.com>
21099
21100         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21101         CS0661 checks; fixes bug #30442.
21102
21103 2003-07-21  Martin Baulig  <martin@ximian.com>
21104
21105         * decl.cs (AdditionResult): Added `Error'.
21106
21107         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21108
21109         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21110         makes cs0031.cs actually work.
21111
21112 2003-07-20  Martin Baulig  <martin@ximian.com>
21113
21114         * namespace.cs: Fixed that bug which caused a crash when compiling
21115         the debugger's GUI.
21116
21117 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21118
21119         * typemanager.cs (LookupTypeReflection): Never expose types which
21120         are NotPublic, NestedPrivate, NestedAssembly, or
21121         NestedFamANDAssem.  We used to return these, and later do a check
21122         that would report a meaningful error, but the problem is that we
21123         would not get the real match, if there was a name override.
21124
21125 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21126
21127         * namespace.cs (Namespace, Name): Do not compute the namespace
21128         name dynamically, compute it in the constructor.  This reduced
21129         memory usage by 1697 KB.
21130
21131         * driver.cs: Use --pause to pause at the end.
21132
21133 2003-07-17  Peter Williams  <peter@newton.cx>
21134
21135         * Makefile: Change the name of the test target so that it doesn't
21136         conflict with the recursive test target.
21137
21138 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21139
21140         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21141         AddressOf): Do not use EmitThis, that was wrong, use the actual
21142         this pointer.
21143
21144 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21145
21146         * class.cs (MethodData.Define): While checking if a method is an
21147         interface implementation, improve the test: If we are not public
21148         (use new test here: use the computed MethodAttributes directly,
21149         instead of the parsed modifier flags) check if the `implementing'
21150         method comes from an interface or not.
21151
21152         * pending.cs (VerifyPendingMethods): Slightly better error
21153         message.
21154
21155         * makefile: add test target that does the mcs bootstrap.
21156
21157 2003-07-16  Ravi Pratap  <ravi@ximian.com>
21158
21159         * interface.cs (Define): Do nothing here since there are no
21160         members to populate etc. Move the attribute emission out of here
21161         since this was just totally the wrong place to put it. Attribute
21162         application happens during the 'Emit' phase, not in the 'Define'
21163         phase.
21164
21165         (Emit): Add this method and move the attribute emission here
21166
21167         * rootcontext.cs (EmitCode): Call the Emit method on interface
21168         types too.
21169
21170 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21171
21172         * expression.cs (OverloadResolve): Report error only if Location
21173         is not 'Null' which means that there was a probe going on.
21174
21175 2003-07-14  Martin Baulig  <martin@ximian.com>
21176
21177         * expression.cs (ConditionalLogicalOperator): New public class to
21178         implement user defined conditional logical operators.
21179         This is section 14.11.2 in the spec and bug #40505.
21180
21181 2003-07-14  Martin Baulig  <martin@ximian.com>
21182
21183         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
21184
21185 2003-07-14  Martin Baulig  <martin@ximian.com>
21186
21187         * codegen.cs (EmitContext.InFixedInitializer): New public field.
21188
21189         * ecore.cs (IVariable.VerifyFixed): New interface method.
21190
21191         * expression.cs (Unary.ResolveOperator): When resolving the `&'
21192         operator, check whether the variable is actually fixed.  Fixes bug
21193         #36055.  Set a variable definitely assigned when taking its
21194         address as required by the spec.
21195
21196         * statement.cs (LocalInfo.IsFixed): New field.
21197         (LocalInfo.MakePinned): Set `IsFixed' to true.
21198
21199 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21200
21201         * attribute.cs (Attribute.Resolve): While doing a Member lookup
21202         for .ctors, ensure that we only ask for members declared in the
21203         attribute type (BindingFlags.DeclaredOnly).
21204
21205         Fixes bug #43632.
21206
21207         * expression.cs (Error_WrongNumArguments): Report error 1501
21208         correctly the way CSC does.
21209
21210 2003-07-13  Martin Baulig  <martin@ximian.com>
21211
21212         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
21213         lookup on the fully qualified name, to make things like "X.X" work
21214         where "X.X" is a fully qualified type name, but we also have a
21215         namespace "X" in the using list.  Fixes #41975.
21216
21217 2003-07-13  Martin Baulig  <martin@ximian.com>
21218
21219         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
21220         function. If we're a CompoundAssign, we need to create an embedded
21221         CompoundAssign, not an embedded Assign.
21222         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
21223         Fixes #45854.
21224
21225 2003-07-13  Martin Baulig  <martin@ximian.com>
21226
21227         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
21228         work to fix bug #46088.
21229
21230 2003-07-13  Ravi Pratap <ravi@ximian.com>
21231
21232         * class.cs (Operator.Emit): Do not emit attributes here - it is
21233         taken care of by the Method class that we delegate too. This takes
21234         care of bug #45876.
21235
21236 2003-07-10  Martin Baulig  <martin@ximian.com>
21237
21238         * expression.cs (TypeOfVoid): New class.
21239         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
21240
21241 2003-07-10  Martin Baulig  <martin@ximian.com>
21242
21243         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
21244         bug #35957.
21245
21246 2003-07-10  Martin Baulig  <martin@ximian.com>
21247
21248         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
21249         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
21250
21251         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
21252
21253         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
21254
21255 2003-07-10  Martin Baulig  <martin@ximian.com>
21256
21257         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
21258         of decimal.  Fixes #42850.
21259
21260         NOTE: I also fixed the created byte blob, but this doesn't work on
21261         the MS runtime and csc never produces any byte blobs for decimal
21262         arrays.
21263
21264 2003-07-10  Martin Baulig  <martin@ximian.com>
21265
21266         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
21267         structs; fixes #32068.
21268         (Block.AddChildVariableNames): Fixed #44302.
21269
21270 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21271
21272         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
21273
21274 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21275
21276         * attribute.cs: And this test is onger needed.
21277
21278 2003-07-08  Martin Baulig  <martin@ximian.com>
21279
21280         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
21281         inaccessible types.  Fixes #36313.
21282
21283         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
21284
21285         * namespace.cs (NamespaceEntry): Create implicit entries for all
21286         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
21287         implicit entries for N1.N2 and N1.
21288
21289 2003-07-08  Martin Baulig  <martin@ximian.com>
21290
21291         Rewrote the handling of namespaces to fix a lot of the issues
21292         wrt. `using' aliases etc.
21293
21294         * namespace.cs (Namespace): Splitted this class into a
21295         per-assembly `Namespace' and a per-file `NamespaceEntry'.
21296
21297         * typemanager.cs (TypeManager.IsNamespace): Removed.
21298         (TypeManager.ComputeNamespaces): Only compute namespaces from
21299         loaded assemblies here, not the namespaces from the assembly we're
21300         currently compiling.
21301
21302 2003-07-08  Martin Baulig  <martin@ximian.com>
21303
21304         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
21305
21306 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21307
21308         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
21309         already fixed it.  
21310
21311         I thought about the memory savings here, but LookupTypeReflection
21312         is used under already very constrained scenarios.  Compiling
21313         corlib or mcs only exposes one hit, so it would not really reduce
21314         any memory consumption.
21315
21316 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21317
21318         * typemanager.cs: fixes bug #45889 by only adding public types from
21319         other assemblies to the list of known types.
21320
21321 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21322
21323         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
21324         on the type we resolved.
21325
21326 2003-07-05  Martin Baulig  <martin@ximian.com>
21327
21328         * pending.cs (PendingImplementation.ParentImplements): Don't
21329         create the proxy if the parent is abstract.
21330
21331         * class.cs (TypeContainer.DefineIndexers): Process explicit
21332         interface implementations first.  Fixes #37714.
21333
21334 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
21335
21336         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
21337         defined recursively;  but since we modify the input parameters
21338         (left is set to `this' temporarily), we reset this value if the
21339         left_is_explicit is false, which gives the original semantics to
21340         the code.  
21341
21342         * literal.cs (NullPointer): new class used to represent a null
21343         literal in a pointer context.
21344
21345         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
21346         type is a pointer, use a NullPointer object instead of a
21347         NullLiteral.   Closes 43687
21348
21349         (ExplicitConversion): Convert pointer values using
21350         the conv opcode to the proper type.
21351
21352         * ecore.cs (New): change ValueTypeVariable property into a method,
21353         that returns whether the valuetype is suitable for being used.
21354
21355         * expression.cs (Binary.DoNumericPromotions): Only return if we
21356         the int constant was a valid uint, and we can return both left and
21357         right as uints.  If not, we continue processing, to trigger the
21358         type conversion.  This fixes 39018.
21359
21360         * statement.cs (Block.EmitMeta): During constant resolution, set
21361         the CurrentBlock property on the emitcontext, so that we resolve
21362         constants propertly.
21363
21364 2003-07-02  Martin Baulig  <martin@ximian.com>
21365
21366         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
21367         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
21368
21369         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
21370         than emitting it here.
21371
21372         * statement.cs: Fixed some more flow analysis bugs.
21373
21374 2003-07-02  Martin Baulig  <martin@ximian.com>
21375
21376         * class.cs (MethodData.Define): When implementing interface
21377         methods, set Final unless we're Virtual.
21378
21379         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
21380         check work for interface methods.
21381
21382 2003-07-01  Martin Baulig  <martin@ximian.com>
21383
21384         * ecore.cs (EmitContext.This): Replaced this property with a
21385         GetThis() method which takes a Location argument.  This ensures
21386         that we get the correct error location for a CS0188.
21387
21388 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
21389
21390         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
21391         ImplicitStandardConversion.
21392
21393         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
21394
21395 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
21396
21397         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
21398         optimization.
21399
21400 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
21401
21402         * class.cs (Constructor.Define): Turn off initlocals for unsafe
21403         constructors.
21404
21405         (MethodData.Define): Turn off initlocals for unsafe methods.
21406
21407 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
21408
21409         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
21410         complete;  Fixes #37521.
21411
21412         * delegate.cs: Use Modifiers.TypeAttr to compute the
21413         TypeAttributes, instead of rolling our own.  This makes the flags
21414         correct for the delegates.
21415
21416 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
21417
21418         * class.cs (Constructor.Define): Set the private flag for static
21419         constructors as well.
21420
21421         * cs-parser.jay (statement_expression): Set the return value to
21422         null, to avoid a crash when we catch an error.
21423
21424 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
21425
21426         * cs-parser.jay: Applied patch from Jackson that adds support for
21427         extern and unsafe modifiers to destructor declarations.
21428
21429         * expression.cs: Report error 21 if the user is trying to index a
21430         System.Array.
21431
21432         * driver.cs: Add an error message, suggested by the bug report.
21433
21434         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
21435         if we do not have a ": this ()" constructor initializer.  Fixes 45149
21436
21437 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
21438
21439         * namespace.cs: Add some information to reduce FAQs.
21440
21441 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
21442
21443         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
21444         underlying enumeration types.  Fixes #43915.
21445
21446         * expression.cs: Treat ushort/short as legal values to be used in
21447         bitwise operations.
21448
21449 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
21450
21451         * delegate.cs: transfer custom attributes for paramenters from
21452         the delegate declaration to Invoke and BeginInvoke.
21453
21454 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21455
21456         * attribute.cs: handle custom marshalers and emit marshal info
21457         for fields, too.
21458
21459 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
21460
21461         * makefile.gnu: Added anonymous.cs to the compiler sources.
21462
21463 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
21464
21465         * iterators.cs: Change the name of the proxy class to include two
21466         underscores.
21467
21468         * cs-parser.jay: Update grammar to include anonymous methods.
21469
21470         * anonymous.cs: new file.
21471
21472 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
21473
21474         * class.cs (Field.Define): Add missing test for pointers and
21475         safety. 
21476
21477 2003-05-27  Ravi Pratap  <ravi@ximian.com>
21478
21479         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
21480         we use the stobj opcode.
21481
21482         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
21483         since it wasn't the correct fix. 
21484
21485         It still is puzzling that we are required to use stobj for IntPtr
21486         which seems to be a ValueType.
21487
21488 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
21489
21490         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
21491         during regular simple name resolution.   Now, the trick is that
21492         instead of returning for processing the simplename, we do a
21493         TypeManager.LookupType (ie, a rooted lookup as opposed to a
21494         contextual lookup type).   If a match is found, return that, if
21495         not, return for further composition.
21496
21497         This fixes long-standing 30485.
21498
21499         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21500         using the address to initialize an object, do an Stobj instead of
21501         using the regular Stelem.
21502
21503         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
21504         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
21505         Because if we are a BaseIndexerAccess that value will be true.
21506         Fixes 43643.
21507
21508         * statement.cs (GotoCase.Resolve): Return after reporting an
21509         error, do not attempt to continue. 
21510
21511         * expression.cs (PointerArithmetic.Emit): If our operand is a
21512         long, convert our constants to match the operand before
21513         multiplying.  Convert to I type before adding.   Fixes 43670.
21514
21515 2003-05-14  Ravi Pratap  <ravi@ximian.com>
21516
21517         * enum.cs (ImplicitConversionExists) : Rename to
21518         ImplicitEnumConversionExists to remove ambiguity. 
21519
21520         * ecore.cs (NullCast): New type of cast expression class which
21521         basically is very similar to EmptyCast with the difference being
21522         it still is a constant since it is used only to cast a null to
21523         something else
21524         (eg. (string) null)
21525
21526         * convert.cs (ImplicitReferenceConversion): When casting a null
21527         literal, we return a NullCast.
21528
21529         * literal.cs (NullLiteralTyped): Remove - I don't see why this
21530         should be around anymore.
21531
21532         The renaming (reported was slightly wrong). Corrections:
21533
21534         ConvertImplicitStandard -> ImplicitConversionStandard
21535         ConvertExplicitStandard -> ExplicitConversionStandard
21536
21537         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
21538         before passing them in !
21539
21540         * convert.cs (ImplicitConversionStandard): When comparing for
21541         equal expr and target types, ensure that expr is not a
21542         NullLiteral.
21543
21544         In general, we must not be checking (expr_type ==
21545         target_type) in the top level conversion methods
21546         (ImplicitConversion, ExplicitConversion etc). This checking is
21547         done in the methods that they delegate to.
21548
21549 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
21550
21551         * convert.cs: Move Error_CannotConvertType,
21552         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
21553         ImplicitNumericConversion, ImplicitConversionExists,
21554         ImplicitUserConversionExists, StandardConversionExists,
21555         FindMostEncompassedType, FindMostSpecificSource,
21556         FindMostSpecificTarget, ImplicitUserConversion,
21557         ExplicitUserConversion, GetConversionOperators,
21558         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
21559         TryImplicitIntConversion, Error_CannotConvertImplicit,
21560         ConvertImplicitRequired, ConvertNumericExplicit,
21561         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
21562         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
21563         its own file.
21564
21565         Perform the following renames:
21566
21567         StandardConversionExists -> ImplicitStandardConversionExists
21568         ConvertImplicit -> ImplicitConversion
21569         ConvertImplicitStandard -> ImplicitStandardConversion
21570         TryImplicitIntConversion -> ImplicitIntConversion
21571         ConvertImplicitRequired -> ImplicitConversionRequired
21572         ConvertNumericExplicit -> ExplicitNumericConversion
21573         ConvertReferenceExplicit -> ExplicitReferenceConversion
21574         ConvertExplicit -> ExplicitConversion
21575         ConvertExplicitStandard -> ExplicitStandardConversion
21576
21577 2003-05-19  Martin Baulig  <martin@ximian.com>
21578
21579         * statement.cs (TypeInfo.StructInfo): Made this type protected.
21580         (TypeInfo): Added support for structs having structs as fields.
21581
21582         * ecore.cs (FieldExpr): Implement IVariable.
21583         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
21584         VariableInfo for the field.
21585
21586 2003-05-18  Martin Baulig  <martin@ximian.com>
21587
21588         * expression.cs (This.DoResolve): Report a CS0027 if we're
21589         emitting a field initializer.
21590
21591 2003-05-18  Martin Baulig  <martin@ximian.com>
21592
21593         * expression.cs (This.ResolveBase): New public function.
21594         (This.DoResolve): Check for CS0188.
21595
21596         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
21597         This.Resolve().
21598
21599         * ecore.cs (MethodGroupExpr.DoResolve): Set the
21600         `instance_expression' to null if we don't have any non-static
21601         methods.
21602
21603 2003-05-18  Martin Baulig  <martin@ximian.com>
21604
21605         Reworked the way how local variables and parameters are handled by
21606         the flow analysis code.
21607
21608         * statement.cs (TypeInfo, VariableMap): New public classes.
21609         (VariableInfo): New public class.  This is now responsible for
21610         checking whether a variable has been assigned.  It is used for
21611         parameters and local variables.
21612         (Block.EmitMeta): Take the InternalParameters as argument; compute
21613         the layout of the flow vectors here.
21614         (Block.LocalMap, Block.ParameterMap): New public properties.
21615         (FlowBranching): The .ctor doesn't get the InternalParameters
21616         anymore since Block.EmitMeta() now computes the layout of the flow
21617         vector.
21618         (MyStructInfo): This class is now known as `StructInfo' and nested
21619         in `TypeInfo'; we don't access this directly anymore.
21620
21621         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
21622         property and removed IsAssigned(), IsFieldAssigned(),
21623         SetAssigned() and SetFieldAssigned(); we now call them on the
21624         VariableInfo so we don't need to duplicate this code everywhere.
21625
21626         * expression.cs (ParameterReference): Added `Block block' argument
21627         to the .ctor.
21628         (LocalVariableReference, ParameterReference, This): The new
21629         VariableInfo class is now responsible for all the definite
21630         assignment stuff.
21631
21632         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
21633         IsParameterAssigned, SetParameterAssigned): Removed.
21634
21635 2003-05-18  Martin Baulig  <martin@ximian.com>
21636
21637         * typemanager.cs (InitCoreTypes): Try calling
21638         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
21639         the 3-args-version.  Corlib now also needs our `void_type'.
21640         (GetMethod): Added overloaded version which takes an optional
21641         `bool report_errors' to allow lookups of optional methods.
21642
21643 2003-05-12  Martin Baulig  <martin@ximian.com>
21644
21645         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
21646         only used for locals and not for parameters.
21647
21648 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
21649
21650         * support.cs (InternalParameters.ParameterType): Return the
21651         ExternalType of the parameter.
21652
21653         * parameter.cs (Parameter.ExternalType): drop the two arguments,
21654         they were unused.
21655
21656 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
21657
21658         * class.cs (MethodData.Define): Do not set the `newslot' on
21659         interface members, if they are also flagged as "override".
21660
21661         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
21662         better code for ++i and i++.  This only works for static fields
21663         and local variables.
21664
21665         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
21666         want to pull the DeclSpace out of the builder_to_declspace instead
21667         of the TypeBuilder (like in TypeContainer.FindMembers).
21668
21669         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
21670         instead of LookupTypeContainer.  Fixes the crash on .NET for
21671         looking up interface members.
21672
21673         * const.cs: Create our own emit context during the Definition
21674         stage, so that constants are evaluated in the proper context, when
21675         a recursive definition happens.
21676
21677 2003-05-11  Martin Baulig  <martin@ximian.com>
21678
21679         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
21680         new block for a switch section.
21681         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
21682         the adding/lookup in the switch block.  Fixes #39828.
21683
21684 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
21685
21686         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
21687         functionality: I needed to convert the data after I had performed
21688         the add/sub operation into the operands type size.
21689
21690         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
21691         pass the type for the box operation, otherwise the resulting
21692         object would have been of type object.
21693
21694         (BoxedCast): Add constructor to specify the type to box as.
21695
21696 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
21697
21698         * iterators.cs: I was reusing the `count' variable inadvertently,
21699         take steps to not allow this to happen.
21700
21701 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
21702
21703         * attribute.cs (Attribute.Resolve): Params attributes are encoded
21704         by creating an array at the point where the params starts and
21705         putting all those arguments there, then adjusting the size of the
21706         array.
21707
21708 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
21709
21710         * expression.cs (New.AddressOf): Implement interface
21711         IMemoryLocation.  This is used when the `new' operator is used in
21712         the context of an invocation to a method on a value type.
21713
21714         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
21715         example. 
21716
21717         * namespace.cs: Also check the using aliases here.
21718
21719         * driver.cs: Move the test for using validity after the types have
21720         been entered, so we do a single pass that also includes the using
21721         aliases. 
21722
21723         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
21724         in the regular case.   CreateSiblingForFinally is doing extra
21725         error checking.
21726
21727         * attribute.cs (GetAttributeArgumentExpression): Store the result
21728         on an out value, and use the return value to indicate failure
21729         instead of using null (which is a valid return for Constant.GetValue).
21730
21731         * statement.cs: Perform the analysis flow for the increment
21732         portion after the statement, because this will be the real flow of
21733         execution.  Fixes #42385
21734
21735         * codegen.cs (EmitContext.EmitArgument,
21736         EmitContext.EmitStoreArgument): New helper functions when the
21737         RemapToProxy flag is set.
21738
21739         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
21740         function.
21741
21742         Add support for remapping parameters. 
21743
21744         * iterators.cs: Propagate parameter values;  Store parameter
21745         values in the proxy classes.
21746
21747 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
21748
21749         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
21750         need a proxy reference;  I do not know what I was thinking
21751
21752         * cs-parser.jay (constructor_initializer): catch another error,
21753         and display nice message.
21754
21755         (field_declaration): catch void field declaration
21756         to flag a better error. 
21757
21758         * class.cs (MemberBase.CheckBase): Report an error instead of a
21759         warning if a new protected member is declared in a struct. 
21760         (Field.Define): catch the error of readonly/volatile.
21761
21762         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
21763
21764         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
21765         volatile variable is taken
21766
21767 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
21768
21769         * statement.cs (Fixed.Resolve): Report an error if we are not in
21770         an unsafe context.
21771
21772 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
21773
21774         * typemanager.cs: reuse the code that handles type clashes for
21775         delegates and enumerations.
21776
21777         * class.cs (Report28): Always report.
21778
21779         * expression.cs (EncodeAsAttribute): Allow nulls here.
21780
21781 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
21782
21783         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
21784         the functionality for testing whether an expression is valid for
21785         an attribute here.  Also handle the case of arrays of elements
21786         being stored. 
21787
21788         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
21789         encoding a linear array into an array of objects that are suitable
21790         to be passed to an CustomAttributeBuilder.
21791
21792         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
21793
21794         * ecore.cs: (FieldExpr): Handle field remapping here.
21795
21796         * iteratators.cs: Pass the instance variable (if the method is an
21797         instance method) to the constructors, so we can access the field
21798         variables on the class.
21799
21800         TODO: Test this with structs.  I think the THIS variable on
21801         structs might have to be a pointer, and not a refenrece
21802
21803 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
21804
21805         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
21806         local variables to fields in a proxy class.
21807
21808         * iterators.cs (PopulateProxy): Rename our internal fields to
21809         <XXX>.  
21810         Create a <THIS> field if we are an instance method, so we can
21811         reference our parent container variables.
21812         (MapVariable): Called back from the EmitContext code to enter a
21813         new variable to field mapping into the proxy class (we just create
21814         a FieldBuilder).
21815
21816         * expression.cs
21817         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
21818         for using the remapped locals to fields.
21819
21820         I placed the code here, because that gives the same semantics to
21821         local variables, and only changes the Emit code.
21822
21823         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
21824         statements inside iterators.
21825         (VariableInfo): Add a FieldBuilder for the cases when we are
21826         remapping local variables to fields in a proxy class
21827
21828         * ecore.cs (SimpleNameResolve): Avoid testing two times for
21829         current_block != null.
21830
21831         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
21832         not cope with strings, as it has been moved to the
21833         TableSwitchEmit.  Fixed bug in switch generation.
21834
21835         * expression.cs (New.DoResolve): Provide more context for the user
21836         when reporting an error.
21837
21838         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
21839         pointers. 
21840
21841         * expression.cs (MemberAccess.DoResolve): When we get a type back,
21842         check the permissions for it.  Note than in a type-resolution
21843         context the check was already present in DeclSpace.ResolveType,
21844         but was missing from the MemberAccess.
21845
21846         (ArrayCreation.CheckIndices): warn if the user has
21847         more nested levels of expressions, but there are no more
21848         dimensions specified.  Avoids crash on bug 41906.
21849
21850 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
21851
21852         * statement.cs (Block): replace Implicit bool, for a generic
21853         flags.   
21854         New flag: `Unchecked'.  This is used during the EmitMeta phase
21855         (which is out-of-line with the regular Resolve/Emit process for a
21856         statement, as this is done ahead of time, but still gets a chance
21857         to call constant resolve).
21858
21859         (Block.Flags): new enum for adding a new flag.
21860
21861         (Block.EmitMeta): track the state of unchecked.
21862
21863         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
21864         to enable constant resolution to work there as well.
21865
21866 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
21867
21868         * typemanager.cs (ienumerable_type): Also look up
21869         System.Collections.IEnumerable. 
21870
21871 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
21872
21873         TODO: Test more than one conditional per method.
21874
21875         * class.cs (Indexer.Define): Report the location where the user is
21876         referencing the unsupported feature.
21877
21878         (MethodData): Overload the use of `conditionals' to
21879         minimize the creation of needless ArrayLists.   This saves roughly
21880         212kb on my machine.
21881
21882         (Method): Implement the new IIteratorContainer interface.
21883         (Method.SetYields): Implement the method by setting the ModFlags
21884         to contain METHOD_YIELDS.
21885
21886         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
21887         which just got set to null.
21888
21889         * iterators.cs: New file.
21890
21891         (Yield, YieldBreak): New statements.
21892
21893         * statement.cs (Return.Resolve): Flag an error if we are used in
21894         an iterator method.
21895
21896         * codegen.cs (InIterator): New flag set if the code is being
21897         compiled in an iterator method.
21898
21899         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
21900         internal modifier, and we just use it to avoid adding extra
21901         fields, as this is seldom used.  
21902
21903         * cs-parser.jay: Add yield_statement (yield and yield break).
21904
21905         * driver.cs: New flag -v2 to turn on version 2 features. 
21906
21907         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
21908         hashtable when v2 is enabled.
21909
21910 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
21911
21912         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
21913         there is already a namespace defined with this name.
21914
21915         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
21916         people upgraded their corlibs.
21917
21918         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
21919         always use fully qualified types, no need to use the compiler
21920         front end.
21921
21922         (TypeManager.IsNamespace): Use binarysearch.
21923
21924         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
21925         AddDelegate): I did not quite use the new IsValid API properly: I
21926         have to pass the short-name and the fullname.  I was passing only
21927         the basename instead of the fullname sometimes. 
21928
21929         (TypeContainer.DefineType): call NamespaceClash.
21930
21931         * interface.cs (Interface.DefineType): use NamespaceClash before
21932         defining the type.
21933
21934         * delegate.cs (Delegate.DefineType): use NamespaceClash before
21935         defining the type.
21936
21937         * enum.cs: (Enum.DefineType): use NamespaceClash before
21938         defining the type.
21939
21940         * typemanager.cs (: 3-line patch that gives us some tasty 11%
21941         speed increase.  First, use the negative_hits cache when we get a
21942         negative.  Second, add the type with its full original name
21943         instead of the new . and + encoded name (reflection uses + to
21944         separate type from a nested type).  Use LookupTypeReflection
21945         directly which bypasses the type->name hashtable (that we already
21946         know does not contain the type.
21947
21948         * decl.cs (DeclSpace.ResolveTypeExpr): track the
21949         location/container type. 
21950
21951         * driver.cs: When passing utf8, use directly the UTF8Encoding.
21952
21953 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
21954
21955         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
21956
21957         * delegate.cs (NewDelegate.Resolve): Test whether an instance
21958         method is being referenced in the method group from a static
21959         context, and report error 120 if so.
21960
21961         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
21962         Error118. 
21963
21964         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
21965         is created, we create the A namespace).
21966
21967         * cs-parser.jay: A namespace also introduces a DeclarationFound.
21968         Fixes #41591
21969
21970 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
21971
21972         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
21973         invocation to ModuleBuilder.GetType with the same values will
21974         return a new type instance, so we need to cache its return
21975         values. 
21976
21977         * expression.cs (Binary.ResolveOperator): Only allow the compare
21978         operators on enums if they are of the same type.
21979
21980         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
21981         types of ValueType on their own case.  Before we were giving them
21982         the same treatment as objects.
21983
21984         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
21985         fullname.  Short name is used to compare against container name.
21986         Fullname is used to check against defined namespace names.
21987
21988         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
21989         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
21990
21991         (Method.CheckBase): Call parent.
21992         (MemberBase.CheckBase): Check for protected members on sealed
21993         classes.
21994         (PropertyBase.CheckBase): Call parent.
21995         (Field.Define): Call parent.
21996
21997         * report.cs: Negative error codes are now mapped to 8000 - code,
21998         so that the display is render more nicely.
21999
22000         * typemanager.cs: Do not use try/catch, instead report a regular
22001         error. 
22002
22003         (GetPointerType, GetReferenceType): These methods provide
22004         mechanisms to obtain the T* and T& from a T.  We had the code
22005         previously scattered around the code base, and it also used
22006         TypeManager.LookupType that would go through plenty of caches.
22007         This one goes directly to the type source.
22008
22009         In some places we did the Type.GetType followed by
22010         ModuleBuilder.GetType, but not in others, so this unifies the
22011         processing as well.
22012
22013         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22014         statements now that we have namespace information.
22015
22016         * typemanager.cs (IsNamespace): New method, returns whether the
22017         string presented is a namespace or not.
22018
22019         (ComputeNamespaces): New public entry point, computes the list of
22020         available namespaces, using the GetNamespaces API call in Mono, or
22021         the slower version in MS.NET.   
22022
22023         Now before we start the semantic analysis phase, we have a
22024         complete list of namespaces including everything that the user has
22025         provided.
22026
22027         Deleted old code to cache namespaces in .nsc files.
22028
22029 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22030
22031         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22032         class/struct location definition Location for the implicit
22033         constructor location.
22034
22035         (Operator.Define): Use the location of the operator for the
22036         implicit Method definition.
22037
22038         (Constructor.Emit): use the constructor location for the implicit
22039         base initializer constructor.
22040
22041         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22042         and the Expression class now contains two new methods:
22043
22044         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22045         isolate type lookup from the rest of the resolution process.
22046
22047         Since we use Expressions to hold type definitions due to the way
22048         we parse the input we have historically overloaded Resolve to
22049         perform the Type lookups if a special flag is passed.  Now this is
22050         eliminated and two methods take their place. 
22051
22052         The differences in the two methods between xStep and xTerminal is
22053         that xStep is involved in our current lookup system that uses
22054         SimpleNames to compose a name, while xTerminal is used just to
22055         catch the case where the simplename lookup failed.
22056
22057 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22058
22059         * expression.cs (ResolveMemberAccess): Remove redundant code.
22060         TypeExpr expressions are always born fully resolved.
22061
22062         * interface.cs (PopulateMethod): Do not lookup the types twice.
22063         We were doing it once during SemanticAnalysis and once during
22064         PopulateMethod.
22065
22066         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22067         in local variable type definitions, were being returned as a
22068         SimpleName (we decomposed everything into a string), that is
22069         because primary_expression was being used instead of a type in the
22070         grammar (reduce/reduce conflicts).
22071
22072         The part that was wrong is that we converted the expression into a
22073         string (an oversimplification in one hand, compounded with primary
22074         expressions doing string concatenation).
22075
22076         So things like:
22077
22078         A.B.C [] x;
22079
22080         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22081         using clauses from working on this particular context.  And a type
22082         was being matched directly against "A.B.C[]".
22083
22084         We now use the correct approach, and allow for ComposedCast to be
22085         part of the unary expression.  So the "A.B.C []" become a composed
22086         cast of "A.B.C" (as a nested group of MemberAccess with a
22087         SimpleName at the end) plus the rank composition "[]". 
22088
22089         Also fixes 35567
22090
22091 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22092
22093         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22094         for the access level checking.
22095
22096         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22097         `TypeContainer container', because I kept getting confused when I
22098         was debugging this code.
22099
22100         * expression.cs (Indexers): Instead of tracking getters/setters,
22101         we now track them in parallel.  We create one arraylist less, but
22102         most importantly it is possible now for the LValue code to find a
22103         matching get for a set.
22104
22105         (IndexerAccess.DoResolveLValue): Update the code.
22106         GetIndexersForType has been modified already to extract all the
22107         indexers from a type.  The code assumed it did not.
22108
22109         Also make the code set the correct return type for the indexer.
22110         This was fixed a long time ago for properties, but was missing for
22111         indexers.  It used to be void_type.
22112
22113         (Binary.Emit): Test first for doubles instead of
22114         floats, as they are more common.
22115
22116         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22117         when dealing with floats and the <=, >= operators.  This fixes bug
22118         #39314 
22119
22120         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22121         to load the array value by emitting a load on the foreach variable
22122         type.  This was incorrect.  
22123
22124         We now emit the code to load an element using the the array
22125         variable type, and then we emit the conversion operator.
22126
22127         Fixed #40176
22128
22129 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22130
22131         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22132
22133 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22134
22135         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22136         test for protection before we test for signatures. 
22137
22138         (MethodSignature.ToString): implement.
22139
22140         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22141         to the case where we reduced into a LongConstant.
22142
22143         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22144         depend on whether the information is acurrate, because the
22145         Microsoft runtime will always claim that the array type is public,
22146         regardless of the real state.
22147
22148         If the type is a pointer, another problem happens: the type is
22149         reported as non-public in Microsoft.  
22150
22151         In both cases we have to call CheckAccessLevel recursively with
22152         the underlying type as the argument to be tested.
22153
22154 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22155
22156         * assign.cs (Assign.Emit): If we are dealing with a compound
22157         assignment expression, we should use the code path that stores the
22158         intermediate result in a temporary value.  This fixes #40903.
22159
22160         *expression.cs (Indirection.ToString): Provide ToString method for
22161         debugging. 
22162
22163 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
22164
22165         * class.cs: Null out fields holding references to Block objects so
22166         they can be garbage collected.
22167
22168         * expression.cs (OverloadResolve): Remove unused local.
22169
22170 2003-04-07  Martin Baulig  <martin@ximian.com>
22171
22172         * codegen.cs (EmitContext.CurrentFile): New public field.
22173         (EmitContext.Mark): Use the CurrentFile to check whether the
22174         location is in the correct file.
22175         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
22176
22177 2003-04-07  Martin Baulig  <martin@ximian.com>
22178
22179         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
22180
22181         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
22182         location.  [FIXME: The location argument which gets passed to this
22183         method is sometimes wrong!]
22184
22185 2003-04-07  Nick Drochak <ndrochak@gol.com>
22186
22187         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
22188
22189 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
22190
22191         * expression.cs (Indirection.EmitAssign): We were using the
22192         temporary, but returning immediately instead of continuing the
22193         EmitAssing flow.
22194
22195 2003-04-06  Martin Baulig  <martin@ximian.com>
22196
22197         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
22198         if it's a nested child, but also deriving from the outer class.
22199         See test 190.cs.
22200
22201         * typemanager.cs (IsNestedChildOf): Make this work if it's a
22202         nested child, but also deriving from the outer class.  See
22203         test-190.cs.
22204         (FilterWithClosure): We may access private members of the outer
22205         class if we're a nested child and deriving from the outer class.
22206         (RealMemberLookup): Only set `closure_private_ok' if the
22207         `original_bf' contained BindingFlags.NonPublic.
22208
22209 2003-04-05  Martin Baulig  <martin@ximian.com>
22210
22211         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
22212
22213 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
22214
22215         * class.cs (Event.Define): Do not allow abstract events to have
22216         initializers. 
22217
22218 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
22219
22220         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
22221         block in event declarations.
22222
22223         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
22224         value type, get its address.
22225
22226         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
22227         leaving a class on the stack instead of a boolean value (int
22228         0/1).  Change the code so we compare against null, and then the
22229         result against zero.
22230
22231         * class.cs (TypeContainer.GetClassBases): We were checking for the
22232         parent class being sealed too late.
22233
22234         * expression.cs (Binary.Emit): For <= and >= when dealing with
22235         floating point values, use cgt.un and clt.un instead of cgt and
22236         clt alone.
22237
22238 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
22239
22240         * statement.cs: Apply the same optimization as MS: skip the 
22241         GetEnumerator returning an IEnumerator, and use the one returning a 
22242         CharEnumerator instead. This allows us to avoid the try-finally block 
22243         and the boxing.
22244
22245 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
22246
22247         * cs-parser.jay: Attributes cannot be applied to
22248                          namespaces. Fixes #40473
22249
22250 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22251
22252         * class.cs:
22253         (Add*): check if the name is valid using the full name for constants,
22254         fields, properties and events.
22255
22256 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
22257
22258         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
22259         char constants to be part of the enumeration.
22260
22261         * expression.cs (Conditional.DoResolve): Add support for operator
22262         true. Implements the missing functionality from 14.12
22263
22264         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
22265         operator true/false as required by the spec.
22266
22267         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
22268         implicit conversion to boolean.
22269
22270         * statement.cs (Statement.ResolveBoolean): A boolean expression is
22271         also one where the type implements `operator true'. 
22272
22273         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
22274         get an expression that will invoke operator true based on an
22275         expression.  
22276
22277         (GetConversionOperators): Removed the hack that called op_True
22278         here.  
22279
22280         (Expression.ResolveBoolean): Move this from Statement.
22281
22282 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
22283
22284         * ecore.cs (FieldExpr): do not allow initialization of initonly
22285         fields on derived classes
22286
22287 2003-03-13  Martin Baulig  <martin@ximian.com>
22288
22289         * statement.cs (Block.Emit): Call ig.BeginScope() and
22290         ig.EndScope() when compiling with debugging info; call
22291         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
22292
22293 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
22294
22295         * expression.cs (Indexers): Do not construct immediately, allow
22296         for new members to be appended as we go.  Fixes 38143
22297
22298 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22299
22300         * expression.cs: save/restore context when resolving an unchecked
22301         expression.
22302
22303 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
22304
22305         * cfold.cs: Catch division by zero in modulus operator during
22306         constant folding.
22307
22308 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
22309
22310         * interface.cs (Interface.DefineMembers): Avoid defining members
22311         twice. 
22312
22313 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
22314
22315         * driver.cs: handle the +/- options for -noconfig
22316
22317         * statement.cs (Unckeched.Resolve): Also track the state of
22318         unchecked in the Resolve phase.
22319
22320 2003-02-27  Martin Baulig  <martin@ximian.com>
22321
22322         * ecore.cs (Expression.MemberLookup): Don't create a
22323         MethodGroupExpr for something which is not a method.  Fixes #38291.
22324
22325 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
22326
22327         * class.cs (MemberBase.CheckParameters): Also check that the type
22328         is unmanaged if it is a pointer.
22329
22330         * expression.cs (SizeOf.Resolve): Add location information.
22331
22332         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
22333         a managed type is declared.
22334
22335         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
22336         parameter modifiers as well.  Fixes bug 38606
22337
22338         * class.cs: Very sad.  Am backing out the speed up changes
22339         introduced by the ArrayList -> Array in the TypeContainer, as they
22340         were not actually that much faster, and introduced a bug (no error
22341         reports on duplicated methods).
22342
22343         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
22344         source first, this will guarantee that we have a valid expression
22345         before calling in lower levels functions that will require a
22346         resolved object.  Then use this original_source in the
22347         target.ResolveLValue instead of the original source that was
22348         passed to us.
22349
22350         Another change.  Use target.Resolve instead of LValueResolve.
22351         Although we are resolving for LValues, we will let the Assign code
22352         take care of that (it will be called again from Resolve).  This
22353         basically allows code like this:
22354
22355         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
22356         class Y { void A (X x) { x [0] += o; }
22357
22358         The problem was that the indexer was trying to resolve for
22359         set_Item (idx, object o) and never finding one.  The real set_Item
22360         was set_Item (idx, X).  By delaying the process we get the right
22361         semantics. 
22362
22363         Fixes bug 36505
22364
22365 2003-02-23  Martin Baulig  <martin@ximian.com>
22366
22367         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
22368         while calling DoEmit ().
22369
22370         * codegen.cs (EmitContext.Mark): Don't mark locations in other
22371         source files; if you use the #line directive inside a method, the
22372         compiler stops emitting line numbers for the debugger until it
22373         reaches the end of the method or another #line directive which
22374         restores the original file.
22375
22376 2003-02-23  Martin Baulig  <martin@ximian.com>
22377
22378         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
22379
22380 2003-02-23  Martin Baulig  <martin@ximian.com>
22381
22382         * statement.cs (Block.AddChildVariableNames): We need to call this
22383         recursively, not just for our immediate children.
22384
22385 2003-02-23  Martin Baulig  <martin@ximian.com>
22386
22387         * class.cs (Event.Define): Always make the field private, like csc does.
22388
22389         * typemanager.cs (TypeManager.RealMemberLookup): Make events
22390         actually work, fixes bug #37521.
22391
22392 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
22393
22394         * delegate.cs: When creating the various temporary "Parameters"
22395         classes, make sure that we call the ComputeAndDefineParameterTypes
22396         on those new parameters (just like we do with the formal ones), to
22397         allow them to be resolved in the context of the DeclSpace.
22398
22399         This fixes the bug that Dick observed in Bugzilla #38530.
22400
22401 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
22402
22403         * expression.cs (ResolveMemberAccess): When resolving a constant,
22404         do not attempt to pull a constant if the value was not able to
22405         generate a valid constant.
22406
22407         * const.cs (LookupConstantValue): Do not report more errors than required.
22408
22409 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22410
22411         * expression.cs: fixes bug #38328.
22412
22413 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22414
22415         * class.cs: Changed all the various members that can be part of a
22416         class from being an ArrayList to be an Array of the right type.
22417         During the DefineType type_list, interface_list, delegate_list and
22418         enum_list are turned into types, interfaces, delegates and enums
22419         arrays.  
22420
22421         And during the member population, indexer_list, event_list,
22422         constant_list, field_list, instance_constructor_list, method_list,
22423         operator_list and property_list are turned into their real arrays.
22424
22425         Although we could probably perform this operation earlier, for
22426         good error reporting we need to keep the lists and remove the
22427         lists for longer than required.
22428
22429         This optimization was triggered by Paolo profiling the compiler
22430         speed on the output of `gen-sample-program.pl' perl script. 
22431
22432         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
22433         not crash in methods like MemberLookupFailed that use this field.  
22434
22435         This problem arises when the compiler fails to resolve a type
22436         during interface type definition for example.
22437
22438 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22439
22440         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
22441         inherit from System.Object, so we have to stop at null, not only
22442         when reaching System.Object.
22443
22444 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
22445
22446         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
22447         DeclaredOnly because the parent indexer might have had a different
22448         name, but did not loop until the top of the hierarchy was reached.
22449
22450         The problem this one fixes is 35492: when a class implemented an
22451         indexer from an interface, we were getting the interface method
22452         (which was abstract) and we were flagging an error (can not invoke
22453         abstract method).
22454
22455         This also keeps bug 33089 functioning, and test-148 functioning.
22456
22457         * typemanager.cs (IsSpecialMethod): The correct way of figuring
22458         out if a method is special is to see if it is declared in a
22459         property or event, or whether it is one of the predefined operator
22460         names.   This should fix correctly #36804.
22461
22462 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
22463
22464         The goal here is to remove the dependency on EmptyCast.Peel ().
22465         Killing it completely.
22466
22467         The problem is that currently in a number of places where
22468         constants are expected, we have to "probe" for an EmptyCast, and
22469         Peel, which is not the correct thing to do, as this will be
22470         repetitive and will likely lead to errors. 
22471
22472         The idea is to remove any EmptyCasts that are used in casts that
22473         can be reduced to constants, so we only have to cope with
22474         constants. 
22475
22476         This bug hunt was triggered by Bug 37363 and the desire to remove
22477         the duplicate pattern where we were "peeling" emptycasts to check
22478         whether they were constants.  Now constants will always be
22479         constants.
22480
22481         * ecore.cs: Use an enumconstant here instead of wrapping with
22482         EmptyCast.  
22483
22484         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
22485         throwing me off.  By handling this we can get rid of a few hacks.
22486
22487         * statement.cs (Switch): Removed Peel() code.
22488
22489 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
22490
22491         * class.cs: Location information for error 508
22492
22493         * expression.cs (New.DoResolve): Add a guard against double
22494         resolution of an expression.  
22495
22496         The New DoResolve might be called twice when initializing field
22497         expressions (see EmitFieldInitializers, the call to
22498         GetInitializerExpression will perform a resolve on the expression,
22499         and later the assign will trigger another resolution
22500
22501         This leads to bugs (#37014)
22502
22503         * delegate.cs: The signature for EndInvoke should contain any ref
22504         or out parameters as well.  We were not doing this in the past. 
22505
22506         * class.cs (Field.Define): Do not overwrite the type definition
22507         inside the `volatile' group.  Turns out that volatile enumerations
22508         were changing the type here to perform a validity test, which
22509         broke conversions. 
22510
22511 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
22512
22513         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
22514         and structs, we do not want to load the instance variable
22515
22516         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
22517         enum_type has to be handled like an object reference (implicit
22518         conversions exists from this to object), but the regular IsClass
22519         and IsValueType tests will never return true for this one.
22520
22521         Also we use TypeManager.IsValueType instead of type.IsValueType,
22522         just for consistency with the rest of the code (this is only
22523         needed if we ever use the construct exposed by test-180.cs inside
22524         corlib, which we dont today).
22525
22526 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
22527
22528         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
22529         just InternalCall.
22530
22531 2003-02-09  Martin Baulig  <martin@ximian.com>
22532
22533         * namespace.cs (Namespace..ctor): Added SourceFile argument.
22534         (Namespace.DefineNamespaces): New static public method; this is
22535         called when we're compiling with debugging to add all namespaces
22536         to the symbol file.
22537
22538         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
22539         pass it to the Namespace's .ctor.
22540
22541         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
22542         and MethodBase arguments; pass the namespace ID to the symwriter;
22543         pass the MethodBase instead of the token to the symwriter.
22544         (SymbolWriter.DefineNamespace): New method to add a namespace to
22545         the symbol file.
22546
22547 2003-02-09  Martin Baulig  <martin@ximian.com>
22548
22549         * symbolwriter.cs: New file.  This is a wrapper around
22550         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
22551         methods here in near future.
22552
22553 2003-02-09  Martin Baulig  <martin@ximian.com>
22554
22555         * codegen.cs (EmitContext.Mark): Just pass the arguments to
22556         ILGenerator.MarkSequencePoint() which are actually used by the
22557         symbol writer.
22558
22559 2003-02-09  Martin Baulig  <martin@ximian.com>
22560
22561         * location.cs (SourceFile): New public sealed class.  This
22562         contains the name and an index which is used in the location's token.
22563         (Location): Reserve an appropriate number of bits in the token for
22564         the source file instead of walking over that list, this gives us a
22565         really huge performance improvement when compiling with debugging.
22566
22567         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
22568         `SourceFile' argument instead of a string.
22569         (Driver.ProcessFile): Add all the files via Location.AddFile(),
22570         but don't parse/tokenize here, we need to generate the list of all
22571         source files before we do that.
22572         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
22573         the files.
22574
22575         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
22576         instead of a string.
22577
22578         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
22579         of a string.
22580
22581 2003-02-09  Martin Baulig  <martin@ximian.com>
22582
22583         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
22584         filename on `#line default'.
22585
22586 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
22587
22588         * statement.cs: don't clear the pinned var when the fixed statement
22589         returns from the method (fixes bug#37752).
22590
22591 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
22592
22593         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
22594         to IsValueType.
22595
22596 2003-02-07  Martin Baulig  <martin@ximian.com>
22597
22598         * driver.cs: Removed the `--debug-args' command line argument.
22599
22600         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
22601         automatically by the AsssemblyBuilder.
22602         (CodeGen.InitializeSymbolWriter): We don't need to call any
22603         initialization function on the symbol writer anymore.  This method
22604         doesn't take any arguments.
22605
22606 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
22607
22608         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
22609         from referenced assemblies as well.
22610
22611 2003-02-02  Martin Baulig  <martin@ximian.com>
22612
22613         * class.cs (MethodData.Emit): Generate debugging info for external methods.
22614
22615 2003-02-02  Martin Baulig  <martin@ximian.com>
22616
22617         * class.cs (Constructor.Emit): Open the symbol writer before
22618         emitting the constructor initializer.
22619         (ConstructorInitializer.Emit): Call ec.Mark() to allow
22620         single-stepping through constructor initializers.
22621
22622 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
22623
22624         * class.cs: Handle error 549: do not allow virtual methods in
22625         sealed classes. 
22626
22627 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
22628
22629         * decl.cs: Check access levels when resolving types
22630
22631 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
22632
22633         * statement.cs: Add parameters and locals set in catch blocks that might 
22634         return to set vector
22635
22636 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
22637
22638         * class.cs (Operator): Set the SpecialName flags for operators.
22639
22640         * expression.cs (Invocation.DoResolve): Only block calls to
22641         accessors and operators on SpecialName methods.
22642
22643         (Cast.TryReduce): Handle conversions from char constants.
22644
22645
22646 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
22647
22648         * statement.cs: small memory and time optimization in FlowBranching.
22649
22650 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
22651
22652         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
22653         problem that the last fix but in the other sid (Set).
22654
22655         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
22656         access when there is no indexer in the hierarchy.
22657
22658 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
22659
22660         * class.cs: Combine some if statements.
22661
22662 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22663
22664         * driver.cs: fixed bug #37187.
22665
22666 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
22667
22668         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
22669         any indexer, it's needed to build a list with all the indexers in the
22670         hierarchy (AllGetters), else we have problems. Fixes #35653.
22671
22672 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
22673
22674         * class.cs (MethodData.Define): It is wrong for an interface
22675         implementation to be static in both cases: explicit and implicit.
22676         We were only handling this in one case.
22677
22678         Improve the if situation there to not have negations.
22679
22680         * class.cs (Field.Define): Turns out that we do not need to check
22681         the unsafe bit on field definition, only on usage.  Remove the test.
22682
22683 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22684
22685         * driver.cs: use assembly.Location instead of Codebase (the latest
22686         patch made mcs fail when using MS assemblies).
22687
22688 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
22689
22690         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
22691         get the path to *corlib.dll.
22692
22693 2003-01-21  Nick Drochak <ndrochak@gol.com>
22694
22695         * cs-tokenizer.cs:
22696         * pending.cs:
22697         * typemanager.cs: Remove compiler warnings
22698
22699 2003-01-20  Duncan Mak  <duncan@ximian.com>
22700
22701         * AssemblyInfo.cs: Bump the version number to 0.19.
22702
22703 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22704
22705         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
22706
22707 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
22708
22709         * class.cs (Constructor::Emit): Emit debugging info for constructors.
22710
22711 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
22712
22713         * cs-parser.jay: Small fix: we were not comparing the constructor
22714         name correctly.   Thanks to Zoltan for the initial pointer.
22715
22716 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
22717
22718         * cs-tokenizer.cs: Set file name when specified with #line
22719
22720 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
22721
22722         * cs-parser.jay: Only perform the constructor checks here if we
22723         are named like the class;  This will help provider a better
22724         error.  The constructor path is taken when a type definition is
22725         not found, but most likely the user forgot to add the type, so
22726         report that rather than the constructor error.
22727
22728 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
22729
22730         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
22731         allocations.
22732
22733 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
22734
22735         * cs-parser.jay: Add cleanup call.
22736
22737 2003-01-13  Duncan Mak  <duncan@ximian.com>
22738
22739         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
22740         consistent with other methods.
22741
22742 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
22743
22744         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
22745
22746 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
22747
22748         * attribute.cs: only set GuidAttr to true when we have a
22749         GuidAttribute.
22750
22751 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22752
22753         * ecore.cs:
22754         * expression.cs:
22755         * typemanager.cs: fixes to allow mcs compile corlib with the new
22756         Type.IsSubclassOf fix.
22757
22758 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
22759
22760         * expression.cs (LocalVariableReference.DoResolve): Classify a
22761         constant as a value, not as a variable.   Also, set the type for
22762         the variable.
22763
22764         * cs-parser.jay (fixed_statement): take a type instead of a
22765         pointer_type, so we can produce a better error message later.
22766
22767         * statement.cs (Fixed.Resolve): Flag types that are not pointers
22768         as an error.  
22769
22770         (For.DoEmit): Make inifinite loops have a
22771         non-conditional branch back.
22772
22773         (Fixed.DoEmit): First populate the pinned variables, then emit the
22774         statement, then clear the variables.  Before I was emitting the
22775         code once for each fixed piece.
22776
22777
22778 2003-01-08  Martin Baulig  <martin@ximian.com>
22779
22780         * statement.cs (FlowBranching.MergeChild): A break in a
22781         SWITCH_SECTION does not leave a loop.  Fixes #36155.
22782
22783 2003-01-08  Martin Baulig  <martin@ximian.com>
22784
22785         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
22786         lives in the same number space than `param_map'.  Fixes #36154.
22787
22788 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
22789
22790         * cs-parser.jay (constructor_declaration): Set the
22791         Constructor.ModFlags before probing for it.  This makes the
22792         compiler report 514, 515 and 132 (the code was there, but got
22793         broken). 
22794
22795         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
22796         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
22797         (GotoCase.Resolve): Set `Returns' to ALWAYS.
22798
22799 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
22800
22801         * enum.cs: create the enum static fields using the enum type.
22802
22803 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
22804
22805         * class.cs: don't try to create the ParamBuilder for the return
22806         type if it's not needed (and handle it breaking for the ms runtime
22807         anyway).
22808
22809 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
22810
22811         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
22812
22813 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
22814
22815         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
22816         the command.   This showed up while compiling the JANET source
22817         code, which used \r as its only newline separator.
22818
22819 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
22820
22821         * class.cs (Method.Define): If we are an operator (because it
22822         reuses our code), then set the SpecialName and HideBySig.  #36128
22823
22824 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
22825
22826         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
22827         exception, report error 120 `object reference required'.
22828
22829         * driver.cs: Add --pause option, used during to measure the size
22830         of the process as it goes with --timestamp.
22831
22832         * expression.cs (Invocation.DoResolve): Do not allow methods with
22833         SpecialName to be invoked.
22834
22835 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
22836
22837         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
22838         number before adding it.
22839
22840 2002-12-21  Ravi Pratap  <ravi@ximian.com>
22841
22842         * ecore.cs (StandardImplicitConversion): When in an unsafe
22843         context, we allow conversion between void * to any other pointer
22844         type. This fixes bug #35973.
22845
22846 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
22847
22848         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
22849         is not thrown when extensionless outputs are used 
22850
22851 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22852
22853         * rootcontext.cs: fixed compilation of corlib.
22854
22855 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
22856
22857         * attribute.cs (Attributes.Contains): Add new method.
22858
22859         * class.cs (MethodCore.LabelParameters): if the parameter is an
22860         `out' parameter, check that no attribute `[In]' has been passed.
22861
22862         * enum.cs: Handle the `value__' name in an enumeration.
22863
22864 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
22865
22866         * decl.cs: Added special case to allow overrides on "protected
22867         internal" methods
22868
22869 2002-12-18  Ravi Pratap  <ravi@ximian.com>
22870
22871         * attribute.cs (Attributes.AddAttributeSection): Rename to this
22872         since it makes much more sense.
22873
22874         (Attributes.ctor): Don't require a Location parameter.
22875
22876         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
22877
22878         * attribute.cs (ApplyAttributes): Remove extra Location parameters
22879         since we already have that information per attribute.
22880
22881         * everywhere : make appropriate changes.
22882
22883         * class.cs (LabelParameters): Write the code which actually
22884         applies attributes to the return type. We can't do this on the MS
22885         .NET runtime so we flag a warning in the case an exception is
22886         thrown.
22887
22888 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
22889
22890         * const.cs: Handle implicit null conversions here too.
22891
22892 2002-12-17  Ravi Pratap  <ravi@ximian.com>
22893
22894         * class.cs (MethodCore.LabelParameters): Remove the extra
22895         Type [] parameter since it is completely unnecessary. Instead
22896         pass in the method's attributes so that we can extract
22897         the "return" attribute.
22898
22899 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
22900
22901         * cs-parser.jay (parse): Use Report.Error to flag errors instead
22902         of ignoring it and letting the compile continue.
22903
22904         * typemanager.cs (ChangeType): use an extra argument to return an
22905         error condition instead of throwing an exception.
22906
22907 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
22908
22909         * expression.cs (Unary.TryReduce): mimic the code for the regular
22910         code path.  Perform an implicit cast in the cases where we can
22911         implicitly convert to one of the integral types, and then reduce
22912         based on that constant.   This fixes bug #35483.
22913
22914 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22915
22916         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
22917
22918 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22919
22920         * namespace.cs: fixed bug #35489.
22921
22922 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
22923
22924         * class.cs: Remove some dead code.
22925
22926         * cs-parser.jay: Estimate the number of methods needed
22927         (RootContext.MethodCount);
22928
22929         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
22930         numbers instead of StringBuilders.
22931
22932         * support.cs (PtrHashtable): Add constructor with initial size;
22933         We can now reduce reallocations of the method table.
22934
22935 2002-12-10  Ravi Pratap  <ravi@ximian.com>
22936
22937         * attribute.cs (ApplyAttributes): Keep track of the emitted
22938         attributes on a per-target basis. This fixes bug #35413.
22939
22940 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
22941
22942         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
22943         default to the Windows 1252 encoding.
22944
22945         (UnixParseOption): Support version, thanks to Alp for the missing
22946         pointer. 
22947
22948         * AssemblyInfo.cs: Add nice assembly information.
22949
22950         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
22951         (bug 35169).
22952
22953         * cs-parser.jay: Allow a trailing comma before the close bracked
22954         in the attribute_section production.
22955
22956         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
22957         address of the instance was being taken, I will take this out,
22958         because we take the address of the object immediately here.
22959
22960 2002-12-09  Ravi Pratap  <ravi@ximian.com>
22961
22962         * typemanager.cs (AreMultipleAllowed): Take care of the most
22963         obvious case where attribute type is not in the current assembly -
22964         stupid me ;-)
22965
22966 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
22967
22968         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
22969         definitions, instead of doing that afterwards.  
22970
22971         Also we use a nice little hack, depending on the constructor, we
22972         know if we are a "composed" name or a simple name.  Hence, we
22973         avoid the IndexOf test, and we avoid 
22974
22975         * codegen.cs: Add code to assist in a bug reporter to track down
22976         the source of a compiler crash. 
22977
22978 2002-12-07  Ravi Pratap  <ravi@ximian.com>
22979
22980         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
22981         types have been emitted for a given element and flag an error
22982         if something which does not have AllowMultiple set is used more
22983         than once.
22984
22985         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
22986         attribute types and their corresponding AllowMultiple properties
22987
22988         (AreMultipleAllowed): Check the property for a given type.
22989
22990         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
22991         property in the case we have a TypeContainer.
22992
22993         (Attributes.AddAttribute): Detect duplicates and just skip on
22994         adding them. This trivial fix catches a pretty gross error in our
22995         attribute emission - global attributes were being emitted twice!
22996
22997         Bugzilla bug #33187 is now fixed.
22998
22999 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23000
23001         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23002         instead of pp_and).
23003
23004         * expression.cs (Binary.ResolveOperator): I can only use the
23005         Concat (string, string, string) and Concat (string, string,
23006         string, string) if the child is actually a concatenation of
23007         strings. 
23008
23009 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23010
23011         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23012         context where we need a 2-character lookahead.
23013
23014         * pending.cs (PendingImplementation): Rework so we can keep track
23015         of interface types all the time, and flag those which were
23016         implemented by parents as optional.
23017
23018 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23019
23020         * expression.cs (Binary.ResolveOperator): Use
23021         String.Concat(string,string,string) or
23022         String.Concat(string,string,string,string) when possible. 
23023
23024         * typemanager: More helper methods.
23025
23026
23027 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23028
23029         * pending.cs: remove the bogus return from GetMissingInterfaces()
23030         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23031
23032 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23033
23034         * namespace.cs: avoid duplicated 'using xxx' being added to
23035         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23036         when we get more than one 'using' statement for the same namespace.
23037         Report a CS0105 warning for it.
23038
23039 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23040
23041         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23042         of calling getChar/putback, uses internal knowledge of it.    
23043
23044         (xtoken): Reorder tokenizer so most common patterns are checked
23045         first.  This reduces the compilation time in another 5% (from 8.11s
23046         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23047
23048         The parsing time is 22% of the compilation in mcs, and from that
23049         64% is spent on the tokenization process.  
23050
23051         I tried using a binary search for keywords, but this is slower
23052         than the hashtable.  Another option would be to do a couple of
23053         things:
23054
23055                 * Not use a StringBuilder, instead use an array of chars,
23056                   with a set value.  Notice that this way we could catch
23057                   the 645 error without having to do it *afterwards*.
23058
23059                 * We could write a hand-parser to avoid the hashtable
23060                   compares altogether.
23061
23062         The identifier consumption process takes 37% of the tokenization
23063         time.  Another 15% is spent on is_number.  56% of the time spent
23064         on is_number is spent on Int64.Parse:
23065
23066                 * We could probably choose based on the string length to
23067                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23068                   computations. 
23069
23070         Another 3% is spend on wrapping `xtoken' in the `token' function.
23071
23072         Handle 0xa0 as whitespace (#34752)
23073
23074 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23075
23076         * typemanager.cs (IsCLRType): New routine to tell whether a type
23077         is one of the builtin types.  
23078
23079         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23080         typecode in more places instead of doing pointer comparissions.
23081         We could leverage some knowledge about the way the typecodes are
23082         laid out.
23083
23084         New code to cache namespaces in assemblies, it is currently not
23085         invoked, to be used soon.
23086
23087         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23088
23089         * expression.cs (Binary.ResolveOperator): specially handle
23090         strings, and do not perform user-defined operator overloading for
23091         built-in types.
23092
23093 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23094
23095         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23096         internalcall as it is a pretty simple operation;  Avoid whenever
23097         possible to call Char.IsLetter.
23098
23099         (consume_identifier): Cut by half the number of
23100         hashtable calls by merging the is_keyword and GetKeyword behavior.
23101
23102         Do not short-circuit, because if we do, we
23103         report errors (ie, #if false && true would produce an invalid
23104         directive error);
23105
23106
23107 2002-11-24  Martin Baulig  <martin@ximian.com>
23108
23109         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23110         check constant ranges and report a CS0221.  Fixes #33186.
23111
23112 2002-11-24  Martin Baulig  <martin@ximian.com>
23113
23114         * cs-parser.jay: Make this work for uninitialized variable
23115         declarations in the `for' initializer.  Fixes #32416.
23116
23117 2002-11-24  Martin Baulig  <martin@ximian.com>
23118
23119         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23120         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23121
23122 2002-11-24  Martin Baulig  <martin@ximian.com>
23123
23124         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23125         argument; if true, we also check for user-defined conversions.
23126         This is only needed if both arguments are of a user-defined type.
23127         Fixes #30443, added test-175.cs.
23128         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23129
23130         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23131
23132 2002-11-24  Martin Baulig  <martin@ximian.com>
23133
23134         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23135         function to get the store opcode.
23136         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23137         only emit the Ldelema if the store opcode is Stobj.  You must run
23138         both test-34 and test-167 to test this.  Fixes #34529.
23139
23140 2002-11-23  Martin Baulig  <martin@ximian.com>
23141
23142         * ecore.cs (Expression.MemberLookup): Added additional
23143         `qualifier_type' argument which is used when we're being called
23144         from MemberAccess.DoResolve() and null if we're called from a
23145         SimpleName lookup.
23146         (Expression.MemberLookupFailed): New method to report errors; this
23147         does the CS1540 check and reports the correct error message.
23148
23149         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23150         argument for the CS1540 check and redone the way how we're dealing
23151         with private members.  See the comment in the source code for details.
23152         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23153         `closure_start_type' to `closure_qualifier_type' and check whether
23154         it's not null.  It was not this filter being broken, it was just
23155         being called with the wrong arguments.
23156
23157         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
23158         and pass it the correct `qualifier_type'; this also does the error
23159         handling for us.
23160
23161 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
23162
23163         * expression.cs (Invocation.EmitParams): If the we are dealing
23164         with a non-built-in value type, load its address as well.
23165
23166         (ArrayCreation): Use a a pretty constant instead
23167         of the hardcoded value 2.   Use 6 instead of 2 for the number of
23168         static initializers.  
23169
23170         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
23171         because they are not really value types, just glorified integers. 
23172
23173         * driver.cs: Do not append .exe, the CSC compiler does not do it.
23174
23175         * ecore.cs: Remove redundant code for enumerations, make them use
23176         the same code path as everything else, fixes the casting issue
23177         with enumerations in Windows.Forms.
23178
23179         * attribute.cs: Do only cast to string if it is a string, the
23180         validation happens later.
23181
23182         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
23183         people upgrade their corlibs.
23184
23185         * ecore.cs: Oops, enumerations were not following the entire code path
23186
23187 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
23188
23189         * typemanager.cs (FilterWithClosure): Commented out the test for
23190         1540 in typemanager.cs, as it has problems when accessing
23191         protected methods from a parent class (see test-174.cs). 
23192
23193         * attribute.cs (Attribute.ValidateGuid): new method.
23194         (Attribute.Resolve): Use above.
23195
23196 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
23197
23198         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
23199
23200         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
23201         handling for enumerations, as we only needed the TypeContainer
23202         functionality to begin with (this is required for the fix below to
23203         work for enums that reference constants in a container class for
23204         example). 
23205
23206         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
23207
23208         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
23209         a valid TypeBuilder to perform lookups on.o
23210
23211         * class.cs (InheritableMemberSignatureCompare): Use true in the
23212         call to GetGetMethod and GetSetMethod, because we are comparing
23213         the signature, and we need to get the methods *even* if they are
23214         private. 
23215
23216         (PropertyBase.CheckBase): ditto.
23217
23218         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
23219         GotoCase.Resolve): Use Peel on EmpytCasts.
23220
23221         * ecore.cs (EmptyCast): drop child, add Peel method.
23222
23223 2002-11-17  Martin Baulig  <martin@ximian.com>
23224
23225         * ecore.cs (EmptyCast.Child): New public property.
23226
23227         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
23228         label resolved to an EmptyCast.  Fixes #34162.
23229         (GotoCase.Resolve): Likewise.
23230         (Block.EmitMeta): Likewise.
23231
23232 2002-11-17  Martin Baulig  <martin@ximian.com>
23233
23234         * expression.cs (Invocation.BetterConversion): Prefer int over
23235         uint; short over ushort; long over ulong for integer literals.
23236         Use ImplicitConversionExists instead of StandardConversionExists
23237         since we also need to check for user-defined implicit conversions.
23238         Fixes #34165.  Added test-173.cs.
23239
23240 2002-11-16  Martin Baulig  <martin@ximian.com>
23241
23242         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
23243         with the `true' and `false' literals.  Fixes #33151.
23244
23245 2002-11-16  Martin Baulig  <martin@ximian.com>
23246
23247         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
23248         October 22nd; don't do the cs1540 check for static members.
23249
23250         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
23251         now using our own filter here and doing the cs1540 check again.
23252
23253 2002-11-16  Martin Baulig  <martin@ximian.com>
23254
23255         * support.cs (InternalParameters): Don't crash if we don't have
23256         any fixed parameters.  Fixes #33532.
23257
23258 2002-11-16  Martin Baulig  <martin@ximian.com>
23259
23260         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
23261         when looking up static methods to make this work on Windows.
23262         Fixes #33773.
23263
23264 2002-11-16  Martin Baulig  <martin@ximian.com>
23265
23266         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
23267         a setter rather than using PropertyInfo.CanWrite.
23268
23269 2002-11-15  Nick Drochak  <ndrochak@gol.com>
23270
23271         * class.cs: Allow acces to block member by subclasses. Fixes build
23272         breaker.
23273
23274 2002-11-14  Martin Baulig  <martin@ximian.com>
23275
23276         * class.cs (Constructor.Emit): Added the extern/block check.
23277         Fixes bug #33678.
23278
23279 2002-11-14  Martin Baulig  <martin@ximian.com>
23280
23281         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
23282         iteration while looking for indexers, this is needed because the
23283         indexer may have a different name in our base classes.  Fixed the
23284         error reporting (no indexers at all, not get accessor, no
23285         overloaded match).  Fixes bug #33089.
23286         (IndexerAccess.DoResolveLValue): Likewise.
23287
23288 2002-11-14  Martin Baulig  <martin@ximian.com>
23289
23290         * class.cs (PropertyBase.CheckBase): Make this work for multiple
23291         indexers.  Fixes the first part of bug #33089.
23292         (MethodSignature.InheritableMemberSignatureCompare): Added support
23293         for properties.
23294
23295 2002-11-13  Ravi Pratap  <ravi@ximian.com>
23296
23297         * attribute.cs (Attribute.Resolve): Catch the
23298         NullReferenceException and report it since it isn't supposed to
23299         happen. 
23300
23301 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
23302
23303         * expression.cs (Binary.EmitBranchable): Also handle the cases for
23304         LogicalOr and LogicalAnd that can benefit from recursively
23305         handling EmitBranchable.  The code now should be nice for Paolo.
23306
23307 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
23308
23309         * typemanager.cs (LookupType): Added a negative-hit hashtable for
23310         the Type lookups, as we perform quite a number of lookups on
23311         non-Types.  This can be removed once we can deterministically tell
23312         whether we have a type or a namespace in advance.
23313
23314         But this might require special hacks from our corlib.
23315
23316         * TODO: updated.
23317
23318         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
23319         and double which avoids a conversion from an integer to a double.
23320
23321         * expression.cs: tiny optimization, avoid calling IsConstant,
23322         because it effectively performs the lookup twice.
23323
23324 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
23325
23326         But a bogus return here to keep the semantics of the old code
23327         until the Mono runtime is fixed.
23328
23329         * pending.cs (GetMissingInterfaces): New method used to remove all
23330         the interfaces that are already implemented by our parent
23331         classes from the list of pending methods. 
23332
23333         * interface.cs: Add checks for calls after ResolveTypeExpr.
23334
23335 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
23336
23337         * class.cs (Class.Emit): Report warning 67: event not used if the
23338         warning level is beyond 3.
23339
23340         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
23341         being a NullLiteral.
23342
23343         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
23344         specifiers. 
23345
23346         * class.cs (TypeContainer.GetClassBases): Cover a missing code
23347         path that might fail if a type can not be resolved.
23348
23349         * expression.cs (Binary.Emit): Emit unsigned versions of the
23350         operators. 
23351
23352         * driver.cs: use error 5.
23353
23354 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23355
23356         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
23357
23358 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
23359
23360         * cs-parser.jay (switch_section): A beautiful patch from Martin
23361         Baulig that fixed 33094.
23362
23363 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
23364
23365         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
23366         Check whether the base is abstract and report an error if so.
23367
23368         * expression.cs (IndexerAccess.DoResolveLValue,
23369         IndexerAccess.DoResolve): ditto. 
23370
23371         (Invocation.DoResolve): ditto.
23372
23373         (Invocation.FullMethodDesc): Improve the report string.
23374
23375         * statement.cs (Block): Eliminate IsVariableDefined as it is
23376         basically just a wrapper for GetVariableInfo.
23377
23378         * ecore.cs (SimpleName): Use new 
23379
23380         * support.cs (ReflectionParamter.ParameterType): We unwrap the
23381         type, as we return the actual parameter ref/unref state on a
23382         different call.
23383
23384 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
23385
23386         * support.cs: Return proper flags REF/OUT fixing the previous
23387         commit.  
23388
23389         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
23390         not used to mean `ref' but `ref or out' in ParameterReference
23391
23392         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
23393         full type signature instead of calling TypeManger.CSharpName
23394         ourselves. 
23395
23396         * support.cs (InternalParameters.ParameterDesc): Do not compare
23397         directly to the modflags, because REF/OUT will actually be bitsets
23398         if set. 
23399
23400         * delegate.cs (VerifyMethod): Check also the modifiers.
23401
23402         * cs-tokenizer.cs: Fix bug where floating point values with an
23403         exponent where a sign was missing was ignored.
23404
23405         * driver.cs: Allow multiple assemblies to be specified in a single
23406         /r: argument
23407
23408 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
23409
23410         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
23411         because identifiers after a parenthesis would end up in this kind
23412         of production, and we needed to desamiguate it for having casts
23413         like:
23414
23415                 (UserDefinedType *) xxx
23416
23417 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
23418
23419         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
23420         we should set on the Bindingflags.NonPublic, but not turn on
23421         private_ok.  private_ok controls whether a Private member is
23422         returned (this is chekced on the filter routine), while the
23423         BindingFlags.NonPublic just controls whether private/protected
23424         will be allowed.   This fixes the problem part of the problem of
23425         private properties being allowed to be used in derived classes.
23426
23427         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
23428         so we can call the children DoResolveLValue method (this will
23429         properly signal errors on lvalue assignments to base properties)
23430
23431         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
23432         getter are null, and we have a property info, we know that this
23433         happened because the lookup failed, so we report an error 122 for
23434         protection level violation.
23435
23436         We also silently return if setter and getter are null in the
23437         resolve functions, this condition only happens if we have flagged
23438         the error before.  This is the other half of the problem. 
23439
23440         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
23441         not have accessibility information, that is why we were returning
23442         true in the filter function in typemanager.cs.
23443
23444         To properly report 122 (property is inaccessible because of its
23445         protection level) correctly, we report this error in ResolveAccess
23446         by failing if both the setter and the getter are lacking (ie, the
23447         lookup failed). 
23448
23449         DoResolve and DoLResolve have been modified to check for both
23450         setter/getter being null and returning silently, the reason being
23451         that I did not want to put the knowledge about this error in upper
23452         layers, like:
23453
23454         int old = Report.Errors;
23455         x = new PropertyExpr (...);
23456         if (old != Report.Errors)
23457                 return null;
23458         else
23459                 return x;
23460
23461         So the property expr is returned, but it is invalid, so the error
23462         will be flagged during the resolve process. 
23463
23464         * class.cs: Remove InheritablePropertySignatureCompare from the
23465         class, as we no longer depend on the property signature to compute
23466         whether it is possible to implement a method or not.
23467
23468         The reason is that calling PropertyInfo.GetGetMethod will return
23469         null (in .NET, in Mono it works, and we should change this), in
23470         cases where the Get Method does not exist in that particular
23471         class.
23472
23473         So this code:
23474
23475         class X { public virtual int A { get { return 1; } } }
23476         class Y : X { }
23477         class Z : Y { public override int A { get { return 2; } } }
23478
23479         Would fail in Z because the parent (Y) would not have the property
23480         defined.  So we avoid this completely now (because the alternative
23481         fix was ugly and slow), and we now depend exclusively on the
23482         method names.
23483
23484         (PropertyBase.CheckBase): Use a method-base mechanism to find our
23485         reference method, instead of using the property.
23486
23487         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
23488         routines are gone now.
23489
23490         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
23491         names, they were incorrectly named.
23492
23493         * cs-tokenizer.cs: Return are more gentle token on failure. 
23494
23495         * pending.cs (PendingImplementation.InterfaceMethod): This routine
23496         had an out-of-sync index variable, which caused it to remove from
23497         the list of pending methods the wrong method sometimes.
23498
23499 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
23500
23501         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
23502         CanWrite, because those refer to this particular instance of the
23503         property, and do not take into account the fact that we can
23504         override single members of a property.
23505
23506         Constructor requires an EmitContext.  The resolution process does
23507         not happen here, but we need to compute the accessors before,
23508         because the resolution does not always happen for properties.
23509
23510         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
23511         subclass, before we did not update this flag, but we did update
23512         bindingflags. 
23513
23514         (GetAccessors): Drop this routine, as it did not work in the
23515         presence of partially overwritten set/get methods. 
23516
23517         Notice that this broke the cs1540 detection, but that will require
23518         more thinking. 
23519
23520 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23521
23522         * class.cs:
23523         * codegen.cs:
23524         * driver.cs: issue a warning instead of an error if we don't support
23525         debugging for the platform. Also ignore a couple of errors that may
23526         arise when trying to write the symbols. Undo my previous patch.
23527
23528 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23529
23530         * driver.cs: ignore /debug switch except for Unix platforms.
23531
23532 2002-10-23  Nick Drochak  <ndrochak@gol.com>
23533
23534         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
23535
23536 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
23537
23538         * driver.cs: Do not make mcs-debug conditional, so we do not break
23539         builds that use it.
23540
23541         * statement.cs (UsageVector.MergeChildren): I would like Martin to
23542         review this patch.  But basically after all the children variables
23543         have been merged, the value of "Breaks" was not being set to
23544         new_breaks for Switch blocks.  I think that it should be set after
23545         it has executed.  Currently I set this to the value of new_breaks,
23546         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
23547         conservative, but I do not understand this code very well.
23548
23549         I did not break anything in the build, so that is good ;-)
23550
23551         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
23552
23553 2002-10-20  Mark Crichton  <crichton@gimp.org>
23554
23555         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
23556
23557 2002-10-20  Nick Drochak  <ndrochak@gol.com>
23558
23559         * cfold.cs: Fixed compile blocker.
23560
23561 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
23562
23563         * driver.cs: I was chekcing the key, not the file.
23564
23565 2002-10-19  Ravi Pratap  <ravi@ximian.com>
23566
23567         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
23568         message that we were generating - we just need to silently return
23569         a null.
23570
23571 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
23572
23573         * class.cs (Event.Define): Change my previous commit, as this
23574         breaks the debugger.  This is a temporary hack, as it seems like
23575         the compiler is generating events incorrectly to begin with.
23576
23577         * expression.cs (Binary.ResolveOperator): Added support for 
23578         "U operator - (E x, E y)"
23579
23580         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
23581         y)".
23582
23583         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
23584         init-only variables, but this path did not take into account that
23585         there might be also instance readonly variables.  Correct this
23586         problem. 
23587
23588         This fixes bug 32253
23589
23590         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
23591         delegates as well.
23592
23593         * driver.cs: Change the extension for modules to `netmodule'
23594
23595         * cs-parser.jay: Improved slightly the location tracking for
23596         the debugger symbols.
23597
23598         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
23599         modifiers that were specified instead of the hardcoded value
23600         (FamAndAssem).  This was basically ignoring the static modifier,
23601         and others.  Fixes 32429.
23602
23603         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
23604         fixed a bug in the process (32476)
23605
23606         * expression.cs (ArrayAccess.EmitAssign): Patch from
23607         hwang_rob@yahoo.ca that fixes bug 31834.3
23608
23609 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
23610
23611         * driver.cs: Make the module extension .netmodule.
23612
23613 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
23614
23615         * driver.cs: Report an error if the resource file is not found
23616         instead of crashing.
23617
23618         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
23619         false, like Emit does.
23620
23621 2002-10-16  Nick Drochak  <ndrochak@gol.com>
23622
23623         * typemanager.cs: Remove unused private member.  Also reported mcs
23624         bug to report this as a warning like csc.
23625
23626 2002-10-15  Martin Baulig  <martin@gnome.org>
23627
23628         * statement.cs (Statement.Emit): Made this a virtual method; emits
23629         the line number info and calls DoEmit().
23630         (Statement.DoEmit): New protected abstract method, formerly knows
23631         as Statement.Emit().
23632
23633         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
23634
23635 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
23636
23637         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
23638         have fixed a remaining problem: not every AddXXXX was adding a
23639         fully qualified name.  
23640
23641         Now everyone registers a fully qualified name in the DeclSpace as
23642         being defined instead of the partial name.  
23643
23644         Downsides: we are slower than we need to be due to the excess
23645         copies and the names being registered this way.  
23646
23647         The reason for this is that we currently depend (on the corlib
23648         bootstrap for instance) that types are fully qualified, because
23649         we dump all the types in the namespace, and we should really have
23650         types inserted into the proper namespace, so we can only store the
23651         basenames in the defined_names array.
23652
23653 2002-10-10  Martin Baulig  <martin@gnome.org>
23654
23655         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
23656         from bug #31834, see the bug report for a testcase which is
23657         miscompiled.
23658
23659 2002-10-10  Martin Baulig  <martin@gnome.org>
23660
23661         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
23662         flow analysis code for this.
23663
23664         * statement.cs (Do, While, For): Tell the flow analysis code about
23665         infinite loops.
23666         (FlowBranching.UsageVector): Added support for infinite loops.
23667         (Block.Resolve): Moved the dead code elimination here and use flow
23668         analysis to do it.
23669
23670 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
23671
23672         * class.cs (Field.Define): Catch cycles on struct type
23673         definitions. 
23674
23675         * typemanager.cs (IsUnmanagedtype): Do not recursively check
23676         fields if the fields are static.  We only need to check instance
23677         fields. 
23678
23679         * expression.cs (As.DoResolve): Test for reference type.
23680
23681         * statement.cs (Using.ResolveExpression): Use
23682         ConvertImplicitRequired, not ConvertImplicit which reports an
23683         error on failture
23684         (Using.ResolveLocalVariableDecls): ditto.
23685
23686         * expression.cs (Binary.ResolveOperator): Report errors in a few
23687         places where we had to.
23688
23689         * typemanager.cs (IsUnmanagedtype): Finish implementation.
23690
23691 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
23692
23693         * expression.cs: Use StoreFromPtr instead of extracting the type
23694         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
23695
23696         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
23697         an enumeration value to a System.Enum, but System.Enum is not a
23698         value type, but an class type, so we need to box.
23699
23700         (Expression.ConvertExplicit): One codepath could return
23701         errors but not flag them.  Fix this.  Fixes #31853
23702
23703         * parameter.cs (Resolve): Do not allow void as a parameter type.
23704
23705 2002-10-06  Martin Baulig  <martin@gnome.org>
23706
23707         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
23708         if it's a class type and not a struct.  Fixes #31815.
23709
23710 2002-10-06  Martin Baulig  <martin@gnome.org>
23711
23712         * statement.cs: Reworked the flow analysis code a bit to make it
23713         usable for dead code elimination.
23714
23715 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23716
23717         * cs-parser.jay: allow empty source files. Fixes bug #31781.
23718
23719 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
23720
23721         * expression.cs (ComposedCast.DoResolveType): A quick workaround
23722         to fix the test 165, will investigate deeper.
23723
23724 2002-10-04  Martin Baulig  <martin@gnome.org>
23725
23726         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
23727         finally blocks actually work.
23728         (Try.Resolve): We don't need to create a sibling for `finally' if
23729         there is no finally block.
23730
23731 2002-10-04  Martin Baulig  <martin@gnome.org>
23732
23733         * class.cs (Constructor.Define): The default accessibility for a
23734         non-default constructor is private, not public.
23735
23736 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
23737
23738         * class.cs (Constructor): Make AllowedModifiers public, add
23739         EXTERN.
23740
23741         * cs-parser.jay: Perform the modifiers test here, as the
23742         constructor for the Constructor class usually receives a zero
23743         because of the way we create it (first we create, later we
23744         customize, and we were never checking the modifiers).
23745
23746         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
23747         is a version of LookupTypeReflection that includes the type-name
23748         cache.  This can be used as a fast path for functions that know
23749         the fully qualified name and are only calling into *.GetType() to
23750         obtain a composed type.
23751
23752         This is also used by TypeManager.LookupType during its type
23753         composition.
23754
23755         (LookupType): We now also track the real type name, as sometimes
23756         we can get a quey for the real type name from things like
23757         ComposedCast.  This fixes bug 31422.
23758
23759         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
23760         complete type fullname, it does not have to go through the type
23761         resolution system to obtain the composed version of the type (for
23762         obtaining arrays or pointers).
23763
23764         (Conditional.Emit): Use the EmitBoolExpression to
23765         generate nicer code, as requested by Paolo.
23766
23767         (ArrayCreation.CheckIndices): Use the patch from
23768         hwang_rob@yahoo.ca to validate the array initializers. 
23769
23770 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
23771
23772         * class.cs (ConstructorInitializer.Emit): simplify code by using
23773         Invocation.EmitCall, and at the same time, fix the bugs in calling
23774         parent constructors that took variable arguments. 
23775
23776         * ecore.cs (Expression.ConvertNumericExplicit,
23777         Expression.ImplicitNumericConversion): Remove the code that
23778         manually wrapped decimal (InternalTypeConstructor call is now gone
23779         as well).
23780
23781         * expression.cs (Cast.TryReduce): Also handle decimal types when
23782         trying to perform a constant fold on the type.
23783
23784         * typemanager.cs (IsUnmanagedtype): Partially implemented.
23785
23786         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
23787         that only turned off an error report, and did nothing else. 
23788
23789 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
23790
23791         * driver.cs: Handle and ignore /fullpaths
23792
23793 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
23794
23795         * expression.cs (Binary.ResolveOperator): Catch the case where
23796         DoNumericPromotions returns true, 
23797
23798         (Binary.DoNumericPromotions): Simplify the code, and the tests.
23799
23800 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
23801
23802         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
23803         report error 70.
23804
23805 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
23806
23807         * ecore.cs (ConvertNumericExplicit): It is not enough that the
23808         conversion exists, but it is also required that the conversion be
23809         performed.  This manifested in "(Type64Enum) 2".  
23810
23811         * class.cs (TypeManager.AddMethod): The fix is not to change
23812         AddEnum, because that one was using a fully qualified name (every
23813         DeclSpace derivative does), but to change the AddMethod routine
23814         that was using an un-namespaced name.  This now correctly reports
23815         the duplicated name.
23816
23817         Revert patch until I can properly fix it.  The issue
23818         is that we have a shared Type space across all namespaces
23819         currently, which is wrong.
23820
23821         Options include making the Namespace a DeclSpace, and merge
23822         current_namespace/current_container in the parser.
23823
23824 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
23825
23826         * cs-parser.jay: Improve error reporting when we get a different
23827         kind of expression in local_variable_type and
23828         local_variable_pointer_type. 
23829
23830         Propagate this to avoid missleading errors being reported.
23831
23832         * ecore.cs (ImplicitReferenceConversion): treat
23833         TypeManager.value_type as a target just like object_type.   As
23834         code like this:
23835
23836         ValueType v = 1;
23837
23838         Is valid, and needs to result in the int 1 being boxed before it
23839         is assigned to the value type v.
23840
23841         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
23842         to validate the enumeration name.
23843
23844         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
23845         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
23846         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
23847
23848         * ecore.cs (TryImplicitIntConversion): When doing an
23849         implicit-enumeration-conversion, check if the type is 64-bits and
23850         perform a conversion before passing to EnumConstant.
23851
23852 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
23853
23854         * decl.cs (Error_AmbiguousTypeReference); New routine used to
23855         report ambiguous type references.  Unlike the MS version, we
23856         report what the ambiguity is.   Innovation at work ;-)
23857
23858         (DeclSpace.FindType): Require a location argument to
23859         display when we display an ambiguous error.
23860
23861         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
23862
23863         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
23864
23865         * expression.cs (EmitDynamicInitializers): Apply patch from
23866         hwang_rob@yahoo.ca that fixes the order in which we emit our
23867         initializers. 
23868
23869 2002-09-21  Martin Baulig  <martin@gnome.org>
23870
23871         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
23872         delegate takes no arguments.
23873
23874 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
23875
23876         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
23877         from integers.
23878
23879         * expression.cs: Extract the underlying type.
23880
23881         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
23882
23883         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
23884
23885 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
23886
23887         * class.cs (TypeContainer.DefineType): We can not use the nice
23888         PackingSize with the size set to 1 DefineType method, because it
23889         will not allow us to define the interfaces that the struct
23890         implements.
23891
23892         This completes the fixing of bug 27287
23893
23894         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
23895         means also structs.  This fixes part of the problem. 
23896         (Expresion.ImplicitReferenceConversionExists): ditto.
23897
23898         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
23899         error if there were no errors reported during the type lookup
23900         process, to avoid duplicates or redundant errors.  Without this
23901         you would get an ambiguous errors plus a type not found.  We have
23902         beaten the user enough with the first error.  
23903
23904         (DeclSparce.FindType): Emit a warning if we have an ambiguous
23905         reference. 
23906
23907         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
23908         during the resolution process, stop the lookup, this avoids
23909         repeated error reports (same error twice).
23910
23911         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
23912
23913         * typemanager.cs (LookupType): Redo the type lookup code to match
23914         the needs of System.Reflection.  
23915
23916         The issue is that System.Reflection requires references to nested
23917         types to begin with a "+" sign instead of a dot.  So toplevel
23918         types look like: "NameSpace.TopLevelClass", and nested ones look
23919         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
23920         levels. 
23921
23922 2002-09-19  Martin Baulig  <martin@gnome.org>
23923
23924         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
23925         says that a method always returns or always throws an exception,
23926         don't report the CS0161.
23927
23928         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
23929         set `Returns = new_returns'.
23930
23931 2002-09-19  Martin Baulig  <martin@gnome.org>
23932
23933         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
23934         to an enum constant, check for a CS0176.
23935
23936 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
23937
23938         * class.cs (TypeContainer.CheckPairedOperators): Now we check
23939         for operators that must be in pairs and report errors.
23940
23941         * ecore.cs (SimpleName.DoResolveType): During the initial type
23942         resolution process, when we define types recursively, we must
23943         check first for types in our current scope before we perform
23944         lookups in the enclosing scopes.
23945
23946         * expression.cs (MakeByteBlob): Handle Decimal blobs.
23947
23948         (Invocation.VerifyArgumentsCompat): Call
23949         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
23950         I thought we were supposed to always call this, but there are a
23951         few places in the code where we dont do it.
23952
23953 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
23954
23955         * driver.cs: Add support in -linkres and -resource to specify the
23956         name of the identifier.
23957
23958 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
23959
23960         * ecore.cs (StandardConversionExists): Sync with the conversion
23961         code: allow anything-* to void* conversions.
23962
23963         (FindMostSpecificSource): Use an Expression argument
23964         instead of a Type, because we might be handed over a Literal which
23965         gets a few more implicit conversions that plain types do not.  So
23966         this information was being lost.
23967
23968         Also, we drop the temporary type-holder expression when not
23969         required.
23970
23971 2002-09-17  Martin Baulig  <martin@gnome.org>
23972
23973         * class.cs (PropertyBase.CheckBase): Don't check the base class if
23974         this is an explicit interface implementation.
23975
23976 2002-09-17  Martin Baulig  <martin@gnome.org>
23977
23978         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
23979         different `IndexerName' attributes.
23980
23981         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
23982         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
23983         virtual CommonResolve().
23984
23985 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
23986
23987         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
23988         and convert that to the UnderlyingType.
23989
23990         * statement.cs (Foreach.Resolve): Indexers are just like variables
23991         or PropertyAccesses.
23992
23993         * cs-tokenizer.cs (consume_string): Track line numbers and columns
23994         inside quoted strings, we were not doing this before.
23995
23996 2002-09-16  Martin Baulig  <martin@gnome.org>
23997
23998         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
23999         resolve it.  This is needed for the definite assignment check of the
24000         instance expression, fixes bug #29846.
24001         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24002
24003 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24004
24005         * parameter.cs: Fix compile error.  Cannot reference static member
24006         from an instance object.  Is this an mcs bug?
24007
24008 2002-09-14  Martin Baulig  <martin@gnome.org>
24009
24010         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24011         multiple times.  Fixes bug #30295, added test-166.cs.
24012
24013 2002-09-14  Martin Baulig  <martin@gnome.org>
24014
24015         * statement.cs (Block.Emit): Don't emit unreachable code.
24016         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24017         `break' statements.
24018         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24019
24020 2002-09-14  Martin Baulig  <martin@gnome.org>
24021
24022         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24023         is set.
24024
24025 2002-09-14  Martin Baulig  <martin@gnome.org>
24026
24027         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24028         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24029         be false on the ms runtime.
24030
24031 2002-09-13  Martin Baulig  <martin@gnome.org>
24032
24033         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24034         the CS0038 error message.
24035
24036 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24037
24038         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24039         constant inside, return it.
24040
24041 2002-09-12  Martin Baulig  <martin@gnome.org>
24042
24043         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24044         implicit conversion can be done between enum types.
24045
24046         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24047         check whether an implicit conversion to the current enum's UnderlyingType
24048         exists and report an error if not.
24049
24050         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24051         without debugging support.
24052
24053         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24054         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24055
24056 2002-09-12  Martin Baulig  <martin@gnome.org>
24057
24058         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24059
24060         * ecore.cs (IMemberExpr.DeclaringType): New property.
24061         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24062         nonstatic member of an outer type (CS0038).
24063
24064 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24065
24066         * driver.cs: Activate the using-error detector at warning level
24067         4 (at least for MS-compatible APIs).
24068
24069         * namespace.cs (VerifyUsing): Small buglett fix.
24070
24071         * pending.cs (PendingImplementation): pass the container pointer. 
24072
24073         * interface.cs (GetMethods): Allow for recursive definition.  Long
24074         term, I would like to move every type to support recursive
24075         definitions, not the current ordering mechanism that we have right
24076         now.
24077
24078         The situation is this: Attributes are handled before interfaces,
24079         so we can apply attributes to interfaces.  But some attributes
24080         implement interfaces, we will now handle the simple cases
24081         (recursive definitions will just get an error).  
24082
24083         * parameter.cs: Only invalidate types at the end if we fail to
24084         lookup all types.  
24085
24086 2002-09-09  Martin Baulig  <martin@gnome.org>
24087
24088         * ecore.cs (PropertyExpr.Emit): Also check for
24089         TypeManager.system_int_array_get_length so this'll also work when
24090         compiling corlib.  Fixes #30003.
24091
24092 2002-09-09  Martin Baulig  <martin@gnome.org>
24093
24094         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24095         and throw an exception if we can't get the type's size.  Fixed #30040,
24096         added test-165.cs.
24097
24098 2002-09-09  Martin Baulig  <martin@gnome.org>
24099
24100         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24101
24102         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24103         context.  Fixes bug #30027.
24104
24105         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24106         virtual functions.  Fixes bug #30043, added test-164.cs.
24107
24108 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24109
24110         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24111
24112 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24113
24114         * driver.cs: Use an object to get the windows codepage since it's not a
24115         static property.
24116
24117 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24118
24119         * statement.cs (For.Emit): for infinite loops (test == null)
24120         return whether there is a break inside, not always "true".
24121
24122         * namespace.cs (UsingEntry): New struct to hold the name of the
24123         using definition, the location where it is defined, and whether it
24124         has been used in a successful type lookup.
24125
24126         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24127         strings.
24128
24129         * decl.cs: ditto.
24130
24131 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24132
24133         * attribute.cs : Fix incorrect code which relied on catching
24134         a NullReferenceException to detect a null being passed in
24135         where an object was expected.
24136
24137 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24138
24139         * statement.cs (Try): flag the catch variable as assigned
24140
24141         * expression.cs (Cast): Simplified by using ResolveType instead of
24142         manually resolving.
24143
24144         * statement.cs (Catch): Fix bug by using ResolveType.
24145
24146 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24147
24148         * expression.cs (BetterConversion): Special case for when we have
24149         a NullLiteral as the argument and we have to choose between string
24150         and object types - we choose string the way csc does.
24151
24152         * attribute.cs (Attribute.Resolve): Catch the
24153         NullReferenceException and report error #182 since the Mono
24154         runtime no more has the bug and having this exception raised means
24155         we tried to select a constructor which takes an object and is
24156         passed a null.
24157
24158 2002-09-05  Ravi Pratap  <ravi@ximian.com>
24159
24160         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
24161         message (1502, 1503) when we can't locate a method after overload
24162         resolution. This is much more informative and closes the bug
24163         Miguel reported.
24164
24165         * interface.cs (PopulateMethod): Return if there are no argument
24166         types. Fixes a NullReferenceException bug.
24167
24168         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
24169         expressions too. Previously we were checking only in one place for
24170         positional arguments leaving out named arguments.
24171
24172         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
24173         type to the enum type is not allowed. Remove code corresponding to
24174         that.
24175
24176         (ConvertNumericExplicit): Allow explicit conversions from
24177         the underlying type to enum type. This precisely follows the spec
24178         and closes a bug filed by Gonzalo.
24179
24180 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24181
24182         * compiler.csproj:
24183         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
24184
24185 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
24186
24187         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
24188         it was important that we stored the right value after the
24189         reduction in `converted'.
24190
24191 2002-09-04  Martin Baulig  <martin@gnome.org>
24192
24193         * location.cs (Location.SymbolDocument): Use full pathnames for the
24194         source files.
24195
24196 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
24197
24198         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
24199         of the expression resolve mechanism, because that will catch the
24200         SimpleName error failures.
24201
24202         (Conditional): If we can not resolve the
24203         expression, return, do not crash.
24204
24205 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24206
24207         * cs-tokenizer.cs:
24208         (location): display token name instead of its number.
24209
24210 2002-08-28  Martin Baulig  <martin@gnome.org>
24211
24212         * expression.cs (Binary.ResolveOperator): Don't silently return
24213         but return an error if an operator cannot be applied between two
24214         enum types.
24215
24216 2002-08-28  Martin Baulig  <martin@gnome.org>
24217
24218         * class.cs (Constructor.Define): Set the permission attributes
24219         correctly instead of making all constructors public.
24220
24221 2002-08-28  Martin Baulig  <martin@gnome.org>
24222
24223         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
24224         for private members before reporting a CS0103; if we find anything,
24225         it's a CS0122.
24226
24227 2002-08-28  Martin Baulig  <martin@gnome.org>
24228
24229         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
24230         to check whether `closure_start_type == closure_invocation_type',
24231         we also need to check whether `m.DeclaringType == closure_invocation_type'
24232         before bypassing the permission checks.  We might be accessing
24233         protected/private members from the base class.
24234         (TypeManager.RealMemberLookup): Only set private_ok if private
24235         members were requested via BindingFlags.NonPublic.
24236
24237         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
24238
24239         * expression.cs (MemberAccess.ResolveMemberAccess): Set
24240         MethodGroupExpr.IsExplicitImpl if appropriate.
24241         (Invocation.DoResolve): Don't report the CS0120 for explicit
24242         interface implementations.
24243
24244 2002-08-27  Martin Baulig  <martin@gnome.org>
24245
24246         * expression.cs (Invocation.DoResolve): If this is a static
24247         method and we don't have an InstanceExpression, we must report
24248         a CS0120.
24249
24250 2002-08-25  Martin Baulig  <martin@gnome.org>
24251
24252         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
24253         `==' between a valuetype and an object.
24254
24255 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
24256
24257         * ecore.cs (TypeExpr): Provide a ToString method.
24258
24259 2002-08-24  Martin Baulig  <martin@gnome.org>
24260
24261         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
24262         now called proggie.dbg and it's a binary file.
24263
24264 2002-08-23  Martin Baulig  <martin@gnome.org>
24265
24266         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
24267
24268 2002-08-23  Martin Baulig  <martin@gnome.org>
24269
24270         * struct.cs (MyStructInfo.ctor): Make this work with empty
24271         structs; it's not allowed to use foreach() on null.
24272
24273 2002-08-23  Martin Baulig  <martin@gnome.org>
24274
24275         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
24276         writer the full pathname of the generated assembly.
24277
24278 2002-08-23  Martin Baulig  <martin@gnome.org>
24279
24280         * statements.cs (FlowBranching.UsageVector.MergeChildren):
24281         A `finally' block never returns or breaks; improved handling of
24282         unreachable code.
24283
24284 2002-08-23  Martin Baulig  <martin@gnome.org>
24285
24286         * statement.cs (Throw.Resolve): Allow `throw null'.
24287
24288 2002-08-23  Martin Baulig  <martin@gnome.org>
24289
24290         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
24291         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
24292         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
24293         MemberLookup would return a wrong event if this is an explicit
24294         interface implementation and the class has an event with the same
24295         name.
24296
24297 2002-08-23  Martin Baulig  <martin@gnome.org>
24298
24299         * statement.cs (Block.AddChildVariableNames): New public method.
24300         (Block.AddChildVariableName): Likewise.
24301         (Block.IsVariableNameUsedInChildBlock): Likewise.
24302         (Block.AddVariable): Check whether a variable name has already
24303         been used in a child block.
24304
24305         * cs-parser.jay (declare_local_variables): Mark all variable names
24306         from the current block as being used in a child block in the
24307         implicit block.
24308
24309 2002-08-23  Martin Baulig  <martin@gnome.org>
24310
24311         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
24312         find the symbol writer.
24313
24314         * driver.cs: csc also allows the arguments to /define being
24315         separated by commas, not only by semicolons.
24316
24317 2002-08-23  Martin Baulig  <martin@gnome.org>
24318
24319         * interface.cs (Interface.GetMembers): Added static check for events.
24320
24321 2002-08-15  Martin Baulig  <martin@gnome.org>
24322
24323         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
24324         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
24325
24326         * ecore.cs (Expression.MemberLookup): Added documentation and explained
24327         why the MethodData.EmitDestructor() change was necessary.
24328
24329 2002-08-20  Martin Baulig  <martin@gnome.org>
24330
24331         * class.cs (TypeContainer.FindMembers): Added static check for events.
24332
24333         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
24334
24335         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
24336         use Type.GetEvents(), not Type.FindMembers().
24337
24338 2002-08-20  Martin Baulig  <martin@gnome.org>
24339
24340         * decl.cs (MemberCache): Added a special method cache which will
24341         be used for method-only searched.  This ensures that a method
24342         search will return a MethodInfo with the correct ReflectedType for
24343         inherited methods.      
24344
24345 2002-08-20  Martin Baulig  <martin@gnome.org>
24346
24347         * decl.cs (DeclSpace.FindMembers): Made this public.
24348
24349 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24350
24351         * delegate.cs: fixed build on windows.
24352         [FIXME:  Filed as bug #29150: MCS must report these errors.]
24353
24354 2002-08-19  Ravi Pratap  <ravi@ximian.com>
24355
24356         * ecore.cs (StandardConversionExists): Return a false
24357         if we are trying to convert the void type to anything else
24358         since that is not allowed.
24359
24360         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
24361         we flag error 70 in the event an event is trying to be accessed
24362         directly from outside the declaring type.
24363
24364 2002-08-20  Martin Baulig  <martin@gnome.org>
24365
24366         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
24367         MemberCache from typemanager.cs to decl.cs.
24368
24369 2002-08-19  Martin Baulig  <martin@gnome.org>
24370
24371         * class.cs (TypeContainer): Implement IMemberContainer.
24372         (TypeContainer.DefineMembers): Create the MemberCache.
24373         (TypeContainer.FindMembers): Do better BindingFlags checking; only
24374         return public members if BindingFlags.Public was given, check
24375         whether members are static.
24376
24377 2002-08-16  Martin Baulig  <martin@gnome.org>
24378
24379         * decl.cs (DeclSpace.Define): Splitted this in Define and
24380         DefineMembers.  DefineMembers is called first and initializes the
24381         MemberCache.
24382
24383         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
24384         DefineMembers() on all our DeclSpaces.
24385
24386         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
24387         but call DefineMembers() on all nested interfaces.  We call their
24388         Define() in our new Define() function.
24389
24390         * interface.cs (Interface): Implement IMemberContainer.
24391         (Interface.Define): Moved all code except the attribute stuf to
24392         DefineMembers().
24393         (Interface.DefineMembers): Initialize the member cache.
24394
24395         * typemanager.cs (IMemberFinder): Removed this interface, we don't
24396         need this anymore since we can use MemberCache.FindMembers directly.
24397
24398 2002-08-19  Martin Baulig  <martin@gnome.org>
24399
24400         * typemanager.cs (MemberCache): When creating the cache for an
24401         interface type, add all inherited members.
24402         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
24403         to `out bool used_cache' and documented it.
24404         (TypeManager.MemberLookup): If we already used the cache in the first
24405         iteration, we don't need to do the interfaces check.
24406
24407 2002-08-19  Martin Baulig  <martin@gnome.org>
24408
24409         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
24410         here from IMemberFinder and don't implement this interface anymore.
24411         (DeclSpace.MemberCache): Moved here from IMemberFinder.
24412
24413         * typemanager.cs (IMemberFinder): This interface is now only used by
24414         classes which actually support the member cache.
24415         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
24416         since we only put DeclSpaces into this Hashtable.
24417         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
24418         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
24419
24420 2002-08-16  Martin Baulig  <martin@gnome.org>
24421
24422         * typemanager.cs (ICachingMemberFinder): Removed.
24423         (IMemberFinder.MemberCache): New property.
24424         (TypeManager.FindMembers): Merged this with RealFindMembers().
24425         This function will never be called from TypeManager.MemberLookup()
24426         so we can't use the cache here, just the IMemberFinder.
24427         (TypeManager.MemberLookup_FindMembers): Check whether the
24428         IMemberFinder has a MemberCache and call the cache's FindMembers
24429         function.
24430         (MemberCache): Rewrote larger parts of this yet another time and
24431         cleaned it up a bit.
24432
24433 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
24434
24435         * driver.cs (LoadArgs): Support quoting.
24436
24437         (Usage): Show the CSC-like command line arguments.
24438
24439         Improved a few error messages.
24440
24441 2002-08-15  Martin Baulig  <martin@gnome.org>
24442
24443         * typemanager.cs (IMemberContainer.Type): New property.
24444         (IMemberContainer.IsInterface): New property.
24445
24446         The following changes are conditional to BROKEN_RUNTIME, which is
24447         defined at the top of the file.
24448
24449         * typemanager.cs (MemberCache.MemberCache): Don't add the base
24450         class'es members, but add all members from TypeHandle.ObjectType
24451         if we're an interface.
24452         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
24453         is the current type.
24454         (MemberCache.CacheEntry.Container): Removed this field.
24455         (TypeHandle.GetMembers): Include inherited members.
24456
24457 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24458
24459         * typemanager.cs: fixed compilation and added a comment on a field that
24460         is never used.
24461
24462 2002-08-15  Martin Baulig  <martin@gnome.org>
24463
24464         * class.cs (ConstructorInitializer.Resolve): In the
24465         Expression.MemberLookup call, use the queried_type as
24466         invocation_type.
24467
24468         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
24469         declared' attribute, it's always true.
24470         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
24471         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
24472         temporary wrapper for FindMembers which tells MemberLookup whether
24473         members from the base classes are included in the return value.
24474         This will go away soon.
24475         (TypeManager.MemberLookup): Use this temporary hack here; once the
24476         new MemberCache is completed, we don't need to do the DeclaredOnly
24477         looping here anymore since the MemberCache will take care of this.
24478         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
24479         (MemberCache): When creating the MemberCache for a class, get
24480         members from the current class and all its base classes.
24481         (MemberCache.CacheEntry.Container): New field.  This is a
24482         temporary hack until the Mono runtime is fixed to distinguish
24483         between ReflectedType and DeclaringType.  It allows us to use MCS
24484         with both the MS runtime and the unfixed Mono runtime without
24485         problems and without accecting performance.
24486         (MemberCache.SearchMembers): The DeclaredOnly looping from
24487         TypeManager.MemberLookup is now done here.      
24488
24489 2002-08-14  Martin Baulig  <martin@gnome.org>
24490
24491         * statement.cs (MyStructInfo.MyStructInfo): Don't call
24492         Type.GetFields on dynamic types but get the fields from the
24493         corresponding TypeContainer.
24494         (MyStructInfo.GetStructInfo): Added check for enum types.
24495
24496         * typemanager.cs (MemberList.IsSynchronized): Implemented.
24497         (MemberList.SyncRoot): Implemented.
24498         (TypeManager.FilterWithClosure): No need to check permissions if
24499         closure_start_type == closure_invocation_type, don't crash if
24500         closure_invocation_type is null.
24501
24502 2002-08-13  Martin Baulig  <martin@gnome.org>
24503
24504         Rewrote TypeContainer.FindMembers to use a member cache.  This
24505         gives us a speed increase of about 35% for the self-hosting MCS
24506         build and of about 15-20% for the class libs (both on GNU/Linux).
24507
24508         * report.cs (Timer): New class to get enhanced profiling.  This
24509         whole class is "TIMER" conditional since it remarkably slows down
24510         compilation speed.
24511
24512         * class.cs (MemberList): New class.  This is an IList wrapper
24513         which we're now using instead of passing MemberInfo[]'s around to
24514         avoid copying this array unnecessarily.
24515         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
24516         (ICachingMemberFinder, IMemberContainer): New interface.
24517         (TypeManager.FilterWithClosure): If `criteria' is null, the name
24518         has already been checked, otherwise use it for the name comparision.
24519         (TypeManager.FindMembers): Renamed to RealMemberFinder and
24520         provided wrapper which tries to use ICachingMemberFinder.FindMembers
24521         if possible.  Returns a MemberList, not a MemberInfo [].
24522         (TypeHandle): New class, implements IMemberContainer.  We create
24523         one instance of this class per type, it contains a MemberCache
24524         which is used to do the member lookups.
24525         (MemberCache): New class.  Each instance of this class contains
24526         all members of a type and a name-based hash table.
24527         (MemberCache.FindMembers): This is our new member lookup
24528         function.  First, it looks up all members of the requested name in
24529         the hash table.  Then, it walks this list and sorts out all
24530         applicable members and returns them.
24531
24532 2002-08-13  Martin Baulig  <martin@gnome.org>
24533
24534         In addition to a nice code cleanup, this gives us a performance
24535         increase of about 1.4% on GNU/Linux - not much, but it's already
24536         half a second for the self-hosting MCS compilation.
24537
24538         * typemanager.cs (IMemberFinder): New interface.  It is used by
24539         TypeManager.FindMembers to call FindMembers on a TypeContainer,
24540         Enum, Delegate or Interface.
24541         (TypeManager.finder_to_member_finder): New PtrHashtable.
24542         (TypeManager.finder_to_container): Removed.
24543         (TypeManager.finder_to_delegate): Removed.
24544         (TypeManager.finder_to_interface): Removed.
24545         (TypeManager.finder_to_enum): Removed.
24546
24547         * interface.cs (Interface): Implement IMemberFinder.
24548
24549         * delegate.cs (Delegate): Implement IMemberFinder.
24550
24551         * enum.cs (Enum): Implement IMemberFinder.
24552
24553         * class.cs (TypeContainer): Implement IMemberFinder.
24554
24555 2002-08-12  Martin Baulig  <martin@gnome.org>
24556
24557         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
24558
24559 2002-08-12  Martin Baulig  <martin@gnome.org>
24560
24561         * ecore.cs (ITypeExpression): New interface for expressions which
24562         resolve to a type.
24563         (TypeExpression): Renamed to TypeLookupExpression.
24564         (Expression.DoResolve): If we're doing a types-only lookup, the
24565         expression must implement the ITypeExpression interface and we
24566         call DoResolveType() on it.
24567         (SimpleName): Implement the new ITypeExpression interface.
24568         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
24569         hack, the situation that we're only looking up types can't happen
24570         anymore when this method is called.  Moved the type lookup code to
24571         DoResolveType() and call it.
24572         (SimpleName.DoResolveType): This ITypeExpression interface method
24573         is now doing the types-only lookup.
24574         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
24575         (ResolveFlags): Added MaskExprClass.
24576
24577         * expression.cs (MemberAccess): Implement the ITypeExpression
24578         interface.
24579         (MemberAccess.DoResolve): Added support for a types-only lookup
24580         when we're called via ITypeExpression.DoResolveType().
24581         (ComposedCast): Implement the ITypeExpression interface.
24582
24583         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
24584         Expression.Resolve() with ResolveFlags.Type instead.
24585
24586 2002-08-12  Martin Baulig  <martin@gnome.org>
24587
24588         * interface.cs (Interface.Define): Apply attributes.
24589
24590         * attribute.cs (Attribute.ApplyAttributes): Added support for
24591         interface attributes.
24592
24593 2002-08-11  Martin Baulig  <martin@gnome.org>
24594
24595         * statement.cs (Block.Emit): Only check the "this" variable if we
24596         do not always throw an exception.
24597
24598         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
24599         whether the property has a set accessor.
24600
24601 2002-08-11  Martin Baulig  <martin@gnome.org>
24602
24603         Added control flow analysis support for structs.
24604
24605         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
24606         with control flow analysis turned off.
24607         (IVariable): New interface.
24608         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
24609         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
24610         (FieldExpr.DoResolve): Resolve the instance expression with flow
24611         analysis turned off and do the definite assignment check after the
24612         resolving when we know what the expression will resolve to.
24613
24614         * expression.cs (LocalVariableReference, ParameterReference):
24615         Implement the new IVariable interface, only call the flow analysis
24616         code if ec.DoFlowAnalysis is true.
24617         (This): Added constructor which takes a Block argument.  Implement
24618         the new IVariable interface.
24619         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
24620         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
24621         This does the definite assignment checks for struct members.
24622
24623         * class.cs (Constructor.Emit): If this is a non-static `struct'
24624         constructor which doesn't have any initializer, call
24625         Block.AddThisVariable() to tell the flow analysis code that all
24626         struct elements must be initialized before control returns from
24627         the constructor.
24628
24629         * statement.cs (MyStructInfo): New public class.
24630         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
24631         argument to this indexer.  If non-zero, check an individual struct
24632         member, not the whole struct.
24633         (FlowBranching.CheckOutParameters): Check struct members.
24634         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
24635         overloaded versions of these methods which take an additional
24636         `int field_idx' argument to check struct members.
24637         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
24638         overloaded versions of these methods which take an additional
24639         `string field_name' argument to check struct member.s
24640         (VariableInfo): Implement the IVariable interface.
24641         (VariableInfo.StructInfo): New public property.  Returns the
24642         MyStructInfo instance of the variable if it's a struct or null.
24643         (Block.AddThisVariable): New public method.  This is called from
24644         Constructor.Emit() for non-static `struct' constructor which do
24645         not have any initializer.  It creates a special variable for the
24646         "this" instance variable which will be checked by the flow
24647         analysis code to ensure that all of the struct's fields are
24648         initialized before control returns from the constructor.
24649         (UsageVector): Added support for struct members.  If a
24650         variable/parameter is a struct with N members, we reserve a slot
24651         in the usage vector for each member.  A struct is considered fully
24652         initialized if either the struct itself (slot 0) or all its
24653         members are initialized.
24654
24655 2002-08-08  Martin Baulig  <martin@gnome.org>
24656
24657         * driver.cs (Driver.MainDriver): Only report an error CS5001
24658         if there were no compilation errors.
24659
24660         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
24661         `UnsafeContext' property to determine whether the parent is in
24662         unsafe context rather than checking the parent's ModFlags:
24663         classes nested in an unsafe class are unsafe as well.
24664
24665 2002-08-08  Martin Baulig  <martin@gnome.org>
24666
24667         * statement.cs (UsageVector.MergeChildren): Distinguish between
24668         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
24669         we return.  Added test17() and test18() to test-154.cs.
24670
24671 2002-08-08  Martin Baulig  <martin@gnome.org>
24672
24673         * typemanager.cs (TypeManager.FilterWithClosure): If we have
24674         Family access, make sure the invoking type isn't a subclass of the
24675         queried type (that'd be a CS1540).
24676
24677         * ecore.cs (Expression.MemberLookup): Added overloaded version of
24678         this method which takes an additional `Type invocation_type'.
24679
24680         * expression.cs (BaseAccess.DoResolve): Use the base type as
24681         invocation and query type.
24682         (MemberAccess.DoResolve): If the lookup failed and we're about to
24683         report a CS0122, try a lookup with the ec.ContainerType - if this
24684         succeeds, we must report a CS1540.
24685
24686 2002-08-08  Martin Baulig  <martin@gnome.org>
24687
24688         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
24689         (MethodGroupExpr): Implement the IMemberExpr interface.
24690
24691         * expression (MemberAccess.ResolveMemberAccess): No need to have
24692         any special code for MethodGroupExprs anymore, they're now
24693         IMemberExprs.   
24694
24695 2002-08-08  Martin Baulig  <martin@gnome.org>
24696
24697         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
24698         Family, FamANDAssem and FamORAssem permissions.
24699         (TypeManager.IsSubclassOrNestedChildOf): New public method.
24700
24701 2002-08-08  Martin Baulig  <martin@gnome.org>
24702
24703         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
24704         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
24705         or loop block.
24706
24707 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
24708
24709         * driver.cs: implemented /resource option to embed managed resources.
24710
24711 2002-08-07  Martin Baulig  <martin@gnome.org>
24712
24713         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
24714         (FieldBase.HasFieldInitializer): New public property.
24715         (FieldBase.GetInitializerExpression): New public method.  Resolves and
24716         returns the field initializer and makes sure it is only resolved once.
24717         (TypeContainer.EmitFieldInitializers): Call
24718         FieldBase.GetInitializerExpression to get the initializer, this ensures
24719         that it isn't resolved multiple times.
24720
24721         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
24722         the resolving process (SimpleName/MemberLookup) that we're currently
24723         emitting a field initializer (which must not access any instance members,
24724         this is an error CS0236).
24725
24726         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
24727         argument, if the `IsFieldInitializer' flag is set, we must report and
24728         error CS0236 and not an error CS0120.   
24729
24730 2002-08-07  Martin Baulig  <martin@gnome.org>
24731
24732         * ecore.cs (IMemberExpr): New public interface.
24733         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
24734         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
24735         if the expression is an IMemberExpr.
24736
24737         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
24738         to be null, implicitly default to `this' if we're non-static in
24739         this case.  Simplified the code a lot by using the new IMemberExpr
24740         interface.  Also fixed bug #28176 here.
24741
24742 2002-08-06  Martin Baulig  <martin@gnome.org>
24743
24744         * cs-parser.jay (SimpleLookup): Removed.  We need to create
24745         ParameterReferences during semantic analysis so that we can do a
24746         type-only search when resolving Cast, TypeOf and SizeOf.
24747         (block): Pass the `current_local_parameters' to the Block's
24748         constructor.
24749
24750         * class.cs (ConstructorInitializer): Added `Parameters parameters'
24751         argument to the constructor.
24752         (ConstructorInitializer.Resolve): Create a temporary implicit
24753         block with the parameters.
24754
24755         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
24756         references here if we aren't doing a type-only search.
24757
24758         * statement.cs (Block): Added constructor which takes a
24759         `Parameters parameters' argument.
24760         (Block.Parameters): New public property.
24761
24762         * support.cs (InternalParameters.Parameters): Renamed `parameters'
24763         to `Parameters' and made it public readonly.
24764
24765 2002-08-06  Martin Baulig  <martin@gnome.org>
24766
24767         * ecore.cs (Expression.Warning): Made this public as well.
24768
24769         * report.cs (Report.Debug): Print the contents of collections.
24770
24771 2002-08-06  Martin Baulig  <martin@gnome.org>
24772
24773         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
24774         used to tell Resolve() which kinds of expressions it may return.
24775         (Expression.Resolve): Added overloaded version of this method which
24776         takes a `ResolveFlags flags' argument.  This can be used to tell
24777         Resolve() which kinds of expressions it may return.  Reports a
24778         CS0118 on error.
24779         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
24780         ResolveFlags.SimpleName.
24781         (Expression.Error118): Added overloaded version of this method which
24782         takes a `ResolveFlags flags' argument.  It uses the flags to determine
24783         which kinds of expressions are allowed.
24784
24785         * expression.cs (Argument.ResolveMethodGroup): New public method.
24786         Resolves an argument, but allows a MethodGroup to be returned.
24787         This is used when invoking a delegate.
24788
24789         * TODO: Updated a bit.
24790
24791 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24792
24793         Fixed compilation with csc.
24794
24795         * ecore.cs: Expression.Error made public. Is this correct? Should
24796         Warning be made public too?
24797
24798         * expression.cs: use ea.Location instead of ea.loc.
24799         [FIXME:  Filed as bug #28607: MCS must report these errors.]
24800
24801 2002-08-06  Martin Baulig  <martin@gnome.org>
24802
24803         * ecore.cs (Expression.loc): Moved the location here instead of
24804         duplicating it in all derived classes.
24805         (Expression.Location): New public property.
24806         (Expression.Error, Expression.Warning): Made them non-static and
24807         removed the location argument.
24808         (Expression.Warning): Added overloaded version which takes an
24809         `int level' argument.
24810         (Expression.Error118): Make this non-static and removed the
24811         expression and location arguments.
24812         (TypeExpr): Added location argument to the constructor.
24813
24814         * expression.cs (StaticCallExpr): Added location argument to
24815         the constructor.
24816         (Indirection, PointerArithmetic): Likewise.
24817         (CheckedExpr, UnCheckedExpr): Likewise.
24818         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
24819         (StringPtr): Likewise.
24820
24821
24822 2002-08-05  Martin Baulig  <martin@gnome.org>
24823
24824         * expression.cs (BaseAccess.DoResolve): Actually report errors.
24825
24826         * assign.cs (Assign.DoResolve): Check whether the source
24827         expression is a value or variable.
24828
24829         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
24830         while resolving the corresponding blocks.
24831
24832         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
24833         an error, don't silently return null.
24834
24835         * statement.cs (Block.AddVariable): Do the error reporting here
24836         and distinguish between CS0128 and CS0136.
24837         (Block.DoResolve): Report all unused labels (warning CS0164).
24838         (LabeledStatement): Pass the location to the constructor.
24839         (LabeledStatement.HasBeenReferenced): New property.
24840         (LabeledStatement.Resolve): Set it to true here.
24841
24842         * statement.cs (Return.Emit): Return success even after reporting
24843         a type mismatch error (CS0126 or CS0127), this is what csc does and
24844         it avoids confusing the users with any consecutive errors.
24845
24846 2002-08-05  Martin Baulig  <martin@gnome.org>
24847
24848         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
24849
24850         * const.cs (Const.LookupConstantValue): Catch circular definitions.
24851
24852         * expression.cs (MemberAccess.DoResolve): Silently return if an
24853         error has already been reported.
24854
24855         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
24856         error has already been reported.
24857
24858 2002-08-05  Martin Baulig  <martin@gnome.org>
24859
24860         * statement.cs (UsageVector): Only initialize the `parameters'
24861         vector if we actually have any "out" parameters.
24862
24863 2002-08-05  Martin Baulig  <martin@gnome.org>
24864
24865         * expression.cs (Binary.ResolveOperator): When combining delegates,
24866         they must have the same type.
24867
24868 2002-08-05  Martin Baulig  <martin@gnome.org>
24869
24870         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
24871         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
24872         work with the ms runtime and we also don't need it: if we're a
24873         PropertyBuilder and not in the `indexer_arguments' hash, then we
24874         are a property and not an indexer.
24875
24876         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
24877         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
24878         since the latter one doesn't work with the ms runtime.
24879
24880 2002-08-03  Martin Baulig  <martin@gnome.org>
24881
24882         Fixed bugs #27998 and #22735.
24883
24884         * class.cs (Method.IsOperator): New public field.
24885         (Method.CheckBase): Report CS0111 if there's already a method
24886         with the same parameters in the current class.  Report CS0508 when
24887         attempting to change the return type of an inherited method.
24888         (MethodData.Emit): Report CS0179 if a method doesn't have a body
24889         and it's not marked abstract or extern.
24890         (PropertyBase): New abstract base class for Property and Indexer.
24891         (PropertyBase.CheckBase): Moved here from Property and made it work
24892         for indexers.
24893         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
24894         the same so we can reuse it there.
24895         (Property, Indexer): Derive from PropertyBase.
24896         (MethodSignature.inheritable_property_signature_filter): New delegate
24897         to find properties and indexers.
24898
24899         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
24900         argument and improved error reporting.
24901
24902         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
24903         EmptyReadOnlyParameters and made it a property.
24904
24905         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
24906         version of this method which takes a `PropertyInfo indexer'.
24907         (TypeManager.RegisterIndexer): New method.
24908
24909         * class.cs: Added myself as author of this file :-)
24910
24911 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24912
24913         * class.cs: fixed compilation on windoze.
24914
24915 2002-08-03  Martin Baulig  <martin@gnome.org>
24916
24917         * interface.cs (Interface.GetInterfaceBases): Check whether all
24918         base interfaces are at least as accessible than the current one.
24919
24920         * class.cs (TypeContainer.GetClassBases): Check whether base types
24921         are at least as accessible than the current type.
24922         (TypeContainer.AsAccessible): Implemented and made non-static.
24923         (MemberBase.CheckParameters): Report errors if the accessibility
24924         checks fail.
24925
24926         * delegate.cs (Delegate.Delegate): The default visibility is
24927         internal for top-level types and private for nested types.
24928         (Delegate.Define): Report errors if the accessibility checks fail.
24929
24930         * enum.cs (Enum.Enum): The default visibility is internal for
24931         top-level types and private for nested types.
24932         (Enum.DefineType): Compute the correct visibility.
24933
24934         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
24935         function which takes a `bool is_toplevel' instead of a TypeContainer.
24936
24937         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
24938         builtin type.
24939
24940 2002-08-02  Martin Baulig  <martin@gnome.org>
24941
24942         * expression.cs (LocalVariableReferenc): Added constructor which
24943         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
24944         (LocalVariableReference.IsReadOnly): New property.
24945         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
24946         variable is readonly, use our own readonly flag to do this; you can
24947         use the new constructor to get a writable reference to a read-only
24948         variable.
24949
24950         * cs-parser.jay (foreach_statement, using_statement): Get a writable
24951         reference to the local variable.
24952
24953 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
24954
24955         * rootcontext.cs (ResolveCore): Also include System.Exception
24956
24957         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
24958         we reach an EmptyStatement.
24959
24960         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
24961         is also fine.
24962
24963         * expression.cs (Binary.ResolveOperator): Check error result in
24964         two places.
24965
24966         use brtrue/brfalse directly and avoid compares to null.
24967
24968 2002-08-02  Martin Baulig  <martin@gnome.org>
24969
24970         * class.cs (TypeContainer.Define): Define all nested interfaces here.
24971         Fixes bug #28407, added test-155.cs.
24972
24973 2002-08-01  Martin Baulig  <martin@gnome.org>
24974
24975         * class.cs (Event.EmitDefaultMethod): Make this work with static
24976         events.  Fixes #28311, added verify-3.cs.
24977
24978 2002-08-01  Martin Baulig  <martin@gnome.org>
24979
24980         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
24981         `is_disposable' fields.
24982         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
24983         `hm.is_disposable' if we're using the collection pattern.
24984         (Foreach.EmitCollectionForeach): Use the correct type for the
24985         enumerator's local variable, only emit the try/finally block if
24986         necessary (fixes #27713).
24987
24988 2002-08-01  Martin Baulig  <martin@gnome.org>
24989
24990         * ecore.cs (Expression.report118): Renamed to Error118 and made
24991         it public static.
24992
24993         * statement.cs (Throw.Resolve): Check whether the expression is of
24994         the correct type (CS0118) and whether the type derives from
24995         System.Exception (CS0155).
24996         (Catch.Resolve): New method.  Do the type lookup here and check
24997         whether it derives from System.Exception (CS0155).
24998         (Catch.CatchType, Catch.IsGeneral): New public properties.
24999
25000         * typemanager.cs (TypeManager.exception_type): Added.
25001
25002 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25003
25004         * driver.cs: Updated About function.
25005
25006 2002-07-31  Martin Baulig  <martin@gnome.org>
25007
25008         Implemented Control Flow Analysis.
25009
25010         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25011         (EmitContext.CurrentBranching): Added.
25012         (EmitContext.StartFlowBranching): Added.
25013         (EmitContext.EndFlowBranching): Added.
25014         (EmitContext.KillFlowBranching): Added.
25015         (EmitContext.IsVariableAssigned): Added.
25016         (EmitContext.SetVariableAssigned): Added.
25017         (EmitContext.IsParameterAssigned): Added.
25018         (EmitContext.SetParameterAssigned): Added.
25019         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25020         Added control flow analysis stuff here.
25021
25022         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25023         resolve the expression as lvalue.
25024         (LocalVariableReference.DoResolve): Check whether the variable has
25025         already been assigned.
25026         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25027         the parameter as assigned here.
25028         (ParameterReference.DoResolve): Check whether the parameter has already
25029         been assigned.
25030         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25031         expression as lvalue.
25032
25033         * statement.cs (FlowBranching): New class for the flow analysis code.
25034         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25035         (LabeledStatement.IsDefined): New public property.
25036         (LabeledStatement.AddUsageVector): New public method to tell flow
25037         analyis that the label may be reached via a forward jump.
25038         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25039         flow analysis.
25040         (VariableInfo.Number): New public field.  This is used by flow analysis
25041         to number all locals of a block.
25042         (Block.CountVariables): New public property.  This is the number of
25043         local variables in this block (including the locals from all parent
25044         blocks).
25045         (Block.EmitMeta): Number all the variables.
25046
25047         * statement.cs: Added flow analysis support to all classes.
25048
25049 2002-07-31  Martin Baulig  <martin@gnome.org>
25050
25051         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25052         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25053         then use this argument.
25054
25055         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25056
25057         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25058         use this to specify /define options.
25059
25060 2002-07-29  Martin Baulig  <martin@gnome.org>
25061
25062         * statement.cs (Fixed): Moved all code that does variable lookups
25063         and resolvings from Emit to Resolve.
25064
25065         * statement.cs (For): Moved all code that does variable lookups
25066         and resolvings from Emit to Resolve.
25067
25068         * statement.cs (Using): Moved all code that does variable lookups
25069         and resolvings from Emit to Resolve.
25070
25071 2002-07-29  Martin Baulig  <martin@gnome.org>
25072
25073         * attribute.cs (Attribute.Resolve): Explicitly catch a
25074         System.NullReferenceException when creating the
25075         CustromAttributeBuilder and report a different warning message.
25076
25077 2002-07-29  Martin Baulig  <martin@gnome.org>
25078
25079         * support.cs (ParameterData.ParameterName): Added method to
25080         get the name of a parameter.
25081
25082         * typemanager.cs (TypeManager.IsValueType): New public method.
25083
25084 2002-07-29  Martin Baulig  <martin@gnome.org>
25085
25086         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25087         is a flag which specifies that it's either ref or out.
25088         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25089         the out parameter to `out Parameter.Modifier mod', also set the
25090         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25091
25092         * support.cs (InternalParameters.ParameterModifier): Distinguish
25093         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25094         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25095
25096         * expression.cs (Argument.GetParameterModifier): Distinguish
25097         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25098         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25099
25100 2002-07-29  Martin Baulig  <martin@gnome.org>
25101
25102         * expression.cs (ParameterReference.ParameterReference): Added
25103         `Location loc' argument to the constructor.
25104
25105         * cs-parser.jay: Pass location to ParameterReference.
25106
25107 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25108
25109         * statement.cs (Try): Initialize the location.
25110
25111         * cs-parser.jay: pass location to Try.
25112
25113         * expression.cs (Unary.Reduce): Change the prototype to return
25114         whether a constant fold could be performed or not.  The result is
25115         returned in an out parameters.  In the case of Indirection and
25116         AddressOf, we want to perform the full tests.
25117
25118 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25119
25120         * statement.cs (Statement.Emit): Flag dead code.
25121
25122 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25123
25124         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25125
25126 2002-07-27  Martin Baulig  <martin@gnome.org>
25127
25128         * class.cs (MethodData.Define): Put back call to
25129         TypeManager.AddMethod(), accidentally commented this out.
25130
25131         * report.cs (Debug): New public method to print debugging information,
25132         this is `[Conditional ("DEBUG")]'.
25133
25134 2002-07-26  Martin Baulig  <martin@gnome.org>
25135
25136         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25137         (switch_statement): Push the current_block to the switch_stack and
25138         pop it again when we're done with the switch.
25139         (switch_section): The new block is a child of the current_block.
25140         Fixes bug #24007, added test-152.cs.
25141
25142 2002-07-27  Martin Baulig  <martin@gnome.org>
25143
25144         * expression.cs (Invocation.EmitArguments): When calling a varargs
25145         function with only its fixed arguments, we need to pass an empty
25146         array.
25147
25148 2002-07-27  Martin Baulig  <martin@gnome.org>
25149
25150         Mono 0.13 has been released.
25151
25152 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25153
25154         * driver.cs: Rename --resource to --linkres, because that is what
25155         we do currently, we dont support --resource yet.
25156
25157         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
25158
25159 2002-07-25  Martin Baulig  <martin@gnome.org>
25160
25161         * class.cs (MethodData): New public class.  This is a `method builder'
25162         class for a method or one accessor of a Property/Indexer/Event.
25163         (MethodData.GetMethodFlags): Moved here from MemberBase.
25164         (MethodData.ApplyAttributes): Likewise.
25165         (MethodData.ApplyObsoleteAttribute): Likewise.
25166         (MethodData.ApplyConditionalAttribute): Likewise.
25167         (MethodData.ApplyDllImportAttribute): Likewise.
25168         (MethodData.CheckAbstractAndExternal): Likewise.
25169         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
25170         (MethodData.Emit): Formerly known as Method.Emit().
25171         (MemberBase): Moved everything which was specific to a single
25172         accessor/method to MethodData.
25173         (Method): Create a new MethodData and call Define() and Emit() on it.
25174         (Property, Indexer, Event): Create a new MethodData objects for each
25175         accessor and call Define() and Emit() on them.
25176
25177 2002-07-25  Martin Baulig  <martin@gnome.org>
25178
25179         Made MethodCore derive from MemberBase to reuse the code from there.
25180         MemberBase now also checks for attributes.
25181
25182         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
25183         (MemberBase.GetMethodFlags): Moved here from class Method and marked
25184         as virtual.
25185         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
25186         `CallingConventions cc' and `Attributes opt_attrs' arguments.
25187         (MemberBase.ApplyAttributes): New virtual method; applies the
25188         attributes to a method or accessor.
25189         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
25190         (MemberBase.ApplyConditionalAttribute): Likewise.
25191         (MemberBase.ApplyDllImportAttribute): Likewise.
25192         (MemberBase.CheckAbstractAndExternal): Likewise.
25193         (MethodCore.ParameterTypes): This is now a property instead of a
25194         method, it's initialized from DoDefineParameters().
25195         (MethodCore.ParameterInfo): Removed the set accessor.
25196         (MethodCore.DoDefineParameters): New protected virtual method to
25197         initialize ParameterTypes and ParameterInfo.
25198         (Method.GetReturnType): We can now simply return the MemberType.
25199         (Method.GetMethodFlags): Override the MemberBase version and add
25200         the conditional flags.
25201         (Method.CheckBase): Moved some code from Define() here, call
25202         DoDefineParameters() here.
25203         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
25204         here to avoid some larger code duplication.
25205         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
25206         ensure that abstract and external accessors don't declare a body.
25207
25208         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
25209         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
25210         lookup in the attribute's parent classes, so we need to abort as soon
25211         as we found the first match.
25212         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
25213         the attribute has no arguments.
25214
25215         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
25216         of a Method.
25217
25218 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25219
25220         * cs-parser.jay: reverted previous patch.
25221
25222 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25223
25224         * cs-parser.jay: fixed bug #22119.
25225
25226 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25227
25228         * attribute.cs: fixed compilation. The error was:
25229         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
25230         be assigned to before control leaves the current method."
25231         [FIXME:  Filed as bug #28186: MCS must report this error.]
25232
25233 2002-07-25  Martin Baulig  <martin@gnome.org>
25234
25235         * attribute.cs (Attribute.Conditional_GetConditionName): New static
25236         method to pull the condition name ouf of a Conditional attribute.
25237         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
25238         the obsolete message and error flag out of an Obsolete attribute.
25239
25240         * class.cs (Method.GetMethodFlags): New public method to get the
25241         TypeManager.MethodFlags for this method.
25242         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
25243         private methods.
25244         (Method.Define): Get and apply the Obsolete and Conditional attributes;
25245         if we're overriding a virtual function, set the new private variable
25246         `parent_method'; call the new TypeManager.AddMethod().
25247
25248         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
25249         the MethodBuilder and the Method in a PtrHashtable.
25250         (TypeManager.builder_to_method): Added for this purpose.
25251         (TypeManager.MethodFlags): Added IsObsoleteError.
25252         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
25253         Obsolete and Conditional arguments in MethodBuilders.  If we discover
25254         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
25255         the message from the attribute.
25256
25257 2002-07-24  Martin Baulig  <martin@gnome.org>
25258
25259         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
25260         preprocessor directives, ensure that the argument to #define/#undef is
25261         exactly one identifier and that it's actually an identifier.
25262
25263         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
25264         did not work ....
25265
25266 2002-07-24  Martin Baulig  <martin@gnome.org>
25267
25268         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
25269         initialize it to TypeManager.object_type in the constructor.
25270         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
25271         of the `hm.get_current' method if we're using the collection pattern.
25272         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
25273         for the explicit conversion to make it work when we're using the collection
25274         pattern and the `Current' property has a different return type than `object'.
25275         Fixes #27713.
25276
25277 2002-07-24  Martin Baulig  <martin@gnome.org>
25278
25279         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
25280         does not match, but don't report any errors.  This method is called in
25281         order for all methods in a MethodGroupExpr until a matching method is
25282         found, so we don't want to bail out if the first method doesn't match.
25283         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
25284         matches, report the 123.  Fixes #28070.
25285
25286 2002-07-24  Martin Baulig  <martin@gnome.org>
25287
25288         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
25289         TypeManager.TypeToCoreType() to the top of the method so the
25290         following equality checks will work.  Fixes #28107.
25291
25292 2002-07-24  Martin Baulig  <martin@gnome.org>
25293
25294         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
25295         operand is of type uint, and the other operand is of type sbyte,
25296         short or int, the operands are converted to type long." -
25297         Actually do what this comment already told us.  Fixes bug #28106,
25298         added test-150.cs.
25299
25300 2002-07-24  Martin Baulig  <martin@gnome.org>
25301
25302         * class.cs (MethodBase): New abstract class.  This is now a base
25303         class for Property, Indexer and Event to avoid some code duplication
25304         in their Define() and DefineMethods() methods.
25305         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
25306         generic methods for Define() and DefineMethods().
25307         (FieldBase): Derive from MemberBase, not MemberCore.
25308         (Property): Derive from MemberBase, not MemberCore.
25309         (Property.DefineMethod): Moved all the code from this method to the
25310         new MethodBase.DefineAccessor(), just call it with appropriate
25311         argumetnts.
25312         (Property.Define): Call the new Property.DoDefine(), this does some
25313         sanity checks and we don't need to duplicate the code everywhere.
25314         (Event): Derive from MemberBase, not MemberCore.
25315         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
25316         accessors, this will also make them work with interface events.
25317         (Indexer): Derive from MemberBase, not MemberCore.
25318         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
25319         (Indexer.Define): Use the new MethodBase functions.
25320
25321         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
25322         argument to the constructor.
25323         (Interface.FindMembers): Added support for interface events.
25324         (Interface.PopluateEvent): Implemented.
25325
25326         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
25327
25328 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
25329
25330         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
25331         but this is required to check for a method name being the same as
25332         the containing class.  
25333
25334         Handle this now.
25335
25336 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25337
25338         * interface.cs: initialize variable.
25339
25340 2002-07-23  Martin Baulig  <martin@gnome.org>
25341
25342         Implemented the IndexerName attribute in interfaces.
25343
25344         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
25345         name if this is an explicit interface implementation.
25346         (Indexer.InterfaceIndexerName): New public variable.  If we're
25347         implementing an interface indexer, this is the IndexerName in that
25348         interface.  Otherwise, it's the IndexerName.
25349         (Indexer.DefineMethod): If we're implementing interface indexer,
25350         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
25351         and Pending.ImplementIndexer methods.
25352         (Indexer.Define): Also define the PropertyBuilder if we're
25353         implementing an interface indexer and this is neither an explicit
25354         interface implementation nor do the IndexerName match the one in
25355         the interface.
25356
25357         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
25358         If a method is defined here, then we always need to create a proxy
25359         for it.  This is used when implementing interface indexers.
25360         (Pending.IsInterfaceIndexer): New public method.
25361         (Pending.ImplementIndexer): New public method.
25362         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
25363         This is used when implementing interface indexers to define a proxy
25364         if necessary.
25365         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
25366         define a proxy if necessary.
25367
25368         * interface.cs (Interface.IndexerName): New public variable.
25369         (Interface.PopulateIndexer): Set the IndexerName.
25370         (Interface.DefineIndexers): New private method.  Populate all the
25371         indexers and make sure their IndexerNames match.
25372
25373         * typemanager.cs (IndexerPropertyName): Added support for interface
25374         indexers.
25375
25376 2002-07-22  Martin Baulig  <martin@gnome.org>
25377
25378         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
25379         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
25380         ret if HasReturnLabel.
25381         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
25382         variables.
25383
25384         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
25385         and set the ec.LoopBeginTryCatchLevel.
25386         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
25387         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
25388         the current ec.TryCatchLevel, the branch goes out of an exception
25389         block.  In this case, we need to use Leave and not Br.
25390
25391 2002-07-22  Martin Baulig  <martin@gnome.org>
25392
25393         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
25394         block unless the block does not always return or it is contained in
25395         another try { ... } catch { ... } block.  Fixes bug #26506.
25396         Added verify-1.cs to the test suite.
25397
25398 2002-07-22  Martin Baulig  <martin@gnome.org>
25399
25400         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
25401         then we do not always return.  Fixes bug #24985.
25402
25403 2002-07-22  Martin Baulig  <martin@gnome.org>
25404
25405         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
25406         lookup on a per-class level; ie. walk up the class hierarchy until we
25407         found at least one applicable method, then choose the best among them.
25408         Fixes bug #24463 and test-29.cs.
25409
25410 2002-07-22  Martin Baulig  <martin@gnome.org>
25411
25412         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
25413         return types of the methods.  The return type is not part of the
25414         signature and we must not check it to make the `new' modifier work.
25415         Fixes bug #27999, also added test-147.cs.
25416         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
25417
25418         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
25419         on the method's return type.
25420
25421 2002-07-21  Martin Baulig  <martin@gnome.org>
25422
25423         * assign.cs: Make this work if the rightmost source is a constant and
25424         we need to do an implicit type conversion.  Also adding a few more tests
25425         to test-38.cs which should have caught this.
25426
25427         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
25428         target in the makefile for this.  The makefile.gnu is primarily intended
25429         for end-users who don't want to debug the compiler.
25430
25431 2002-07-21  Martin Baulig  <martin@gnome.org>
25432
25433         * assign.cs: Improved the Assign class so it can now handle embedded
25434         assignments (X = Y = Z = something).  As a side-effect this'll now also
25435         consume less local variables.  test-38.cs now passes with MCS, added
25436         a few new test cases to that test.
25437
25438 2002-07-20  Martin Baulig  <martin@gnome.org>
25439
25440         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
25441         instructions.  Fixes bug #27977, also added test-146.cs.
25442
25443 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25444
25445         * cs-tokenizer.cs: fixed getHex ().
25446
25447 2002-07-19  Martin Baulig  <martin@gnome.org>
25448
25449         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
25450         not Type.GetType() to lookup the array type.  This is needed when
25451         we're constructing an array of a user-defined type.
25452         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
25453         single-dimensional arrays, but also for single-dimensial arrays of
25454         type decimal.
25455
25456 2002-07-19  Martin Baulig  <martin@gnome.org>
25457
25458         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
25459         this function is called, it's not allowed to share LocalBuilders
25460         among ILGenerators.
25461
25462 2002-07-19  Martin Baulig  <martin@gnome.org>
25463
25464         * expression.cs (Argument.Resolve): Report an error 118 when trying
25465         to pass a type as argument.
25466
25467 2002-07-18  Martin Baulig  <martin@gnome.org>
25468
25469         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
25470         Conv_R_Un for the signed `long' type.
25471
25472 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
25473
25474         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
25475         `expr' for the temporary result, as that will fail if we do
25476         multiple resolves on the same expression.
25477
25478 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
25479
25480         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
25481         ec.TypeContainer for looking up aliases. 
25482
25483         * class.cs (TypeContainer): Remove LookupAlias from here.
25484
25485         * decl.cs (DeclSpace); Move here.
25486
25487 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
25488
25489         * class.cs (FindMembers): Only call filter if the constructor
25490         bulider is not null.
25491
25492         Also handle delegates in `NestedTypes' now.  Now we will perform
25493         type lookups using the standard resolution process.  This also
25494         fixes a bug.
25495
25496         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
25497         This uses Expressions (the limited kind that can be parsed by the
25498         tree) instead of strings.
25499
25500         * expression.cs (ComposedCast.ToString): Implement, used to flag
25501         errors since now we have to render expressions.
25502
25503         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
25504         FormArrayType. 
25505
25506         * ecore.cs (SimpleName.ToString): ditto.
25507
25508         * cs-parser.jay: Instead of using strings to assemble types, use
25509         Expressions to assemble the type (using SimpleName, ComposedCast,
25510         MemberAccess).  This should fix the type lookups in declarations,
25511         because we were using a different code path for this.
25512
25513         * statement.cs (Block.Resolve): Continue processing statements
25514         even when there is an error.
25515
25516 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
25517
25518         * class.cs (Event.Define): Also remove the `remove' method from
25519         the list of pending items.
25520
25521         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
25522         generate more compact code. 
25523
25524 2002-07-17  Martin Baulig  <martin@gnome.org>
25525
25526         * const.cs (Const.LookupConstantValue): Add support for constant
25527         `unchecked' and `checked' expressions.
25528         Also adding test case test-140.cs for this.
25529
25530 2002-07-17  Martin Baulig  <martin@gnome.org>
25531
25532         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
25533         check whether mi.ReturnType implements the IEnumerator interface; the
25534         `==' and the IsAssignableFrom() will fail in this situation.
25535
25536 2002-07-16  Ravi Pratap  <ravi@ximian.com>
25537
25538         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
25539         here too.
25540
25541 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25542
25543         * expression.cs: fixed bug #27811.
25544
25545 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
25546
25547         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
25548         Molaro: when we are a ref, the value already contains a pointer
25549         value, do not take the address of it.
25550
25551 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
25552         * removed mb-parser.jay and mb-tokenizer.cs
25553
25554 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
25555
25556         * expression.cs: check against the building corlib void type.
25557
25558 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
25559
25560         * ecore.cs: fix for valuetype static readonly fields: when 
25561         initializing them, we need their address, not the address of a copy.
25562
25563 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
25564
25565         * typemanager.cs: register also enum_type in corlib.
25566
25567 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
25568
25569         * class.cs: allow calling this (but not base) initializers in structs.
25570
25571 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
25572
25573         * ecore.cs: make sure we compare against the building base types
25574         in GetTypeSize ().
25575
25576 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
25577
25578         * typemanager.cs: fix TypeToCoreType() to handle void and object
25579         (corlib gets no more typerefs after this change).
25580
25581 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
25582
25583         * expression.cs (ArrayCreation.EmitArrayArguments): use
25584         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
25585
25586         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
25587         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
25588         array indexes, the runtime actually forbids them.
25589
25590         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
25591         for array arguments here.
25592
25593         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
25594         instead of the default for ValueTypes.
25595
25596         (New.DoEmit): Use IsValueType instead of
25597         IsSubclassOf (value_type)
25598         (New.DoResolve): ditto.
25599         (Invocation.EmitCall): ditto.
25600
25601         * assign.cs (Assign): ditto.
25602
25603         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
25604         Statements *are* currently doing part of their resolution during
25605         Emit.  
25606
25607         Expressions do always resolve during resolve, but statements are
25608         only required to propagate resolution to their children.
25609
25610 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
25611
25612         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
25613
25614         (LoadAssembly): Do not add the dll if it is already specified
25615
25616         (MainDriver): Add the System directory to the link path at the end,
25617         after all the other -L arguments. 
25618
25619         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
25620         wrong opcode for loading bytes and bools (ldelem.i1 instead of
25621         ldelem.u1) and using the opposite for sbytes.
25622
25623         This fixes Digger, and we can finally run it.
25624
25625         * driver.cs (UnixParseOption): Move the option parsing here.  
25626         (CSCParseOption): Implement CSC-like parsing of options.
25627
25628         We now support both modes of operation, the old Unix way, and the
25629         new CSC-like way.  This should help those who wanted to make cross
25630         platform makefiles.
25631
25632         The only thing broken is that /r:, /reference: and /lib: are not
25633         implemented, because I want to make those have the same semantics
25634         as the CSC compiler has, and kill once and for all the confussion
25635         around this.   Will be doing this tomorrow.
25636
25637         * statement.cs (Unsafe.Resolve): The state is checked during
25638         resolve, not emit, so we have to set the flags for IsUnsfe here.
25639
25640 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
25641
25642         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
25643         not catch the Error_ObjectRefRequired in SimpleName (as it is
25644         possible to have a class/instance variable name that later gets
25645         deambiguated), we have to check this here.      
25646
25647 2002-07-10  Ravi Pratap  <ravi@ximian.com>
25648
25649         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
25650         make static and put into Expression.
25651
25652         (Event.Define): Register the private field of the event with the 
25653         TypeManager so that GetFieldFromEvent can get at it.
25654
25655         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
25656         keep track of the private field associated with an event which
25657         has no accessors.
25658
25659         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
25660         private field.
25661
25662         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
25663
25664 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
25665
25666         * expression.cs (Binary.EmitBranchable): this routine emits the
25667         Binary expression in a branchable context.  This basically means:
25668         we need to branch somewhere, not just get the value on the stack.
25669
25670         This works together with Statement.EmitBoolExpression.
25671
25672         * statement.cs (Statement.EmitBoolExpression): Use
25673         EmitBranchable. 
25674
25675 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
25676
25677         * statement.cs (For): Reduce the number of jumps in loops.
25678
25679         (For): Implement loop inversion for the For statement.
25680
25681         (Break): We can be breaking out of a Try/Catch controlled section
25682         (foreach might have an implicit try/catch clause), so we need to
25683         use Leave instead of Br.
25684
25685         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
25686         now).  If the instace expression supports IMemoryLocation, we use
25687         the AddressOf method from the IMemoryLocation to extract the
25688         address instead of emitting the instance.
25689
25690         This showed up with `This', as we were emitting the instance
25691         always (Emit) instead of the Address of This.  Particularly
25692         interesting when This is a value type, as we dont want the Emit
25693         effect (which was to load the object).
25694
25695 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
25696
25697         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
25698
25699         * statement.cs (Checked): Set the CheckedState during the resolve
25700         process too, as the ConvCast operations track the checked state on
25701         the resolve process, and not emit.
25702
25703         * cs-parser.jay (namespace_member_declaration): Flag that we have
25704         found a declaration when we do.  This is used to flag error 1529
25705
25706         * driver.cs: Report ok when we display the help only.
25707
25708 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
25709
25710         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
25711
25712 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
25713
25714         * cs-tokenizer.cs (define): We also have to track locally the
25715         defines.  AllDefines is just used for the Conditional Attribute,
25716         but we also need the local defines for the current source code. 
25717
25718 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
25719
25720         * statement.cs (While, For, Do): These loops can exit through a
25721         Break statement, use this information to tell whether the
25722         statement is the last piece of code.
25723
25724         (Break): Flag that we break.
25725
25726         * codegen.cs (EmitContexts): New `Breaks' state variable.
25727
25728 2002-07-03  Martin Baulig  <martin@gnome.org>
25729
25730         * class.cs (TypeContainer.MethodModifiersValid): Allow override
25731         modifiers in method declarations in structs.  Otherwise, you won't
25732         be able to override things like Object.Equals().
25733
25734 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
25735
25736         * class.cs (Method, Property, Indexer): Do not allow the public
25737         modifier to be used in explicit interface implementations.
25738
25739         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
25740         override modifiers in method declarations in structs
25741
25742 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
25743
25744         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
25745         integer or real overflow, report an error
25746
25747 2002-07-02  Martin Baulig  <martin@gnome.org>
25748
25749         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
25750         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
25751         to tell the runtime about our newly created System.Object and
25752         System.ValueType types.
25753
25754 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
25755
25756         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
25757         struct instead of Ldarg/Starg.
25758
25759 2002-07-02  Martin Baulig  <martin@gnome.org>
25760
25761         * expression.cs (Indirection.Indirection): Call
25762         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
25763
25764 2002-07-02  Martin Baulig  <martin@gnome.org>
25765
25766         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
25767         ValueType, call TypeManager.TypeToCoreType() on it.
25768         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
25769         the OpCodes.Newarr argument.
25770
25771 2002-07-02  Martin Baulig  <martin@gnome.org>
25772
25773         * expression.cs (Invocation.EmitCall): When compiling corlib,
25774         replace all calls to the system's System.Array type to calls to
25775         the newly created one.
25776
25777         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
25778         System.Array methods.
25779         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
25780         from the system's System.Array type which must be replaced.
25781
25782 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
25783
25784         * typemanager.cs: load unverifiable_code_ctor so we can build
25785         corlib using the correct type. Avoid using GetTypeCode() with
25786         TypeBuilders.
25787         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
25788         TypeManager.object_type to allow building corlib.
25789
25790 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
25791
25792         * ecore.cs: handle System.Enum separately in LoadFromPtr().
25793
25794 2002-07-01  Martin Baulig  <martin@gnome.org>
25795
25796         * class.cs: Make the last change actually work, we need to check
25797         whether `ifaces != null' to avoid a crash.
25798
25799 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
25800
25801         * class.cs: when we build structs without fields that implement
25802         interfaces, we need to add the interfaces separately, since there is
25803         no API to both set the size and add the interfaces at type creation
25804         time.
25805
25806 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
25807
25808         * expression.cs: the dimension arguments to the array constructors
25809         need to be converted if they are a long.
25810
25811 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
25812
25813         * class.cs: don't emit ldarg.0 if there is no parent constructor
25814         (fixes showstopper for corlib).
25815
25816 2002-06-29  Martin Baulig  <martin@gnome.org>
25817
25818         MCS now compiles corlib on GNU/Linux :-)
25819
25820         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
25821         ie. check for MethodImplOptions.InternalCall.
25822
25823         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
25824         and TypeManager.attribute_type are null, so we must explicitly check
25825         whether parent is not null to find out whether it's an attribute type.
25826         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
25827         and SetBuilder, not only if the property is neither abstract nor external.
25828         This is necessary to set the MethodImplOptions on the accessor methods.
25829         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
25830         SetBuilder, see Property.Emit().
25831
25832         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
25833         populate "System.Object", "System.ValueType" and "System.Attribute" since
25834         they've already been populated from BootCorlib_PopulateCoreTypes().
25835
25836 2002-06-29  Martin Baulig  <martin@gnome.org>
25837
25838         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
25839         is the NullLiteral, we also need to make sure that target_type is not
25840         an enum type.   
25841
25842 2002-06-29  Martin Baulig  <martin@gnome.org>
25843
25844         * rootcontext.cs (RootContext.ResolveCore): We must initialize
25845         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
25846         before calling BootstrapCorlib_ResolveDelegate ().
25847
25848 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25849
25850         * statement.cs: fixed build-breaker. All tests passed ok.
25851
25852 2002-06-27  Martin Baulig  <martin@gnome.org>
25853
25854         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
25855         for System.Decimal when compiling corlib.
25856
25857 2002-06-27  Martin Baulig  <martin@gnome.org>
25858
25859         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
25860         switch blocks which contain nothing but a default clause.
25861
25862 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
25863
25864        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
25865
25866 2002-06-27  Martin Baulig  <martin@gnome.org>
25867
25868         * ecore.cs (PropertyExpr.PropertyExpr): Call
25869         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
25870
25871         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
25872         is already a TypeBuilder.
25873
25874 2002-06-27  Martin Baulig  <martin@gnome.org>
25875
25876         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
25877         `target_type == TypeManager.array_type', not IsAssignableFrom() in
25878         the "from an array-type to System.Array" case.  This makes it work
25879         when compiling corlib.
25880
25881 2002-06-27  Martin Baulig  <martin@gnome.org>
25882
25883         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
25884         non-static PropertyExpr, set its InstanceExpression.  This makes
25885         the `ICollection.Count' property work in System/Array.cs.
25886
25887 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
25888
25889         * driver.cs: Made error handling more consistent.  Errors now
25890         tracked by Report class, so many methods which used to return int
25891         now return void.  Main() now prints success/failure and 
25892         errors/warnings message.
25893
25894         Renamed '--probe' compiler argument to '--expect-error'.  Removed
25895         the magic number return values (123 and 124).  Now, if the
25896         expected error occurs, the compiler exits with success (exit value
25897         0).  If the compilation completes without seeing that particular
25898         error, the compiler exits with failure (exit value 1).  The
25899         makefile in mcs/errors has been changed to handle the new behaviour.
25900
25901         * report.cs: Made 'expected error' number a property and renamed
25902         it from 'Probe' to 'ExpectedError'.
25903
25904         * genericparser.cs: Removed error handling support, since it is
25905         now all done by Report class.
25906
25907         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
25908         class, so parse() no longer returns an int.
25909
25910         * namespace.cs: Use Report.Error instead of GenericParser.error
25911
25912 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
25913
25914         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
25915         TypeContainer.AddOperator): At the front of the list put the
25916         explicit implementations, so they get resolved/defined first. 
25917
25918 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
25919
25920         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
25921         interface type is implemented by this TypeContainer.  Used during
25922         explicit interface implementation.
25923
25924         (Property.Define, Indexer.Define, Method.Define): Validate that
25925         the given interface in the explicit implementation is one of the
25926         base classes for the containing type.
25927
25928         Also if we are explicitly implementing an interface, but there is
25929         no match in the pending implementation table, report an error.
25930
25931         (Property.Define): Only define the property if we are
25932         not explicitly implementing a property from an interface.  Use the
25933         correct name also for those properties (the same CSC uses,
25934         although that is really not needed).
25935
25936         (Property.Emit): Do not emit attributes for explicitly implemented
25937         properties, as there is no TypeBuilder.
25938
25939         (Indexer.Emit): ditto.
25940
25941         Hiding then means that we do not really *implement* a pending
25942         implementation, which makes code fail.
25943
25944 2002-06-22  Martin Baulig  <martin@gnome.org>
25945
25946         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
25947         the return value of Object.GetType().  [FIXME: we need to do this whenever
25948         we get a type back from the reflection library].
25949
25950 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
25951
25952         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
25953
25954 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
25955
25956         * attribute.cs: Return null if we can not look up the type.
25957
25958         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
25959         the interface types found.
25960
25961         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
25962         interface types found.
25963
25964         * typemanager.cs (GetInterfaces): Make this routine returns alll
25965         the interfaces and work around the lame differences between
25966         System.Type and System.Reflection.Emit.TypeBuilder in the results
25967         result for GetInterfaces.
25968
25969         (ExpandInterfaces): Given an array of interface types, expand and
25970         eliminate repeated ocurrences of an interface.  This expands in
25971         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
25972         be IA, IB, IC.
25973
25974 2002-06-21  Martin Baulig  <martin@gnome.org>
25975
25976         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
25977         on System.Enum.
25978
25979 2002-06-21  Martin Baulig  <martin@gnome.org>
25980
25981         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
25982         and called with one of the core types, return the corresponding typebuilder for
25983         that type.
25984
25985         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
25986         element type.
25987
25988 2002-06-21  Martin Baulig  <martin@gnome.org>
25989
25990         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
25991         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
25992         (Expression.ConvertReferenceExplicit): Likewise.
25993
25994         * expression.cs (ElementAccess.DoResolve): Likewise.
25995         (ElementAccess.DoResolveLValue): Likewise.
25996
25997 2002-06-10  Martin Baulig  <martin@gnome.org>
25998
25999         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26000         add the "value" parameter to the parameter list.
26001
26002         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26003         to our caller.
26004
26005 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26006
26007         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26008         the argument to an int, uint, long or ulong, per the spec.  Also
26009         catch negative constants in array creation.
26010
26011 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26012
26013         * class.cs: do not allow the same interface to appear twice in
26014         the definition list.
26015
26016 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26017
26018         * ecore.cs: don't use ldlen with System.Array.
26019
26020 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26021
26022         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26023
26024 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26025
26026         * modifiers.cs: produce correct field attributes for protected
26027         internal. Easy fix so miguel can work on ther harder stuff:-)
26028
26029 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26030
26031         * pending.cs: New file.  Move the code from class.cs here.
26032         Support clearning the pending flag for all methods (when not doing
26033         explicit interface implementation).
26034
26035 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26036
26037         * rootcontext.cs: added a couple more types needed to bootstrap.
26038
26039 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26040
26041         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26042         constructor in the type, instead of any constructor in the type
26043         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26044         a bug in the Mono runtime when applying the params attribute). 
26045
26046 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26047         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26048
26049 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26050
26051         * expression.cs (Unary.ResolveOperator): Use TypeManager
26052         to resolve the type.
26053
26054 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26055
26056         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26057         attached.
26058
26059         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26060         with each member too.
26061
26062         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26063         field builders too - this takes care of the enum member case.
26064
26065 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26066
26067         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26068         address-of operator on both value types and pointers.
26069
26070 2002-06-10  Martin Baulig  <martin@gnome.org>
26071
26072         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26073         PropertyBuilder to the `property_builders' list.
26074
26075         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26076         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26077         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26078         find any indexers which are inherited from an interface.
26079
26080 2002-06-09  Martin Baulig  <martin@gnome.org>
26081
26082         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26083         the same type as the constant if necessary.  There's also a test-130.cs
26084         for this.
26085
26086         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26087
26088         * typemanager.cs (TypeManager.ChangeType): Previously known as
26089         Enum.ChangeEnumType().
26090
26091 2002-06-09  Martin Baulig  <martin@gnome.org>
26092
26093         * expression.cs (Cast.TryReduce): Added support for consts.
26094
26095 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26096
26097         * class.cs (Accessor): Hold attributes information so we can pass
26098         it along.
26099
26100         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26101         Modify to pass in attributes attached to the methods.
26102
26103         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26104
26105         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26106         to handle the Accessor kind :-)
26107
26108         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26109
26110 2002-06-08  Martin Baulig  <martin@gnome.org>
26111
26112         * expression.cs (Unary.TryReduceNegative): Added support for
26113         ULongConstants.
26114
26115 2002-06-08  Martin Baulig  <martin@gnome.org>
26116
26117         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26118         name can't be found in the `defined_names' - the caller will do a
26119         MemberLookup in this case and thus find methods in System.Enum
26120         such as Enum.IsDefined().
26121
26122 2002-06-08  Martin Baulig  <martin@gnome.org>
26123
26124         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26125         Convert.ChangeType() which works with TypeBuilder created types.
26126         (Enum.LookupEnumValue, Enum.Define): Use it here.
26127
26128         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26129         `TypeBuilder.BaseType != null' check.
26130         (TypeContainer.FindMembers): Only lookup parent members if we
26131         actually have a parent.
26132         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26133         (ConstructorInitializer.Resolve): Likewise.
26134
26135         * interface.cs (Interface.FindMembers): Added
26136         `TypeBuilder.BaseType != null' check.
26137
26138         * rootcontext.cs (RootContext.ResolveCore): Added
26139         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26140         classes_second_stage.
26141
26142         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26143         debug_type and trace_type when compiling with --nostdlib.       
26144
26145 2002-06-07  Martin Baulig  <martin@gnome.org>
26146
26147         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26148         (AddField): Set it to true when adding a non-static field.
26149         (DefineType): Use `have_nonstatic_fields' to find out whether we
26150         have non-static fields, not `Fields != null'.
26151
26152 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26153
26154         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26155         dereferencing a null on the static-field code path)
26156
26157 2002-05-30  Martin Baulig  <martin@gnome.org>
26158
26159         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
26160         to take command line arguments.  Use reflection to call the new
26161         custom `Initialize' function on the symbol writer and pass it the
26162         command line arguments.
26163
26164         * driver.cs (--debug-args): New command line argument to pass command
26165         line arguments to the symbol writer.
26166
26167 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
26168
26169         * assign.cs (DoResolve): Forgot to do the implicit conversion to
26170         the target type for indexers and properties.  Thanks to Joe for
26171         catching this.
26172
26173 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
26174
26175         * typemanager.cs (MethodFlags): returns the method flags
26176         (Obsolete/ShouldIgnore) that control warning emission and whether
26177         the invocation should be made, or ignored. 
26178
26179         * expression.cs (Invocation.Emit): Remove previous hack, we should
26180         not do this on matching a base type, we should do this based on an attribute
26181
26182         Only emit calls to System.Diagnostics.Debug and
26183         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
26184         on the command line.
26185
26186         * rootcontext.cs: Global settings for tracing and debugging.
26187
26188         * cs-tokenizer.cs (define): New utility function to track
26189         defines.   Set the global settings for TRACE and DEBUG if found.
26190
26191 2002-05-25  Ravi Pratap  <ravi@ximian.com>
26192
26193         * interface.cs (Populate*): Pass in the TypeContainer as well as
26194         the DeclSpace as parameters so that we can create EmitContexts and
26195         then use that to apply attributes etc.
26196
26197         (PopulateMethod, PopulateEvent, PopulateProperty)
26198         (PopulateIndexer): Apply attributes everywhere.
26199
26200         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
26201         etc.
26202
26203         (ApplyAttributes): Update accordingly.
26204
26205         We now apply interface attributes for all members too.
26206
26207 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
26208
26209         * class.cs (Indexer.Define); Correctly check if we are explicit
26210         implementation (instead of checking the Name for a ".", we
26211         directly look up if the InterfaceType was specified).
26212
26213         Delay the creation of the PropertyBuilder.
26214
26215         Only create the PropertyBuilder if we are not an explicit
26216         interface implementation.   This means that explicit interface
26217         implementation members do not participate in regular function
26218         lookups, and hence fixes another major ambiguity problem in
26219         overload resolution (that was the visible effect).
26220
26221         (DefineMethod): Return whether we are doing an interface
26222         implementation. 
26223
26224         * typemanager.cs: Temporary hack until we get attributes in
26225         interfaces (Ravi is working on that) and we get IndexerName
26226         support in interfaces.
26227
26228         * interface.cs: Register the indexers as properties.
26229
26230         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
26231         warning, I have verified that this is a bug in the .NET runtime
26232         (JavaScript suffers of the same problem).
26233
26234         * typemanager.cs (MemberLookup): When looking up members for
26235         interfaces, the parent of an interface is the implicit
26236         System.Object (so we succeed in searches of Object methods in an
26237         interface method invocation.  Example:  IEnumerable x;  x.ToString
26238         ()) 
26239
26240 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
26241
26242         * class.cs (Event): Events should also register if they do
26243         implement the methods that an interface requires.
26244
26245         * typemanager.cs (MemberLookup); use the new GetInterfaces
26246         method. 
26247
26248         (GetInterfaces): The code used to lookup interfaces for a type is
26249         used in more than one place, factor it here. 
26250
26251         * driver.cs: Track the errors at the bottom of the file, we kept
26252         on going.
26253
26254         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
26255         instance if the method we are calling is static!
26256
26257 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
26258
26259         * attribute.cs (ApplyAttributes): Make this function filter out
26260         the IndexerName attribute (as that attribute in reality is never
26261         applied) and return the string constant for the IndexerName
26262         attribute. 
26263
26264         * class.cs (TypeContainer.Emit): Validate that all the indexers
26265         have the same IndexerName attribute, and if so, set the
26266         DefaultName attribute on the class. 
26267
26268         * typemanager.cs: The return value might contain other stuff (not
26269         only methods).  For instance, consider a method with an "Item"
26270         property and an Item method.
26271
26272         * class.cs: If there is a problem with the parameter types,
26273         return. 
26274
26275 2002-05-24  Ravi Pratap  <ravi@ximian.com>
26276
26277         * ecore.cs (ImplicitConversionExists): Wrapper function which also
26278         looks at user defined conversion after making a call to 
26279         StandardConversionExists - we need this for overload resolution.
26280
26281         * expression.cs : Update accordingly the various method calls.
26282
26283         This fixes 2 bugs filed against implicit user defined conversions 
26284
26285 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
26286
26287         * statement.cs: Track the result of the assignment.
26288
26289 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
26290
26291         * expression.cs (MemberAccess): Improved error reporting for
26292         inaccessible members.
26293
26294 2002-05-22  Martin Baulig  <martin@gnome.org>
26295
26296         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
26297         itself with debugging support.
26298
26299 2002-05-22  Martin Baulig  <martin@gnome.org>
26300
26301         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
26302         Removed, this isn't needed anymore.
26303
26304 2002-05-20  Martin Baulig  <martin@gnome.org>
26305
26306         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
26307         be underlying type for an enum.
26308
26309 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
26310
26311         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
26312         that splits out the loading of just the core types.
26313
26314         * rootcontext.cs (ResolveCore): Split the struct resolution in
26315         two, so we can load the enumeration underlying types before any
26316         enums are used.
26317
26318         * expression.cs (Is): Bandaid until we fix properly Switch (see
26319         bug #24985 for details).
26320
26321         * typemanager.cs (ImplementsInterface): The hashtable will contain
26322         a null if there are no interfaces implemented.
26323
26324 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
26325
26326         * cs-parser.jay (indexer_declarator): It is fine to have array
26327         parameters
26328
26329 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26330
26331         * typemanager.cs: (RegisterBuilder): New function used to register
26332         TypeBuilders that implement interfaces.  Since
26333         TypeBuilder.GetInterfaces (as usual) does not work with lame
26334         Reflection.Emit. 
26335         (AddUserType): register interfaces.
26336
26337         (ImplementsInterface): Use the builder_to_ifaces hash if we are
26338         dealing with TypeBuilder.  Also, arrays are showing up as
26339         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
26340         methods can not be invoked on them!
26341
26342         * ecore.cs (ExplicitReferenceConversionExists): Made public.
26343         (ImplicitReferenceConversionExists): Split out from
26344         StandardConversionExists. 
26345
26346         * expression.cs (As): We were only implementing one of the three
26347         cases for the as operator.  We now implement them all.
26348         (Is): Implement the various other cases for Is as well.
26349
26350         * typemanager.cs (CACHE): New define used to control if we want or
26351         not the FindMembers cache.  Seems to have a negative impact on
26352         performance currently
26353
26354         (MemberLookup): Nested types have full acess to
26355         enclosing type members
26356
26357         Remove code that coped with instance/static returns for events, we
26358         now catch this in RealFindMembers.
26359
26360         (RealFindMembers): only perform static lookup if the instance
26361         lookup did not return a type or an event.  
26362
26363 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26364
26365         * assign.cs (CompoundAssign): We pass more semantic information
26366         now to Compound Assignments than we did before: now we have all
26367         the information at hand, and now we resolve the target *before* we
26368         do the expression expansion, which allows the "CacheValue" method
26369         to have the effect we intended (before, a [x] += 1 would generate
26370         two differen ArrayAccess expressions from the ElementAccess,
26371         during the resolution process).
26372
26373         (CompoundAssign.DoResolve): Resolve target and original_source here.
26374
26375 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
26376
26377         * expression.cs (ArrayAccess): dropped debugging information. 
26378
26379         * typemanager.cs: Small bug fix: I was always returning i_members,
26380         instead of one of i_members or s_members (depending on which had
26381         the content).
26382
26383         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
26384         method is invoked before any code generation takes place, and it
26385         is a mechanism to inform that the expression will be invoked more
26386         than once, and that the method should use temporary values to
26387         avoid having side effects
26388
26389         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
26390
26391         * ecore.cs (Expression.CacheTemporaries): Provide empty default
26392         implementation.
26393
26394         * expression.cs (Indirection, ArrayAccess): Add support for
26395         CacheTemporaries in these two bad boys. 
26396
26397         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
26398         ldobj or ldind_ref.  
26399         (StoreFromPtr): Handle stobj as well.
26400
26401         * expression.cs (UnaryMutator): Share more code.
26402
26403         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
26404         down: I was not tracking the Filter function as well, which
26405         was affecting the results of the cache.
26406
26407 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
26408
26409         * attribute.cs: Remove the hack to handle the CharSet property on
26410         StructLayouts. 
26411
26412 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
26413
26414         * attribute.cs (DoResolve): More uglyness, we now only try to
26415         resolve the attribute partially, to extract the CharSet
26416         information (only if we are a StructLayout attribute).  Otherwise 
26417
26418         (GetExtraTypeInfo): Add some code to conditionally kill in the
26419         future this.   I am more and more convinced that the .NET
26420         framework has special code to handle the attribute setting on
26421         certain elements.
26422
26423         * expression.cs (IsParamsMethodApplicable): Revert my previous
26424         foreach change here, it was wrong.
26425
26426 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
26427
26428         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
26429         (pp_expr): do not abort on unknown input, just return.
26430         (eval): abort if there are pending chars.
26431
26432         * attribute.cs (Attribute.Resolve): Positional parameters are
26433         optional.  Deal with that case.
26434
26435         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
26436         the Ansi/Unicode/Auto information for the type.
26437
26438         (TypeContainer.DefineType): instantiate the EmitContext here, as
26439         we will be using it during the type definition (to resolve
26440         attributes) and during the emit phase.
26441
26442         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
26443         to pull type information out of the attributes
26444
26445         (Attribute.Resolve): track the constructor builder, and allow for
26446         multiple invocations (structs and classes will use this).
26447
26448         * ecore.cs (MemberLookupFinal): new version with all the
26449         parameters customizable.
26450
26451         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
26452         constructors.  Return if the result value is null (as the error
26453         would have been flagged already by MemberLookupFinal)
26454
26455         Do not allow instances of abstract classes or interfaces to be
26456         created.
26457
26458         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
26459         We have to compare the assembly property here when dealing with
26460         FamANDAssem and Assembly access modifiers, because we might be
26461         creating an assembly from *modules* (that means that we are not
26462         getting TypeBuilders for types defined in other modules that are
26463         part of this assembly).
26464
26465         (Method.Emit): If the method is marked abstract and has a body,
26466         emit an error. 
26467
26468         (TypeContainer.DefineMembers): If both the defined member and the
26469         parent name match are methods, then do not emit any warnings: let
26470         the Method.Define routine take care of flagging warnings.  But if
26471         there is a mismatch (method overrides something else, or method is
26472         overriwritten by something, then emit warning).
26473
26474         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
26475         set to null, this means `do not check for the return type on the
26476         signature'. 
26477
26478         (Method.Define): set the return type for the method signature to
26479         null, so that we get methods with the same name and parameters and
26480         different return types.  This is used to flag warning 114 (you are
26481         hiding a method, and you probably want to use the new/override
26482         keywords instead).
26483
26484         * typemanager.cs (MemberLookup): Implemented proper access
26485         control, closing a long standing set of bug reports.  The problem
26486         was that the Framework only has two bits: Public and NonPublic,
26487         and NonPublic includes private and protected methods, but we need
26488         to enforce the FamANDAssem, FamOrAssem and Family. 
26489
26490 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
26491
26492         * statement.cs (GotoCase): Return true: Ammounts to giving up
26493         knowledge on whether we return or not, and letting the other case
26494         be responsible for it.
26495
26496 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
26497
26498         * driver.cs: Do not load directories for each file processed, only
26499         do it if there is a pattern.
26500
26501         * ecore.cs: Report readonly assigns here as well, as we might have
26502         been resolved only by MemberAccess.
26503
26504         (SimpleName.SimpleNameResolve): Also be useful for LValue
26505         resolution.   We need this to propagate assign to local readonly variables
26506
26507         * typemanager.cs: Use a ptrhashtable for the criteria, because we
26508         do not want to reuse potential criteria memory.
26509
26510         * class.cs (MyEventBuilder): Set reflected_type;
26511
26512         * ecore.cs (Constantify): Added support for constifying bools.
26513
26514         (RootContext.LookupType): Added a cache for values looked up in
26515         the declaration space.
26516
26517         * typemanager.cs (FindMembers): Now is a front-end to
26518         RealFindMembers, and provides a two-level hashtable-based cache to
26519         the request.  
26520
26521         15% performance improvement: from 22.5 to 19.2 seconds.
26522
26523         * expression.cs (IsParamsMethodApplicable): use foreach.
26524         (Invocation.DoResolve): ditto.
26525         (New.DoResolve): ditto.
26526         (ArrayCreation.DoResolve): ditto.
26527
26528         * ecore.cs (FindMostEncompassingType): use foreach.
26529
26530         * delegate.cs (NewDelegate.DoResolve): Use foreach
26531
26532         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
26533         (RemoveMethods): use foreach.
26534
26535         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
26536         nested foreach statements instead of for, and also break out of
26537         the inner loop once a match is found.
26538
26539         (Invocation.OverloadResolve): Use foreach, simplify the code. 
26540
26541 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
26542
26543         * cfold.cs (BinaryFold): During an enumeration evaluation context,
26544         we actually unwrap the expression to allow for extra information
26545         to be extracted. 
26546
26547         * expression.cs: Use Shr_Un on unsigned operations. 
26548
26549 2002-05-08  Ravi Pratap  <ravi@ximian.com>
26550
26551         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
26552         applicable operators was not being considered correctly. This closes
26553         the bug Miguel reported.
26554
26555 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
26556
26557         * attribute.cs: check that the type derives from System.Attribute
26558         and report the correct error in that case (moved the duplicate code to
26559         its own method, too).
26560
26561 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
26562
26563         * attribute.cs: lookup attribute type name as the spec says: first the
26564         bare attribute name and then name + "Attribute" (nant compiles with
26565         mcs after this fix).
26566
26567 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
26568
26569         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
26570         Because of the way we parse things, we should try to see if a
26571         UIntConstant can fit in an integer.
26572
26573 2002-05-07  Ravi Pratap  <ravi@ximian.com>
26574
26575         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
26576         when we are in an explicit context.
26577
26578         (ConvertReferenceExplicit): When converting from Iface type S to Class
26579         T make sure the rules are implemented as an OR.
26580
26581         * parameter.cs (ParameterType): Make it a property for now although the
26582         purpose really isn't anything immediate.
26583
26584         * expression.cs (Is*Applicable): Do better checking on the parameter type
26585         of a ref/out parameter. The ones from the system assemblies are already 
26586         marked with the correct type so we don't need to do any correction.
26587
26588         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
26589         the object type is standard too so include that.
26590
26591 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
26592
26593         * ecore.cs (StandardConversionExists): Augment with missing code:
26594         deal with IntConstant, LongConstants and Enumerations.
26595
26596         * assign.cs: Report the error, instead of failing silently
26597
26598         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
26599         typecontainer that they are declared, because the
26600         typecontainer/namespace will have the list of using clauses that
26601         need to be applied.
26602
26603         Assembly Attributes were escaping the normal registration
26604         mechanism. 
26605
26606         (EmitCode): Apply attributes within an EmitContext that represents
26607         the container they were declared on.
26608
26609         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
26610
26611 2002-05-06  Ravi Pratap  <ravi@ximian.com>
26612
26613         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
26614         Revamp completely - make much cleaner as we now operate only
26615         on a set of Types.
26616
26617         (FindMostSpecificSource, FindMostSpecificTarget): New methods
26618         to implement the logic detailed in the spec more correctly.
26619
26620         (UserDefinedConversion): Update accordingly.
26621
26622 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
26623
26624         * statement.cs: Return flow analysis information up.
26625
26626         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
26627         and the default.
26628
26629         (token): Do not consume an extra character before calling
26630         decimal_digits.
26631
26632 2002-05-06  Piers Haken <piersh@friskit.com>
26633
26634         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
26635
26636 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
26637
26638         * class.cs (Constructor.Emit): Set the IsStatic flag in the
26639         EmitContext during the instance constructor initializer
26640         resolution, to stop access to instance variables.
26641
26642         This is mandated by the spec, last paragraph of the `constructor
26643         initializers' section. 
26644
26645 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
26646
26647         * cs-parser.jay, class.cs (Accessor): new class used to represent
26648         an accessor (get or set).  In the past we used `null' to represent
26649         a missing accessor.  But this is ambiguous because there was no
26650         way to tell in abstract indexers/properties if one of them was
26651         specified.
26652
26653         Now there is a way of addressing that.
26654
26655         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
26656         instead of FindMembers.
26657
26658         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
26659         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
26660
26661         * attribute.cs: Treat indexers and properties as the same in terms
26662         of applying attributes
26663
26664         * ecore.cs (FindMostEncompassedType): Use statically initialized
26665         EmptyExpressions()s like we do elsewhere to avoid creating useless
26666         objects (and we take this out of the tight loop).
26667
26668         (GetConversionOperators): Move the code to extract the actual
26669         operators to a separate routine to clean things up.
26670
26671 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
26672
26673         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
26674         events are always registered FieldBuilders.
26675
26676         * class.cs (FieldBase): New class shared by Fields 
26677
26678         * delegate.cs: If we are a toplevel delegate, use our full name.
26679         If we are a nested delegate, then only use our tail name.
26680
26681 2002-05-02  Ravi Pratap  <ravi@ximian.com>
26682
26683         * expression.cs (IsApplicable): Ensure that we add the "&" to
26684         ref/out types before comparing it with the type of the argument.
26685
26686         (IsParamsMethodApplicable): Ditto.
26687
26688         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
26689         silly me ;-)
26690
26691         * delegate.cs : Handle the case when we have more than one applicable
26692         method. Flag an error only when we finish checking all.
26693
26694 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
26695
26696         * expression.cs: Add support for boolean static initializers.
26697
26698 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
26699
26700         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
26701
26702         * parameter.cs (ComputeParameterTypes,
26703         ComputeAndDefineParameterTypes): Better error handling: now we
26704         clear the `types' cache if we fail during any of the type lookups.
26705         We also return the status code correctly to our caller
26706
26707         * delegate.cs: If we fail to define a delegate, abort the extra
26708         steps. 
26709
26710         * expression.cs (Binary.ResolveOperator): for
26711         operator==(object,object) and operator !=(object, object) we also
26712         have to verify that there is an implicit conversion from one to
26713         the other.
26714
26715         (ArrayAccess.DoResolve): Array Access can operate on
26716         non-variables. 
26717
26718 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
26719
26720         * assign.cs (CompoundAssign): A new class used as a "flag" that
26721         the assignment actually is happening as part of a compound
26722         assignment operator.
26723
26724         During compound assignment, a few new rules exist to enable things
26725         like:
26726
26727         byte b |= 1 + 2
26728
26729         From the spec:
26730
26731         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
26732         to the type of x) if y is implicitly convertible to the type of x,
26733         and the operator is a builtin operator and the return type of the
26734         operator is explicitly convertible to the type of x. 
26735
26736         * rootcontext.cs: Reset warning level to 2.  4 catches various
26737         "interesting" features in mcs, we must clean this up at some
26738         point, but currently am trying to kill other bugs ;-)
26739
26740         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
26741         in container classes as well.  
26742
26743         * expression.cs (Binary.ResolveOperator): Handle string case
26744         before anything else (as operator overloading does emit an error
26745         before doing anything else).
26746
26747         This code could go away when we move to a table driven model, but
26748         i could not come up with a good plan last night.
26749
26750 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
26751
26752         * typemanager.cs (CSharpName): reimplementation using regex.
26753         * class.cs: added null check for fields in Emit
26754         * rootcontext.cs: set warninglevel to 4
26755
26756 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
26757
26758         * typemanager.cs (CSharpName): reimplemented with Lupus
26759         suggestion.
26760
26761 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
26762
26763         * statement.cs (If): correclty implement Resolve, because we were
26764         not catching sem errors in there.  The same process is needed
26765         everywhere else. 
26766         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
26767
26768
26769         (Statement.Warning_DeadCodeFound): Factorize code.
26770         (While): Report dead code here too.
26771
26772         (Statement): Added Resolve virtual method to allow
26773         for resolution split from the emit code.
26774
26775 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
26776
26777         * statement.cs (EmitBoolExpression): No longer try to resolve the
26778         expression here.    
26779         (MakeBoolean): New utility function that resolve, implicitly
26780         converts to boolean and tags the expression. 
26781
26782
26783         (If, Do): Implement dead code elimination.
26784         (While): Implement loop inversion
26785
26786         (Do, While, For, If): Resolve the expression prior to calling our
26787         code generation.
26788
26789 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
26790
26791         * class.cs:
26792           - added method Report28 (warning: program has more than one entry point)
26793           - added method IsEntryPoint, implements paragraph 10.1 of the spec
26794           - modified method Method.Define, the part at the end of the method
26795
26796         * rootcontext.cs: added static public Location EntryPointLocation;
26797           
26798         * ../errors/cs0028.cs : Add test case for the above warning.              
26799
26800         * typemanager.cs:
26801           - modified method CSharpName to allow arrays of primitive type to
26802             be printed nicely (e.g. instead of System.Int32[][] it now prints
26803             int[][])
26804           - added method CSharpSignature: returns the signature of a method
26805             in string format to be used in reporting errors, warnings, etc.
26806
26807         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
26808         with String.Empty.
26809
26810 2002-04-26  Ravi Pratap  <ravi@ximian.com>
26811
26812         * delegate.cs (Define): Fix extremely silly bug where I was
26813         setting the type of the 'object' parameter of the BeginInvoke
26814         method to System.IAsyncResult instead of System.Object ;-)
26815
26816 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
26817
26818         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
26819         here. 
26820
26821         (Constructor.Emit): return if we fail to initialize the
26822         constructor.  Another door closed!  
26823
26824         * expression.cs (New.DoResolve): Improve error message (from -6 to
26825         1501).  Use DeclaredOnly lookup to find the exact constructor.
26826
26827         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
26828         loop.  This is useful.
26829
26830         * cs-parser.jay: Adjust the default parameters so that destructors
26831         have the proper signature.
26832
26833 2002-04-26  Martin Baulig  <martin@gnome.org>
26834
26835         * driver.cs (LoadAssembly): If `assembly' contains any characters
26836         which are only valid in path names and not in assembly names
26837         (currently slash, backslash and point), use Assembly.LoadFrom ()
26838         instead of Assembly.Load () on the `assembly' (before iteration
26839         over the link_paths).
26840
26841 2002-04-26  Martin Baulig  <martin@gnome.org>
26842
26843         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
26844
26845 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
26846
26847         * class.cs (Property): use the new typemanager.MemberLookup
26848
26849         (TypeContainer.MemberLookup): Implement using the
26850         TypeManager.MemberLookup now. 
26851
26852         * typemanager.cs: Make MemberLookup a function of the TypeManager,
26853         and return MemberInfos, so that these can be used without an
26854         EmitContext (what we had before).
26855
26856 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
26857
26858         * expression.cs: Fix the case where the argument to params if the
26859         type of the params.  I omitted handling this before.   Fixed
26860
26861 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
26862
26863         * driver.cs: Call BootCorlib_PopulateCoreType
26864
26865         * class.cs (Property.CheckBase): Check for properties only, not
26866         for all members. 
26867
26868         * interface.cs: Temporary hack: try/catch around the
26869         CustomAttributeBuilder, because I am getting an exception that I
26870         do not understand.
26871
26872         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
26873         types whose definitions are required to be there (attributes are
26874         defined before standard types).
26875
26876         Compute definitions as we boot the various types, as they are used
26877         immediately (value_type class will need object_type, but if we do
26878         not initialize object_type, we will pass a null, which will let
26879         the runtime pick the System.Object from the existing corlib, which
26880         is not what we want).
26881
26882 2002-04-22  Patrik Torstensson <totte@labs2.com>
26883
26884         * cs-tokenizer.cs: fixed a number of trim() issues.
26885
26886 2002-04-22  Ravi Pratap  <ravi@ximian.com>
26887
26888         * expression.cs (Argument.Type): Ensure that we return the correct
26889         type when we have out or ref parameters [in which case we 
26890         append a "&"].
26891
26892 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
26893
26894         * class.cs (Property, Indexer): Allow extern modifier in there. 
26895
26896         * typemanager.cs (InitBaseTypes): Initializes object_type and
26897         value_type, since those will be used early on during the bootstrap
26898         process to compile corlib.
26899
26900         (InitCoreTypes): Move code from here to InitBaseTypes.
26901
26902 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
26903
26904         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
26905         single-dimension arrays as using the ldlen opcode.  
26906
26907         Daniel Lewis discovered this optimization.  
26908
26909         * typemanager.cs: Add signature for System.Array::get_Length
26910
26911 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26912
26913         * statement.cs: report the error when the foreach does not apply to an
26914         array nor a collection.
26915
26916 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
26917
26918         * expression.cs: Add implicit conversions to the operator ~.
26919
26920         * constant.cs (DecimalConstant.Emit): Emit decimal value.
26921
26922         * typemanager.cs: Locate the decimal constructor.
26923
26924 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26925
26926         * attribute.cs: use the new property of TypeOf.
26927         * expression.cs: added 'get' property around typearg.
26928
26929         These changes fix a build breaker reported by NickD. Is this the
26930         correct way to fix?  If not, please, revert my changes and make it
26931         work :-).
26932
26933 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
26934
26935         * attribute.cs: Add support for typeof in attribute invocations.
26936         I am not sure that this is right though.
26937
26938 2002-04-14  Duncan Mak  <duncan@ximian.com>
26939
26940         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
26941         Binary.Operator.Division case.
26942
26943 2002-04-13  Ravi Pratap  <ravi@ximian.com>
26944
26945         * class.cs (DefineType): Ensure that we do a proper check on
26946         attribute types and also register it with the TypeManager.
26947
26948         (TypeContainer.Targets): The default for attribute types is
26949         AttributeTargets.All.
26950
26951         * attribute.cs (ApplyAttributes): Registering the attribute type
26952         is done elsewhere, not when we discover we have a Usage attribute.
26953
26954 2002-04-12  Ravi Pratap  <ravi@ximian.com>
26955
26956         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
26957         and get rid of is_delegate parameter.
26958
26959         * everywhere : update.
26960
26961 2002-04-12  Ravi Pratap  <ravi@ximian.com>
26962
26963         * cs-parser.jay (compilation_unit): Revamp completely to use
26964         some new ideas that I got from Rhys' grammar to solve the problems
26965         with assembly level attributes.
26966
26967         (outer_declaration): New grammar production.
26968
26969         (attribute_sections): Add.
26970
26971         (opt_attributes): Base on attribute_sections
26972
26973         (namespace_declaration): Allow opt_attributes to tackle the case
26974         when we have assembly level attributes - we are clever in this
26975         regard now ;-)
26976
26977         * attribute.cs (ApplyAttributes): Do not worry about assembly 
26978         attributes in the non-global context.
26979
26980         * rootcontext.cs (AddGlobalAttributes): Go back to using this
26981         instead of SetGlobalAttributes.
26982
26983         * class.cs, rootcontext.cs : Ensure we define and generate 
26984         attribute types before anything else.
26985
26986         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
26987         and flag the new error -20 for the case when the attribute type
26988         does not have valid targets specified. csc does not catch this.
26989
26990         * ../errors/errors.txt : update for error # -20
26991
26992 2002-04-11  Ravi Pratap  <ravi@ximian.com>
26993
26994         * support.cs (InternalParameters.ParameterModifier): Do some null
26995         checking and return sane values.
26996
26997         * class.cs (Method.Define): If we are a PInvoke method, ensure
26998         that we are static and extern. Report error # 601
26999
27000         * ../errors/cs0601.cs : Add test case for the above error.
27001
27002 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27003
27004         * rootcontext.cs (attribute_types): We need to keep type of
27005         all attribute types separately and emit code for them first.
27006
27007         (RegisterAttribute) : Implement.
27008
27009         * class.cs (DefineType): Check if the current Type is a custom
27010         attribute type and register it accordingly.
27011
27012         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27013         adding the first attribute twice and rename to
27014
27015         (SetGlobalAttributes): this.
27016
27017         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27018         lookups.
27019
27020         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27021         if we are processing global arguments. Hmm, I am unsure of this.
27022
27023 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27024
27025         * expression.cs: added static array of strings to avoid calling
27026         Enum.ToString () for Operator in Binary. Significant recover of
27027         performance.
27028
27029 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27030
27031         * class.cs (FindMembers): Allow the Builders of the various
27032         members to be null.  If they are skip them.  This only happens
27033         during the PInvoke declaration.
27034
27035 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27036
27037         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27038         failure, so we do not keep going afterwards.
27039
27040         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27041         wanted to pass `false' as the `is_delegate' argument.  If this is
27042         the case, why not use delegate_type == null to mean `is_delegate =
27043         false' and anything else as is_delegate = true.
27044
27045 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27046
27047         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27048         code for the section, not the beginning of the tests.
27049
27050 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27051
27052         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27053
27054         * expression.cs (Binary): same.  Warn about errors where we have
27055         Enum/Enum in operator + as well.
27056
27057 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27058
27059         * statement.cs:
27060                 - added support for switch(bool)
27061                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27062                 - add TableSwitchEmit() to handle table-based switch statements
27063
27064 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27065
27066         * expression.cs (Invocation.OverloadResolve): Factor out code which
27067         does parameter compatibility checking with arguments so that we can 
27068         re-use the code even from Delegate.VerifyApplicability
27069
27070         (VerifyArgumentsCompat): Move above code here.
27071
27072         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27073         and instead make a call to the above method.
27074
27075 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27076
27077         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27078         We use it to keep track of classes which are attribute types.
27079
27080 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27081
27082         * delegate.cs (Delegate.Define): Correctly define the types in the
27083         presence of fixed and array parameters.
27084
27085         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27086         doing FindMembers.
27087
27088         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27089         include NonPublic after the first iteration.
27090
27091         * class.cs (Indexer.CheckBase): Only check if both parents are
27092         non-null. 
27093
27094         * cs-parser.jay (accessor_body): If empty, set to null.
27095
27096         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27097         same code path here to resolve constants names that we did have in
27098         MemberAccess.DoResolve.  There is too much code duplicated here.
27099
27100 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27101
27102         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27103
27104         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27105         to MakeUnionSet.
27106
27107         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27108         tokens, numbers and strings.
27109
27110         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27111         parenthesis.
27112
27113         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27114         asyncronous parameters and the regular parameters.  
27115
27116         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27117         specify the target directory.
27118
27119         * expression.cs: (This.DoResolve): Simplify
27120         (As.Emit): Optimize, do not generate IsInst if the expression is
27121         always of the given type.
27122
27123         (Is.DoResolve): Bug fix, we were reporting both always/never for
27124         the is expression.
27125
27126         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27127         creating too many unnecessary arrays.
27128
27129 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27130
27131         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27132         fields instead of rolling our own initializer.   Takes care of all
27133         implicit conversions, and drops unnecessary static checks/argument.
27134
27135 2002-03-31  Dick Porter  <dick@ximian.com>
27136
27137         * driver.cs: use the GetDirectories() return values properly, and
27138         use "/" as path separator.
27139
27140 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27141
27142         * expression.cs (Unary): Optimize - - expr into expr.
27143         (Binary): Optimize a + (-b) into a -b.
27144
27145         * codegen.cs (CodeGen): Made all methods static.
27146
27147 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27148
27149         * rootcontext.cs: 
27150
27151         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27152         TypeBuilder property.
27153
27154         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27155         instead. 
27156
27157         * tree.cs: Removed the various RecordXXXX, and replaced with a
27158         single RecordDecl.  Removed all the accessor methods, and just
27159         left a single access point Type 
27160
27161         * enum.cs: Rename DefineEnum to DefineType.
27162
27163         * decl.cs: New abstract method `DefineType' used to unify the
27164         Defines for Enumerations, Interfaces, TypeContainers and
27165         Delegates.
27166
27167         (FindType): Moved LookupInterfaceOrClass here.  Moved the
27168         LookupBaseClasses method that used to live in class.cs and
27169         interface.cs here, and renamed to FindType.
27170
27171         * delegate.cs: Implement DefineType.  Take advantage of the
27172         refactored pattern for locating the parent builder without taking
27173         the parent_builder argument (which we know does not work if we are
27174         nested, and triggering a toplevel definition).
27175
27176 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27177
27178         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
27179         accessibility of a member has changed during override and report
27180         an error if so.
27181
27182         * class.cs (Method.Define, Property.Define): Only complain on
27183         overrides if the method is private, any other accessibility is
27184         fine (and since we just checked the permission is the same, we are
27185         good to go).
27186
27187         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
27188         and elif are processed always.  The other pre-processing
27189         directives are only processed if we are "taking" the path
27190
27191 2002-03-29  Martin Baulig  <martin@gnome.org>
27192
27193         * class.cs (Method.Emit): Only emit symbolic debugging info if the
27194         current location is not Null.
27195
27196         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
27197         a separate method so we can profile it.
27198
27199         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
27200         `span.Seconds' are just seconds, but no minutes or hours.
27201         (MainDriver): Profile the CodeGen.SaveSymbols calls.
27202
27203 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27204
27205         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
27206         Remove the gratuitous set of Final:
27207
27208                                 // If an interface implementation, then we can set Final.
27209                                 if (((flags & MethodAttributes.Abstract) == 0) &&
27210                                     implementing.DeclaringType.IsInterface)
27211                                         flags |= MethodAttributes.Final;
27212
27213         I do not know what I was smoking when I used that.
27214
27215
27216         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
27217         step into fixing the name resolution issues for delegates and
27218         unifying the toplevel name resolution.
27219
27220 2002-03-28  Martin Baulig  <martin@gnome.org>
27221
27222         * class.cs (Method.Emit): If we have a symbol writer, call its
27223         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
27224         tell it about the current method.
27225
27226         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
27227         writer that we're going to emit the first byte of IL code for a new
27228         statement (a new source line).
27229         (EmitContext.EmitTopBlock): If we have a symbol writer, call
27230         EmitContext.Mark() before emitting any code.
27231
27232         * location.cs (SymbolDocument): Return null when we're Null.
27233
27234         * statement.cs (Statement): Moved the `Location loc' variable here.
27235         (Statement.EmitBoolExpression): If we have a symbol writer, call
27236         ec.Mark() before emitting any code to tell it that we're at the
27237         beginning of a new statement.
27238         (StatementExpression): Added `Location' argument to the constructor.
27239         (Block): Added public readonly variable `StartLocation' and public
27240         variable `EndLocation'.  The latter is to be set using SetEndLocation().
27241         (Block): Added constructor which takes a start and end location.
27242         (Block.SetEndLocation): New method. This sets the end location.
27243         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
27244         local variables we create.
27245         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
27246         each statement and do also mark the begin and end of the block.
27247
27248         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
27249         tell it the current lexer.Location, use Location.Null for the end of the
27250         block.
27251         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
27252         current block, set its end location using SetEndLocation().
27253         (statement_expression): StatementExpression constructor now takes the
27254         lexer.Location as additional argument.
27255         (for_statement, declare_local_variables): Likewise.
27256         (declare_local_variables): When creating a new implicit block, use the
27257         new Block constructor and pass it the lexer.Location.
27258
27259 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27260
27261         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
27262         members also on the parent interfaces recursively.
27263
27264 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
27265
27266         * report.cs: Use new formats, since Gonzalo finished the missing
27267         bits. 
27268
27269         * expression.cs (Binary.ResolveOperator): added missing operator|
27270         operator& and operator^ for bool/bool.
27271
27272         * cs-parser.jay: CheckDef now takes a Location argument that is
27273         used to report errors more precisly (instead of reporting the end
27274         of a definition, we try to track something which is a lot closer
27275         to the source of the problem).
27276
27277         * cs-tokenizer.cs: Track global token use, so we can properly flag
27278         the use of #define/#undef after the first token has been seen.
27279
27280         Also, rename the reportXXXX to Error_DescriptiveName
27281
27282         * decl.cs (DeclSpace.IsTopLevel): Move property here from
27283         TypeContainer, so that Enum and Interface can use this too.
27284
27285         * class.cs (TypeContainer.LookupInterfaceOrClass,
27286         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
27287         `builder' argument.  Typically this was used to pass the parent
27288         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
27289         the definition).  
27290
27291         The problem is that a nested class could trigger the definition of
27292         a toplevel class, and the builder would be obviously wrong in that
27293         case. 
27294
27295         So we drop this argument, and we compute dynamically the
27296         TypeBuilder/ModuleBuilder (the correct information was available
27297         to us anyways from DeclSpace.Parent)
27298
27299         * interface.cs (Interface.DefineInterface): Drop builder
27300         parameter cleanup like class.cs
27301
27302         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
27303         like class.cs
27304
27305         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
27306         values. 
27307
27308         (Try.Emit): Propagate the returns value from the statement.
27309
27310         (Return.Emit): Even if we are leavning 
27311
27312         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
27313
27314         * modifiers.cs: Fix the computation of MethodAttributes flags.
27315
27316 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
27317
27318         * driver.cs: allow compilation of files that start with '/'.
27319         Add a default case when checking the argument of --target.
27320
27321 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
27322
27323         * interface.cs: Implement the same search algorithm for types in
27324         the interface code.
27325
27326         * delegate.cs: Do not allow multiple definition.
27327
27328         * Recovered ChangeLog that got accidentally amputated
27329
27330         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
27331
27332         * rootcontext.cs: Load manually enum to allow core classes to
27333         contain enumerations.
27334
27335         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
27336         Update to new static methods in TypeManager.
27337
27338         * typemanager.cs (GetMethod, GetConstructor): Use our
27339         implementation of FindMembers to find the members, since during
27340         corlib compilation, the types are TypeBuilders and GetMethod and
27341         GetConstructor do not work.
27342
27343         Make all methods in TypeManager static.
27344
27345         (InitCodeHelpers): Split the functionality from
27346         the InitCodeTypes function.
27347
27348         * driver.cs: Call InitCodeHelpers after we have populated the
27349         types. 
27350
27351         * cs-parser.jay (delegate_declaration): we did not used to compute
27352         the delegate name correctly for void delegates.
27353
27354 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
27355
27356         * rootcontext.cs (RootContext): Init the interface_resolve_order
27357         and type_container_resolve_order always.
27358
27359         (ResolveCore, BootstrapCorlib_ResolveClass,
27360         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
27361         compiler when compiling with --nostdlib
27362
27363         * class.cs (TypeContainer.DefineType): Check that our parent is
27364         not null.  This test is most important when we are bootstraping
27365         the core types.
27366
27367         * codegen.cs: Split out the symbol writing code.
27368
27369 2002-03-25  Martin Baulig  <martin@gnome.org>
27370
27371         * driver.cs (-g): Made -g an alias for --debug.
27372
27373 2002-03-24  Martin Baulig  <martin@gnome.org>
27374
27375         * codegen.cs (SymbolWriter): New public variable. Returns the
27376         current symbol writer.
27377         (CodeGen): Added `bool want_debugging_support' argument to the
27378          constructor. If true, tell the ModuleBuild that we want debugging
27379         support and ask it for the ISymbolWriter.
27380         (Save): If we have a symbol writer, call it's Close() method after
27381         saving the assembly.
27382
27383         * driver.c (--debug): New command line argument to create a
27384         debugger information file.
27385
27386         * location.cs (SymbolDocument): New public property. Returns an
27387         ISymbolDocumentWriter object for the current source file or null
27388         if we don't have a symbol writer.
27389
27390 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
27391
27392         * driver.cs (LoadAssembly): Correctly return when all the paths
27393         have been tried and not before.
27394
27395         * statement.cs (Switch.Emit): return the actual coverage for this
27396         statement (returns/not-returns)
27397
27398         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
27399         switch of the statement if we are the last switch section.  That
27400         kills two problems: try/catch problems (we used to emit an empty
27401         nop at the end) and switch statements where all branches would
27402         return. 
27403
27404 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
27405
27406         * driver.cs: Add default assemblies (the equivalent to the
27407         Microsoft CSC.RSP file)
27408
27409         * cs-tokenizer.cs: When updating `cols and setting it to zero,
27410         also update tokens_seen and set it to false.
27411
27412         * driver.cs: Implement --recurse for Mike.
27413
27414         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
27415         correctly splitting out the paths.
27416
27417 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
27418
27419         * interface.cs (Interface.PopulateProperty): Instead of using
27420         `parent' as the declaration space for the set parameters, use
27421         `this' 
27422
27423         * support.cs (InternalParameters): InternalParameters constructor
27424         takes a DeclSpace instead of a TypeContainer.
27425
27426         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
27427         types are being initialized, load the address of it before calling
27428         the function.  
27429
27430         (New): Provide a mechanism to disable the generation of local
27431         value type temporaries when the caller will be providing us with
27432         an address to store it.
27433
27434         (ArrayCreation.EmitDynamicInitializers): Use it.
27435
27436 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
27437
27438         * expression.cs (Invocation.EmitArguments): Only probe for array
27439         property if there is more than one argument.  Sorry about that.
27440
27441         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
27442         empty param arrays.
27443
27444         * class.cs (Method.LabelParameters): Fix incorrect code path that
27445         prevented the `ParamArrayAttribute' from being applied to the
27446         params attribute.
27447
27448 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
27449
27450         * support.cs (ReflectionParameters): Correctly compute whether the
27451         last argument is a params array.  Fixes the problem with
27452         string.Split ('a')
27453
27454         * typemanager.cs: Make the assemblies array always be non-null
27455         (empty, but non-null)
27456
27457         * tree.cs (RecordDecl): New function that abstracts the recording
27458         of names.  This reports error 101, and provides a pointer to the
27459         previous declaration.  Fixes a crash in the compiler.
27460
27461         * cs-parser.jay (constructor_declaration): Update to new grammar,
27462         and provide a constructor_body that can be empty.
27463
27464 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
27465
27466         * driver.cs: Add support for --resources.
27467
27468         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
27469         Make all types for the various array helper methods be integer.
27470
27471         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
27472         CheckState to ConvCast.
27473
27474         (ConvCast): Now it takes a `checked' state argument, to avoid
27475         depending on the emit context for the conversion, and just using
27476         the resolve time setting.
27477
27478         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
27479         instead of Invocation.EmitArguments.  We do not emit the original
27480         arguments, instead we emit those which have been converted to
27481         unsigned int expressions.
27482
27483         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
27484
27485         * codegen.cs: ditto.
27486
27487         * expression.cs (LocalVariableReference): Drop the use of the
27488         Store function that depended on the variable index.
27489
27490         * statement.cs (VariableInfo): Drop the `Idx' property from this
27491         class, as this is not taking into account the indexes for
27492         temporaries tat we generate during the execution, getting the
27493         indexes wrong.
27494
27495         * class.cs: First emit class initializers, then call the parent
27496         constructor. 
27497
27498         * expression.cs (Binary): Fix opcode emision.
27499         (UnaryMutator.EmitCode): Support checked code generation
27500
27501         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
27502         matches for events for both the Static and Instance scans,
27503         pointing to the same element.   Fix that.
27504
27505 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
27506
27507         * rootcontext.cs (ResolveTree): Always set the
27508         interface_resolve_order, because nested interfaces will be calling
27509         into us.
27510
27511         * class.cs (GetInterfaceOrClass): Track the same resolution
27512         process used by TypeManager.LookupType.  This fixes the nested
27513         type lookups in class declarations (separate path from
27514         LookupType). 
27515
27516         (TypeContainer.DefineType): Also define nested interfaces.
27517         (TypeContainer.RegisterOrder): New public function used to
27518         register the order in which child interfaces need to be closed.
27519
27520         Nested interfaces need to be closed after their parents have been
27521         created. 
27522
27523         * interface.cs (InterfaceAttr): Put all the logic for computing
27524         the interface attribute here. 
27525
27526         (DefineInterface): Register our interface order with the
27527         RootContext or with the TypeContainer depending on the case.
27528
27529 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
27530
27531         * cs-parser.jay: rework foreach statement to work with the new
27532         changes to the policy on SimpleNames.
27533
27534         * report.cs: support Stacktrace on warnings as well.
27535
27536         * makefile: drop --unsafe and /unsafe from the compile.
27537
27538 2002-03-13  Ravi Pratap  <ravi@ximian.com>
27539
27540         * ecore.cs (StandardConversionExists): Modify to take an Expression
27541         as the first parameter. Ensure we do null -> reference type conversion
27542         checking.
27543
27544         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
27545         temporary Expression objects.
27546
27547 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
27548
27549         * interface.cs: workaround bug in method overloading resolution
27550         (there is already a bugzilla bug for it).
27551
27552 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
27553
27554         We could also solve this problem by having a separate path for
27555         performing type lookups, instead of DoResolve, we could have a
27556         ResolveType entry point, and only participating pieces of the
27557         production (simplename, deref, array) would implement this. 
27558
27559         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
27560         signal SimpleName to only resolve type names and not attempt to
27561         resolve anything else.
27562
27563         * expression.cs (Cast): Set the flag.
27564
27565         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
27566
27567         * class.cs: Only report 108 if there is no `new' modifier.
27568
27569         * cs-parser.jay: rework foreach statement to work with the new
27570         changes to the policy on SimpleNames.
27571
27572         * report.cs: support Stacktrace on warnings as well.
27573
27574         * makefile: drop --unsafe and /unsafe from the compile.
27575
27576 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
27577
27578         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
27579         lookups here, instead of doing that at parse time.  This means
27580         that our grammar will not introduce `LocalVariableReferences' as
27581         expressions at this point.  That solves the problem of code like
27582         this:
27583
27584         class X {
27585            static void Main ()
27586            { int X = 1;
27587             { X x = null }}}
27588
27589         This is only half the fix.  The full fix requires parameters to
27590         also be handled in this way.
27591
27592         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
27593         makes the use more obvious of the DeclSpace.  The
27594         ec.TypeContainer.TypeBuilder is now only used to pull the
27595         TypeBuilder for it.
27596
27597         My theory is that I can get rid of the TypeBuilder completely from
27598         the EmitContext, and have typecasts where it is used (from
27599         DeclSpace to where it matters).  
27600
27601         The only pending problem is that the code that implements Aliases
27602         is on TypeContainer, and probably should go in DeclSpace.
27603
27604         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
27605         lookups here, instead of doing that at parse time.  This means
27606         that our grammar will not introduce `LocalVariableReferences' as
27607         expressions at this point.  That solves the problem of code like
27608         this:
27609
27610         class X {
27611            static void Main ()
27612            { int X = 1;
27613             { X x = null }}}
27614
27615         This is only half the fix.  The full fix requires parameters to
27616         also be handled in this way.
27617
27618         * class.cs (Property.DefineMethod): When implementing an interface
27619         method, set newslot, when implementing an abstract method, do not
27620         set the flag (before we tried never setting it, or always setting
27621         it, which is the difference).
27622         (Indexer.DefineMethod): same.
27623         (Method.DefineMethod): same.
27624
27625         * ecore.cs: Only set the status used flag if we get back a Field.
27626
27627         * attribute.cs: Temporary hack, so Paolo can keep working.
27628
27629 2002-03-08  Ravi Pratap  <ravi@ximian.com>
27630
27631         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
27632         the unmanaged type in the case we have a MarshalAs attribute.
27633
27634         (Resolve): Handle the case when we are parsing the special MarshalAs
27635         attribute [we need to store the unmanaged type to use later]
27636
27637         * typemanager.cs (marshal_as_attr_type): Built in type for the 
27638         MarshalAs Attribute.
27639
27640         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
27641         on parameters and accordingly set the marshalling info.
27642
27643 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
27644
27645         * class.cs: Optimizing slightly by removing redundant code after
27646         we switched to the `NoTypes' return value.
27647         (Property.DefineMethod): use NoTypes here too.
27648
27649         This fixes the bug I introduced in my last batch of changes.
27650
27651 2002-03-05  Ravi Pratap  <ravi@ximian.com>
27652
27653         * tree.cs (RecordEnum): Add. We now keep track of enums too.
27654
27655         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
27656         Enums since those are types too. 
27657
27658         * cs-parser.jay (enum_declaration): Record enums as we parse them.
27659
27660         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
27661         thanks to a call during the lookup process.
27662
27663 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
27664
27665         * statement.cs (Foreach): Lots of work to accomodate a particular
27666         kind of foreach statement that I had not kept in mind.  It is
27667         possible to have foreachs on classes that provide a GetEnumerator
27668         method that return objects that implement the "pattern" for using
27669         a foreach, there is no need to support GetEnumerator
27670         specifically. 
27671
27672         This is needed to compile nant.
27673
27674         * decl.cs: Only report 114 if the member is not `Finalize' and if
27675         the warning level is at least 2.
27676
27677         * class.cs: Moved the compare function from Method to
27678         MethodSignature. 
27679
27680         (MethodSignature.InheritableMemberSignatureCompare): Add new
27681         filter function that is used to extract inheritable methods from a
27682         class. 
27683
27684         (Method.Define): Use the new `inheritable_method_signature_filter'
27685         delegate
27686
27687         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
27688         command. 
27689
27690 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
27691
27692         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
27693
27694         * cs-parser.jay: Add opt_semicolon to the interface declaration.
27695
27696         * expression.cs: Pass location information to
27697         ConvertImplicitStandard. 
27698
27699         * class.cs: Added debugging code to track return values from
27700         interfaces. 
27701
27702 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
27703
27704         * expression.cs (Is.DoResolve): If either side of the `is' is an
27705         interface, do not flag the warning.
27706
27707         * ecore.cs (ImplicitReferenceConversion): We need a separate test
27708         for interfaces
27709
27710         * report.cs: Allow for --fatal to be used with --probe.
27711
27712         * typemanager.cs (NoTypes): Move the definition for the empty Type
27713         array here. 
27714
27715         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
27716         properties. 
27717         (TypeContainer.DefineProxy): New function used to proxy to parent
27718         implementations when implementing interfaces.
27719         (TypeContainer.ParentImplements): used to lookup if our parent
27720         implements a public function that is required by an interface.
27721         (TypeContainer.VerifyPendingMethods): Hook this up.
27722
27723         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
27724         `modules' and `assemblies' arraylists into arrays.  We only grow
27725         these are the very early start up of the program, so this improves
27726         the speedof LookupType (nicely measured).
27727
27728         * expression.cs (MakeByteBlob): Replaced unsafe code with
27729         BitConverter, as suggested by Paolo.
27730
27731         * cfold.cs (ConstantFold.Binary): Special case: perform constant
27732         folding of string concatenation, but if either side is a string,
27733         and the other is not, then return null, and let the runtime use
27734         the concatenation on the string plus the object (using
27735         `Object.ToString'). 
27736
27737 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
27738
27739         Constant Folding has been implemented now.
27740
27741         * expression.cs (Unary.Reduce): Do not throw an exception, catch
27742         the error instead on types that are not supported in one's
27743         complement. 
27744
27745         * constant.cs (Constant and all children): New set of functions to
27746         perform implict and explicit conversions.
27747
27748         * ecore.cs (EnumConstant): Implement the new functions to perform
27749         conversion by proxying to the child expression.
27750
27751         * codegen.cs: (ConstantCheckState): Constant evaluation has its
27752         own separate setting that can not be turned off from the command
27753         line using --unchecked or --checked and is only controlled using
27754         the checked/unchecked statements and expressions.  This setting is
27755         used by the constant folder to flag errors.
27756
27757         * expression.cs (CheckedExpr, UncheckedExpr): Set the
27758         ConstantCheckState as well.   
27759
27760         During Resolve, they also have to flag the state, because the
27761         constant folder runs completely in the Resolve phase.
27762
27763         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
27764         well.
27765
27766 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
27767
27768         * cfold.cs: New file, this file contains the constant folder.
27769
27770         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
27771         argument to track whether we are using the resulting address to
27772         load or store a value and provide better error messages. 
27773
27774         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
27775         new AddressOf arguments.
27776
27777         * statement.cs (Foreach.EmitCollectionForeach): Update
27778
27779         * expression.cs (Argument.Emit): Call AddressOf with proper
27780         arguments to track usage.
27781
27782         (New.DoEmit): Call AddressOf with new arguments.
27783
27784         (Unary.Emit): Adjust AddressOf call.
27785
27786 2002-03-01  Ravi Pratap  <ravi@ximian.com>
27787
27788         * cs-parser.jay (member_access): Change the case for pre-defined types
27789         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
27790         this suggestion.
27791
27792         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
27793         a method body.
27794
27795         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
27796         essentially like methods and apply attributes like MethodImplOptions to them too.
27797
27798         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
27799         not being null.
27800
27801         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
27802         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
27803         is the DeclSpace.
27804
27805         * Update code everywhere accordingly.
27806
27807         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
27808
27809         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
27810
27811 2002-02-28  Ravi Pratap  <ravi@ximian.com>
27812
27813         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
27814         try performing lookups against those instead of jumping straight into using
27815         the 'using' clauses.
27816
27817         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
27818
27819         (LookupType): Perform lookups in implicit parents too.
27820
27821         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
27822         sequence as RootContext.LookupType. 
27823
27824         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
27825         the various cases of namespace lookups into this method.
27826
27827 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
27828
27829         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
27830         in positional arguments)
27831
27832         * class.cs (Operator): Update the AllowedModifiers to contain
27833         extern. 
27834
27835         * cs-parser.jay: Update operator declaration to allow for the
27836         operator body to be empty.
27837
27838         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
27839         values. 
27840
27841 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
27842
27843         * class.cs (Method.Emit): Label parameters.
27844
27845         * driver.cs: Return 1 or 0 as the program exit code.
27846
27847 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
27848
27849         * expression.cs: Special case the `null' object when trying to
27850         auto-compute the type, as anything can be explicitly converted to
27851         that. 
27852
27853         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
27854         spotting this Paolo.
27855
27856         (Expression.ImplicitNumericConversion): Perform comparissions of
27857         the type using the underlying type in the case of an enumeration
27858         rather than using the enumeration type for the compare.
27859
27860         Cope with the underlying == type case, which is not possible to
27861         catch before. 
27862
27863         (Expression.ConvertNumericExplicit): Perform comparissions of
27864         the type using the underlying type in the case of an enumeration
27865         rather than using the enumeration type for the compare.
27866
27867         * driver.cs: If the user does not supply an extension, assume .exe
27868
27869         * cs-parser.jay (if_statement): Rewrote so that we can track the
27870         location for the if statement.
27871
27872         * expression.cs (Binary.ConstantFold): Only concat strings when
27873         the operation is "+", not everything ;-)
27874
27875         * statement.cs (Statement.EmitBoolExpression): Take a location
27876         argument. 
27877         (If, While, Do): Track location.
27878
27879         * expression.cs (Binary.ResolveOperator): In the object + string
27880         case, I was missing a call to ConvertImplicit
27881
27882 2002-02-25  Ravi Pratap  <ravi@ximian.com>
27883
27884         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
27885         Location arguments. Ensure we use RootContext.LookupType to do our work
27886         and not try to do a direct Type.GetType and ModuleBuilder.GetType
27887
27888         * interface.cs (PopulateMethod): Handle the type of the parameter being
27889         null gracefully.
27890
27891         * expression.cs (Invocation.BetterFunction): Handle the case when we 
27892         have a params method with no fixed arguments and a call is made with no
27893         arguments.
27894
27895 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
27896
27897         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
27898         the verbatim-string-literal
27899
27900         * support.cs (InternalParameters.ParameterModifier): handle null
27901         fixed parameters.
27902         (InternalParameters.ParameterType): ditto.
27903
27904         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
27905         duplicating the name of the variable parameter.
27906         (GetParameterByName): Fix bug where we were not looking up array
27907         paramters if they were the only present (thanks Paolo!).
27908         (GetParameterInfo): We only have an empty set of types if both
27909         fixed and array are set to null.
27910         (GetParameterInfo-idx): Handle FixedParameter == null
27911
27912         * cs-parser.jay: Handle the case where there is no catch
27913         statements (missing null test).
27914
27915 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
27916
27917         * driver.cs (MainDriver): Be conservative on our command line
27918         handling.
27919
27920         Catch DirectoryNotFoundException when calling GetFiles.
27921
27922         (SplitPathAndPattern): Used to split the input specification into
27923         a path and a pattern that we can feed to Directory.GetFiles.
27924
27925 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
27926
27927         * statement.cs (Fixed): Implement the last case of the Fixed
27928         statement (string handling).
27929
27930         * expression.cs (StringPtr): New class used to return a char * to
27931         a string;  Used by the Fixed statement.
27932
27933         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
27934
27935         * expression.cs (Binary.ResolveOperator): Remove redundant
27936         MemberLookup pn parent type.
27937         Optimize union call, we do not need a union if the types are the same.
27938         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
27939         type.
27940
27941         Specialize the use of MemberLookup everywhere, instead of using
27942         the default settings. 
27943
27944         (StackAlloc): Implement stackalloc keyword.
27945
27946         * cs-parser.jay: Add rule to parse stackalloc.
27947
27948         * driver.cs: Handle /h, /help, /?
27949
27950         * expression.cs (MakeByteBlob): Removed the hacks we had in place
27951         before we supported unsafe code.
27952
27953         * makefile: add --unsafe to the self compilation of mcs.
27954
27955 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
27956
27957         * expression.cs (PointerArithmetic): New class that is used to
27958         perform pointer arithmetic.
27959         (Binary.Resolve): Handle pointer arithmetic
27960         Handle pointer comparission.
27961         (ArrayPtr): Utility expression class that is used to take the
27962         address of an array.
27963
27964         (ElementAccess): Implement array access for pointers
27965
27966         * statement.cs (Fixed): Implement fixed statement for arrays, we
27967         are missing one more case before we are done.
27968
27969         * expression.cs (Indirection): Implement EmitAssign and set the
27970         ExprClass to Variable.  This allows pointer dereferences to be
27971         treated as variables, and to have values assigned to them.
27972
27973         * ecore.cs (Expression.StoreFromPtr): New utility function to
27974         store values dereferencing.
27975
27976 2002-02-20  Ravi Pratap  <ravi@ximian.com>
27977
27978         * expression.cs (Binary.ResolveOperator): Ensure that we are
27979         not trying to operate on a void type - this fixes the reported
27980         bug.
27981
27982         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
27983         the parent implementation is sealed.
27984
27985         * ../errors/cs0239.cs : Add.
27986
27987         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
27988
27989         * typemanager.cs (unverifiable_code_type): Corresponds to 
27990         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
27991         which have unsafe code in them.
27992
27993         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
27994         unsafe context.
27995
27996 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
27997
27998         * cs-tokenizer.cs: Add support for @"litreal strings"
27999
28000         Make tokenizer accept pre-processor directives
28001         on any column (remove the old C-like limitation). 
28002
28003         * rootcontext.cs (EmitCode): Emit any global attributes.
28004         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28005
28006         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28007
28008         * cs-parser.jay: Add support for global attributes.  
28009
28010 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28011
28012         * expression.cs (Indirection): New helper class.  Unary will
28013         create Indirection classes to be able to implement the
28014         IMemoryLocation interface on it.
28015
28016 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28017
28018         * cs-parser.jay (fixed_statement): reference the right statement.
28019
28020         * statement.cs (Fixed.Emit): Finish implementing the fixed
28021         statement for the &x case.
28022
28023 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28024
28025         * class.cs (Property.Define, Method.Define): Remove newslot when
28026         `implementing'.  
28027
28028         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28029         wrong.  NewSlot should only be used if the `new' keyword is present.
28030
28031         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28032         locating our system dir.  Sorry about this.
28033
28034 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28035
28036         * driver.cs (GetSystemDir): Compute correctly the location of our
28037         system assemblies.  I was using the compiler directory instead of
28038         the library directory.
28039
28040 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28041
28042         * expression.cs (BetterFunction): Put back in what Miguel commented out
28043         since it is the correct fix. The problem is elsewhere ;-)
28044
28045         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28046         parameters of the parms method are themselves compatible or not !
28047
28048         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28049         to check that a class implements an interface before saying that an implicit
28050         conversion was allowed. Use ImplementsInterface to do the checking.
28051
28052 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28053
28054         * class.cs (Method.Define): Track whether we are an explicit
28055         implementation or not.  And only call DefineMethodOverride if we
28056         are an explicit implementation.
28057
28058         (Property.DefineMethod): Ditto.
28059
28060 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28061
28062         * expression.cs (BetterFunction): Catch hideous bug which was
28063          preventing us from detecting ambiguous calls due to implicit casts i.e
28064         cs0121.
28065
28066 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28067
28068         * support.cs (Pair): Remove un-needed method.  I figured why I was
28069         getting the error in cs-parser.jay, the variable in a foreach loop
28070         is readonly, and the compiler does not really treat this as a variable.
28071
28072         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28073         instead of EQUALS in grammar.  
28074
28075         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28076
28077         * expression.cs (Unary.DoResolve): Check whether the argument is
28078         managed or not.
28079
28080 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28081
28082         * support.cs: Api for Pair to set a value.  Despite the fact that
28083         the variables are public the MS C# compiler refuses to compile
28084         code that accesses the field if the variable is part of a foreach
28085         statement. 
28086
28087         * statement.cs (Fixed): Begin implementation of the fixed
28088         statement.
28089
28090         (Block.AddVariable): Return the VariableInfo on success and null
28091         on failure instead of true/false. 
28092
28093         * cs-parser.jay (foreach): Catch errors on variables already
28094         defined (we were ignoring this value before) and properly unwind
28095         the block hierarchy
28096
28097         (fixed_statement): grammar for the fixed statement.
28098
28099 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28100
28101         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28102         pointer types to be incretemented.
28103
28104         (SizeOf): Implement.
28105
28106         * cs-parser.jay (pointer_member_access): Implement
28107         expr->IDENTIFIER production.
28108
28109         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28110         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28111         on safe contexts.
28112
28113         (Unary): Implement indirection.
28114
28115         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28116         use in non-unsafe context).
28117
28118         (SimpleName.DoResolve): Check for pointers in field access on safe
28119         contexts. 
28120
28121         (Expression.LoadFromPtr): Factor the load-indirect code in this
28122         function.  This was duplicated in UnboxCast and ParameterReference
28123
28124 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28125
28126         * expression.cs (ComposedCast): report an error if a pointer cast
28127         is used in a safe region.
28128
28129         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28130         pointer type casts in unsafe context.
28131
28132         * codegen.cs (EmitContext): Set up IsUnsafe.
28133
28134         * cs-parser.jay (non_expression_type): Add productions for pointer
28135         casts. 
28136
28137         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28138         code.  We should not use force into static mode if the method is
28139         not virtual.  Fixes bug in MIS
28140
28141         * statement.cs (Do.Emit, While.Emit, For.Emit,
28142         Statement.EmitBoolExpression): Add support to Do and While to
28143         propagate infinite loop as `I do return' semantics.
28144
28145         Improve the For case to also test for boolean constants.
28146
28147         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28148         to the list of attributes we can add.
28149
28150         Remove `EmitContext' argument.
28151
28152         * class.cs (Method.Define): Apply parameter attributes.
28153         (Constructor.Define): Apply parameter attributes.
28154         (MethodCore.LabelParameters): Move here the core of labeling
28155         parameters. 
28156
28157         * support.cs (ReflectionParameters.ParameterModifier,
28158         InternalParameters.ParameterModifier): Use IsByRef on the type and
28159         only return the OUT bit for these parameters instead of in/out/ref
28160         flags.
28161
28162         This is because I miss-understood things.  The ParameterInfo.IsIn
28163         and IsOut represent whether the parameter has the [In] and [Out]
28164         attributes set.  
28165
28166 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
28167
28168         * ecore.cs (FieldExpr.Emit): Release temporaries.
28169
28170         * assign.cs (LocalTemporary.Release): new function.
28171
28172         * codegen.cs (EmitContext.GetTemporaryStorage,
28173         EmitContext.FreeTemporaryStorage): Rework the way we deal with
28174         temporary storage.  Now we can "put back" localbuilders when we
28175         are done with them
28176
28177 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
28178
28179         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
28180         need to make a copy of the variable to generate verifiable code.
28181
28182 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
28183
28184         * driver.cs: Compute dynamically the system directory.
28185
28186         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
28187         Slower, but more generally useful.  Used by the abstract
28188         registering implementation. 
28189
28190         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
28191         the rules for the special rule on Type/instances.  First check if
28192         we have the same name, and if so, try that special static path
28193         rather than the instance path.
28194
28195 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
28196
28197         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
28198         for, while and if.
28199
28200         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
28201         Enum, ValueType, Delegate or Array for non-corlib compiles.
28202
28203         * cs-tokenizer.cs: Catch long identifiers (645)
28204
28205         * typemanager.cs (IndexerPropetyName): Ravi never tested this
28206         piece of code.
28207
28208         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
28209         fix, we were returning too early, so we were not registering
28210         pending methods from abstract classes.
28211
28212         Do not register pending methods if the class is abstract.
28213
28214         * expression.cs (Conditional.DoResolve): Report circular implicit
28215         conversions when we neecd to compute it for conditional
28216         expressions. 
28217
28218         (Is.DoResolve): If the expression is always of the provided type,
28219         flag warning 183.  If the expression can not ever be of the
28220         provided type flag warning 184.
28221
28222         * class.cs: Catch 169 as well.
28223
28224         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
28225         read. 
28226
28227 2002-01-18  Nick Drochak  <ndrochak@gol.com>
28228
28229         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
28230
28231 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
28232
28233         * interface.cs: (PopulateMethod): Check for pointers being defined
28234         only if the unsafe context is active.
28235         (PopulateProperty): ditto.
28236         (PopulateIndexer): ditto.
28237
28238         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
28239         specified.  If pointers are present, make sure that they are
28240         present in an unsafe context.
28241         (Constructor, Constructor.Define): ditto.
28242         (Field, Field.Define): ditto.
28243         (Property, Property.Define): ditto.
28244         (Event, Event.Define): ditto.
28245
28246         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
28247         hashtable if there are classes or structs defined.
28248
28249         * expression.cs (LocalVariableReference.DoResolve): Simplify this
28250         code, as the constant resolution moved.
28251
28252         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
28253         the metadata, so we can flag error 133. 
28254
28255         * decl.cs (MemberCore.UnsafeOK): New function to test that a
28256         pointer is being declared in an unsafe context.
28257
28258 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
28259
28260         * modifiers.cs (Modifiers.Check): Require a Location argument.
28261         Report error 227 for Unsafe use.
28262
28263         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
28264
28265         * statement.cs (For.Emit): If the test is null, then report that
28266         we do `return', as we wont reach anything afterwards.
28267
28268         (Switch.SwitchGoverningType): Track the expression that matched
28269         the conversion.
28270
28271         * driver.cs: Allow negative numbers as an error code to flag.
28272
28273         * cs-parser.jay: Handle 1551.
28274
28275         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
28276
28277 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28278
28279         * cs-parser.jay: Report 1518 (type declaration can only contain
28280         class, struct, interface, enum or delegate)
28281
28282         (switch_label): Report 1523 (keywords `case' or `default' must
28283         preced code)
28284
28285         (opt_switch_sections): Report 1522 (empty switch)
28286
28287         * driver.cs: Report 1515 (response file specified multiple times)
28288         Report 1516 (Source file specified multiple times).
28289
28290         * expression.cs (Argument.Resolve): Signal 1510
28291
28292         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
28293         access not allowed in static code)
28294
28295 2002-01-11  Ravi Pratap  <ravi@ximian.com>
28296
28297         * typemanager.cs (IsPointerType): Utility method which we are going
28298         to need a lot.
28299
28300         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
28301         the object type, so we take care of that.
28302
28303         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
28304
28305         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
28306         added to non-params parameters :-)
28307
28308         * typemanager.cs (CSharpName): Include 'void' type too. 
28309
28310         (void_ptr_type): Include in the set of core types.
28311
28312         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
28313         duplicating code.
28314
28315         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
28316         an unsafe context.
28317
28318         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
28319         completely forgotten about it.
28320
28321 2002-01-10  Ravi Pratap  <ravi@ximian.com>
28322
28323         * cs-parser.jay (pointer_type): Add. This begins our implementation
28324         of parsing rules for unsafe code.
28325
28326         (unsafe_statement): Implement.
28327
28328         (embedded_statement): Modify to include the above.
28329
28330         * statement.cs (Unsafe): Implement new class for unsafe blocks.
28331
28332         * codegen.cs (EmitContext.InUnsafe): Add. This determines
28333         if the current context is an unsafe one.
28334
28335         * cs-parser.jay (local_variable_pointer_type): Since local variable types
28336         are handled differently, we need separate rules for them.
28337
28338         (local_variable_declaration): Update to use local_variable_pointer_type
28339         to allow variable declarations of unmanaged pointer types.
28340
28341         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
28342         in unsafe contexts.
28343
28344         * ../errors/cs0214.cs : Add.
28345
28346 2002-01-16  Nick Drochak  <ndrochak@gol.com>
28347
28348         * makefile: remove 'response' file when cleaning.
28349
28350 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28351
28352         * cs-parser.jay: Report 1524.
28353
28354 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
28355
28356         * typemanager.cs (RegisterMethod): drop checking if we have
28357         registered this from here
28358
28359 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
28360
28361         * class.cs (Method.EmitDestructor): Implement calling our base
28362         destructor. 
28363
28364         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
28365         value of InFinally.
28366
28367         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
28368         this routine and will wrap the call in a try/catch block.  Deal
28369         with the case.
28370
28371 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
28372
28373         * ecore.cs (Expression.MemberLookup): instead of taking a
28374         parameter `same_type' that was used to tell whether we could
28375         access private members we compute our containing type from the
28376         EmitContext.
28377
28378         (FieldExpr): Added partial support for volatile fields.  This does
28379         not work for volatile fields exposed from assemblies, as I can not
28380         figure out how to extract the modreq from it.
28381
28382         Updated all the source files to use this.
28383
28384         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
28385         because it is referenced by MemberLookup very often. 
28386
28387 2002-01-09  Ravi Pratap  <ravi@ximian.com>
28388
28389         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
28390         TypeBuilder.GetCustomAttributes to retrieve what we need.
28391
28392         Get rid of redundant default_member_attr_type as this is the same as
28393         default_member_type which already exists.
28394
28395         * interface.cs, attribute.cs : Update accordingly.
28396
28397 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
28398
28399         * typemanager.cs: Enable IndexerPropertyName again.  It does not
28400         work for TYpeBuilders though.  Ravi, can you please fix this?
28401
28402         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
28403
28404         * expression.cs (Argument.Emit): Handle the case of ref objects
28405         being passed to ref functions;  
28406
28407         (ParameterReference.EmitLoad): Loads the content of the pointer
28408         without dereferencing.
28409
28410 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28411
28412         * cs-tokenizer.cs: Implemented the pre-processing expressions.
28413
28414 2002-01-08  Ravi Pratap  <ravi@ximian.com>
28415
28416         * class.cs (Indexer.DefineMethod): Incorporate the interface
28417         type in the name of the method if we are doing explicit interface
28418         implementation.
28419
28420         * expression.cs (ConversionExists): Remove as it is completely obsolete.
28421
28422         (BetterConversion): Fix extremely trivial bug where we were referring to
28423         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
28424         again !
28425
28426         * ../errors/bug16.cs : Add although we have fixed it.
28427
28428 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28429
28430         * expression.cs (BaseIndexer): Begin implementation.
28431
28432         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
28433
28434         * cs-parser.jay (indexer_declarator): Use qualified_identifier
28435         production directly to remove a shift/reduce, and implement
28436         explicit interface implementation.
28437
28438         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
28439         after a floating point suffix.
28440
28441         * expression.cs (DoNumericPromotions): Improved the conversion for
28442         uint/uint.  If we have a constant, we avoid doing a typecast to a
28443         larger type.
28444
28445         * class.cs (Indexer): Implement explicit interface implementation
28446         for indexers.
28447
28448 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28449
28450         * class.cs: make the default instance constructor public and hidebysig.
28451
28452 2001-01-03  Ravi Pratap  <ravi@ximian.com>
28453
28454         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
28455         so we can call it from elsewhere.
28456
28457         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
28458         we emit it internally if the class has a defined indexer; otherwise the user
28459         emits it by decorating the class definition with the DefaultMemberAttribute.
28460
28461         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
28462         attribute is not used on a type which defines an indexer.
28463
28464         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
28465         character when we skip whitespace.
28466
28467         * ../errors/cs0646.cs : Add.
28468
28469 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
28470
28471         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
28472         again. 
28473
28474         * makefile: Add practical target `mcs3.exe' which builds the third
28475         generation compiler. 
28476
28477         * expression.cs (New): Fix structures constructor calling.
28478
28479         * class.cs (Property, Method, Indexer): Emit Final flag on the
28480         method if we are an interface implementation and we are not
28481         abstract. 
28482
28483         * ecore.cs (PropertyExpr): New public field `IsBase', tells
28484         whether this property is referencing a `base' method.
28485
28486         * expression.cs (Invocation.EmitCall): take an extra argument:
28487         is_base, this is used to determine whether the `call' or
28488         `callvirt' opcode should be used.
28489
28490
28491         * delegate.cs: update EmitCall.
28492
28493         * class.cs (Method.Define): Set NewSlot for the cases where we are
28494         not implementing an interface method.
28495
28496         (Property.Define): ditto.
28497
28498 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
28499
28500         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
28501         'r'.  Allows mcs to parse itself fully.
28502
28503 2002-01-02  Ravi Pratap  <ravi@ximian.com>
28504
28505         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
28506         of the number of initializers that require the InitializeArray method.
28507
28508         (CheckIndices): Store the Expression in all cases - not the plain value. Also
28509         update the above field where necessary.
28510
28511         (MakeByteBlob): Update accordingly.
28512
28513         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
28514         greater than 2.
28515
28516         (EmitDynamicInitializers): Update in accordance with the new optimization.
28517
28518         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
28519         same OpCode applies.
28520
28521         * cs-parser.jay : Fix some glaring errors I introduced.
28522
28523 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
28524
28525         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
28526         so that we can check for name clashes there too.
28527
28528         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
28529         for interface indexers.
28530
28531         * interfaces.cs (Define): Emit the default member attribute.
28532
28533         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
28534         variable was being referred to while setting the value ;-)
28535
28536 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
28537
28538         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
28539         byte-by-byte information when we know the data is zero.
28540
28541         Make the block always a multiple of 4, because
28542         DefineInitializedData has a bug.
28543
28544         * assign.cs: Fix, we should assign from the temporary, not from
28545         the source. 
28546
28547         * expression.cs (MakeByteBlob): Fix my incorrect code.
28548
28549 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
28550
28551         * typemanager.cs (EnumToUnderlying): This function is used to get
28552         the underlying type from an enumeration, because it does not
28553         always work. 
28554
28555         * constant.cs: Use the I4_S form for values between -128 and 127.
28556
28557         * statement.cs (Block.LookupLabel): Looks up a label.
28558         (Block): Drop support for labeled blocks.
28559
28560         (LabeledStatement): New kind of statement that represents a label
28561         only.
28562
28563         (Goto): Finally implement this bad boy.
28564
28565         * cs-parser.jay: Update to reflect new mechanism to implement
28566         labels.
28567
28568 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
28569
28570         * codegen.cs (EmitContext.This): a codegen property that keeps the
28571         a single instance of this instead of creating many different this
28572         instances. 
28573
28574         * delegate.cs (Delegate.DoResolve): Update to use the property;
28575
28576         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
28577
28578         * expression.cs (BaseAccess.DoResolve): Ditto.
28579
28580 2001-12-29  Ravi Pratap  <ravi@ximian.com>
28581
28582         * typemanager.cs (methodimpl_attr_type): Add to hold the type
28583         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
28584
28585         (InitCoreTypes): Update accordingly.
28586
28587         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
28588         so we can quickly store the state.
28589
28590         (ApplyAttributes): Set the correct implementation flags
28591         for InternalCall methods.
28592
28593 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
28594
28595         * expression.cs (EmitCall): if a method is not virtual, then do
28596         not use callvirt on it.
28597
28598         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
28599         user defined stuff) requires the use of stobj, which takes an
28600         address on the stack instead of an array and an index.  So emit
28601         the Ldelema operation for it.
28602
28603         (EmitStoreOpcode): Use stobj for valuetypes.
28604
28605         (UnaryMutator.EmitCode): Use the right 1 value depending on
28606         whether we are dealing with int64/uint64, float or doubles.
28607
28608         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
28609         constructors that I implemented last night.
28610
28611         (Constructor.IsDefault): Fix to work properly for static
28612         constructors.
28613
28614         * cs-parser.jay (CheckDef): report method signature errors.
28615         Update error number 103 to be 132.
28616
28617         * decl.cs: New AdditionResult enumeration value: MethodExists.
28618         Although we do this check for methods later on in the semantic
28619         analysis, catching repeated default constructors is so easy that
28620         we catch these here. 
28621
28622         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
28623         promotions code.
28624
28625         (ParameterReference.EmitAssign, Emit): handle
28626         bools as bytes.
28627
28628         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
28629         (ArrayAccess.EmitStoreOpcode): ditto.
28630
28631         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
28632
28633         * expression.cs (MakeByteBlob): Complete all the missing types
28634         (uint, short, ushort, byte, sbyte)
28635
28636         * class.cs: Only init instance field initializers on instance
28637         constructors. 
28638
28639         Rename `constructors' to instance_constructors. 
28640
28641         (TypeContainer.AddConstructor): Only add constructors to the list
28642         if it is not static.
28643
28644         Make sure that we handle default_static_constructor independently
28645         everywhere where we handle instance_constructors
28646
28647 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
28648
28649         * class.cs: Do not lookup or create a base initializer for a
28650         static constructor.
28651
28652         (ConstructorInitializer.Resolve): use the proper type to lookup
28653         for constructors.
28654
28655         * cs-parser.jay: Report error 1585 (modifiers between type and name).
28656
28657         * enum.cs, interface.cs: Remove CloseType, this is taken care by
28658         in DeclSpace. 
28659
28660         * decl.cs: CloseType is now an virtual method, the default
28661         implementation just closes this type.
28662
28663 2001-12-28  Ravi Pratap  <ravi@ximian.com>
28664
28665         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
28666         to PreserveSig by default. Also emit HideBySig on such methods.
28667
28668         Basically, set the defaults to standard values.
28669
28670         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
28671         argument, if candidate is better, it can't be worse than the best !
28672
28673         (Invocation): Re-write bits to differentiate between methods being
28674         applicable in their expanded form and their normal form - for params
28675         methods of course.
28676
28677         Get rid of use_standard everywhere as only standard conversions are allowed
28678         in overload resolution. 
28679
28680         More spec conformance.
28681
28682 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
28683
28684         * driver.cs: Add --timestamp, to see where the compiler spends
28685         most of its time.
28686
28687         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
28688         `this' in static code.
28689
28690         (SimpleName.DoResolve): Implement in terms of a helper function
28691         that allows static-references to be passed upstream to
28692         MemberAccess.
28693
28694         (Expression.ResolveWithSimpleName): Resolve specially simple
28695         names when called by MemberAccess to implement the special
28696         semantics. 
28697
28698         (Expression.ImplicitReferenceConversion): Handle conversions from
28699         Null to reference types before others, as Null's type is
28700         System.Object. 
28701
28702         * expression.cs (Invocation.EmitCall): Handle the special case of
28703         calling methods declared on a reference type from a ValueType
28704         (Base classes System.Object and System.Enum)
28705
28706         (MemberAccess.Resolve): Only perform lookups on Enumerations if
28707         the left hand side is a TypeExpr, not on every enumeration. 
28708
28709         (Binary.Resolve): If types are reference types, then do a cast to
28710         object on operators != and == of both arguments.
28711
28712         * typemanager.cs (FindMembers): Extract instance and static
28713         members if requested.
28714
28715         * interface.cs (PopulateProperty): Use void_type instead of null
28716         as the return type for the setter method.
28717
28718         (PopulateIndexer): ditto.
28719
28720 2001-12-27  Ravi Pratap  <ravi@ximian.com>
28721
28722         * support.cs (ReflectionParameters): Fix minor bug where we
28723         were examining the wrong parameter for the ParamArray attribute.
28724
28725         Cope with requests for the type of the parameter at position
28726         greater than the params parameter's. We now return the element
28727         type of the params array as that makes more sense.
28728
28729         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
28730         accordingly as we no longer have to extract the element type
28731         ourselves.
28732
28733         (Invocation.OverloadResolve): Update.
28734
28735 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
28736
28737         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
28738         against IEnumerator, test whether the return value is a descendant
28739         of the IEnumerator interface.
28740
28741         * class.cs (Indexer.Define): Use an auxiliary method to implement
28742         the other bits of the method definition.  Begin support for
28743         explicit interface implementation.
28744
28745         (Property.DefineMethod): Use TypeManager.void_type instead of null
28746         for an empty return value.
28747
28748 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
28749
28750         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
28751         dealing with a FieldExpr which is composed of a FieldBuilder, in
28752         the code path we did extract the constant, but we should have
28753         obtained the underlying value to be able to cast it (otherwise we
28754         end up in an infinite loop, this is what Ravi was running into).
28755
28756         (ArrayCreation.UpdateIndices): Arrays might be empty.
28757
28758         (MemberAccess.ResolveMemberAccess): Add support for section
28759         14.5.4.1 that deals with the special case of E.I when E is a type
28760         and something else, that I can be a reference to a static member.
28761
28762         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
28763         handle a particular array type to create byte blobs, it is just
28764         something we dont generate byteblobs for.
28765
28766         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
28767         arguments. 
28768
28769         * location.cs (Push): remove the key from the hashtable that we
28770         are about to add.   This happens for empty files.
28771
28772         * driver.cs: Dispose files after we have parsed them.
28773
28774         (tokenize): new function that only runs the tokenizer on its
28775         input, for speed testing.
28776
28777 2001-12-26  Ravi Pratap  <ravi@ximian.com>
28778
28779         * class.cs (Event.Define): Define the private field only if there
28780         are no accessors defined.
28781
28782         * expression.cs (ResolveMemberAccess): If there is no associated
28783         field with the event, that means we have an event defined with its
28784         own accessors and we should flag error cs0070 since transforming
28785         ourselves into a field is not valid in that case.
28786
28787         * ecore.cs (SimpleName.DoResolve): Same as above.
28788
28789         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
28790         and charset to sane values.
28791
28792 2001-12-25  Ravi Pratap  <ravi@ximian.com>
28793
28794         * assign.cs (DoResolve): Perform check on events only if they 
28795         are being accessed outside the declaring type.
28796
28797         * cs-parser.jay (event_declarations): Update rules to correctly
28798         set the type of the implicit parameter etc.
28799
28800         (add_accessor, remove_accessor): Set current local parameters.
28801
28802         * expression.cs (Binary): For delegate addition and subtraction,
28803         cast the return value from the method into the appropriate delegate
28804         type.
28805
28806 2001-12-24  Ravi Pratap  <ravi@ximian.com>
28807
28808         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
28809         of these as the workaround is unnecessary.
28810
28811         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
28812         delegate data - none of that is needed at all.
28813
28814         Re-write bits to extract the instance expression and the delegate method
28815         correctly.
28816
28817         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
28818         on delegates too.
28819
28820         * attribute.cs (ApplyAttributes): New method to take care of common tasks
28821         of attaching attributes instead of duplicating code everywhere.
28822
28823         * everywhere : Update code to do attribute emission using the above method.
28824
28825 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
28826
28827         * expression.cs (IsParamsMethodApplicable): if there are not
28828         parameters, return immediately.
28829
28830         * ecore.cs: The 0 literal can be implicity converted to an enum
28831         type. 
28832
28833         (SimpleName.DoResolve): First lookup the type, then lookup the
28834         members. 
28835
28836         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
28837         want to get its address.  If the InstanceExpression is not
28838         addressable, store the result in a temporary variable, then get
28839         the address of it.
28840
28841         * codegen.cs: Only display 219 errors on warning level or above. 
28842
28843         * expression.cs (ArrayAccess): Make it implement the
28844         IMemoryLocation interface.
28845
28846         (Binary.DoResolve): handle the operator == (object a, object b)
28847         and operator != (object a, object b) without incurring into a
28848         BoxedCast (because 5 != o should never be performed).
28849
28850         Handle binary enumerator operators.
28851
28852         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
28853         value type, otherwise use Ldelem_ref.
28854
28855         Use precomputed names;
28856
28857         (AddressOf): Implement address of
28858
28859         * cs-parser.jay (labeled_statement): Fix recursive block
28860         addition by reworking the production.
28861
28862         * expression.cs (New.DoEmit): New has a special case:
28863                 
28864                  If we are dealing with a ValueType, we have a few
28865                  situations to deal with:
28866                 
28867                     * The target of New is a ValueType variable, that is
28868                       easy, we just pass this as the variable reference
28869                 
28870                     * The target of New is being passed as an argument,
28871                       to a boxing operation or a function that takes a
28872                       ValueType.
28873                 
28874                       In this case, we need to create a temporary variable
28875                       that is the argument of New.
28876
28877
28878 2001-12-23  Ravi Pratap  <ravi@ximian.com>
28879
28880         * rootcontext.cs (LookupType): Check that current_type is not null before
28881         going about looking at nested types.
28882
28883         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
28884         not implement the IAssignMethod interface any more.
28885
28886         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
28887         where we tranform them into FieldExprs if they are being resolved from within
28888         the declaring type.
28889
28890         * ecore.cs (SimpleName.DoResolve): Do the same here.
28891
28892         * assign.cs (DoResolve, Emit): Clean up code considerably. 
28893
28894         * ../errors/bug10.cs : Add.
28895
28896         * ../errors/cs0070.cs : Add.
28897
28898         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
28899
28900         * assign.cs : Get rid of EventIsLocal everywhere.
28901
28902 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
28903
28904         * ecore.cs (ConvertIntLiteral): finished the implementation.
28905
28906         * statement.cs (SwitchLabel): Convert the value we are using as a
28907         key before looking up the table.
28908
28909 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
28910
28911         * codegen.cs (EmitTopBlock): Require a Location argument now.
28912
28913         * cs-parser.jay (constructor_declarator): We need to setup
28914         current_local_parameters before we parse the
28915         opt_constructor_initializer, to allow the variables to be bound
28916         to the constructor arguments.
28917
28918         * rootcontext.cs (LookupType): First lookup nested classes in our
28919         class and our parents before we go looking outside our class.
28920
28921         * expression.cs (ConstantFold): Extract/debox the values at the
28922         beginnning. 
28923
28924         * rootcontext.cs (EmitCode): Resolve the constants first before we
28925         resolve the types.  This is not really needed, but it helps debugging.
28926
28927         * statement.cs: report location.
28928
28929         * cs-parser.jay: pass location to throw statement.
28930
28931         * driver.cs: Small bug fix.
28932
28933         * report.cs: Updated format to be 4-zero filled digits.
28934
28935 2001-12-22  Ravi Pratap  <ravi@ximian.com>
28936
28937         * expression.cs (CheckIndices): Fix minor bug where the wrong
28938         variable was being referred to ;-)
28939
28940         (DoEmit): Do not call EmitStaticInitializers when the 
28941         underlying type is System.Object.
28942
28943 2001-12-21  Ravi Pratap  <ravi@ximian.com>
28944
28945         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
28946         and do the usual workaround for SRE.
28947
28948         * class.cs (MyEventBuilder.EventType): New member to get at the type
28949         of the event, quickly.
28950
28951         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
28952
28953         * assign.cs (Assign.DoResolve): Handle the case when the target
28954         is an EventExpr and perform the necessary checks.
28955
28956         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
28957         interface.
28958
28959         (SimpleName.MemberStaticCheck): Include check for EventExpr.
28960
28961         (EventExpr): Set the type in the constructor itself since we 
28962         are meant to be born fully resolved.
28963
28964         (EventExpr.Define): Revert code I wrote earlier.
28965                 
28966         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
28967         instance expression is null. The instance expression is a This in that case
28968         or a null, depending on whether it is a static method or not.
28969
28970         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
28971         refers to more than one method.
28972
28973         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
28974         and accordingly flag errors.
28975
28976 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
28977
28978         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
28979
28980 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
28981
28982         * location.cs (ToString): Provide useful rutine.
28983
28984 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
28985
28986         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
28987         objects, return the actual integral boxed.
28988
28989         * statement.cs (SwitchLabel): define an ILLabel for each
28990         SwitchLabel. 
28991
28992         (Switch.CheckSwitch): If the value is a Literal, extract
28993         the underlying literal.
28994
28995         Also in the unused hashtable we had, add the SwitchLabel so we can
28996         quickly look this value up.
28997
28998         * constant.cs: Implement a bunch of new constants.  Rewrite
28999         Literal based on this.  Made changes everywhere to adapt to this.
29000
29001         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29002         dereferencing array only once, and also copes with enumrations.
29003
29004         bytes are two bytes wide, not one.
29005
29006         (Cast): Perform constant conversions.
29007
29008         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29009         wrappers to the literals here.
29010
29011         * expression.cs (DoNumericPromotions): long literals can converted
29012         to ulong implicity (this is taken care of elsewhere, but I was
29013         missing this spot).
29014
29015         * ecore.cs (Expression.Literalize): Make the return type Literal,
29016         to improve type checking.
29017
29018         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29019
29020 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29021
29022         * literal.cs: Revert code from ravi that checked the bounds.  The
29023         bounds are sane by the definition of the type itself. 
29024
29025         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29026         need to actually look up in our parent hierarchy for interfaces
29027         implemented. 
29028
29029         * const.cs: Use the underlying type for enumerations
29030
29031         * delegate.cs: Compute the basename for the delegate creation,
29032         that should fix the delegate test case, and restore the correct
29033         Type Lookup semantics in rootcontext
29034
29035         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29036         referencing a nested type with the Reflection API is using the "+"
29037         sign. 
29038
29039         * cs-parser.jay: Do not require EOF token at the end.
29040
29041 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29042
29043         * rootcontext.cs (LookupType): Concatenate type names with
29044         a '.' instead of a '+' The test suite passes again.
29045
29046         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29047         field of the enumeration.
29048
29049         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29050         the case when the member is an EventExpr.
29051
29052         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29053         static has an associated instance expression.
29054
29055         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29056
29057         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29058
29059         * class.cs (Event.Define): Register event and perform appropriate checks
29060         for error #111.
29061
29062         We define the Add and Remove methods even if the use provides none because
29063         in that case, we provide default implementations ourselves.
29064
29065         Define a private field of the type of the event. This is done by the CSC compiler
29066         and we should be doing it too ;-)
29067
29068         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29069         More methods we use in code we generate.
29070
29071         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29072         is important.
29073
29074         (InitCoreTypes): Update accordingly for the above.
29075
29076         * class.cs (Event.Emit): Generate code for default accessors that we provide
29077
29078         (EmitDefaultMethod): Do the job in the above.
29079
29080         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29081         appropriate place.
29082
29083 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29084
29085         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29086         builders even if we were missing one.
29087
29088         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29089         pass the Basename as our class name instead of the Name.  The
29090         basename will be correctly composed for us.
29091
29092         * parameter.cs (Paramters): Now takes a Location argument.
29093
29094         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29095         make all the code call directly LookupType in RootContext and take
29096         this chance to pass the Location information everywhere.
29097
29098         * Everywhere: pass Location information.
29099
29100 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29101
29102         * class.cs (Constructor.Define): Updated way of detecting the
29103         length of the parameters.
29104
29105         (TypeContainer.DefineType): Use basename as the type name for
29106         nested types.
29107
29108         (TypeContainer.Define): Do not recursively define types here, as
29109         definition is taken care in order by the RootContext.
29110
29111         * tree.cs: Keep track of namespaces in a per-file basis.
29112
29113         * parameter.cs (Parameter.ComputeSignature): Update to use
29114         DeclSpace. 
29115
29116         (Parameters.GetSignature): ditto.
29117
29118         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29119         instead of a TypeContainer.
29120
29121         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29122         resolve names.  Because we need to be resolve in our context, not
29123         our parents.
29124
29125         * driver.cs: Implement response files.
29126
29127         * class.cs (TypeContainer.DefineType): If we are defined, do not
29128         redefine ourselves.
29129
29130         (Event.Emit): Emit the code for add/remove handlers.
29131         (Event.Define): Save the MethodBuilders for add/remove.
29132
29133         * typemanager.cs: Use pair here too.
29134
29135         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29136         DictionaryEntry requires the first argument to be non-null.  
29137
29138         (enum_declaration): Compute full name for registering the
29139         enumeration.
29140
29141         (delegate_declaration): Instead of using
29142         formal_parameter_list, use opt_formal_parameter_list as the list
29143         can be empty.
29144
29145         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29146         (EventParsing): New property that controls whether `add' and
29147         `remove' are returned as tokens or identifiers (for events);
29148
29149 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29150
29151         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29152         use MyEventBuilder only and let it wrap the real builder for us.
29153
29154         (MyEventBuilder): Revamp constructor etc.
29155
29156         Implement all operations that we perform on EventBuilder in precisely the same
29157         way here too.
29158
29159         (FindMembers): Update to use the EventBuilder member.
29160
29161         (Event.Emit): Update accordingly.
29162
29163 2001-12-18  Ravi Pratap  <ravi@ximian.com>
29164
29165         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
29166         by calling the appropriate methods.
29167
29168         (GetCustomAttributes): Make stubs as they cannot possibly do anything
29169         useful.
29170
29171         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
29172
29173 2001-12-17  Ravi Pratap  <ravi@ximian.com>
29174
29175         * delegate.cs (Delegate.Populate): Check that the return type
29176         and various parameters types are indeed accessible.
29177
29178         * class.cs (Constructor.Define): Same here.
29179
29180         (Field.Define): Ditto.
29181
29182         (Event.Define): Ditto.
29183
29184         (Operator.Define): Check that the underlying Method defined itself
29185         correctly - so it's MethodBuilder should not be null.
29186
29187         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
29188         expression happens to be null.
29189
29190         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
29191         members but as of now we don't seem to be able to do anything really useful with it.
29192
29193         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
29194         not the EventBuilder.
29195
29196 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
29197
29198         * cs-tokenizer.cs: Add support for defines.
29199         Add support for #if, #elif, #else, #endif
29200
29201         (eval_var): evaluates a variable.
29202         (eval): stubbed for evaluating functions.
29203
29204         * cs-parser.jay: Pass the defines information
29205
29206         * driver.cs: Add --define command line option.
29207
29208         * decl.cs: Move MemberCore here.
29209
29210         Make it the base class for DeclSpace.  This allows us to catch and
29211         report 108 and 109 for everything now.
29212
29213         * class.cs (TypeContainer.Define): Extract all the members
29214         before populating and emit the warning 108 (new keyword required
29215         to override) instead of having each member implement this.
29216
29217         (MemberCore.Define): New abstract method, we will be using this in
29218         the warning reporting engine in Populate.
29219
29220         (Operator.Define): Adjust to new MemberCore protocol. 
29221
29222         * const.cs (Const): This does not derive from Expression, it is a
29223         temporary object we use to create fields, it is a MemberCore. 
29224
29225         * class.cs (Method.Define): Allow the entry point to be in a
29226         specific class.
29227
29228         * driver.cs: Rewrite the argument handler to clean it up a bit.
29229
29230         * rootcontext.cs: Made it just an auxiliary namespace feature by
29231         making everything static.
29232
29233         * driver.cs: Adapt code to use RootContext type name instead of
29234         instance variable.
29235
29236         * delegate.cs: Remove RootContext argument.
29237
29238         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
29239         argument. 
29240
29241         * class.cs (Event.Define): The lookup can fail.
29242
29243         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
29244
29245         * expression.cs: Resolve the this instance before invoking the code.
29246
29247 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
29248
29249         * cs-parser.jay: Add a production in element_access that allows
29250         the thing to become a "type" reference.  This way we can parse
29251         things like "(string [])" as a type.
29252
29253         Note that this still does not handle the more complex rules of
29254         casts. 
29255
29256
29257         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
29258
29259         * ecore.cs: (CopyNewMethods): new utility function used to
29260         assemble the list of methods from running FindMembers.
29261
29262         (MemberLookup): Rework FindMembers so that 
29263
29264 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
29265
29266         * class.cs (TypeContainer): Remove Delegates who fail to be
29267         defined.
29268
29269         * delegate.cs (Populate): Verify that we dont get null return
29270         values.   TODO: Check for AsAccessible.
29271
29272         * cs-parser.jay: Use basename to emit error 574 (destructor should
29273         have the same name as container class), not the full name.
29274
29275         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
29276         possible representation.  
29277
29278         Also implements integer type suffixes U and L.
29279
29280 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
29281
29282         * expression.cs (ArrayCreation.DoResolve): We need to do the
29283         argument resolution *always*.
29284
29285         * decl.cs: Make this hold the namespace.  Hold the root context as
29286         well.
29287         (LookupType): Move here.
29288
29289         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
29290
29291         * location.cs (Row, Name): Fixed the code, it was always returning
29292         references to the first file.
29293
29294         * interface.cs: Register properties defined through interfaces.
29295
29296         * driver.cs: Add support for globbing on the command line
29297
29298         * class.cs (Field): Make it derive from MemberCore as well.
29299         (Event): ditto.
29300
29301 2001-12-15  Ravi Pratap  <ravi@ximian.com>
29302
29303         * class.cs (Event::Define): Check that the type of the event is a delegate
29304         type else flag error #66.
29305
29306         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
29307         same.
29308
29309         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
29310         values of EntryPoint, CharSet etc etc.
29311
29312         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
29313
29314         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
29315         be null and we should ignore this. I am not sure if this is really clean. Apparently,
29316         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
29317         which needs this to do its work.
29318
29319         * ../errors/cs0066.cs : Add.
29320
29321 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
29322
29323         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
29324         helper functions.
29325
29326         * class.cs: (MethodSignature.MethodSignature): Removed hack that
29327         clears out the parameters field.
29328         (MemberSignatureCompare): Cleanup
29329
29330         (MemberCore): New base class used to share code between MethodCore
29331         and Property.
29332
29333         (RegisterRequiredImplementations) BindingFlags.Public requires
29334         either BindingFlags.Instace or Static.  Use instance here.
29335
29336         (Property): Refactored code to cope better with the full spec.
29337
29338         * parameter.cs (GetParameterInfo): Return an empty array instead
29339         of null on error.
29340
29341         * class.cs (Property): Abstract or extern properties have no bodies.
29342
29343         * parameter.cs (GetParameterInfo): return a zero-sized array.
29344
29345         * class.cs (TypeContainer.MethodModifiersValid): Move all the
29346         method modifier validation to the typecontainer so we can reuse
29347         this on properties.
29348
29349         (MethodCore.ParameterTypes): return an empty sized array of types.
29350
29351         (Property.Define): Test property modifier validity.
29352
29353         Add tests for sealed/override too.
29354
29355         (Method.Emit): abstract or extern methods have no bodies.
29356
29357 2001-12-14  Ravi Pratap  <ravi@ximian.com>
29358
29359         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
29360         thing.
29361
29362         (Method::Define, ::Emit): Modify accordingly.
29363
29364         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
29365
29366         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
29367
29368         * makefile: Pass in /unsafe.
29369
29370 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
29371
29372         * class.cs (MakeKey): Kill routine.
29373
29374         * class.cs (TypeContainer.Define): Correctly define explicit
29375         method implementations (they require the full interface name plus
29376         the method name).
29377
29378         * typemanager.cs: Deply the PtrHashtable here and stop using the
29379         lame keys.  Things work so much better.
29380
29381         This of course broke everyone who depended on `RegisterMethod' to
29382         do the `test for existance' test.  This has to be done elsewhere.
29383
29384         * support.cs (PtrHashtable): A hashtable that avoid comparing with
29385         the object stupid Equals method (because, that like fails all over
29386         the place).  We still do not use it.
29387
29388         * class.cs (TypeContainer.SetRequiredInterface,
29389         TypeContainer.RequireMethods): Killed these two routines and moved
29390         all the functionality to RegisterRequiredImplementations.
29391
29392         (TypeContainer.RegisterRequiredImplementations): This routine now
29393         registers all the implementations required in an array for the
29394         interfaces and abstract methods.  We use an array of structures
29395         which can be computed ahead of time to reduce memory usage and we
29396         also assume that lookups are cheap as most classes will not
29397         implement too many interfaces.
29398
29399         We also avoid creating too many MethodSignatures.
29400
29401         (TypeContainer.IsInterfaceMethod): Update and optionally does not
29402         clear the "pending" bit if we find that there are problems with
29403         the declaration.
29404
29405         (TypeContainer.VerifyPendingMethods): Update to report errors of
29406         methods that look like implementations but are not.
29407
29408         (TypeContainer.Define): Add support for explicit interface method
29409         implementation. 
29410
29411 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
29412
29413         * typemanager.cs: Keep track of the parameters here instead of
29414         being a feature of the TypeContainer.
29415
29416         * class.cs: Drop the registration of parameters here, as
29417         InterfaceMethods are also interface declarations.
29418
29419         * delegate.cs: Register methods with the TypeManager not only with
29420         the TypeContainer.  This code was buggy.
29421
29422         * interface.cs: Full registation here.
29423
29424 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
29425
29426         * expression.cs: Remove reducer for binary expressions, it can not
29427         be done this way.
29428
29429         * const.cs: Put here the code that used to go into constant.cs
29430
29431         * constant.cs: Put here the code for constants, this is a new base
29432         class for Literals.
29433
29434         * literal.cs: Make Literal derive from Constant.
29435
29436 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
29437
29438         * statement.cs (Return.Emit): Report error 157 if the user
29439         attempts to return from a finally block.
29440
29441         (Return.Emit): Instead of emitting a return, jump to the end of
29442         the function.
29443
29444         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
29445         LocalBuilder to store the result of the function.  ReturnLabel is
29446         the target where we jump.
29447
29448
29449 2001-12-09  Radek Doulik  <rodo@ximian.com>
29450
29451         * cs-parser.jay: remember alias in current namespace
29452
29453         * ecore.cs (SimpleName::DoResolve): use aliases for types or
29454         namespaces
29455
29456         * class.cs (LookupAlias): lookup alias in my_namespace
29457
29458         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
29459         aliases hashtable
29460         (LookupAlias): lookup alias in this and if needed in parent
29461         namespaces
29462
29463 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
29464
29465         * support.cs: 
29466
29467         * rootcontext.cs: (ModuleBuilder) Made static, first step into
29468         making things static.  I need this to avoid passing the
29469         TypeContainer when calling ParameterType.
29470
29471         * support.cs (InternalParameters.ParameterType): Remove ugly hack
29472         that did string manipulation to compute the type and then call
29473         GetType.  Use Parameter.ParameterType instead.
29474
29475         * cs-tokenizer.cs: Consume the suffix for floating values.
29476
29477         * expression.cs (ParameterReference): figure out whether this is a
29478         reference parameter or not.  Kill an extra variable by computing
29479         the arg_idx during emission.
29480
29481         * parameter.cs (Parameters.GetParameterInfo): New overloaded
29482         function that returns whether a parameter is an out/ref value or not.
29483
29484         (Parameter.ParameterType): The type of the parameter (base,
29485         without ref/out applied).
29486
29487         (Parameter.Resolve): Perform resolution here.
29488         (Parameter.ExternalType): The full type (with ref/out applied).
29489
29490         * statement.cs (Using.Emit, Using.EmitExpression): Implement
29491         support for expressions on the using statement.
29492
29493 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
29494
29495         * statement.cs (Using.EmitLocalVariableDecls): Split the
29496         localvariable handling of the using statement.
29497
29498         (Block.EmitMeta): Keep track of variable count across blocks.  We
29499         were reusing slots on separate branches of blocks.
29500
29501         (Try.Emit): Emit the general code block, we were not emitting it. 
29502
29503         Check the type of the declaration to be an IDisposable or
29504         something that can be implicity converted to it. 
29505
29506         Emit conversions if required.
29507
29508         * ecore.cs (EmptyExpression): New utility class.
29509         (Expression.ImplicitConversionExists): New utility function.
29510
29511 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
29512
29513         * statement.cs (Using): Implement.
29514
29515         * expression.cs (LocalVariableReference): Support read only variables.
29516
29517         * statement.cs: Remove the explicit emit for the Leave opcode.
29518         (VariableInfo): Add a readonly field.
29519
29520 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
29521
29522         * ecore.cs (ConvCast): new class used to encapsulate the various
29523         explicit integer conversions that works in both checked and
29524         unchecked contexts.
29525
29526         (Expression.ConvertNumericExplicit): Use new ConvCast class to
29527         properly generate the overflow opcodes.
29528
29529 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
29530
29531         * statement.cs: The correct type for the EmptyExpression is the
29532         element_type, not the variable type.  Ravi pointed this out.
29533
29534 2001-12-04  Ravi Pratap  <ravi@ximian.com>
29535
29536         * class.cs (Method::Define): Handle PInvoke methods specially
29537         by using DefinePInvokeMethod instead of the usual one.
29538
29539         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
29540         above to do the task of extracting information and defining the method.
29541
29542 2001-12-04  Ravi Pratap  <ravi@ximian.com>
29543
29544         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
29545         of the condition for string type.
29546
29547         (Emit): Move that here. 
29548
29549         (ArrayCreation::CheckIndices): Keep string literals in their expression
29550         form.
29551
29552         (EmitDynamicInitializers): Handle strings appropriately.
29553
29554 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
29555
29556         * codegen.cs (EmitContext): Replace multiple variables with a
29557         single pointer to the current Switch statement.
29558
29559         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
29560         EmitContext.
29561
29562 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
29563
29564         * statement.cs 
29565
29566         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
29567         default'.
29568
29569         (Foreach.Emit): Foreach on arrays was not setting
29570         up the loop variables (for break/continue).
29571
29572         (GotoCase): Semi-implented.
29573
29574 2001-12-03  Ravi Pratap  <ravi@ximian.com>
29575
29576         * attribute.cs (CheckAttribute): Handle system attributes by using
29577         Attribute.GetAttributes to examine information we need.
29578
29579         (GetValidPlaces): Same here.
29580
29581         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
29582
29583         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
29584
29585         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
29586
29587         (Method::Define): Set appropriate flags if we have a DllImport attribute.
29588
29589         (Method::Emit): Handle the case when we are a PInvoke method.
29590
29591 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
29592
29593         * expression.cs: Use ResolveWithSimpleName on compound names.
29594
29595 2001-12-02  Ravi Pratap  <ravi@ximian.com>
29596
29597         * constant.cs (EmitConstant): Make sure we resolve the associated expression
29598         before trying to reduce it.
29599
29600         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
29601
29602         * constant.cs (LookupConstantValue): Implement.
29603
29604         (EmitConstant): Use the above in emitting the constant.
29605
29606         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
29607         that are user-defined by doing a LookupConstantValue on them.
29608
29609         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
29610         too, like above.
29611
29612 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
29613
29614         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
29615
29616         (BaseAccess.DoResolve): Implement.
29617
29618         (MemberAccess.DoResolve): Split this routine into a
29619         ResolveMemberAccess routine that can be used independently
29620
29621 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
29622
29623         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
29624         As that share bits of the implementation.  Is returns a boolean,
29625         while As returns the Type that is being probed.
29626
29627 2001-12-01  Ravi Pratap  <ravi@ximian.com>
29628
29629         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
29630         instead of a Literal - much easier.
29631
29632         (EnumInTransit): Remove - utterly useless :-)
29633
29634         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
29635
29636         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
29637
29638         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
29639         chain when we have no associated expression.
29640
29641 2001-11-30  Ravi Pratap  <ravi@ximian.com>
29642
29643         * constant.cs (Define): Use Location while reporting the errror.
29644
29645         Also emit a warning when 'new' is used and there is no inherited
29646         member to hide.
29647
29648         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
29649         populated.
29650
29651         (LookupEnumValue): Implement to lookup an enum member's value and define it
29652         if necessary.
29653
29654         (Populate): Re-write accordingly to use the above routine.
29655
29656 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
29657
29658         * expression.cs (This): Fix prototype for DoResolveLValue to
29659         override the base class DoResolveLValue.
29660
29661         * cs-parser.cs: Report errors cs574 and cs575 (destructor
29662         declarations) 
29663
29664         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
29665         (we need to load the address of the field here).  This fixes
29666         test-22. 
29667
29668         (FieldExpr.DoResolveLValue): Call the DoResolve
29669         function to initialize the Instance expression.
29670
29671         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
29672         correctly the GetEnumerator operation on a value type.
29673
29674         * cs-parser.jay: Add more simple parsing error catches.
29675
29676         * statement.cs (Switch): Add support for string switches.
29677         Handle null specially.
29678
29679         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
29680
29681 2001-11-28  Ravi Pratap  <ravi@ximian.com>
29682
29683         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
29684
29685         (declare_local_constant): New helper function.
29686
29687         * statement.cs (AddConstant): Keep a separate record of constants
29688
29689         (IsConstant): Implement to determine if a variable is a constant.
29690
29691         (GetConstantExpression): Implement.
29692
29693         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
29694
29695         * statement.cs (IsVariableDefined): Re-write.
29696
29697 2001-11-27  Ravi Pratap  <ravi@ximian.com>
29698
29699         * class.cs (TypeContainer::FindMembers): Look for constants
29700         in the case when we are looking for MemberTypes.Field
29701
29702         * expression.cs (MemberAccess::DoResolve): Check that in the
29703         case we are a FieldExpr and a Literal, we are not being accessed
29704         by an instance reference.
29705
29706         * cs-parser.jay (local_constant_declaration): Implement.
29707
29708         (declaration_statement): Implement for constant declarations.
29709
29710 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
29711
29712         * statement.cs (Switch): Catch double defaults.
29713
29714         (Switch): More work on the switch() statement
29715         implementation.  It works for integral values now, need to finish
29716         string support.
29717
29718
29719 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
29720
29721         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
29722         integer literals into other integer literals.  To be used by
29723         switch. 
29724
29725 2001-11-24  Ravi Pratap  <ravi@ximian.com>
29726
29727         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
29728         some memory.
29729
29730         (EmitDynamicInitializers): Cope with the above since we extract data
29731         directly from ArrayData now.
29732
29733         (ExpectInitializers): Keep track of whether initializers are mandatory
29734         or not.
29735
29736         (Bounds): Make it a hashtable to prevent the same dimension being 
29737         recorded for every element in that dimension.
29738
29739         (EmitDynamicInitializers): Fix bug which prevented the Set array method
29740         from being found.
29741
29742         Also fix bug which was causing the indices to be emitted in the reverse
29743         order.
29744
29745 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
29746
29747         * expression.cs (ArrayCreation): Implement the bits that Ravi left
29748         unfinished.  They do not work, because the underlying code is
29749         sloppy.
29750
29751 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
29752
29753         * cs-parser.jay: Remove bogus fixme.
29754
29755         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
29756         on Switch statement.
29757
29758 2001-11-23  Ravi Pratap  <ravi@ximian.com>
29759
29760         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
29761         the same. 
29762
29763         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
29764         parameter. Apparently, any expression is allowed. 
29765
29766         (ValidateInitializers): Update accordingly.
29767
29768         (CheckIndices): Fix some tricky bugs thanks to recursion.
29769
29770         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
29771         I was being completely brain-dead.
29772
29773         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
29774         and re-write acordingly.
29775
29776         (DelegateInvocation): Re-write accordingly.
29777
29778         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
29779
29780         (MakeByteBlob): Handle types more correctly.
29781
29782         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
29783         initialization from expressions but it is incomplete because I am a complete
29784         Dodo :-|
29785
29786 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
29787
29788         * statement.cs (If.Emit): Fix a bug that generated incorrect code
29789         on If.  Basically, we have to return `true' (ie, we do return to
29790         our caller) only if both branches of the if return.
29791
29792         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
29793         short-circuit operators, handle them as short circuit operators. 
29794
29795         (Cast.DoResolve): Resolve type.
29796         (Cast.Cast): Take an expression as the target type.
29797
29798         * cs-parser.jay (cast_expression): Remove old hack that only
29799         allowed a limited set of types to be handled.  Now we take a
29800         unary_expression and we resolve to a type during semantic
29801         analysis.
29802
29803         Use the grammar productions from Rhys to handle casts (this is
29804         not complete like Rhys syntax yet, we fail to handle that corner
29805         case that C# has regarding (-x), but we will get there.
29806
29807 2001-11-22  Ravi Pratap  <ravi@ximian.com>
29808
29809         * class.cs (EmitFieldInitializer): Take care of the case when we have a
29810         field which is an array type.
29811
29812         * cs-parser.jay (declare_local_variables): Support array initialization too.
29813
29814         * typemanager.cs (MakeKey): Implement.
29815
29816         (everywhere): Use the above appropriately.
29817
29818         * cs-parser.jay (for_statement): Update for array initialization while
29819         declaring variables.
29820
29821         * ecore.cs : The error message was correct, it's the variable's names that
29822         were misleading ;-) Make the code more readable.
29823
29824         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
29825         the correct type etc.
29826
29827         (ConvertExplicit): Handle Enum types by examining the underlying type.
29828
29829 2001-11-21  Ravi Pratap  <ravi@ximian.com>
29830
29831         * parameter.cs (GetCallingConvention): Always return
29832         CallingConventions.Standard for now.
29833
29834 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
29835
29836         * expression.cs (Binary.ResolveOperator): Update the values of `l'
29837         and `r' after calling DoNumericPromotions.
29838
29839         * ecore.cs: Fix error message (the types were in the wrong order).
29840
29841         * statement.cs (Foreach.ProbeCollectionType): Need to pass
29842         BindingFlags.Instance as well 
29843
29844         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
29845         implicit int literal conversion in an empty cast so that we
29846         propagate the right type upstream.
29847
29848         (UnboxCast): new class used to unbox value types.
29849         (Expression.ConvertExplicit): Add explicit type conversions done
29850         by unboxing.
29851
29852         (Expression.ImplicitNumericConversion): Oops, forgot to test for
29853         the target type before applying the implicit LongLiterals to ULong
29854         literal cast.
29855
29856 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
29857
29858         * cs-parser.jay (for_statement): Reworked the way For works: now
29859         we declare manually any variables that are introduced in
29860         for_initializer to solve the problem of having out-of-band code
29861         emition (that is what got for broken).
29862
29863         (declaration_statement): Perform the actual variable declaration
29864         that used to be done in local_variable_declaration here.
29865
29866         (local_variable_declaration): Do not declare anything, just pass
29867         the information on a DictionaryEntry
29868
29869 2001-11-20  Ravi Pratap  <ravi@ximian.com>
29870
29871         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
29872         re-write of the logic to now make it recursive.
29873
29874         (UpdateIndices): Re-write accordingly.
29875
29876         Store element data in a separate ArrayData list in the above methods.
29877
29878         (MakeByteBlob): Implement to dump the array data into a byte array.
29879
29880 2001-11-19  Ravi Pratap  <ravi@ximian.com>
29881
29882         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
29883         into CheckIndices.
29884
29885         * constant.cs (Define): Implement.
29886
29887         (EmitConstant): Re-write fully.
29888
29889         Pass in location info.
29890
29891         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
29892         respectively.
29893
29894         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
29895         DictionaryEntry since we need location info too.
29896
29897         (constant_declaration): Update accordingly.
29898
29899         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
29900         code into another method : UpdateIndices.
29901
29902 2001-11-18  Ravi Pratap  <ravi@ximian.com>
29903
29904         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
29905         some type checking etc.
29906
29907 2001-11-17  Ravi Pratap  <ravi@ximian.com>
29908
29909         * expression.cs (ArrayCreation::ValidateInitializers): Implement
29910         bits to provide dimension info if the user skips doing that.
29911
29912         Update second constructor to store the rank correctly.
29913
29914 2001-11-16  Ravi Pratap  <ravi@ximian.com>
29915
29916         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
29917         and try to implement.
29918
29919         * ../errors/cs0150.cs : Add.
29920
29921         * ../errors/cs0178.cs : Add.
29922
29923 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
29924
29925         * statement.cs: Implement foreach on multi-dimensional arrays. 
29926
29927         * parameter.cs (Parameters.GetParameterByName): Also lookup the
29928         name of the params argument.
29929
29930         * expression.cs: Use EmitStoreOpcode to get the right opcode while
29931         initializing the array.
29932
29933         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
29934         we can use this elsewhere.
29935
29936         * statement.cs: Finish implementation of foreach for single
29937         dimension arrays.
29938
29939         * cs-parser.jay: Use an out-of-band stack to pass information
29940         around, I wonder why I need this.
29941
29942         foreach_block: Make the new foreach_block the current_block.
29943
29944         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
29945         function used to return a static Parameters structure.  Used for
29946         empty parameters, as those are created very frequently.
29947
29948         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
29949
29950 2001-11-15  Ravi Pratap  <ravi@ximian.com>
29951
29952         * interface.cs : Default modifier is private, not public. The
29953         make verify test passes again.
29954
29955 2001-11-15  Ravi Pratap  <ravi@ximian.com>
29956
29957         * support.cs (ReflectionParameters): Fix logic to determine
29958         whether the last parameter is a params one. Test 9 passes again.
29959
29960         * delegate.cs (Populate): Register the builders we define with
29961         RegisterParameterForBuilder. Test 19 passes again.
29962
29963         * cs-parser.jay (property_declaration): Reference $6 instead
29964         of $$ to get at the location.
29965
29966         (indexer_declaration): Similar stuff.
29967
29968         (attribute): Ditto.
29969
29970         * class.cs (Property): Register parameters for the Get and Set methods
29971         if they exist. Test 23 passes again.
29972
29973         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
29974         call to EmitArguments as we are sure there aren't any params arguments. 
29975         Test 32 passes again.
29976
29977         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
29978         IndexOutOfRangeException. 
29979
29980         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
29981         Test 33 now passes again.
29982
29983 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
29984
29985         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
29986         broke a bunch of things.  Will have to come up with a better way
29987         of tracking locations.
29988
29989         * statement.cs: Implemented foreach for single dimension arrays.
29990
29991 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
29992
29993         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
29994         an error.  This removes the lookup from the critical path.
29995
29996         * cs-parser.jay: Removed use of temporary_loc, which is completely
29997         broken. 
29998
29999 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30000
30001         * support.cs (ReflectionParameters.ParameterModifier): Report
30002         whether the argument is a PARAMS argument or not.
30003
30004         * class.cs: Set the attribute `ParamArrayAttribute' on the
30005         parameter argument.
30006
30007         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30008         and cons_param_array_attribute (ConstructorInfo for
30009         ParamArrayAttribute)., 
30010
30011         * codegen.cs: Emit the return using the `Return' statement, that
30012         way we can report the error correctly for missing return values. 
30013
30014         * class.cs (Method.Emit): Clean up.
30015
30016         * expression.cs (Argument.Resolve): Take another argument: the
30017         location where this argument is used.  Notice that this is not
30018         part of the "Argument" class as to reduce the size of the
30019         structure (we know the approximate location anyways).
30020
30021         Test if the argument is a variable-reference, if not, then
30022         complain with a 206.
30023
30024         (Argument.Emit): Emit addresses of variables.
30025
30026         (Argument.FullDesc): Simplify.
30027
30028         (Invocation.DoResolve): Update for Argument.Resolve.
30029
30030         (ElementAccess.DoResolve): ditto.
30031
30032         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30033         method should be virtual, as this method is always virtual.
30034
30035         (NewDelegate.DoResolve): Update for Argument.Resolve.
30036
30037         * class.cs (ConstructorInitializer.DoResolve): ditto.
30038
30039         * attribute.cs (Attribute.Resolve): ditto.
30040
30041 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30042
30043         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30044
30045         * expression.cs (ParameterReference): Drop IStackStorage and implement
30046         IAssignMethod instead. 
30047
30048         (LocalVariableReference): ditto.
30049
30050         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30051         IAssignMethod instead. 
30052
30053 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30054
30055         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30056         enumerations that are used in heavily used structures derive from
30057         byte in a laughable and pathetic attempt to reduce memory usage.
30058         This is the kind of pre-optimzations that you should not do at
30059         home without adult supervision.
30060
30061         * expression.cs (UnaryMutator): New class, used to handle ++ and
30062         -- separatedly from the other unary operators.  Cleans up the
30063         code, and kills the ExpressionStatement dependency in Unary.
30064
30065         (Unary): Removed `method' and `Arguments' from this class, making
30066         it smaller, and moving it all to SimpleCall, so I can reuse this
30067         code in other locations and avoid creating a lot of transient data
30068         strucutres when not required.
30069
30070         * cs-parser.jay: Adjust for new changes.
30071
30072 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30073
30074         * enum.cs (Enum.Populate): If there is a failure during
30075         definition, return
30076
30077         * cs-parser.jay (opt_enum_base): we used to catch type errors
30078         here, but this is really incorrect.  The type error should be
30079         catched during semantic analysis.
30080
30081 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30082
30083         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30084         current_local_parameters as expected since I, in my stupidity, had forgotten
30085         to do this :-)
30086
30087         * attribute.cs (GetValidPlaces): Fix stupid bug.
30088
30089         * class.cs (Method::Emit): Perform check on applicability of attributes.
30090
30091         (Constructor::Emit): Ditto.
30092
30093         (Field::Emit): Ditto.
30094
30095         (Field.Location): Store location information.
30096
30097         (Property, Event, Indexer, Operator): Ditto.
30098
30099         * cs-parser.jay (field_declaration): Pass in location for each field.
30100
30101         * ../errors/cs0592.cs : Add.
30102
30103 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30104
30105         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30106
30107         (InitCoreTypes): Update accordingly.
30108
30109         (RegisterAttrType, LookupAttr): Implement.
30110
30111         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30112         info about the same.
30113
30114         (Resolve): Update to populate the above as necessary.
30115
30116         (Error592): Helper.
30117
30118         (GetValidPlaces): Helper to the above.
30119
30120         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30121
30122         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30123
30124 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30125
30126         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30127
30128         * ../errors/cs0617.cs : Add.
30129
30130 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30131
30132         * enum.cs (Emit): Rename to Populate to be more consistent with what
30133         we expect it to do and when exactly it is called.
30134
30135         * class.cs, rootcontext.cs : Update accordingly.
30136
30137         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30138         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30139
30140         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30141
30142         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30143         of a fieldinfo using the above, when dealing with a FieldBuilder.
30144
30145 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30146
30147         * ../errors/cs0031.cs : Add.
30148
30149         * ../errors/cs1008.cs : Add.
30150
30151         * ../errrors/cs0543.cs : Add.
30152
30153         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30154         enum type.
30155
30156         (FindMembers): Implement.
30157
30158         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
30159         enums and delegates too.
30160
30161         (enum_types): Rename to builder_to_enum.
30162
30163         (delegate_types): Rename to builder_to_delegate.
30164
30165         * delegate.cs (FindMembers): Implement.
30166
30167 2001-11-09  Ravi Pratap  <ravi@ximian.com>
30168
30169         * typemanager.cs (IsEnumType): Implement.
30170
30171         * enum.cs (Emit): Re-write parts to account for the underlying type
30172         better and perform checking etc.
30173
30174         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
30175         of the underlying type.
30176
30177         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
30178         value
30179
30180         * enum.cs (error31): Helper to report error #31.
30181
30182         * cs-parser.jay (enum_declaration): Store location of each member too.
30183
30184         * enum.cs (member_to_location): New hashtable. 
30185
30186         (AddEnumMember): Update location hashtable.
30187
30188         (Emit): Use the location of each member while reporting errors.
30189
30190 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30191
30192         * cs-parser.jay: A for_initializer if is a
30193         local_variable_declaration really ammount to have an implicit
30194         block with the variable declaration and no initializer for for.
30195
30196         * statement.cs (For.Emit): Cope with null initializers.
30197
30198         This fixes the infinite loop on for initializers.
30199
30200 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
30201
30202         * enum.cs: More cleanup.
30203
30204         * ecore.cs: Remove dead code.
30205
30206         * class.cs (Property.Emit): More simplification.
30207         (Event.Emit): ditto.
30208
30209         Reworked to have less levels of indentation.
30210
30211 2001-11-08  Ravi Pratap  <ravi@ximian.com>
30212
30213         * class.cs (Property): Emit attributes.
30214
30215         (Field): Ditto.
30216
30217         (Event): Ditto.
30218
30219         (Indexer): Ditto.
30220
30221         (Operator): Ditto.
30222
30223         * enum.cs (Emit): Ditto.
30224
30225         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
30226         Enums too.
30227
30228         * class.cs (Field, Event, etc.): Move attribute generation into the
30229         Emit method everywhere.
30230
30231         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
30232         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
30233         as we had no way of defining nested enums !
30234
30235         * rootcontext.cs : Adjust code accordingly.
30236
30237         * typemanager.cs (AddEnumType): To keep track of enum types separately.
30238
30239 2001-11-07  Ravi Pratap  <ravi@ximian.com>
30240
30241         * expression.cs (EvalConstantExpression): Move into ecore.cs
30242
30243         * enum.cs (Enum): Rename some members and make them public and readonly
30244         according to our convention.
30245
30246         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
30247         nothing else.
30248
30249         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
30250
30251         (Enum::Emit): Write a simple version for now which doesn't try to compute
30252         expressions. I shall modify this to be more robust in just a while.
30253
30254         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
30255
30256         (TypeContainer::CloseType): Create the Enum types too.
30257
30258         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
30259
30260         * expression.cs (EvalConstantExpression): Get rid of completely.
30261
30262         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
30263         user-defined values and other cases.
30264
30265         (IsValidEnumLiteral): Helper function.
30266
30267         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
30268         out there in the case we had a literal FieldExpr.
30269
30270         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
30271
30272         (Literalize): Revamp a bit to take two arguments.
30273
30274         (EnumLiteral): New class which derives from Literal to wrap enum literals.
30275
30276 2001-11-06  Ravi Pratap  <ravi@ximian.com>
30277
30278         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
30279
30280         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
30281
30282         (Resolve): Use the above to ensure we have proper initializers.
30283
30284 2001-11-05  Ravi Pratap  <ravi@ximian.com>
30285
30286         * expression.cs (Expression::EvalConstantExpression): New method to 
30287         evaluate constant expressions.
30288
30289         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
30290
30291 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30292
30293         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
30294         in an array.
30295
30296         (Binary.ResolveOperator): Handle operator != (object a, object b)
30297         and operator == (object a, object b);
30298
30299         (Binary.DoNumericPromotions): Indicate whether the numeric
30300         promotion was possible.
30301
30302         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
30303         Implement.  
30304
30305         Made the ArrayAccess implement interface IAssignMethod instead of
30306         IStackStore as the order in which arguments are passed reflects
30307         this.
30308
30309         * assign.cs: Instead of using expr.ExprClass to select the way of
30310         assinging, probe for the IStackStore/IAssignMethod interfaces.
30311
30312         * typemanager.cs: Load InitializeArray definition.
30313
30314         * rootcontext.cs (RootContext.MakeStaticData): Used to define
30315         static data that can be used to initialize arrays. 
30316
30317 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
30318
30319         * expression.cs: Handle operator== and operator!= for booleans.
30320
30321         (Conditioal.Reduce): Implement reducer for the ?: operator.
30322
30323         (Conditional.Resolve): Implement dead code elimination.
30324
30325         (Binary.Resolve): Catch string literals and return a new
30326         concatenated string.
30327
30328         (Unary.Reduce): Implement reduction of unary expressions.
30329
30330         * ecore.cs: Split out the expression core handling here.
30331
30332         (Expression.Reduce): New method used to perform constant folding
30333         and CSE.  This is needed to support constant-expressions. 
30334
30335         * statement.cs (Statement.EmitBoolExpression): Pass true and false
30336         targets, and optimize for !x.
30337
30338 2001-11-04  Ravi Pratap  <ravi@ximian.com>
30339
30340         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
30341         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
30342         set custom atttributes.
30343
30344         * literal.cs (Literal::GetValue): New abstract method to return the actual
30345         value of the literal, cast as an object.
30346
30347         (*Literal): Implement GetValue method.
30348
30349         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
30350         expressions to the arraylist but objects of type Argument.
30351
30352         * class.cs (TypeContainer::Emit): Emit our attributes too.
30353
30354         (Method::Emit, Constructor::Emit): Ditto.
30355
30356         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
30357         to be ignoring earlier.
30358
30359 2001-11-03  Ravi Pratap  <ravi@ximian.com>
30360
30361         * attribute.cs (AttributeSection::Define): Implement to do the business
30362         of constructing a CustomAttributeBuilder.
30363
30364         (Attribute): New trivial class. Increases readability of code.  
30365
30366         * cs-parser.jay : Update accordingly.
30367
30368         (positional_argument_list, named_argument_list, named_argument): New rules
30369
30370         (attribute_arguments): Use the above so that we are more correct.
30371
30372 2001-11-02  Ravi Pratap  <ravi@ximian.com>
30373
30374         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
30375         to perform all checks for a method with a params parameter.
30376
30377         (Invocation::OverloadResolve): Update to use the above method and therefore
30378         cope correctly with params method invocations.
30379
30380         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
30381         params too.
30382
30383         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
30384         constructors in our parent too because we can't afford to miss out on 
30385         protected ones ;-)
30386
30387         * attribute.cs (AttributeSection): New name for the class Attribute
30388
30389         Other trivial changes to improve readability.
30390
30391         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
30392         use the new class names.
30393
30394 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30395
30396         * class.cs (Method::Define): Complete definition for params types too
30397
30398         (Indexer::Define): Ditto.
30399
30400         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
30401         Cope everywhere with a request for info about the array parameter.
30402
30403 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30404
30405         * tree.cs (RecordNamespace): Fix up to check for the correct key.
30406
30407         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
30408         local_variable_type to extract the string corresponding to the type.
30409
30410         (local_variable_type): Fixup the action to use the new helper method.
30411
30412         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
30413         go.
30414
30415         * expression.cs : Clean out code which uses the above.
30416
30417 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30418
30419         * typemanager.cs (RegisterMethod): Check if we already have an existing key
30420         and bale out if necessary by returning a false.
30421
30422         (RegisterProperty): Ditto.
30423
30424         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
30425         and print out appropriate error messages.
30426
30427         * interface.cs (everywhere): Ditto.
30428
30429         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
30430         location to constructor.
30431
30432         * class.cs (Property, Event, Indexer): Update accordingly.
30433
30434         * ../errors/cs111.cs : Added.
30435
30436         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
30437         of a method, as laid down by the spec.
30438
30439         (Invocation::OverloadResolve): Use the above method.
30440
30441 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30442
30443         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
30444         now take a TypeContainer and a Parameters object.
30445
30446         (ParameterData): Modify return type of ParameterModifier method to be 
30447         Parameter.Modifier and not a string.
30448
30449         (ReflectionParameters, InternalParameters): Update accordingly.
30450
30451         * expression.cs (Argument::GetParameterModifier): Same here.
30452
30453         * support.cs (InternalParameters::ParameterType): Find a better way of determining
30454         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
30455         symbol in it at all so maybe this is only for now.
30456
30457 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30458
30459         * support.cs (InternalParameters): Constructor now takes an extra argument 
30460         which is the actual Parameters class.
30461
30462         (ParameterDesc): Update to provide info on ref/out modifiers.
30463
30464         * class.cs (everywhere): Update call to InternalParameters to pass in
30465         the second argument too.
30466
30467         * support.cs (ParameterData): Add ParameterModifier, which is a method 
30468         to return the modifier info [ref/out etc]
30469
30470         (InternalParameters, ReflectionParameters): Implement the above.
30471
30472         * expression.cs (Argument::ParameterModifier): Similar function to return
30473         info about the argument's modifiers.
30474
30475         (Invocation::OverloadResolve): Update to take into account matching modifiers 
30476         too.
30477
30478         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
30479         a new SetFormalParameters object which we pass to InternalParameters.
30480
30481 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30482
30483         * expression.cs (NewArray): Merge into the ArrayCreation class.
30484
30485 2001-10-29  Ravi Pratap  <ravi@ximian.com>
30486
30487         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
30488         NewUserdefinedArray into one as there wasn't much of a use in having
30489         two separate ones.
30490
30491         * expression.cs (Argument): Change field's name to ArgType from Type.
30492
30493         (Type): New readonly property which returns the proper type, taking into 
30494         account ref/out modifiers.
30495
30496         (everywhere): Adjust code accordingly for the above.
30497
30498         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
30499         whether we are emitting for a ref or out parameter.
30500
30501         * expression.cs (Argument::Emit): Use the above field to set the state.
30502
30503         (LocalVariableReference::Emit): Update to honour the flag and emit the
30504         right stuff.
30505
30506         * parameter.cs (Attributes): Set the correct flags for ref parameters.
30507
30508         * expression.cs (Argument::FullDesc): New function to provide a full desc.
30509
30510         * support.cs (ParameterData): Add method ParameterDesc to the interface.
30511
30512         (ReflectionParameters, InternalParameters): Implement the above method.
30513
30514         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
30515         reporting errors.
30516
30517         (Invocation::FullMethodDesc): Ditto. 
30518
30519 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
30520
30521         * cs-parser.jay: Add extra production for the second form of array
30522         creation. 
30523
30524         * expression.cs (ArrayCreation): Update to reflect the above
30525         change. 
30526
30527         * Small changes to prepare for Array initialization.
30528
30529 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
30530
30531         * typemanager.cs (ImplementsInterface): interface might be null;
30532         Deal with this problem;
30533
30534         Also, we do store negative hits on the cache (null values), so use
30535         this instead of calling t.GetInterfaces on the type everytime.
30536
30537 2001-10-28  Ravi Pratap  <ravi@ximian.com>
30538
30539         * typemanager.cs (IsBuiltinType): New method to help determine the same.
30540
30541         * expression.cs (New::DoResolve): Get rid of array creation code and instead
30542         split functionality out into different classes.
30543
30544         (New::FormArrayType): Move into NewBuiltinArray.
30545
30546         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
30547         quite useless.
30548
30549         (NewBuiltinArray): New class to handle creation of built-in arrays.
30550
30551         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
30552         account creation of one-dimensional arrays.
30553
30554         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
30555
30556         (NewUserdefinedArray::DoResolve): Implement.
30557
30558         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
30559
30560         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
30561         we maintain inside the TypeManager. This is necessary to perform lookups on the
30562         module builder.
30563
30564         (LookupType): Update to perform GetType on the module builders too.     
30565
30566         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
30567
30568         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
30569
30570 2001-10-23  Ravi Pratap  <ravi@ximian.com>
30571
30572         * expression.cs (New::DoResolve): Implement guts of array creation.
30573
30574         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
30575
30576 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
30577
30578         * expression.cs: Fix bug I introduced lsat night that broke
30579         Delegates. 
30580
30581         (Expression.Resolve): Report a 246 error (can not resolve name)
30582         if we find a SimpleName in the stream.
30583
30584         (Expression.ResolveLValue): Ditto.
30585
30586         (Expression.ResolveWithSimpleName): This function is a variant of
30587         ResolveName, this one allows SimpleNames to be returned without a
30588         warning.  The only consumer of SimpleNames is MemberAccess
30589
30590 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
30591
30592         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
30593         might arrive here.  I have my doubts that this is correct.
30594
30595         * statement.cs (Lock): Implement lock statement.
30596
30597         * cs-parser.jay: Small fixes to support `lock' and `using'
30598
30599         * cs-tokenizer.cs: Remove extra space
30600
30601         * driver.cs: New flag --checked, allows to turn on integer math
30602         checking. 
30603
30604         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
30605         Threading.Monitor.Exit 
30606
30607 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
30608
30609         * expression.cs (IndexerAccess::DoResolveLValue): Set the
30610         Expression Class to be IndexerAccess.
30611
30612         Notice that Indexer::DoResolve sets the eclass to Value.
30613
30614 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
30615
30616         * class.cs (TypeContainer::Emit): Emit code for indexers.
30617
30618         * assign.cs (IAssignMethod): New interface implemented by Indexers
30619         and Properties for handling assignment.
30620
30621         (Assign::Emit): Simplify and reuse code. 
30622
30623         * expression.cs (IndexerAccess, PropertyExpr): Implement
30624         IAssignMethod, clean up old code. 
30625
30626 2001-10-22  Ravi Pratap  <ravi@ximian.com>
30627
30628         * typemanager.cs (ImplementsInterface): New method to determine if a type
30629         implements a given interface. Provides a nice cache too.
30630
30631         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
30632         method.
30633
30634         (ConvertReferenceExplicit): Ditto.
30635
30636         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
30637         various methods, with correct names etc.
30638
30639         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
30640         Operator.UnaryNegation.
30641
30642         * cs-parser.jay (operator_declarator): Be a little clever in the case where
30643         we have a unary plus or minus operator.
30644
30645         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
30646         UnaryMinus.
30647
30648         * everywhere : update accordingly.
30649
30650         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
30651         respectively.
30652
30653         * class.cs (Method::Define): For the case where we are implementing a method
30654         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
30655         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
30656
30657 2001-10-21  Ravi Pratap  <ravi@ximian.com>
30658
30659         * interface.cs (FindMembers): Implement to work around S.R.E
30660         lameness.
30661
30662         * typemanager.cs (IsInterfaceType): Implement.
30663
30664         (FindMembers): Update to handle interface types too.
30665
30666         * expression.cs (ImplicitReferenceConversion): Re-write bits which
30667         use IsAssignableFrom as that is not correct - it doesn't work.
30668
30669         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
30670         and accordingly override EmitStatement.
30671
30672         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
30673         using the correct logic :-)
30674
30675 2001-10-19  Ravi Pratap  <ravi@ximian.com>
30676
30677         * ../errors/cs-11.cs : Add to demonstrate error -11 
30678
30679 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
30680
30681         * assign.cs (Assign::Resolve): Resolve right hand side first, and
30682         then pass this as a hint to ResolveLValue.
30683
30684         * expression.cs (FieldExpr): Add Location information
30685
30686         (FieldExpr::LValueResolve): Report assignment to readonly
30687         variable. 
30688
30689         (Expression::ExprClassFromMemberInfo): Pass location information.
30690
30691         (Expression::ResolveLValue): Add new method that resolves an
30692         LValue. 
30693
30694         (Expression::DoResolveLValue): Default invocation calls
30695         DoResolve. 
30696
30697         (Indexers): New class used to keep track of indexers in a given
30698         Type. 
30699
30700         (IStackStore): Renamed from LValue, as it did not really describe
30701         what this did.  Also ResolveLValue is gone from this interface and
30702         now is part of Expression.
30703
30704         (ElementAccess): Depending on the element access type
30705
30706         * typemanager.cs: Add `indexer_name_type' as a Core type
30707         (System.Runtime.CompilerServices.IndexerNameAttribute)
30708
30709         * statement.cs (Goto): Take a location.
30710
30711 2001-10-18  Ravi Pratap  <ravi@ximian.com>
30712
30713         * delegate.cs (Delegate::VerifyDelegate): New method to verify
30714         if two delegates are compatible.
30715
30716         (NewDelegate::DoResolve): Update to take care of the case when
30717         we instantiate a delegate from another delegate.
30718
30719         * typemanager.cs (FindMembers): Don't even try to look up members
30720         of Delegate types for now.
30721
30722 2001-10-18  Ravi Pratap  <ravi@ximian.com>
30723
30724         * delegate.cs (NewDelegate): New class to take care of delegate
30725         instantiation.
30726
30727         * expression.cs (New): Split the delegate related code out into 
30728         the NewDelegate class.
30729
30730         * delegate.cs (DelegateInvocation): New class to handle delegate 
30731         invocation.
30732
30733         * expression.cs (Invocation): Split out delegate related code into
30734         the DelegateInvocation class.
30735
30736 2001-10-17  Ravi Pratap  <ravi@ximian.com>
30737
30738         * expression.cs (New::DoResolve): Implement delegate creation fully
30739         and according to the spec.
30740
30741         (New::DoEmit): Update to handle delegates differently.
30742
30743         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
30744         because of which we were printing out arguments in reverse order !
30745
30746         * delegate.cs (VerifyMethod): Implement to check if the given method
30747         matches the delegate.
30748
30749         (FullDelegateDesc): Implement.
30750
30751         (VerifyApplicability): Implement.
30752
30753         * expression.cs (Invocation::DoResolve): Update to accordingly handle
30754         delegate invocations too.
30755
30756         (Invocation::Emit): Ditto.
30757
30758         * ../errors/cs1593.cs : Added.
30759
30760         * ../errors/cs1594.cs : Added.
30761
30762         * delegate.cs (InstanceExpression, TargetMethod): New properties.
30763
30764 2001-10-16  Ravi Pratap  <ravi@ximian.com>
30765
30766         * typemanager.cs (intptr_type): Core type for System.IntPtr
30767
30768         (InitCoreTypes): Update for the same.
30769
30770         (iasyncresult_type, asynccallback_type): Ditto.
30771
30772         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
30773         correct.
30774
30775         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
30776         too.
30777
30778         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
30779         the builders for the 4 members of a delegate type :-)
30780
30781         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
30782         type.
30783
30784         * expression.cs (New::DoResolve): Implement guts for delegate creation.
30785
30786         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
30787
30788 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
30789
30790         * statement.cs (Break::Emit): Implement.   
30791         (Continue::Emit): Implement.
30792
30793         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
30794         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
30795         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
30796         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
30797         end loop
30798
30799         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
30800         properties that track the label for the current loop (begin of the
30801         loop and end of the loop).
30802
30803 2001-10-15  Ravi Pratap  <ravi@ximian.com>
30804
30805         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
30806         use of emitting anything at all.
30807
30808         * class.cs, rootcontext.cs : Get rid of calls to the same.
30809
30810         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
30811
30812         (Populate): Define the constructor correctly and set the implementation
30813         attributes.
30814
30815         * typemanager.cs (delegate_types): New hashtable to hold delegates that
30816         have been defined.
30817
30818         (AddDelegateType): Implement.
30819
30820         (IsDelegateType): Implement helper method.
30821
30822         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
30823
30824         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
30825         and accordingly handle it.
30826
30827         * delegate.cs (Populate): Take TypeContainer argument.
30828         Implement bits to define the Invoke method. However, I still haven't figured out
30829         how to take care of the native int bit :-(
30830
30831         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
30832         Qualify the name of the delegate, not its return type !
30833
30834         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
30835         conversion.
30836
30837         (StandardConversionExists): Checking for array types turns out to be recursive.
30838
30839         (ConvertReferenceExplicit): Implement array conversion.
30840
30841         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
30842
30843 2001-10-12  Ravi Pratap  <ravi@ximian.com>
30844
30845         * cs-parser.jay (delegate_declaration): Store the fully qualified
30846         name as it is a type declaration.
30847
30848         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
30849         readonly.
30850
30851         (DefineDelegate): Renamed from Define. Does the same thing essentially,
30852         as TypeContainer::DefineType.
30853
30854         (Populate): Method in which all the definition of the various methods (Invoke)
30855         etc is done.
30856
30857         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
30858         see.
30859
30860         (CloseDelegate): Finally creates the delegate.
30861
30862         * class.cs (TypeContainer::DefineType): Update to define delegates.
30863         (Populate, Emit and CloseType): Do the same thing here too.
30864
30865         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
30866         delegates in all these operations.
30867
30868 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
30869
30870         * expression.cs: LocalTemporary: a new expression used to
30871         reference a temporary that has been created.
30872
30873         * assign.cs: Handle PropertyAccess back here, so that we can
30874         provide the proper semantic access to properties.
30875
30876         * expression.cs (Expression::ConvertReferenceExplicit): Implement
30877         a few more explicit conversions. 
30878
30879         * modifiers.cs: `NEW' modifier maps to HideBySig.
30880
30881         * expression.cs (PropertyExpr): Make this into an
30882         ExpressionStatement, and support the EmitStatement code path. 
30883
30884         Perform get/set error checking, clean up the interface.
30885
30886         * assign.cs: recognize PropertyExprs as targets, and if so, turn
30887         them into toplevel access objects.
30888
30889 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
30890
30891         * expression.cs: PropertyExpr::PropertyExpr: use work around the
30892         SRE.
30893
30894         * typemanager.cs: Keep track here of our PropertyBuilders again to
30895         work around lameness in SRE.
30896
30897 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
30898
30899         * expression.cs (LValue::LValueResolve): New method in the
30900         interface, used to perform a second resolution pass for LValues. 
30901
30902         (This::DoResolve): Catch the use of this in static methods.
30903
30904         (This::LValueResolve): Implement.
30905
30906         (This::Store): Remove warning, assigning to `this' in structures
30907         is 
30908
30909         (Invocation::Emit): Deal with invocation of
30910         methods on value types.  We need to pass the address to structure
30911         methods rather than the object itself.  (The equivalent code to
30912         emit "this" for structures leaves the entire structure on the
30913         stack instead of a pointer to it). 
30914
30915         (ParameterReference::DoResolve): Compute the real index for the
30916         argument based on whether the method takes or not a `this' pointer
30917         (ie, the method is static).
30918
30919         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
30920         value types returned from functions when we need to invoke a
30921         method on the sturcture.
30922
30923
30924 2001-10-11  Ravi Pratap  <ravi@ximian.com>
30925
30926         * class.cs (TypeContainer::DefineType): Method to actually do the business of
30927         defining the type in the Modulebuilder or Typebuilder. This is to take
30928         care of nested types which need to be defined on the TypeBuilder using
30929         DefineNestedMethod.
30930
30931         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
30932         methods in RootContext, only ported to be part of TypeContainer.
30933
30934         (TypeContainer::GetInterfaceOrClass): Ditto.
30935
30936         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
30937
30938         * interface.cs (Interface::DefineInterface): New method. Does exactly
30939         what RootContext.CreateInterface did earlier, only it takes care of nested types 
30940         too.
30941
30942         (Interface::GetInterfaces): Move from RootContext here and port.
30943
30944         (Interface::GetInterfaceByName): Same here.
30945
30946         * rootcontext.cs (ResolveTree): Re-write.
30947
30948         (PopulateTypes): Re-write.
30949
30950         * class.cs (TypeContainer::Populate): Populate nested types too.
30951         (TypeContainer::Emit): Emit nested members too.
30952
30953         * typemanager.cs (AddUserType): Do not make use of the FullName property,
30954         instead just use the name argument passed in as it is already fully
30955         qualified.
30956
30957         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
30958         to TypeContainer mapping to see if a type is user-defined.
30959
30960         * class.cs (TypeContainer::CloseType): Implement. 
30961
30962         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
30963         the default constructor.
30964
30965         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
30966         twice.
30967
30968         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
30969
30970         * interface.cs (CloseType): Create the type here.
30971
30972         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
30973         the hierarchy.
30974
30975         Remove all the methods which are now in TypeContainer.
30976
30977 2001-10-10  Ravi Pratap  <ravi@ximian.com>
30978
30979         * delegate.cs (Define): Re-write bits to define the delegate
30980         correctly.
30981
30982 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
30983
30984         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
30985
30986         * expression.cs (ImplicitReferenceConversion): handle null as well
30987         as a source to convert to any reference type.
30988
30989         * statement.cs (Return): Perform any implicit conversions to
30990         expected return type.  
30991
30992         Validate use of return statement.  
30993
30994         * codegen.cs (EmitContext): Pass the expected return type here.
30995
30996         * class.cs (Method, Constructor, Property): Pass expected return
30997         type to EmitContext.
30998
30999 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31000
31001         * expression.cs: Make DoResolve take an EmitContext instead of a
31002         TypeContainer.
31003
31004         Replaced `l' and `location' for `loc', for consistency.
31005
31006         (Error, Warning): Remove unneeded Tc argument.
31007
31008         * assign.cs, literal.cs, constant.cs: Update to new calling
31009         convention. 
31010
31011         * codegen.cs: EmitContext now contains a flag indicating whether
31012         code is being generated in a static method or not.
31013
31014         * cs-parser.jay: DecomposeQI, new function that replaces the old
31015         QualifiedIdentifier.  Now we always decompose the assembled
31016         strings from qualified_identifier productions into a group of
31017         memberaccesses.
31018
31019 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31020
31021         * rootcontext.cs: Deal with field-less struct types correctly now
31022         by passing the size option to Define Type.
31023
31024         * class.cs: Removed hack that created one static field. 
31025
31026 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31027
31028         * statement.cs: Moved most of the code generation here. 
31029
31030 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31031
31032         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31033         seem very right.
31034
31035         (ElementAccess): Remove useless bits for now - keep checks as the spec
31036         says.
31037
31038 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31039
31040         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31041         and start performing checks according to the spec.
31042
31043 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31044
31045         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31046         rank_specifiers instead.
31047
31048         (rank_specifiers): Change the order in which the rank specifiers are stored
31049
31050         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31051
31052         * expression.cs (ElementAccess): Implement the LValue interface too.
31053
31054 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31055
31056         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31057         except that user defined conversions are not included.
31058
31059         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31060         perform the conversion of the return type, if necessary.
31061
31062         (New::DoResolve): Check whether we are creating an array or an object
31063         and accordingly do the needful.
31064
31065         (New::Emit): Same here.
31066
31067         (New::DoResolve): Implement guts of array creation.
31068
31069         (New::FormLookupType): Helper function.
31070
31071 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31072
31073         * codegen.cs: Removed most of the code generation here, and move the
31074         corresponding code generation bits to the statement classes. 
31075
31076         Added support for try/catch/finalize and throw.
31077
31078         * cs-parser.jay: Added support for try/catch/finalize.
31079
31080         * class.cs: Catch static methods having the flags override,
31081         virtual or abstract.
31082
31083         * expression.cs (UserCast): This user cast was not really doing
31084         what it was supposed to do.  Which is to be born in fully resolved
31085         state.  Parts of the resolution were being performed at Emit time! 
31086
31087         Fixed this code.
31088
31089 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31090
31091         * expression.cs: Implicity convert the result from UserCast.
31092
31093 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31094
31095         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31096         prevented it from working correctly. 
31097
31098         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31099         merely ConvertImplicit.
31100
31101 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31102
31103         * typemanager.cs: Make the LookupTypeContainer function static,
31104         and not per-instance.  
31105
31106         * class.cs: Make static FindMembers (the one that takes a Type
31107         argument). 
31108
31109         * codegen.cs: Add EmitForeach here.
31110
31111         * cs-parser.jay: Make foreach a toplevel object instead of the
31112         inline expansion, as we need to perform semantic analysis on it. 
31113
31114 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31115
31116         * expression.cs (Expression::ImplicitUserConversion): Rename to
31117         UserDefinedConversion.
31118
31119         (Expression::UserDefinedConversion): Take an extra argument specifying 
31120         whether we look for explicit user conversions too.
31121
31122         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31123
31124         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31125
31126         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31127         with the appropriate arguments.
31128
31129         * cs-parser.jay (cast_expression): Record location too.
31130
31131         * expression.cs (Cast): Record location info.
31132
31133         (Expression::ConvertExplicit): Take location argument.
31134
31135         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31136         to determine if we are doing explicit conversions.
31137
31138         (UserCast::Emit): Update accordingly.
31139
31140         (Expression::ConvertExplicit): Report an error if everything fails.
31141
31142         * ../errors/cs0030.cs : Add.
31143
31144 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31145
31146         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31147         virtual and newslot bits. 
31148
31149         * class.cs (TypeContainer::RegisterRequiredImplementations):
31150         Record methods we need.
31151
31152         (TypeContainer::MakeKey): Helper function to make keys for
31153         MethodBases, since the Methodbase key is useless.
31154
31155         (TypeContainer::Populate): Call RegisterRequiredImplementations
31156         before defining the methods.   
31157
31158         Create a mapping for method_builders_to_methods ahead of time
31159         instead of inside a tight loop.
31160
31161         (::RequireMethods):  Accept an object as the data to set into the
31162         hashtable so we can report interface vs abstract method mismatch.
31163
31164 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31165
31166         * report.cs: Make all of it static.
31167
31168         * rootcontext.cs: Drop object_type and value_type computations, as
31169         we have those in the TypeManager anyways.
31170
31171         Drop report instance variable too, now it is a global.
31172
31173         * driver.cs: Use try/catch on command line handling.
31174
31175         Add --probe option to debug the error reporting system with a test
31176         suite. 
31177
31178         * report.cs: Add support for exiting program when a probe
31179         condition is reached.
31180
31181 2001-10-03  Ravi Pratap  <ravi@ximian.com>
31182
31183         * expression.cs (Binary::DoNumericPromotions): Fix the case when
31184         we do a forcible conversion regardless of type, to check if 
31185         ForceConversion returns a null.
31186
31187         (Binary::error19): Use location to report error.
31188
31189         (Unary::error23): Use location here too.
31190
31191         * ../errors/cs0019.cs : Check in.
31192
31193         * ../errors/cs0023.cs : Check in.
31194
31195         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
31196         case of a non-null MethodInfo object with a length of 0 !
31197
31198         (Binary::ResolveOperator): Flag error if overload resolution fails to find
31199         an applicable member - according to the spec :-)
31200         Also fix logic to find members in base types.
31201
31202         (Unary::ResolveOperator): Same here.
31203
31204         (Unary::report23): Change name to error23 and make first argument a TypeContainer
31205         as I was getting thoroughly confused between this and error19 :-)
31206
31207         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
31208         (::FindMostEncompassedType): Implement.
31209         (::FindMostEncompassingType): Implement.
31210         (::StandardConversionExists): Implement.
31211
31212         (UserImplicitCast): Re-vamp. We now need info about most specific
31213         source and target types so that we can do the necessary conversions.
31214
31215         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
31216         mathematical union with no duplicates.
31217
31218 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31219
31220         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
31221         in order from base classes to child classes, so that we can in
31222         child classes look up in our parent for method names and
31223         attributes (required for handling abstract, virtual, new, override
31224         constructs: we need to instrospect our base class, and if we dont
31225         populate the classes in order, the introspection might be
31226         incorrect.  For example, a method could query its parent before
31227         the parent has any methods and would determine that the parent has
31228         no abstract methods (while it could have had them)).
31229
31230         (RootContext::CreateType): Record the order in which we define the
31231         classes.
31232
31233 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
31234
31235         * class.cs (TypeContainer::Populate): Also method definitions can
31236         fail now, keep track of this.
31237
31238         (TypeContainer::FindMembers): Implement support for
31239         DeclaredOnly/noDeclaredOnly flag.
31240
31241         (Constructor::Emit) Return the ConstructorBuilder.
31242
31243         (Method::Emit) Return the MethodBuilder. 
31244         Check for abstract or virtual methods to be public.
31245
31246         * rootcontext.cs (RootContext::CreateType): Register all the
31247         abstract methods required for the class to be complete and the
31248         interface methods that must be implemented. 
31249
31250         * cs-parser.jay: Report error 501 (method requires body if it is
31251         not marked abstract or extern).
31252
31253         * expression.cs (TypeOf::Emit): Implement.
31254
31255         * typemanager.cs: runtime_handle_type, new global type.
31256
31257         * class.cs (Property::Emit): Generate code for properties.
31258
31259 2001-10-02  Ravi Pratap  <ravi@ximian.com>
31260
31261         * expression.cs (Unary::ResolveOperator): Find operators on base type
31262         too - we now conform exactly to the spec.
31263
31264         (Binary::ResolveOperator): Same here.
31265
31266         * class.cs (Operator::Define): Fix minor quirk in the tests.
31267
31268         * ../errors/cs0215.cs : Added.
31269
31270         * ../errors/cs0556.cs : Added.
31271
31272         * ../errors/cs0555.cs : Added.
31273
31274 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31275
31276         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
31277         single integer which is really efficient
31278
31279 2001-10-01  Ravi Pratap  <ravi@ximian.com>
31280
31281         *  expression.cs (Expression::ImplicitUserConversion): Use location
31282         even in the case when we are examining True operators.
31283  
31284         * class.cs (Operator::Define): Perform extensive checks to conform
31285         with the rules for operator overloading in the spec.
31286
31287         * expression.cs (Expression::ImplicitReferenceConversion): Implement
31288         some of the other conversions mentioned in the spec.
31289
31290         * typemanager.cs (array_type): New static member for the System.Array built-in
31291         type.
31292
31293         (cloneable_interface): For System.ICloneable interface.
31294
31295         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
31296         we start resolving the tree and populating types.
31297
31298         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
31299  
31300 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31301
31302         * expression.cs (Expression::ExprClassFromMemberInfo,
31303         Expression::Literalize): Create literal expressions from
31304         FieldInfos which are literals.
31305
31306         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
31307         type casts, because they were wrong.  The test suite in tests
31308         caught these ones.
31309
31310         (ImplicitNumericConversion): ushort to ulong requires a widening
31311         cast. 
31312
31313         Int32 constant to long requires widening cast as well.
31314
31315         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
31316         for integers because the type on the stack is not i4.
31317
31318 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
31319
31320         * expression.cs (report118): require location argument. 
31321
31322         * parameter.cs: Do not dereference potential null value.
31323
31324         * class.cs: Catch methods that lack the `new' keyword when
31325         overriding a name.  Report warnings when `new' is used without
31326         anything being there to override.
31327
31328         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
31329
31330         * class.cs: Only add constructor to hashtable if it is non-null
31331         (as now constructors can fail on define).
31332
31333         (TypeManager, Class, Struct): Take location arguments.
31334
31335         Catch field instance initialization in structs as errors.
31336
31337         accepting_filter: a new filter for FindMembers that is static so
31338         that we dont create an instance per invocation.
31339
31340         (Constructor::Define): Catch errors where a struct constructor is
31341         parameterless 
31342
31343         * cs-parser.jay: Pass location information for various new
31344         constructs. 
31345
31346         * delegate.cs (Delegate): take a location argument.
31347
31348         * driver.cs: Do not call EmitCode if there were problesm in the
31349         Definition of the types, as many Builders wont be there. 
31350
31351         * decl.cs (Decl::Decl): Require a location argument.
31352
31353         * cs-tokenizer.cs: Handle properly hex constants that can not fit
31354         into integers, and find the most appropiate integer for it.
31355
31356         * literal.cs: Implement ULongLiteral.
31357
31358         * rootcontext.cs: Provide better information about the location of
31359         failure when CreateType fails.
31360
31361 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
31362
31363         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
31364         as well.
31365
31366         * expression.cs (Binary::CheckShiftArguments): Add missing type
31367         computation.
31368         (Binary::ResolveOperator): Add type to the logical and and logical
31369         or, Bitwise And/Or and Exclusive Or code paths, it was missing
31370         before.
31371
31372         (Binary::DoNumericPromotions): In the case where either argument
31373         is ulong (and most signed types combined with ulong cause an
31374         error) perform implicit integer constant conversions as well.
31375
31376 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31377
31378         * expression.cs (UserImplicitCast): Method should always be
31379         non-null. 
31380         (Invocation::BetterConversion): Simplified test for IntLiteral.
31381
31382         (Expression::ImplicitNumericConversion): Split this routine out.
31383         Put the code that performs implicit constant integer conversions
31384         here. 
31385
31386         (Expression::Resolve): Become a wrapper around DoResolve so we can
31387         check eclass and type being set after resolve.
31388
31389         (Invocation::Badness): Remove this dead function
31390
31391         (Binary::ResolveOperator): Do not compute the expensive argumnets
31392         unless we have a union for it.
31393
31394         (Probe::Emit): Is needs to do an isinst and then
31395         compare against null.
31396
31397         (::CanConvert): Added Location argument.  If the Location argument
31398         is null (Location.Null), then we do not report errors.  This is
31399         used by the `probe' mechanism of the Explicit conversion.  We do
31400         not want to generate an error for something that the user
31401         explicitly requested to be casted.  But the pipeline for an
31402         explicit cast first tests for potential implicit casts.
31403
31404         So for now, if the Location is null, it means `Probe only' to
31405         avoid adding another argument.   Might have to revise this
31406         strategy later.
31407
31408         (ClassCast): New class used to type cast objects into arbitrary
31409         classes (used in Explicit Reference Conversions).
31410
31411         Implement `as' as well.
31412
31413         Reverted all the patches from Ravi below: they were broken:
31414
31415                 * The use of `level' as a mechanism to stop recursive
31416                   invocations is wrong.  That was there just to catch the
31417                   bug with a strack trace but not as a way of addressing
31418                   the problem.
31419
31420                   To fix the problem we have to *understand* what is going
31421                   on and the interactions and come up with a plan, not
31422                   just get things going.
31423
31424                 * The use of the type conversion cache that I proposed
31425                   last night had an open topic: How does this work across
31426                   protection domains.  A user defined conversion might not
31427                   be public in the location where we are applying the
31428                   conversion, a different conversion might be selected
31429                   (ie, private A->B (better) but public B->A (worse),
31430                   inside A, A->B applies, but outside it, B->A will
31431                   apply).
31432
31433                 * On top of that (ie, even if the above is solved),
31434                   conversions in a cache need to be abstract.  Ie, `To
31435                   convert from an Int to a Short use an OpcodeCast', not
31436                   `To convert from an Int to a Short use the OpcodeCast on
31437                   the variable 5' (which is what this patch was doing).
31438
31439 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31440
31441         * expression.cs (Invocation::ConversionExists): Re-write to use
31442         the conversion cache
31443
31444         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
31445         cache all conversions done, not just user-defined ones.
31446
31447         (Invocation::BetterConversion): The real culprit. Use ConversionExists
31448         to determine if a conversion exists instead of acutually trying to 
31449         perform the conversion. It's faster too.
31450
31451         (Expression::ConvertExplicit): Modify to use ConversionExists to check
31452         and only then attempt the implicit conversion.
31453
31454 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31455
31456         * expression.cs (ConvertImplicit): Use a cache for conversions
31457         already found. Check level of recursion and bail out if necessary.
31458
31459 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31460
31461         * typemanager.cs (string_concat_string_string, string_concat_object_object):
31462         Export standard methods that we expect for string operations.
31463
31464         * statement.cs (Block::UsageWarning): Track usage of variables and
31465         report the errors for not used variables.
31466
31467         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
31468         operator. 
31469
31470 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
31471
31472         * codegen.cs: remove unnneded code 
31473
31474         * expression.cs: Removed BuiltinTypeAccess class
31475
31476         Fix the order in which implicit conversions are
31477         done.  
31478
31479         The previous fixed dropped support for boxed conversions (adding a
31480         test to the test suite now)
31481
31482         (UserImplicitCast::CanConvert): Remove test for source being null,
31483         that code is broken.  We should not feed a null to begin with, if
31484         we do, then we should track the bug where the problem originates
31485         and not try to cover it up here.
31486
31487         Return a resolved expression of type UserImplicitCast on success
31488         rather than true/false.  Ravi: this is what I was talking about,
31489         the pattern is to use a static method as a "constructor" for
31490         objects. 
31491
31492         Also, do not create arguments until the very last minute,
31493         otherwise we always create the arguments even for lookups that
31494         will never be performed. 
31495
31496         (UserImplicitCast::Resolve): Eliminate, objects of type
31497         UserImplicitCast are born in a fully resolved state. 
31498
31499         * typemanager.cs (InitCoreTypes): Init also value_type
31500         (System.ValueType). 
31501
31502         * expression.cs (Cast::Resolve): First resolve the child expression.
31503
31504         (LValue): Add new method AddressOf to be used by
31505         the `&' operator.  
31506
31507         Change the argument of Store to take an EmitContext instead of an
31508         ILGenerator, because things like FieldExpr need to be able to call
31509         their children expression to generate the instance code. 
31510
31511         (Expression::Error, Expression::Warning): Sugar functions for
31512         reporting errors.
31513
31514         (Expression::MemberLookup): Accept a TypeContainer instead of a
31515         Report as the first argument.
31516
31517         (Expression::ResolvePrimary): Killed.  I still want to improve
31518         this as currently the code is just not right.
31519
31520         (Expression::ResolveMemberAccess): Simplify, but it is still
31521         wrong. 
31522
31523         (Unary::Resolve): Catch errors in AddressOf operators.
31524
31525         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
31526         index to a byte for the short-version, or the compiler will choose
31527         the wrong Emit call, which generates the wrong data.
31528
31529         (ParameterReference::Emit, ::Store): same.
31530
31531         (FieldExpr::AddressOf): Implement.
31532
31533         * typemanager.cs: TypeManager: made public variable instead of
31534         property.
31535
31536         * driver.cs: document --fatal.
31537
31538         * report.cs (ErrorMessage, WarningMessage): new names for the old
31539         Error and Warning classes.
31540
31541         * cs-parser.jay (member_access): Turn built-in access to types
31542         into a normal simplename
31543
31544 2001-09-27  Ravi Pratap  <ravi@ximian.com>
31545
31546         * expression.cs (Invocation::BetterConversion): Fix to cope
31547         with q being null, since this was introducing a bug.
31548
31549         * expression.cs (ConvertImplicit): Do built-in conversions first.
31550
31551 2001-09-27  Ravi Pratap  <ravi@ximian.com>
31552
31553         * expression.cs (UserImplicitCast::Resolve): Fix bug.
31554
31555 2001-09-27  Ravi Pratap  <ravi@ximian.com>
31556
31557         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
31558         I had introduced long ago (what's new ?).
31559
31560         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
31561         the work of all the checking. 
31562         (ConvertImplicit): Call CanConvert and only then create object if necessary.
31563         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
31564
31565         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
31566         that is the right way. 
31567
31568         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
31569         overloading resolution. Use everywhere instead of cutting and pasting code.
31570
31571         (Binary::ResolveOperator): Use MakeUnionSet.
31572
31573         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
31574         we have to convert to bool types. Not complete yet.
31575
31576 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
31577
31578         * typemanager.cs (TypeManager::CSharpName): support ushort.
31579
31580         * expression.cs (Expression::TryImplicitIntConversion): Attempts
31581         to provide an expression that performsn an implicit constant int
31582         conversion (section 6.1.6).
31583         (Expression::ConvertImplicitRequired): Reworked to include
31584         implicit constant expression conversions.
31585
31586         (Expression::ConvertNumericExplicit): Finished.
31587
31588         (Invocation::Emit): If InstanceExpression is null, then it means
31589         that we perform a call on this.
31590
31591 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
31592
31593         * expression.cs (Unary::Emit): Remove some dead code.
31594         (Probe): Implement Resolve and Emit for `is'.
31595         (Expression::ConvertImplicitRequired): Attempt to do constant
31596         expression conversions here.  Maybe should be moved to
31597         ConvertImplicit, but I am not sure.
31598         (Expression::ImplicitLongConstantConversionPossible,
31599         Expression::ImplicitIntConstantConversionPossible): New functions
31600         that tell whether is it possible to apply an implicit constant
31601         expression conversion.
31602
31603         (ConvertNumericExplicit): Started work on explicit numeric
31604         conversions.
31605
31606         * cs-parser.jay: Update operator constants.
31607
31608         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
31609         (Parameters::GetSignature): Hook up VerifyArgs here.
31610         (Parameters::VerifyArgs): Verifies that no two arguments have the
31611         same name. 
31612
31613         * class.cs (Operator): Update the operator names to reflect the
31614         ones that the spec expects (as we are just stringizing the
31615         operator names).
31616
31617         * expression.cs (Unary::ResolveOperator): Fix bug: Use
31618         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
31619         previous usage did only work for our methods.
31620         (Expression::ConvertImplicit): Handle decimal implicit numeric
31621         conversions as well.
31622         (Expression::InternalTypeConstructor): Used to invoke constructors
31623         on internal types for default promotions.
31624
31625         (Unary::Emit): Implement special handling for the pre/post
31626         increment/decrement for overloaded operators, as they need to have
31627         the same semantics as the other operators.
31628
31629         (Binary::ResolveOperator): ditto.
31630         (Invocation::ConversionExists): ditto.
31631         (UserImplicitCast::Resolve): ditto.
31632
31633 2001-09-26  Ravi Pratap  <ravi@ximian.com>
31634
31635         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
31636         operator, return after emitting body. Regression tests pass again !
31637
31638         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
31639         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
31640         (Invocation::OverloadResolve): Ditto.
31641         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
31642
31643         * everywhere : update calls to the above methods accordingly.
31644
31645 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
31646
31647         * assign.cs (Assign): Make it inherit from ExpressionStatement.
31648
31649         * expression.cs (ExpressionStatement): New base class used for
31650         expressions that can appear in statements, so that we can provide
31651         an alternate path to generate expression that do not leave a value
31652         on the stack.
31653
31654         (Expression::Emit, and all the derivatives): We no longer return
31655         whether a value is left on the stack or not.  Every expression
31656         after being emitted leaves a single value on the stack.
31657
31658         * codegen.cs (EmitContext::EmitStatementExpression): Use the
31659         facilties of ExpressionStatement if possible.
31660
31661         * cs-parser.jay: Update statement_expression.
31662
31663 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
31664
31665         * driver.cs: Change the wording of message
31666
31667 2001-09-25  Ravi Pratap  <ravi@ximian.com>
31668
31669         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
31670         the type of the expression to the return type of the method if
31671         we have an overloaded operator match ! The regression tests pass again !
31672         (Unary::ResolveOperator): Ditto.
31673
31674         * expression.cs (Invocation::ConversionExists): Correct the member lookup
31675         to find "op_Implicit", not "implicit" ;-)
31676         (UserImplicitCast): New class to take care of user-defined implicit conversions.
31677         (ConvertImplicit, ForceConversion): Take TypeContainer argument
31678
31679         * everywhere : Correct calls to the above accordingly.
31680
31681         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
31682         (ConvertImplicit): Do user-defined conversion if it exists.
31683
31684 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
31685
31686         * assign.cs: track location.
31687         (Resolve): Use implicit conversions on assignment.
31688
31689         * literal.cs: Oops.  Not good, Emit of short access values should
31690         pass (Bytes) or the wrong argument will be selected.
31691
31692         * expression.cs (Unary::Emit): Emit code for -expr.
31693
31694         (Unary::ResolveOperator): Handle `Substract' for non-constants
31695         (substract from zero from the non-constants).
31696         Deal with Doubles as well. 
31697
31698         (Expression::ConvertImplicitRequired): New routine that reports an
31699         error if no implicit conversion exists. 
31700
31701         (Invocation::OverloadResolve): Store the converted implicit
31702         expressions if we make them
31703
31704 2001-09-24  Ravi Pratap  <ravi@ximian.com>
31705
31706         * class.cs (ConstructorInitializer): Take a Location argument.
31707         (ConstructorBaseInitializer): Same here.
31708         (ConstructorThisInitializer): Same here.
31709
31710         * cs-parser.jay : Update all calls accordingly.
31711
31712         * expression.cs (Unary, Binary, New): Take location argument.
31713         Update accordingly everywhere.
31714
31715         * cs-parser.jay : Update all calls to the above to take a location
31716         argument.
31717
31718         * class.cs : Ditto.
31719
31720 2001-09-24  Ravi Pratap  <ravi@ximian.com>
31721
31722         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
31723         (Invocation::BetterConversion): Same here
31724         (Invocation::ConversionExists): Ditto.
31725
31726         (Invocation::ConversionExists): Implement.
31727
31728 2001-09-22  Ravi Pratap  <ravi@ximian.com>
31729
31730         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
31731         Also take an additional TypeContainer argument.
31732
31733         * All over : Pass in TypeContainer as argument to OverloadResolve.
31734
31735         * typemanager.cs (CSharpName): Update to check for the string type and return
31736         that too.
31737
31738         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
31739         a given method.
31740
31741 2001-09-21  Ravi Pratap  <ravi@ximian.com>
31742
31743         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
31744         (Invocation::BetterFunction): Implement.
31745         (Invocation::BetterConversion): Implement.
31746         (Invocation::ConversionExists): Skeleton, no implementation yet.
31747
31748         Okay, things work fine !
31749
31750 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
31751
31752         * typemanager.cs: declare and load enum_type, delegate_type and
31753         void_type. 
31754
31755         * expression.cs (Expression::Emit): Now emit returns a value that
31756         tells whether a value is left on the stack or not.  This strategy
31757         might be reveted tomorrow with a mechanism that would address
31758         multiple assignments.
31759         (Expression::report118): Utility routine to report mismatches on
31760         the ExprClass.
31761
31762         (Unary::Report23): Report impossible type/operator combination
31763         utility function.
31764
31765         (Unary::IsIncrementableNumber): Whether the type can be
31766         incremented or decremented with add.
31767         (Unary::ResolveOperator): Also allow enumerations to be bitwise
31768         complemented. 
31769         (Unary::ResolveOperator): Implement ++, !, ~,
31770
31771         (Invocation::Emit): Deal with new Emit convetion.
31772
31773         * All Expression derivatives: Updated their Emit method to return
31774         whether they leave values on the stack or not.
31775
31776         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
31777         stack for expressions that are statements. 
31778
31779 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
31780
31781         * expression.cs (LValue): New interface.  Must be implemented by
31782         LValue objects.
31783         (LocalVariableReference, ParameterReference, FieldExpr): Implement
31784         LValue interface.
31785
31786         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
31787         interface for generating code, simplifies the code.
31788
31789 2001-09-20  Ravi Pratap  <ravi@ximian.com>
31790
31791         * expression.cs (everywhere): Comment out return statements in ::Resolve
31792         methods to avoid the warnings.
31793
31794 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
31795
31796         * driver.cs (parse): Report error 2001 if we can not open the
31797         source file.
31798
31799         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
31800         not resolve it.
31801
31802         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
31803         object. 
31804
31805         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
31806         otherwise nested blocks end up with the same index.
31807
31808         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
31809
31810         * expression.cs:  Instead of having FIXMEs in the Resolve
31811         functions, throw exceptions so it is obvious that we are facing a
31812         bug. 
31813
31814         * cs-parser.jay (invocation_expression): Pass Location information.
31815
31816         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
31817         Use a basename for those routines because .NET does not like paths
31818         on them. 
31819
31820         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
31821         already defined.
31822
31823 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
31824
31825         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
31826         are loading the correct data types (throws an exception if not).
31827         (TypeManager::InitCoreTypes): Use CoreLookupType
31828
31829         * expression.cs (Unary::ResolveOperator): return the child
31830         expression for expressions which are just +expr.
31831         (Unary::ResolveOperator): Return negative literals for -LITERAL
31832         expressions (otherwise they are Unary {Literal}).
31833         (Invocation::Badness): Take into account `Implicit constant
31834         expression conversions'.
31835
31836         * literal.cs (LongLiteral): Implement long literal class.
31837         (IntLiteral): export the `Value' of the intliteral. 
31838
31839 2001-09-19  Ravi Pratap  <ravi@ximian.com>
31840
31841         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
31842
31843         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
31844         instead of 'Operator'
31845
31846         * expression.cs (Binary::ResolveOperator): Update accordingly.
31847         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
31848         and 'Minus'
31849
31850         * cs-parser.jay (unary_expression): Update to use the new names.
31851
31852         * gen-treedump.cs (GetUnary): Same here.
31853
31854         * expression.cs (Unary::Resolve): Implement.
31855         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
31856         operators are found instead of making noise ;-)
31857         (Unary::ResolveOperator): New method to do precisely the same thing which
31858         Binary::ResolveOperator does for Binary expressions.
31859         (Unary.method, .Arguments): Add.
31860         (Unary::OperName): Implement.   
31861         (Unary::ForceConversion): Copy and Paste !
31862
31863         * class.cs (Operator::Define): Fix a small bug for the case when we have 
31864         a unary operator.
31865
31866         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
31867         for the inbuilt operators. Only overloading works for now ;-)
31868
31869 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
31870
31871         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
31872         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
31873
31874         * expression.cs (This::Emit): Implement. 
31875         (This::Resolve): Implement.
31876         (TypeOf:Resolve): Implement.
31877         (Expression::ResolveSimpleName): Add an implicit this to instance
31878         field references. 
31879         (MemberAccess::Resolve): Deal with Parameters and Fields. 
31880         Bind instance variable to Field expressions.
31881         (FieldExpr::Instance): New field used to track the expression that
31882         represents the object instance.
31883         (FieldExpr::Resolve): Track potential errors from MemberLookup not
31884         binding 
31885         (FieldExpr::Emit): Implement.
31886
31887         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
31888         the last instruction contains a return opcode to avoid generating
31889         the last `ret' instruction (this generates correct code, and it is
31890         nice to pass the peverify output).
31891
31892         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
31893         initializer for static and instance variables.
31894         (Constructor::Emit): Allow initializer to be null in the case of
31895         static constructors.  Only emit initializer for instance
31896         constructors. 
31897
31898         (TypeContainer::FindMembers): Return a null array if there are no
31899         matches.
31900
31901         Also fix the code for the MemberTypes.Method branch, as it was not
31902         scanning that for operators (or tried to access null variables before).
31903
31904         * assign.cs (Assign::Emit): Handle instance and static fields. 
31905
31906         * TODO: Updated.
31907
31908         * driver.cs: Stop compilation if there are parse errors.
31909
31910         * cs-parser.jay (constructor_declaration): Provide default base
31911         initializer for non-static constructors.
31912         (constructor_declarator): Do not provide a default base
31913         initializers if none was specified.
31914         Catch the fact that constructors should not have parameters.
31915
31916         * class.cs: Do not emit parent class initializers for static
31917         constructors, that should be flagged as an error.
31918
31919 2001-09-18  Ravi Pratap  <ravi@ximian.com>
31920
31921         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
31922         Move back code into TypeContainer::Populate.
31923
31924 2001-09-18  Ravi Pratap  <ravi@ximian.com>
31925
31926         * class.cs (TypeContainer::AddConstructor): Fix the check to
31927         compare against Name, not Basename. 
31928         (Operator::OpType): Change Plus and Minus to Add and Subtract.
31929
31930         * cs-parser.jay : Update accordingly.
31931
31932         * class.cs (TypeContainer::FindMembers): For the case where we are searching
31933         for methods, don't forget to look into the operators too.
31934         (RegisterMethodBuilder): Helper method to take care of this for
31935         methods, constructors and operators.
31936         (Operator::Define): Completely revamp.
31937         (Operator.OperatorMethod, MethodName): New fields.
31938         (TypeContainer::Populate): Move the registering of builders into
31939         RegisterMethodBuilder.
31940         (Operator::Emit): Re-write.
31941
31942         * expression.cs (Binary::Emit): Comment out code path to emit method
31943         invocation stuff for the case when we have a user defined operator. I am
31944         just not able to get it right !
31945
31946 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
31947
31948         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
31949         argument. 
31950
31951         (Expression::MemberLookup): Provide a version that allows to
31952         specify the MemberTypes and BindingFlags. 
31953
31954         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
31955         so it was not fetching variable information from outer blocks.
31956
31957         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
31958         Beforefieldinit as it was buggy.
31959
31960         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
31961         that Ravi put here.  
31962
31963         * class.cs (Constructor::Emit): Only emit if block is not null.
31964         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
31965         deal with this by semantically definining it as if the user had
31966         done it.
31967
31968         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
31969         constructors as we now "emit" them at a higher level.
31970
31971         (TypeContainer::DefineDefaultConstructor): Used to define the
31972         default constructors if none was provided.
31973
31974         (ConstructorInitializer): Add methods Resolve and Emit. 
31975
31976         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
31977
31978 2001-09-17  Ravi Pratap  <ravi@ximian.com>
31979
31980         * class.cs (TypeContainer::EmitDefaultConstructor): Register
31981         the default constructor builder with our hashtable for methodbuilders
31982         to methodcores.
31983
31984         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
31985         and argument_count is 0 in which case we have a match.
31986         (Binary::ResolveOperator): More null checking and miscellaneous coding
31987         style cleanup.
31988
31989 2001-09-17  Ravi Pratap  <ravi@ximian.com>
31990
31991         * rootcontext.cs (IsNameSpace): Compare against null.
31992
31993         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
31994
31995         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
31996         and Unary::Operator.
31997
31998         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
31999         accordingly.
32000
32001         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32002         we have overloaded operators.
32003         (Binary::ResolveOperator): Implement the part which does the operator overload
32004         resolution.
32005
32006         * class.cs (Operator::Emit): Implement.
32007         (TypeContainer::Emit): Emit the operators we have too.
32008
32009         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32010         the case when we have a user-defined operator.
32011
32012 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32013
32014         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32015
32016 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32017
32018         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32019         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32020         (Constructor::Emit): Implement.
32021         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32022         if we have no work to do. 
32023         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32024         Emit method.
32025
32026         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32027         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32028
32029         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32030         of parent.parent.
32031
32032 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32033
32034         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32035         in the source.
32036         (Tree::RecordNamespace): Method to do what the name says ;-)
32037         (Tree::Namespaces): Property to get at the namespaces hashtable.
32038
32039         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32040         keep track.
32041
32042         * rootcontext.cs (IsNamespace): Fixed it :-)
32043
32044 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32045
32046         * class.cs (TypeContainer::FindMembers): Add support for
32047         constructors. 
32048         (MethodCore): New class that encapsulates both the shared aspects
32049         of a Constructor and a Method.  
32050         (Method, Constructor): Factored pieces into MethodCore.
32051
32052         * driver.cs: Added --fatal which makes errors throw exceptions.
32053         Load System assembly as well as part of the standard library.
32054
32055         * report.cs: Allow throwing exceptions on errors for debugging.
32056
32057         * modifiers.cs: Do not use `parent', instead use the real type
32058         container to evaluate permission settings.
32059
32060         * class.cs: Put Ravi's patch back in.  He is right, and we will
32061         have to cope with the
32062
32063 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32064
32065         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32066         FamORAssem, not FamANDAssem.
32067
32068 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32069
32070         * driver.cs: Added --parse option that only parses its input files
32071         and terminates.
32072
32073         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32074         incorrect.  IsTopLevel is not used to tell whether an object is
32075         root_types or not (that can be achieved by testing this ==
32076         root_types).  But to see if this is a top-level *class* (not
32077         necessarly our "toplevel" container). 
32078
32079 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32080
32081         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32082         parent instead of a direct call to GetType.
32083
32084 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32085
32086         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32087         Modifiers.TypeAttr. This should just be a call to that method.
32088
32089         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32090         object so that we can determine if we are top-level or not.
32091
32092         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32093         TypeContainer too.
32094
32095         * enum.cs (Enum::Define): Ditto.
32096
32097         * modifiers.cs (FieldAttr): Re-write.
32098
32099         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32100         (TypeContainer::HaveStaticConstructor): New property to provide access
32101         to precisely that info.
32102
32103         * modifiers.cs (MethodAttr): Re-write.
32104         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32105
32106         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32107         of top-level types as claimed.
32108
32109 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32110
32111         * expression.cs (MemberLookup): Fruitless attempt to lookup
32112         constructors.  Maybe I need to emit default constructors?  That
32113         might be it (currently .NET emits this for me automatically).
32114         (Invocation::OverloadResolve): Cope with Arguments == null.
32115         (Invocation::EmitArguments): new function, shared by the new
32116         constructor and us.
32117         (Invocation::Emit): Handle static and instance methods.  Emit
32118         proper call instruction for virtual or non-virtual invocations.
32119         (New::Emit): Implement.
32120         (New::Resolve): Implement.
32121         (MemberAccess:Resolve): Implement.
32122         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32123         to track instances.
32124         (FieldExpr::Resolve): Set type.
32125
32126         * support.cs: Handle empty arguments.
32127                 
32128         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32129         SimpleLookup): Auxiliary routines to help parse a qualifier
32130         identifier.  
32131
32132         Update qualifier_identifier rule.
32133
32134         * codegen.cs: Removed debugging messages.
32135
32136         * class.cs: Make this a global thing, this acts just as a "key" to
32137         objects that we might have around.
32138
32139         (Populate): Only initialize method_builders_to_methods once.
32140
32141         * expression.cs (PropertyExpr): Initialize type from the
32142         PropertyType. 
32143
32144         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32145         Resolve pattern.  Attempt to implicitly convert value to boolean.
32146         Emit code.
32147
32148         * expression.cs: Set the type for the int32/int32 argument case.
32149         (Binary::ResolveOperator): Set the return type to boolean for
32150         comparission operators
32151
32152         * typemanager.cs: Remove debugging print code.
32153
32154         (Invocation::Resolve): resolve type.
32155
32156         * class.cs: Allocate a MemberInfo of the correct size, as the code
32157         elsewhere depends on the test to reflect the correct contents.
32158
32159         (Method::) Keep track of parameters, due to System.Reflection holes
32160
32161         (TypeContainer::Populate): Keep track of MethodBuilders to Method
32162         mapping here.
32163
32164         (TypeContainer::FindMembers): Use ArrayList and then copy an array
32165         of the exact size and return that.
32166
32167         (Class::LookupMethodByBuilder): New function that maps
32168         MethodBuilders to its methods.  Required to locate the information
32169         on methods because System.Reflection bit us again.
32170
32171         * support.cs: New file, contains an interface ParameterData and
32172         two implementations: ReflectionParameters and InternalParameters
32173         used to access Parameter information.  We will need to grow this
32174         as required.
32175
32176         * expression.cs (Invocation::GetParameterData): implement a cache
32177         and a wrapper around the ParameterData creation for methods. 
32178         (Invocation::OverloadResolve): Use new code.
32179
32180 2001-09-13  Ravi Pratap  <ravi@ximian.com>
32181
32182         * class.cs (TypeContainer::EmitField): Remove and move into 
32183         (Field::Define): here and modify accordingly.
32184         (Field.FieldBuilder): New member.
32185         (TypeContainer::Populate): Update accordingly.
32186         (TypeContainer::FindMembers): Implement.
32187
32188 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32189
32190         * statement.cs: (VariableInfo::VariableType): New field to be
32191         initialized with the full type once it is resolved. 
32192
32193 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
32194
32195         * parameter.cs (GetParameterInfo): Use a type cache to compute
32196         things only once, and to reuse this information
32197
32198         * expression.cs (LocalVariableReference::Emit): Implement.
32199         (OpcodeCast::Emit): fix.
32200
32201         (ParameterReference::Resolve): Implement.
32202         (ParameterReference::Emit): Implement.
32203
32204         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
32205         that are expressions need to stay as Expressions.
32206
32207         * typemanager.cs (CSharpName): Returns the C# name of a type if
32208         possible. 
32209
32210         * expression.cs (Expression::ConvertImplicit): New function that
32211         implements implicit type conversions.
32212
32213         (Expression::ImplicitReferenceConversion): Implements implicit
32214         reference conversions.
32215
32216         (EmptyCast): New type for transparent casts.
32217
32218         (OpcodeCast): New type for casts of types that are performed with
32219         a sequence of bytecodes.
32220
32221         (BoxedCast): New type used for casting value types into reference
32222         types.  Emits a box opcode.
32223
32224         (Binary::DoNumericPromotions): Implements numeric promotions of
32225         and computation of the Binary::Type.
32226
32227         (Binary::EmitBranchable): Optimization.
32228
32229         (Binary::Emit): Implement code emission for expressions.
32230
32231         * typemanager.cs (TypeManager): Added two new core types: sbyte
32232         and byte.
32233
32234 2001-09-12  Ravi Pratap  <ravi@ximian.com>
32235
32236         * class.cs (TypeContainer::FindMembers): Method which does exactly
32237         what Type.FindMembers does, only we don't have to use reflection. No
32238         implementation yet.
32239
32240         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
32241         typecontainer objects as we need to get at them.
32242         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
32243
32244         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
32245         typecontainer object.
32246
32247         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
32248         of just a Report object.
32249
32250 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32251
32252         * class.cs (Event::Define): Go back to using the prefixes "add_" and
32253         "remove_"
32254         (TypeContainer::Populate): Now define the delegates of the type too.
32255         (TypeContainer.Delegates): Property to access the list of delegates defined
32256         in the type.
32257
32258         * delegates.cs (Delegate::Define): Implement partially.
32259
32260         * modifiers.cs (TypeAttr): Handle more flags.
32261
32262 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32263
32264         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
32265         and not <=
32266         (Operator::Define): Re-write logic to get types by using the LookupType method
32267         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
32268         (Indexer::Define): Ditto.
32269         (Event::Define): Ditto.
32270         (Property::Define): Ditto.
32271
32272 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32273
32274         * class.cs (TypeContainer::Populate): Now define operators too. 
32275         (TypeContainer.Operators): New property to access the list of operators
32276         in a type.
32277         (Operator.OperatorMethodBuilder): New member to hold the method builder
32278         for the operator we are defining.
32279         (Operator::Define): Implement.
32280
32281 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32282
32283         * class.cs (Event::Define): Make the prefixes of the accessor methods
32284         addOn_ and removeOn_ 
32285
32286         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
32287         of the location being passed in too. Ideally, this should go later since all
32288         error reporting should be done through the Report object.
32289
32290         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
32291         (Populate): Iterate thru the indexers we have and define them too.
32292         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
32293         for the get and set accessors.
32294         (Indexer::Define): Implement.
32295
32296 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
32297
32298         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
32299         my previous implementation, did not work.
32300
32301         * typemanager.cs: Add a couple of missing types (the longs).
32302
32303         * literal.cs: Use TypeManager.bool_type instead of getting it.
32304
32305         * expression.cs (EventExpr): New kind of expressions.
32306         (Expressio::ExprClassFromMemberInfo): finish
32307
32308 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
32309
32310         * assign.cs: Emit stores to static fields differently.
32311
32312 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32313
32314         * Merge in changes and adjust code to tackle conflicts. Backed out my
32315         code in Assign::Resolve ;-) 
32316
32317 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32318
32319         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
32320         instead Report.Error and also pass in the location.
32321         (CSharpParser::Lexer): New readonly property to return the reference
32322         to the Tokenizer object.
32323         (declare_local_variables): Use Report.Error with location instead of plain 
32324         old error.
32325         (CheckDef): Ditto.
32326
32327         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
32328         (Operator.CheckBinaryOperator): Ditto.
32329
32330         * cs-parser.jay (operator_declarator): Update accordingly.
32331
32332         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
32333         (CheckBinaryOperator): Same here.
32334
32335         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
32336         on the name without any prefixes of namespace names etc. This is because we
32337         already might have something already fully qualified like 
32338         'System.Console.WriteLine'
32339
32340         * assign.cs (Resolve): Begin implementation. Stuck ;-)
32341
32342 2001-09-07  Ravi Pratap  <ravi@ximian.com>
32343
32344         * cs-tokenizer.cs (location): Return a string which also contains
32345         the file name.
32346
32347         * expression.cs (ElementAccess): New class for expressions of the
32348         type 'element access.'
32349         (BaseAccess): New class for expressions of the type 'base access.'
32350         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
32351         respectively.
32352
32353         * cs-parser.jay (element_access): Implement action.
32354         (base_access): Implement actions.
32355         (checked_expression, unchecked_expression): Implement.
32356
32357         * cs-parser.jay (local_variable_type): Correct and implement.
32358         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
32359
32360         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
32361
32362         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
32363         name and the specifiers.
32364
32365         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
32366
32367         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
32368         making them all public ;-)
32369
32370         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
32371         class anyways.
32372
32373 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
32374
32375         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
32376         PropertyExprs.
32377         (FieldExpr, PropertyExprs): New resolved expressions.
32378         (SimpleName::MemberStaticCheck): Perform static checks for access
32379         to non-static fields on static methods. Maybe this should be
32380         generalized for MemberAccesses. 
32381         (SimpleName::ResolveSimpleName): More work on simple name
32382         resolution. 
32383
32384         * cs-parser.jay (primary_expression/qualified_identifier): track
32385         the parameter index.
32386
32387         * codegen.cs (CodeGen::Save): Catch save exception, report error.
32388         (EmitContext::EmitBoolExpression): Chain to expression generation
32389         instead of temporary hack.
32390         (::EmitStatementExpression): Put generic expression code generation.
32391
32392         * assign.cs (Assign::Emit): Implement variable assignments to
32393         local variables, parameters and fields.
32394
32395 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
32396
32397         * statement.cs (Block::GetVariableInfo): New method, returns the
32398         VariableInfo for a variable name in a block.
32399         (Block::GetVariableType): Implement in terms of GetVariableInfo
32400
32401         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
32402         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
32403
32404 2001-09-06  Ravi Pratap  <ravi@ximian.com>
32405
32406         * cs-parser.jay (operator_declaration): Continue on my quest : update
32407         to take attributes argument.
32408         (event_declaration): Ditto.
32409         (enum_declaration): Ditto.
32410         (indexer_declaration): Ditto.
32411
32412         * class.cs (Operator::Operator): Update constructor accordingly.
32413         (Event::Event): Ditto.
32414
32415         * delegate.cs (Delegate::Delegate): Same here.
32416
32417         * enum.cs (Enum::Enum): Same here.
32418
32419 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32420
32421         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
32422
32423         * ../tests/cs0658.cs : New file to demonstrate error 0658.
32424
32425         * attribute.cs (Attributes): New class to encapsulate all attributes which were
32426         being passed around as an arraylist.
32427         (Attributes::AddAttribute): Method to add attribute sections.
32428
32429         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
32430         (struct_declaration): Update accordingly.
32431         (constant_declaration): Update.
32432         (field_declaration): Update.
32433         (method_header): Update.
32434         (fixed_parameter): Update.
32435         (parameter_array): Ditto.
32436         (property_declaration): Ditto.
32437         (destructor_declaration): Ditto.
32438
32439         * class.cs (Struct::Struct): Update constructors accordingly.
32440         (Class::Class): Ditto.
32441         (Field::Field): Ditto.
32442         (Method::Method): Ditto.
32443         (Property::Property): Ditto.
32444         (TypeContainer::OptAttribute): update property's return type.
32445
32446         * interface.cs (Interface.opt_attributes): New member.
32447         (Interface::Interface): Update to take the extra Attributes argument.
32448
32449         * parameter.cs (Parameter::Parameter): Ditto.
32450
32451         * constant.cs (Constant::Constant): Ditto.
32452
32453         * interface.cs (InterfaceMemberBase): New OptAttributes field.
32454         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
32455         the attributes as a parameter.
32456         (InterfaceProperty): Update constructor call.
32457         (InterfaceEvent): Ditto.
32458         (InterfaceMethod): Ditto.
32459         (InterfaceIndexer): Ditto.
32460
32461         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
32462         pass the attributes too.
32463         (interface_event_declaration): Ditto.
32464         (interface_property_declaration): Ditto.
32465         (interface_method_declaration): Ditto.
32466         (interface_declaration): Ditto.
32467
32468 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
32469
32470         * class.cs (Method::Define): Track the "static Main" definition to
32471         create an entry point. 
32472
32473         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
32474         EntryPoint if we find it. 
32475
32476         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
32477         (EmitContext::ig): Make this variable public.
32478
32479         * driver.cs: Make the default output file be the first file name
32480         with the .exe extension.  
32481
32482         Detect empty compilations
32483
32484         Handle various kinds of output targets.  Handle --target and
32485         rename -t to --dumper.
32486
32487         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
32488         methods inherited from Expression return now an Expression.  This
32489         will is used during the tree rewriting as we resolve them during
32490         semantic analysis.
32491
32492         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
32493         the spec.  Missing entirely is the information about
32494         accessability of elements of it.
32495
32496         (Expression::ExprClassFromMemberInfo): New constructor for
32497         Expressions that creates a fully initialized Expression based on
32498         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
32499         a Type.
32500
32501         (Invocation::Resolve): Begin implementing resolution of invocations.
32502
32503         * literal.cs (StringLiteral):  Implement Emit.
32504
32505 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32506
32507         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
32508         member.
32509
32510 2001-09-04  Ravi Pratap  <ravi@ximian.com>
32511
32512         * cs-parser.jay (attribute_arguments): Implement actions.
32513         (attribute): Fix bug in production. Implement action.
32514         (attribute_list): Implement.
32515         (attribute_target): Implement.
32516         (attribute_target_specifier, opt_target_specifier): Implement
32517         (CheckAttributeTarget): New method to check if the attribute target
32518         is valid.
32519         (attribute_section): Implement.
32520         (opt_attributes): Implement.
32521
32522         * attribute.cs : New file to handle attributes.
32523         (Attribute): Class to hold attribute info.
32524
32525         * cs-parser.jay (opt_attribute_target_specifier): Remove production
32526         (attribute_section): Modify production to use 2 different rules to 
32527         achieve the same thing. 1 s/r conflict down !
32528         Clean out commented, useless, non-reducing dimension_separator rules.
32529
32530         * class.cs (TypeContainer.attributes): New member to hold list
32531         of attributes for a type.
32532         (Struct::Struct): Modify to take one more argument, the attribute list.
32533         (Class::Class): Ditto.
32534         (Field::Field): Ditto.
32535         (Method::Method): Ditto.
32536         (Property::Property): Ditto.
32537
32538         * cs-parser.jay (struct_declaration): Update constructor call to
32539         pass in the attributes too.
32540         (class_declaration): Ditto.
32541         (constant_declaration): Ditto.
32542         (field_declaration): Ditto.
32543         (method_header): Ditto.
32544         (fixed_parameter): Ditto.
32545         (parameter_array): Ditto.
32546         (property_declaration): Ditto.
32547
32548         * constant.cs (Constant::Constant): Update constructor similarly.
32549         Use System.Collections.
32550
32551         * parameter.cs (Parameter::Parameter): Update as above.
32552
32553 2001-09-02  Ravi Pratap  <ravi@ximian.com>
32554
32555         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
32556         (TypeContainer.delegates): New member to hold list of delegates.
32557
32558         * cs-parser.jay (delegate_declaration): Implement the action correctly 
32559         this time as I seem to be on crack ;-)
32560
32561 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
32562
32563         * rootcontext.cs (RootContext::IsNamespace): new function, used to
32564         tell whether an identifier represents a namespace.
32565
32566         * expression.cs (NamespaceExpr): A namespace expression, used only
32567         temporarly during expression resolution.
32568         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
32569         utility functions to resolve names on expressions.
32570
32571 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
32572
32573         * codegen.cs: Add hook for StatementExpressions. 
32574
32575         * class.cs: Fix inverted test for static flag in methods.
32576
32577 2001-09-02  Ravi Pratap  <ravi@ximian.com>
32578
32579         * class.cs (Operator::CheckUnaryOperator): Correct error number used
32580         to make it coincide with MS' number.
32581         (Operator::CheckBinaryOperator): Ditto.
32582
32583         * ../errors/errors.txt : Remove error numbers added earlier.
32584
32585         * ../errors/cs1019.cs : Test case for error # 1019
32586
32587         * ../errros/cs1020.cs : Test case for error # 1020
32588
32589         * cs-parser.jay : Clean out commented cruft.
32590         (dimension_separators, dimension_separator): Comment out. Ostensibly not
32591         used anywhere - non-reducing rule.
32592         (namespace_declarations): Non-reducing rule - comment out.
32593
32594         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
32595         with TypeContainer::AddEnum.
32596
32597         * delegate.cs : New file for delegate handling classes.
32598         (Delegate): Class for declaring delegates.
32599
32600         * makefile : Update.
32601
32602         * cs-parser.jay (delegate_declaration): Implement.
32603
32604 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
32605
32606         * class.cs (Event::Define): Implement.
32607         (Event.EventBuilder): New member.
32608
32609         * class.cs (TypeContainer::Populate): Update to define all enums and events
32610         we have.
32611         (Events): New property for the events arraylist we hold. Shouldn't we move to using
32612         readonly fields for all these cases ?
32613
32614 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
32615
32616         * class.cs (Property): Revamp to use the convention of making fields readonly.
32617         Accordingly modify code elsewhere.
32618
32619         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
32620         the Define method of the Property class.
32621
32622         * class.cs : Clean up applied patch and update references to variables etc. Fix 
32623         trivial bug.
32624         (TypeContainer::Populate): Update to define all the properties we have. Also
32625         define all enumerations.
32626
32627         * enum.cs (Define): Implement.
32628
32629 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
32630
32631         * cs-parser.jay (overloadable_operator): The semantic value is an
32632         enum of the Operator class.
32633         (operator_declarator): Implement actions.
32634         (operator_declaration): Implement.
32635
32636         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
32637         validity of definitions.
32638         (Operator::CheckBinaryOperator): Static method to check for binary operators
32639         (TypeContainer::AddOperator): New method to add an operator to a type.
32640
32641         * cs-parser.jay (indexer_declaration): Added line to actually call the
32642         AddIndexer method so it gets added ;-)
32643
32644         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
32645         already taken care of by the MS compiler ?  
32646
32647 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
32648
32649         * class.cs (Operator): New class for operator declarations.
32650         (Operator::OpType): Enum for the various operators.
32651
32652 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
32653
32654         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
32655         ostensibly handle this in semantic analysis.
32656
32657         * cs-parser.jay (general_catch_clause): Comment out
32658         (specific_catch_clauses, specific_catch_clause): Ditto.
32659         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
32660         (catch_args, opt_catch_args): New productions.
32661         (catch_clause): Rewrite to use the new productions above
32662         (catch_clauses): Modify accordingly.
32663         (opt_catch_clauses): New production to use in try_statement
32664         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
32665         and re-write the code in the actions to extract the specific and
32666         general catch clauses by being a little smart ;-)
32667
32668         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
32669         Hooray, try and catch statements parse fine !
32670
32671 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
32672
32673         * statement.cs (Block::GetVariableType): Fix logic to extract the type
32674         string from the hashtable of variables.
32675
32676         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
32677         I end up making that mistake ;-)
32678         (catch_clauses): Fixed gross error which made Key and Value of the 
32679         DictionaryEntry the same : $1 !!
32680
32681 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
32682
32683         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
32684
32685         * cs-parser.jay (event_declaration): Correct to remove the semicolon
32686         when the add and remove accessors are specified. 
32687
32688 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
32689
32690         * cs-parser.jay (IndexerDeclaration): New helper class to hold
32691         information about indexer_declarator.
32692         (indexer_declarator): Implement actions.
32693         (parsing_indexer): New local boolean used to keep track of whether
32694         we are parsing indexers or properties. This is necessary because 
32695         implicit_parameters come into picture even for the get accessor in the 
32696         case of an indexer.
32697         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
32698
32699         * class.cs (Indexer): New class for indexer declarations.
32700         (TypeContainer::AddIndexer): New method to add an indexer to a type.
32701         (TypeContainer::indexers): New member to hold list of indexers for the
32702         type.
32703
32704 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
32705
32706         * cs-parser.jay (add_accessor_declaration): Implement action.
32707         (remove_accessor_declaration): Implement action.
32708         (event_accessors_declaration): Implement
32709         (variable_declarators): swap statements for first rule - trivial.
32710
32711         * class.cs (Event): New class to hold information about event
32712         declarations.
32713         (TypeContainer::AddEvent): New method to add an event to a type
32714         (TypeContainer::events): New member to hold list of events.
32715
32716         * cs-parser.jay (event_declaration): Implement actions.
32717
32718 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
32719
32720         * cs-parser.jay (dim_separators): Implement. Make it a string
32721         concatenating all the commas together, just as they appear.
32722         (opt_dim_separators): Modify accordingly
32723         (rank_specifiers): Update accordingly. Basically do the same
32724         thing - instead, collect the brackets here.
32725         (opt_rank_sepcifiers): Modify accordingly.
32726         (array_type): Modify to actually return the complete type string
32727         instead of ignoring the rank_specifiers.
32728         (expression_list): Implement to collect the expressions
32729         (variable_initializer): Implement. We make it a list of expressions
32730         essentially so that we can handle the array_initializer case neatly too.
32731         (variable_initializer_list): Implement.
32732         (array_initializer): Make it a list of variable_initializers
32733         (opt_array_initializer): Modify accordingly.
32734
32735         * expression.cs (New::NType): Add enumeration to help us
32736         keep track of whether we have an object/delegate creation
32737         or an array creation.
32738         (New:NewType, New::Rank, New::Indices, New::Initializers): New
32739         members to hold data about array creation.
32740         (New:New): Modify to update NewType
32741         (New:New): New Overloaded contructor for the array creation
32742         case.
32743
32744         * cs-parser.jay (array_creation_expression): Implement to call
32745         the overloaded New constructor.
32746
32747 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
32748
32749         * class.cs (TypeContainer::Constructors): Return member
32750         constructors instead of returning null.
32751
32752 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
32753
32754         * typemanager.cs (InitCoreTypes): Initialize the various core
32755         types after we have populated the type manager with the user
32756         defined types (this distinction will be important later while
32757         compiling corlib.dll)
32758
32759         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
32760         on Expression Classification.  Now all expressions have a method
32761         `Resolve' and a method `Emit'.
32762
32763         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
32764         generation from working.     Also add some temporary debugging
32765         code. 
32766
32767 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
32768
32769         * codegen.cs: Lots of code generation pieces.  This is only the
32770         beginning, will continue tomorrow with more touches of polish.  We
32771         handle the fundamentals of if, while, do, for, return.  Others are
32772         trickier and I need to start working on invocations soon.
32773
32774         * gen-treedump.cs: Bug fix, use s.Increment here instead of
32775         s.InitStatement. 
32776
32777         * codegen.cs (EmitContext): New struct, used during code
32778         emission to keep a context.   Most of the code generation will be
32779         here. 
32780
32781         * cs-parser.jay: Add embedded blocks to the list of statements of
32782         this block.  So code generation proceeds in a top down fashion.
32783
32784 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
32785
32786         * statement.cs: Add support for multiple child blocks.
32787
32788 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
32789
32790         * codegen.cs (EmitCode): New function, will emit the code for a
32791         Block of code given a TypeContainer and its ILGenerator. 
32792
32793         * statement.cs (Block): Standard public readonly optimization.
32794         (Block::Block constructors): Link children. 
32795         (Block::Child): Child Linker.
32796         (Block::EmitVariables): Emits IL variable declarations.
32797
32798         * class.cs: Drop support for MethodGroups here, delay until
32799         Semantic Analysis.
32800         (Method::): Applied the same simplification that I did before, and
32801         move from Properties to public readonly fields.
32802         (Method::ParameterTypes): Returns the parameter types for the
32803         function, and implements a cache that will be useful later when I
32804         do error checking and the semantic analysis on the methods is
32805         performed.
32806         (Constructor::GetCallingConvention): Renamed from CallingConvetion
32807         and made a method, optional argument tells whether this is a class
32808         or a structure to apply the `has-this' bit.
32809         (Method::GetCallingConvention): Implement, returns the calling
32810         convention. 
32811         (Method::Define): Defines the type, a second pass is performed
32812         later to populate the methods.
32813
32814         (Constructor::ParameterTypes): implement a cache similar to the
32815         one on Method::ParameterTypes, useful later when we do semantic
32816         analysis. 
32817
32818         (TypeContainer::EmitMethod):  New method.  Emits methods.
32819
32820         * expression.cs: Removed MethodGroup class from here.
32821
32822         * parameter.cs (Parameters::GetCallingConvention): new method.
32823
32824 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
32825
32826         * class.cs (TypeContainer::Populate): Drop RootContext from the
32827         argument. 
32828
32829         (Constructor::CallingConvention): Returns the calling convention.
32830         (Constructor::ParameterTypes): Returns the constructor parameter
32831         types. 
32832
32833         (TypeContainer::AddConstructor): Keep track of default constructor
32834         and the default static constructor.
32835
32836         (Constructor::) Another class that starts using `public readonly'
32837         instead of properties. 
32838
32839         (Constructor::IsDefault): Whether this is a default constructor. 
32840
32841         (Field::) use readonly public fields instead of properties also.
32842
32843         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
32844         track of static constructors;  If none is used, turn on
32845         BeforeFieldInit in the TypeAttributes. 
32846
32847         * cs-parser.jay (opt_argument_list): now the return can be null
32848         for the cases where there are no arguments. 
32849
32850         (constructor_declarator): If there is no implicit `base' or
32851         `this', then invoke the default parent constructor. 
32852
32853         * modifiers.cs (MethodAttr): New static function maps a set of
32854         modifiers flags into a MethodAttributes enum
32855         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
32856         MethodAttr, TypeAttr to represent the various mappings where the
32857         modifiers are used.
32858         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
32859
32860 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
32861
32862         * parameter.cs (GetParameterInfo): Fix bug where there would be no
32863         method arguments.
32864
32865         * interface.cs (PopulateIndexer): Implemented the code generator
32866         for interface indexers.
32867
32868 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
32869
32870         * interface.cs (InterfaceMemberBase): Now we track the new status
32871         here.  
32872
32873         (PopulateProperty): Implement property population.  Woohoo!  Got
32874         Methods and Properties going today. 
32875
32876         Removed all the properties for interfaces, and replaced them with
32877         `public readonly' fields. 
32878
32879 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
32880
32881         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
32882         initialize their hashtables/arraylists only when they are needed
32883         instead of doing this always.
32884
32885         * parameter.cs: Handle refs and out parameters.
32886
32887         * cs-parser.jay: Use an ArrayList to construct the arguments
32888         instead of the ParameterCollection, and then cast that to a
32889         Parameter[] array.
32890
32891         * parameter.cs: Drop the use of ParameterCollection and use
32892         instead arrays of Parameters.
32893
32894         (GetParameterInfo): Use the Type, not the Name when resolving
32895         types. 
32896
32897 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
32898
32899         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
32900         and instead use public readonly fields.
32901
32902         * class.cs: Put back walking code for type containers.
32903
32904 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
32905
32906         * class.cs (MakeConstant): Code to define constants.
32907
32908         * rootcontext.cs (LookupType): New function.  Used to locate types 
32909
32910
32911 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
32912
32913         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
32914         this System.Reflection code is.  Kudos to Microsoft
32915
32916         * typemanager.cs: Implement a type cache and avoid loading all
32917         types at boot time.  Wrap in LookupType the internals.  This made
32918         the compiler so much faster.  Wow.  I rule!
32919
32920         * driver.cs: Make sure we always load mscorlib first (for
32921         debugging purposes, nothing really important).
32922
32923         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
32924         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
32925
32926         * rootcontext.cs: Lookup types on their namespace;  Lookup types
32927         on namespaces that have been imported using the `using' keyword.
32928
32929         * class.cs (TypeContainer::TypeAttr): Virtualize.
32930         (Class::TypeAttr): Return attributes suitable for this bad boy.
32931         (Struct::TypeAttr): ditto.
32932         Handle nested classes.
32933         (TypeContainer::) Remove all the type visiting code, it is now
32934         replaced with the rootcontext.cs code
32935
32936         * rootcontext.cs (GetClassBases): Added support for structs. 
32937
32938 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
32939
32940         * interface.cs, statement.cs, class.cs, parameter.cs,
32941         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
32942         Drop use of TypeRefs, and use strings instead.
32943
32944 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
32945
32946         * rootcontext.cs: 
32947
32948         * class.cs (Struct::Struct): set the SEALED flags after
32949         checking the modifiers.
32950         (TypeContainer::TypeAttr): new property, returns the
32951         TypeAttributes for a class.  
32952
32953         * cs-parser.jay (type_list): Oops, list production was creating a
32954         new list of base types.
32955
32956         * rootcontext.cs (StdLib): New property.
32957         (GetInterfaceTypeByName): returns an interface by type name, and
32958         encapsulates error handling here.
32959         (GetInterfaces): simplified.
32960         (ResolveTree): Encapsulated all the tree resolution here.
32961         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
32962         types. 
32963
32964         * driver.cs: Add support for --nostdlib, to avoid loading the
32965         default assemblies.
32966         (Main): Do not put tree resolution here. 
32967
32968         * rootcontext.cs: Beginning of the class resolution.
32969
32970 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
32971
32972         * rootcontext.cs: Provide better error reporting. 
32973
32974         * cs-parser.jay (interface_base): set our $$ to be interfaces.
32975
32976         * rootcontext.cs (CreateInterface): Handle the case where there
32977         are no parent interfaces.
32978
32979         (CloseTypes): Routine to flush types at the end.
32980         (CreateInterface): Track types.
32981         (GetInterfaces): Returns an array of Types from the list of
32982         defined interfaces.
32983
32984         * typemanager.c (AddUserType): Mechanism to track user types (puts
32985         the type on the global type hash, and allows us to close it at the
32986         end). 
32987
32988 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
32989
32990         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
32991         RecordInterface instead.
32992
32993         * cs-parser.jay: Updated to reflect changes above.
32994
32995         * decl.cs (Definition): Keep track of the TypeBuilder type that
32996         represents this type here.  Not sure we will use it in the long
32997         run, but wont hurt for now.
32998
32999         * driver.cs: Smaller changes to accomodate the new code.
33000
33001         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33002         when done. 
33003
33004         * rootcontext.cs (CreateInterface):  New method, used to create
33005         the System.TypeBuilder type for interfaces.
33006         (ResolveInterfaces): new entry point to resolve the interface
33007         hierarchy. 
33008         (CodeGen): Property, used to keep track of the code generator.
33009
33010 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33011
33012         * cs-parser.jay: Add a second production for delegate_declaration
33013         with `VOID'.
33014
33015         (enum_body): Put an opt_comma here instead of putting it on
33016         enum_body or enum_member_declarations so we can handle trailing
33017         commas on enumeration members.  Gets rid of a shift/reduce.
33018
33019         (type_list): Need a COMMA in the middle.
33020
33021         (indexer_declaration): Tell tokenizer to recognize get/set
33022
33023         * Remove old targets.
33024
33025         * Re-add the parser target.
33026
33027 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33028
33029         * cs-parser.jay: Add precendence rules for a number of operators
33030         ot reduce the number of shift/reduce conflicts in the grammar.
33031
33032 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33033
33034         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33035         and put it here.
33036
33037         Get rid of old crufty code.
33038
33039         * rootcontext.cs: Use this to keep track of the parsed
33040         representation and the defined types available to the program. 
33041
33042         * gen-treedump.cs: adjust for new convention.
33043
33044         * type.cs: Split out the type manager, and the assembly builder
33045         from here. 
33046
33047         * typemanager.cs: the type manager will live here now.
33048
33049         * cil-codegen.cs: And the code generator here. 
33050
33051 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33052
33053         * makefile: Fixed up for easy making.
33054
33055 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33056
33057         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33058         the 
33059
33060         (unary_expression): Expand pre_increment_expression and
33061         post_decrement_expression to reduce a shift/reduce.
33062
33063 2001-07-11  Simon Cozens
33064
33065         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33066
33067         Improve allow_keyword_as_indent name.
33068
33069 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33070
33071         * Adjustments for Beta2. 
33072
33073 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33074
33075         * decl.cs: Added `Define' abstract method.
33076         (InTransit): new property, used to catch recursive definitions. 
33077
33078         * interface.cs: Implement `Define'. 
33079
33080         * modifiers.cs: Map Modifiers.constants to
33081         System.Reflection.TypeAttribute flags.
33082
33083         * class.cs: Keep track of types and user-defined types.
33084         (BuilderInit): New method for creating an assembly
33085         (ResolveType): New function to launch the resolution process, only
33086         used by interfaces for now.
33087
33088         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33089         that are inserted into the name space. 
33090
33091 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33092
33093         * ARGH.  I have screwed up my tree so many times due to the use of
33094         rsync rather than using CVS.  Going to fix this at once. 
33095
33096         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33097         load types.
33098
33099 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33100
33101         * Experiment successful: Use System.Type rather that our own
33102         version of Type.  
33103
33104 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33105
33106         * cs-parser.jay: Removed nsAliases from here.
33107
33108         Use new namespaces, handle `using XXX;' 
33109
33110         * namespace.cs: Reimplemented namespace handling, use a recursive
33111         definition of the class.  Now we can keep track of using clauses
33112         and catch invalid using clauses.
33113
33114 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33115
33116         * gen-treedump.cs: Adapted for all the renaming.
33117
33118         * expression.cs (Expression): this class now has a Type property
33119         which returns an expression Type.
33120
33121         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33122         `Type', as this has a different meaning now in the base
33123
33124 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33125
33126         * interface.cs, class.cs: Removed from all the sources the
33127         references to signature computation, as we can not do method
33128         signature computation during the parsing time, as we are not
33129         trying to solve at that point distinguishing:
33130
33131         class X {
33132                 void a (Blah x) {}
33133                 void a (NS.Blah x) {}
33134         }
33135
33136         Which depending on the context might be valid or not, as we do not
33137         know if Blah is the same thing as NS.Blah at that point.
33138
33139         * Redid everything so the code uses TypeRefs now instead of
33140         Types.  TypeRefs are just temporary type placeholders, that need
33141         to be resolved.  They initially have a pointer to a string and the
33142         current scope in which they are used.  This is used later by the
33143         compiler to resolve the reference to an actual Type. 
33144
33145         * DeclSpace is no longer a CIR.Type, and neither are
33146         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33147         are all DeclSpaces, but no Types. 
33148
33149         * type.cs (TypeRefManager): This implements the TypeRef manager,
33150         which keeps track of all the types that need to be resolved after
33151         the parsing has finished. 
33152
33153 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33154
33155         * ARGH.  We are going to have to store `foreach' as a class rather
33156         than resolving it, as we need to verify error 1579 after name
33157         resolution.   *OR* we could keep a flag that says `This request to
33158         IEnumerator comes from a foreach statement' which we can then use
33159         to generate the error.
33160
33161 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
33162
33163         * class.cs (TypeContainer.AddMethod): we now add methods to the
33164         MethodGroup instead of the method hashtable.  
33165
33166         * expression.cs: Add MethodGroup abstraction, which gets us one
33167         step closer to the specification in the way we handle method
33168         declarations.  
33169
33170         * cs-parser.jay (primary_expression): qualified_identifier now
33171         tried to match up an identifier to a local variable reference or
33172         to a parameter reference.
33173
33174         current_local_parameters is now a parser global variable that
33175         points to the current parameters for the block, used during name
33176         lookup.
33177
33178         (property_declaration): Now creates an implicit `value' argument to
33179         the set accessor.
33180
33181 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
33182
33183         * parameter.cs: Do not use `param' arguments as part of the
33184         signature, per the spec.
33185
33186 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
33187
33188         * decl.cs: Base class for classes, structs and interfaces.  This
33189         is the "Declaration Space" 
33190
33191         * cs-parser.jay: Use CheckDef for checking declaration errors
33192         instead of having one on each function.
33193
33194         * class.cs: Factor out some code for handling error handling in
33195         accordance to the "Declarations" section in the "Basic Concepts"
33196         chapter in the ECMA C# spec.
33197
33198         * interface.cs: Make all interface member classes derive from
33199         InterfaceMemberBase.
33200
33201 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
33202
33203         * Many things: all interfaces are parsed and generated in
33204         gen-treedump.  Support for member variables, constructors,
33205         destructors, properties, constants is there.
33206
33207         Beginning of the IL backend, but very little done, just there for
33208         testing purposes. 
33209
33210 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
33211
33212         * cs-parser.jay: Fix labeled statement.
33213
33214         * cs-tokenizer.cs (escape): Escape " and ' always.
33215         ref_line, ref_name: keep track of the line/filename as instructed
33216         by #line by the compiler.
33217         Parse #line.
33218
33219 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
33220
33221         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
33222         to match the values in System.CodeDOM.
33223
33224         Divid renamed to Divide.
33225
33226         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
33227         statements. 
33228         (Statements.set): remove.
33229
33230         * System.CodeDOM/CodeCatchClause.cs: always have a valid
33231         statements. 
33232
33233         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
33234         falseStatements always have valid values. 
33235
33236         * cs-parser.jay: Use System.CodeDOM now.
33237