2001-10-17 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / mcs / ChangeLog
1 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
2
3         * assign.cs (Assign::Resolve): Resolve right hand side first, and
4         then pass this as a hint to ResolveLValue.
5         
6         * expression.cs (FieldExpr): Add Location information
7
8         (FieldExpr::LValueResolve): Report assignment to readonly
9         variable. 
10         
11         (Expression::ExprClassFromMemberInfo): Pass location information.
12
13         (Expression::ResolveLValue): Add new method that resolves an
14         LValue. 
15
16         (Expression::DoResolveLValue): Default invocation calls
17         DoResolve. 
18
19         (Indexers): New class used to keep track of indexers in a given
20         Type. 
21
22         (IStackStore): Renamed from LValue, as it did not really describe
23         what this did.  Also ResolveLValue is gone from this interface and
24         now is part of Expression.
25
26         (ElementAccess): Depending on the element access type
27         
28         * typemanager.cs: Add `indexer_name_type' as a Core type
29         (System.Runtime.CompilerServices.IndexerNameAttribute)
30
31         * statement.cs (Goto): Take a location.
32         
33 2001-10-18  Ravi Pratap  <ravi@ximian.com>
34
35         * delegate.cs (Delegate::VerifyDelegate): New method to verify
36         if two delegates are compatible.
37
38         (NewDelegate::DoResolve): Update to take care of the case when
39         we instantiate a delegate from another delegate.
40
41         * typemanager.cs (FindMembers): Don't even try to look up members
42         of Delegate types for now.
43
44 2001-10-18  Ravi Pratap  <ravi@ximian.com>
45
46         * delegate.cs (NewDelegate): New class to take care of delegate
47         instantiation.
48
49         * expression.cs (New): Split the delegate related code out into 
50         the NewDelegate class.
51
52         * delegate.cs (DelegateInvocation): New class to handle delegate 
53         invocation.
54
55         * expression.cs (Invocation): Split out delegate related code into
56         the DelegateInvocation class.
57
58 2001-10-17  Ravi Pratap  <ravi@ximian.com>
59
60         * expression.cs (New::DoResolve): Implement delegate creation fully
61         and according to the spec.
62
63         (New::DoEmit): Update to handle delegates differently.
64
65         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
66         because of which we were printing out arguments in reverse order !
67
68         * delegate.cs (VerifyMethod): Implement to check if the given method
69         matches the delegate.
70
71         (FullDelegateDesc): Implement.
72
73         (VerifyApplicability): Implement.
74
75         * expression.cs (Invocation::DoResolve): Update to accordingly handle
76         delegate invocations too.
77
78         (Invocation::Emit): Ditto.
79
80         * ../errors/cs1593.cs : Added.
81
82         * ../errors/cs1594.cs : Added.
83
84         * delegate.cs (InstanceExpression, TargetMethod): New properties.
85
86 2001-10-16  Ravi Pratap  <ravi@ximian.com>
87
88         * typemanager.cs (intptr_type): Core type for System.IntPtr
89
90         (InitCoreTypes): Update for the same.
91
92         (iasyncresult_type, asynccallback_type): Ditto.
93
94         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
95         correct.
96
97         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
98         too.
99
100         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
101         the builders for the 4 members of a delegate type :-)
102
103         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
104         type.
105
106         * expression.cs (New::DoResolve): Implement guts for delegate creation.
107
108         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
109
110 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
111
112         * statement.cs (Break::Emit): Implement.   
113         (Continue::Emit): Implement.
114
115         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
116         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
117         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
118         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
119         end loop
120         
121         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
122         properties that track the label for the current loop (begin of the
123         loop and end of the loop).
124
125 2001-10-15  Ravi Pratap  <ravi@ximian.com>
126
127         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
128         use of emitting anything at all.
129
130         * class.cs, rootcontext.cs : Get rid of calls to the same.
131
132         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
133
134         (Populate): Define the constructor correctly and set the implementation
135         attributes.
136
137         * typemanager.cs (delegate_types): New hashtable to hold delegates that
138         have been defined.
139
140         (AddDelegateType): Implement.
141
142         (IsDelegateType): Implement helper method.
143
144         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
145
146         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
147         and accordingly handle it.
148
149         * delegate.cs (Populate): Take TypeContainer argument.
150         Implement bits to define the Invoke method. However, I still haven't figured out
151         how to take care of the native int bit :-(
152
153         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
154         Qualify the name of the delegate, not its return type !
155
156         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
157         conversion.
158
159         (StandardConversionExists): Checking for array types turns out to be recursive.
160
161         (ConvertReferenceExplicit): Implement array conversion.
162
163         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
164         
165 2001-10-12  Ravi Pratap  <ravi@ximian.com>
166
167         * cs-parser.jay (delegate_declaration): Store the fully qualified
168         name as it is a type declaration.
169
170         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
171         readonly.
172
173         (DefineDelegate): Renamed from Define. Does the same thing essentially,
174         as TypeContainer::DefineType.
175
176         (Populate): Method in which all the definition of the various methods (Invoke)
177         etc is done.
178
179         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
180         see.
181         
182         (CloseDelegate): Finally creates the delegate.
183
184         * class.cs (TypeContainer::DefineType): Update to define delegates.
185         (Populate, Emit and CloseType): Do the same thing here too.
186
187         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
188         delegates in all these operations.
189
190 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
191
192         * expression.cs: LocalTemporary: a new expression used to
193         reference a temporary that has been created.
194
195         * assign.cs: Handle PropertyAccess back here, so that we can
196         provide the proper semantic access to properties.
197
198         * expression.cs (Expression::ConvertReferenceExplicit): Implement
199         a few more explicit conversions. 
200
201         * modifiers.cs: `NEW' modifier maps to HideBySig.
202
203         * expression.cs (PropertyExpr): Make this into an
204         ExpressionStatement, and support the EmitStatement code path. 
205
206         Perform get/set error checking, clean up the interface.
207
208         * assign.cs: recognize PropertyExprs as targets, and if so, turn
209         them into toplevel access objects.
210
211 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
212
213         * expression.cs: PropertyExpr::PropertyExpr: use work around the
214         SRE.
215
216         * typemanager.cs: Keep track here of our PropertyBuilders again to
217         work around lameness in SRE.
218
219 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
220
221         * expression.cs (LValue::LValueResolve): New method in the
222         interface, used to perform a second resolution pass for LValues. 
223         
224         (This::DoResolve): Catch the use of this in static methods.
225
226         (This::LValueResolve): Implement.
227
228         (This::Store): Remove warning, assigning to `this' in structures
229         is 
230
231         (Invocation::Emit): Deal with invocation of
232         methods on value types.  We need to pass the address to structure
233         methods rather than the object itself.  (The equivalent code to
234         emit "this" for structures leaves the entire structure on the
235         stack instead of a pointer to it). 
236
237         (ParameterReference::DoResolve): Compute the real index for the
238         argument based on whether the method takes or not a `this' pointer
239         (ie, the method is static).
240
241         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
242         value types returned from functions when we need to invoke a
243         method on the sturcture.
244         
245
246 2001-10-11  Ravi Pratap  <ravi@ximian.com>
247
248         * class.cs (TypeContainer::DefineType): Method to actually do the business of
249         defining the type in the Modulebuilder or Typebuilder. This is to take
250         care of nested types which need to be defined on the TypeBuilder using
251         DefineNestedMethod.
252
253         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
254         methods in RootContext, only ported to be part of TypeContainer.
255
256         (TypeContainer::GetInterfaceOrClass): Ditto.
257
258         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
259
260         * interface.cs (Interface::DefineInterface): New method. Does exactly
261         what RootContext.CreateInterface did earlier, only it takes care of nested types 
262         too.
263
264         (Interface::GetInterfaces): Move from RootContext here and port.
265
266         (Interface::GetInterfaceByName): Same here.
267
268         * rootcontext.cs (ResolveTree): Re-write.
269
270         (PopulateTypes): Re-write.
271
272         * class.cs (TypeContainer::Populate): Populate nested types too.
273         (TypeContainer::Emit): Emit nested members too.
274
275         * typemanager.cs (AddUserType): Do not make use of the FullName property,
276         instead just use the name argument passed in as it is already fully
277         qualified.
278
279         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
280         to TypeContainer mapping to see if a type is user-defined.
281
282         * class.cs (TypeContainer::CloseType): Implement. 
283
284         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
285         the default constructor.
286         
287         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
288         twice.
289
290         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
291
292         * interface.cs (CloseType): Create the type here.
293         
294         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
295         the hierarchy.
296
297         Remove all the methods which are now in TypeContainer.
298
299 2001-10-10  Ravi Pratap  <ravi@ximian.com>
300
301         * delegate.cs (Define): Re-write bits to define the delegate
302         correctly.
303
304 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
305
306         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
307
308         * expression.cs (ImplicitReferenceConversion): handle null as well
309         as a source to convert to any reference type.
310
311         * statement.cs (Return): Perform any implicit conversions to
312         expected return type.  
313
314         Validate use of return statement.  
315
316         * codegen.cs (EmitContext): Pass the expected return type here.
317
318         * class.cs (Method, Constructor, Property): Pass expected return
319         type to EmitContext.
320
321 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
322
323         * expression.cs: Make DoResolve take an EmitContext instead of a
324         TypeContainer.
325
326         Replaced `l' and `location' for `loc', for consistency.
327         
328         (Error, Warning): Remove unneeded Tc argument.
329
330         * assign.cs, literal.cs, constant.cs: Update to new calling
331         convention. 
332         
333         * codegen.cs: EmitContext now contains a flag indicating whether
334         code is being generated in a static method or not.
335
336         * cs-parser.jay: DecomposeQI, new function that replaces the old
337         QualifiedIdentifier.  Now we always decompose the assembled
338         strings from qualified_identifier productions into a group of
339         memberaccesses.
340
341 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
342
343         * rootcontext.cs: Deal with field-less struct types correctly now
344         by passing the size option to Define Type.
345
346         * class.cs: Removed hack that created one static field. 
347
348 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
349
350         * statement.cs: Moved most of the code generation here. 
351
352 2001-10-09  Ravi Pratap  <ravi@ximian.com>
353
354         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
355         seem very right.
356
357         (ElementAccess): Remove useless bits for now - keep checks as the spec
358         says.
359
360 2001-10-08  Ravi Pratap  <ravi@ximian.com>
361
362         * expression.cs (ElementAccess::DoResolve): Remove my crap code
363         and start performing checks according to the spec.
364
365 2001-10-07  Ravi Pratap  <ravi@ximian.com>
366
367         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
368         rank_specifiers instead.
369
370         (rank_specifiers): Change the order in which the rank specifiers are stored
371
372         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
373
374         * expression.cs (ElementAccess): Implement the LValue interface too.
375         
376 2001-10-06  Ravi Pratap  <ravi@ximian.com>
377         
378         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
379         except that user defined conversions are not included.
380
381         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
382         perform the conversion of the return type, if necessary.
383
384         (New::DoResolve): Check whether we are creating an array or an object
385         and accordingly do the needful.
386
387         (New::Emit): Same here.
388
389         (New::DoResolve): Implement guts of array creation.
390
391         (New::FormLookupType): Helper function.
392
393 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
394
395         * codegen.cs: Removed most of the code generation here, and move the
396         corresponding code generation bits to the statement classes. 
397
398         Added support for try/catch/finalize and throw.
399         
400         * cs-parser.jay: Added support for try/catch/finalize.
401
402         * class.cs: Catch static methods having the flags override,
403         virtual or abstract.
404
405         * expression.cs (UserCast): This user cast was not really doing
406         what it was supposed to do.  Which is to be born in fully resolved
407         state.  Parts of the resolution were being performed at Emit time! 
408
409         Fixed this code.
410
411 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
412
413         * expression.cs: Implicity convert the result from UserCast.
414
415 2001-10-05  Ravi Pratap  <ravi@ximian.com>
416
417         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
418         prevented it from working correctly. 
419
420         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
421         merely ConvertImplicit.
422
423 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
424
425         * typemanager.cs: Make the LookupTypeContainer function static,
426         and not per-instance.  
427
428         * class.cs: Make static FindMembers (the one that takes a Type
429         argument). 
430
431         * codegen.cs: Add EmitForeach here.
432
433         * cs-parser.jay: Make foreach a toplevel object instead of the
434         inline expansion, as we need to perform semantic analysis on it. 
435
436 2001-10-05  Ravi Pratap  <ravi@ximian.com>
437
438         * expression.cs (Expression::ImplicitUserConversion): Rename to
439         UserDefinedConversion.
440
441         (Expression::UserDefinedConversion): Take an extra argument specifying 
442         whether we look for explicit user conversions too.
443
444         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
445
446         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
447
448         (ExplicitUserConversion): Make it a call to UserDefinedConversion
449         with the appropriate arguments.
450
451         * cs-parser.jay (cast_expression): Record location too.
452
453         * expression.cs (Cast): Record location info.
454
455         (Expression::ConvertExplicit): Take location argument.
456
457         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
458         to determine if we are doing explicit conversions.
459
460         (UserCast::Emit): Update accordingly.
461
462         (Expression::ConvertExplicit): Report an error if everything fails.
463
464         * ../errors/cs0030.cs : Add.
465
466 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
467
468         * modifiers.cs: If the ABSTRACT keyword is present, also set the
469         virtual and newslot bits. 
470
471         * class.cs (TypeContainer::RegisterRequiredImplementations):
472         Record methods we need.
473
474         (TypeContainer::MakeKey): Helper function to make keys for
475         MethodBases, since the Methodbase key is useless.
476
477         (TypeContainer::Populate): Call RegisterRequiredImplementations
478         before defining the methods.   
479
480         Create a mapping for method_builders_to_methods ahead of time
481         instead of inside a tight loop.
482
483         (::RequireMethods):  Accept an object as the data to set into the
484         hashtable so we can report interface vs abstract method mismatch.
485
486 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
487
488         * report.cs: Make all of it static.
489
490         * rootcontext.cs: Drop object_type and value_type computations, as
491         we have those in the TypeManager anyways.
492
493         Drop report instance variable too, now it is a global.
494
495         * driver.cs: Use try/catch on command line handling.
496
497         Add --probe option to debug the error reporting system with a test
498         suite. 
499
500         * report.cs: Add support for exiting program when a probe
501         condition is reached.
502
503 2001-10-03  Ravi Pratap  <ravi@ximian.com>
504
505         * expression.cs (Binary::DoNumericPromotions): Fix the case when
506         we do a forcible conversion regardless of type, to check if 
507         ForceConversion returns a null.
508
509         (Binary::error19): Use location to report error.
510
511         (Unary::error23): Use location here too.
512
513         * ../errors/cs0019.cs : Check in.
514
515         * ../errors/cs0023.cs : Check in.
516
517         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
518         case of a non-null MethodInfo object with a length of 0 !
519
520         (Binary::ResolveOperator): Flag error if overload resolution fails to find
521         an applicable member - according to the spec :-)
522         Also fix logic to find members in base types.
523
524         (Unary::ResolveOperator): Same here.
525
526         (Unary::report23): Change name to error23 and make first argument a TypeContainer
527         as I was getting thoroughly confused between this and error19 :-)
528         
529         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
530         (::FindMostEncompassedType): Implement.
531         (::FindMostEncompassingType): Implement.
532         (::StandardConversionExists): Implement.
533
534         (UserImplicitCast): Re-vamp. We now need info about most specific
535         source and target types so that we can do the necessary conversions.
536
537         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
538         mathematical union with no duplicates.
539
540 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
541
542         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
543         in order from base classes to child classes, so that we can in
544         child classes look up in our parent for method names and
545         attributes (required for handling abstract, virtual, new, override
546         constructs: we need to instrospect our base class, and if we dont
547         populate the classes in order, the introspection might be
548         incorrect.  For example, a method could query its parent before
549         the parent has any methods and would determine that the parent has
550         no abstract methods (while it could have had them)).
551
552         (RootContext::CreateType): Record the order in which we define the
553         classes.
554
555 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
556
557         * class.cs (TypeContainer::Populate): Also method definitions can
558         fail now, keep track of this.
559
560         (TypeContainer::FindMembers): Implement support for
561         DeclaredOnly/noDeclaredOnly flag.
562
563         (Constructor::Emit) Return the ConstructorBuilder.
564
565         (Method::Emit) Return the MethodBuilder. 
566         Check for abstract or virtual methods to be public.
567
568         * rootcontext.cs (RootContext::CreateType): Register all the
569         abstract methods required for the class to be complete and the
570         interface methods that must be implemented. 
571
572         * cs-parser.jay: Report error 501 (method requires body if it is
573         not marked abstract or extern).
574
575         * expression.cs (TypeOf::Emit): Implement.
576
577         * typemanager.cs: runtime_handle_type, new global type.
578
579         * class.cs (Property::Emit): Generate code for properties.
580
581 2001-10-02  Ravi Pratap  <ravi@ximian.com>
582
583         * expression.cs (Unary::ResolveOperator): Find operators on base type
584         too - we now conform exactly to the spec.
585
586         (Binary::ResolveOperator): Same here.
587
588         * class.cs (Operator::Define): Fix minor quirk in the tests.
589
590         * ../errors/cs0215.cs : Added.
591
592         * ../errors/cs0556.cs : Added.
593
594         * ../errors/cs0555.cs : Added.
595
596 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
597
598         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
599         single integer which is really efficient
600
601 2001-10-01  Ravi Pratap  <ravi@ximian.com>
602
603         *  expression.cs (Expression::ImplicitUserConversion): Use location
604         even in the case when we are examining True operators.
605  
606         * class.cs (Operator::Define): Perform extensive checks to conform
607         with the rules for operator overloading in the spec.
608
609         * expression.cs (Expression::ImplicitReferenceConversion): Implement
610         some of the other conversions mentioned in the spec.
611
612         * typemanager.cs (array_type): New static member for the System.Array built-in
613         type.
614
615         (cloneable_interface): For System.ICloneable interface.
616
617         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
618         we start resolving the tree and populating types.
619
620         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
621  
622 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
623
624         * expression.cs (Expression::ExprClassFromMemberInfo,
625         Expression::Literalize): Create literal expressions from
626         FieldInfos which are literals.
627
628         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
629         type casts, because they were wrong.  The test suite in tests
630         caught these ones.
631
632         (ImplicitNumericConversion): ushort to ulong requires a widening
633         cast. 
634
635         Int32 constant to long requires widening cast as well.
636
637         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
638         for integers because the type on the stack is not i4.
639
640 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
641
642         * expression.cs (report118): require location argument. 
643
644         * parameter.cs: Do not dereference potential null value.
645
646         * class.cs: Catch methods that lack the `new' keyword when
647         overriding a name.  Report warnings when `new' is used without
648         anything being there to override.
649
650         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
651
652         * class.cs: Only add constructor to hashtable if it is non-null
653         (as now constructors can fail on define).
654
655         (TypeManager, Class, Struct): Take location arguments.
656
657         Catch field instance initialization in structs as errors.
658
659         accepting_filter: a new filter for FindMembers that is static so
660         that we dont create an instance per invocation.
661
662         (Constructor::Define): Catch errors where a struct constructor is
663         parameterless 
664
665         * cs-parser.jay: Pass location information for various new
666         constructs. 
667         
668         * delegate.cs (Delegate): take a location argument.
669
670         * driver.cs: Do not call EmitCode if there were problesm in the
671         Definition of the types, as many Builders wont be there. 
672
673         * decl.cs (Decl::Decl): Require a location argument.
674
675         * cs-tokenizer.cs: Handle properly hex constants that can not fit
676         into integers, and find the most appropiate integer for it.
677
678         * literal.cs: Implement ULongLiteral.
679
680         * rootcontext.cs: Provide better information about the location of
681         failure when CreateType fails.
682         
683 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
684
685         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
686         as well.
687
688         * expression.cs (Binary::CheckShiftArguments): Add missing type
689         computation.
690         (Binary::ResolveOperator): Add type to the logical and and logical
691         or, Bitwise And/Or and Exclusive Or code paths, it was missing
692         before.
693
694         (Binary::DoNumericPromotions): In the case where either argument
695         is ulong (and most signed types combined with ulong cause an
696         error) perform implicit integer constant conversions as well.
697
698 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
699
700         * expression.cs (UserImplicitCast): Method should always be
701         non-null. 
702         (Invocation::BetterConversion): Simplified test for IntLiteral.
703
704         (Expression::ImplicitNumericConversion): Split this routine out.
705         Put the code that performs implicit constant integer conversions
706         here. 
707
708         (Expression::Resolve): Become a wrapper around DoResolve so we can
709         check eclass and type being set after resolve.
710
711         (Invocation::Badness): Remove this dead function
712
713         (Binary::ResolveOperator): Do not compute the expensive argumnets
714         unless we have a union for it.
715
716         (Probe::Emit): Is needs to do an isinst and then
717         compare against null.
718
719         (::CanConvert): Added Location argument.  If the Location argument
720         is null (Location.Null), then we do not report errors.  This is
721         used by the `probe' mechanism of the Explicit conversion.  We do
722         not want to generate an error for something that the user
723         explicitly requested to be casted.  But the pipeline for an
724         explicit cast first tests for potential implicit casts.
725
726         So for now, if the Location is null, it means `Probe only' to
727         avoid adding another argument.   Might have to revise this
728         strategy later.
729
730         (ClassCast): New class used to type cast objects into arbitrary
731         classes (used in Explicit Reference Conversions).
732
733         Implement `as' as well.
734
735         Reverted all the patches from Ravi below: they were broken:
736
737                 * The use of `level' as a mechanism to stop recursive
738                   invocations is wrong.  That was there just to catch the
739                   bug with a strack trace but not as a way of addressing
740                   the problem.
741
742                   To fix the problem we have to *understand* what is going
743                   on and the interactions and come up with a plan, not
744                   just get things going.
745
746                 * The use of the type conversion cache that I proposed
747                   last night had an open topic: How does this work across
748                   protection domains.  A user defined conversion might not
749                   be public in the location where we are applying the
750                   conversion, a different conversion might be selected
751                   (ie, private A->B (better) but public B->A (worse),
752                   inside A, A->B applies, but outside it, B->A will
753                   apply).
754
755                 * On top of that (ie, even if the above is solved),
756                   conversions in a cache need to be abstract.  Ie, `To
757                   convert from an Int to a Short use an OpcodeCast', not
758                   `To convert from an Int to a Short use the OpcodeCast on
759                   the variable 5' (which is what this patch was doing).
760         
761 2001-09-28  Ravi Pratap  <ravi@ximian.com>
762
763         * expression.cs (Invocation::ConversionExists): Re-write to use
764         the conversion cache
765         
766         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
767         cache all conversions done, not just user-defined ones.
768
769         (Invocation::BetterConversion): The real culprit. Use ConversionExists
770         to determine if a conversion exists instead of acutually trying to 
771         perform the conversion. It's faster too.
772
773         (Expression::ConvertExplicit): Modify to use ConversionExists to check
774         and only then attempt the implicit conversion.
775
776 2001-09-28  Ravi Pratap  <ravi@ximian.com>
777
778         * expression.cs (ConvertImplicit): Use a cache for conversions
779         already found. Check level of recursion and bail out if necessary.
780         
781 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
782
783         * typemanager.cs (string_concat_string_string, string_concat_object_object):
784         Export standard methods that we expect for string operations.
785         
786         * statement.cs (Block::UsageWarning): Track usage of variables and
787         report the errors for not used variables.
788
789         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
790         operator. 
791
792 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
793
794         * codegen.cs: remove unnneded code 
795
796         * expression.cs: Removed BuiltinTypeAccess class
797
798         Fix the order in which implicit conversions are
799         done.  
800
801         The previous fixed dropped support for boxed conversions (adding a
802         test to the test suite now)
803
804         (UserImplicitCast::CanConvert): Remove test for source being null,
805         that code is broken.  We should not feed a null to begin with, if
806         we do, then we should track the bug where the problem originates
807         and not try to cover it up here.
808
809         Return a resolved expression of type UserImplicitCast on success
810         rather than true/false.  Ravi: this is what I was talking about,
811         the pattern is to use a static method as a "constructor" for
812         objects. 
813
814         Also, do not create arguments until the very last minute,
815         otherwise we always create the arguments even for lookups that
816         will never be performed. 
817
818         (UserImplicitCast::Resolve): Eliminate, objects of type
819         UserImplicitCast are born in a fully resolved state. 
820         
821         * typemanager.cs (InitCoreTypes): Init also value_type
822         (System.ValueType). 
823
824         * expression.cs (Cast::Resolve): First resolve the child expression.
825
826         (LValue): Add new method AddressOf to be used by
827         the `&' operator.  
828
829         Change the argument of Store to take an EmitContext instead of an
830         ILGenerator, because things like FieldExpr need to be able to call
831         their children expression to generate the instance code. 
832
833         (Expression::Error, Expression::Warning): Sugar functions for
834         reporting errors.
835
836         (Expression::MemberLookup): Accept a TypeContainer instead of a
837         Report as the first argument.
838
839         (Expression::ResolvePrimary): Killed.  I still want to improve
840         this as currently the code is just not right.
841
842         (Expression::ResolveMemberAccess): Simplify, but it is still
843         wrong. 
844
845         (Unary::Resolve): Catch errors in AddressOf operators.
846
847         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
848         index to a byte for the short-version, or the compiler will choose
849         the wrong Emit call, which generates the wrong data.
850
851         (ParameterReference::Emit, ::Store): same.
852
853         (FieldExpr::AddressOf): Implement.
854         
855         * typemanager.cs: TypeManager: made public variable instead of
856         property.
857         
858         * driver.cs: document --fatal.
859
860         * report.cs (ErrorMessage, WarningMessage): new names for the old
861         Error and Warning classes.
862
863         * cs-parser.jay (member_access): Turn built-in access to types
864         into a normal simplename
865
866 2001-09-27  Ravi Pratap  <ravi@ximian.com>
867
868         * expression.cs (Invocation::BetterConversion): Fix to cope
869         with q being null, since this was introducing a bug.
870
871         * expression.cs (ConvertImplicit): Do built-in conversions first.
872
873 2001-09-27  Ravi Pratap  <ravi@ximian.com>
874
875         * expression.cs (UserImplicitCast::Resolve): Fix bug.
876
877 2001-09-27  Ravi Pratap  <ravi@ximian.com>
878
879         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
880         I had introduced long ago (what's new ?).
881
882         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
883         the work of all the checking. 
884         (ConvertImplicit): Call CanConvert and only then create object if necessary.
885         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
886
887         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
888         that is the right way. 
889
890         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
891         overloading resolution. Use everywhere instead of cutting and pasting code.
892
893         (Binary::ResolveOperator): Use MakeUnionSet.
894
895         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
896         we have to convert to bool types. Not complete yet.
897         
898 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
899
900         * typemanager.cs (TypeManager::CSharpName): support ushort.
901
902         * expression.cs (Expression::TryImplicitIntConversion): Attempts
903         to provide an expression that performsn an implicit constant int
904         conversion (section 6.1.6).
905         (Expression::ConvertImplicitRequired): Reworked to include
906         implicit constant expression conversions.
907
908         (Expression::ConvertNumericExplicit): Finished.
909
910         (Invocation::Emit): If InstanceExpression is null, then it means
911         that we perform a call on this.
912         
913 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
914
915         * expression.cs (Unary::Emit): Remove some dead code.
916         (Probe): Implement Resolve and Emit for `is'.
917         (Expression::ConvertImplicitRequired): Attempt to do constant
918         expression conversions here.  Maybe should be moved to
919         ConvertImplicit, but I am not sure.
920         (Expression::ImplicitLongConstantConversionPossible,
921         Expression::ImplicitIntConstantConversionPossible): New functions
922         that tell whether is it possible to apply an implicit constant
923         expression conversion.
924
925         (ConvertNumericExplicit): Started work on explicit numeric
926         conversions.
927
928         * cs-parser.jay: Update operator constants.
929
930         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
931         (Parameters::GetSignature): Hook up VerifyArgs here.
932         (Parameters::VerifyArgs): Verifies that no two arguments have the
933         same name. 
934
935         * class.cs (Operator): Update the operator names to reflect the
936         ones that the spec expects (as we are just stringizing the
937         operator names).
938         
939         * expression.cs (Unary::ResolveOperator): Fix bug: Use
940         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
941         previous usage did only work for our methods.
942         (Expression::ConvertImplicit): Handle decimal implicit numeric
943         conversions as well.
944         (Expression::InternalTypeConstructor): Used to invoke constructors
945         on internal types for default promotions.
946
947         (Unary::Emit): Implement special handling for the pre/post
948         increment/decrement for overloaded operators, as they need to have
949         the same semantics as the other operators.
950
951         (Binary::ResolveOperator): ditto.
952         (Invocation::ConversionExists): ditto.
953         (UserImplicitCast::Resolve): ditto.
954         
955 2001-09-26  Ravi Pratap  <ravi@ximian.com>
956
957         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
958         operator, return after emitting body. Regression tests pass again !
959
960         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
961         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
962         (Invocation::OverloadResolve): Ditto.
963         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
964
965         * everywhere : update calls to the above methods accordingly.
966
967 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
968
969         * assign.cs (Assign): Make it inherit from ExpressionStatement.
970
971         * expression.cs (ExpressionStatement): New base class used for
972         expressions that can appear in statements, so that we can provide
973         an alternate path to generate expression that do not leave a value
974         on the stack.
975
976         (Expression::Emit, and all the derivatives): We no longer return
977         whether a value is left on the stack or not.  Every expression
978         after being emitted leaves a single value on the stack.
979
980         * codegen.cs (EmitContext::EmitStatementExpression): Use the
981         facilties of ExpressionStatement if possible.
982
983         * cs-parser.jay: Update statement_expression.
984
985 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
986
987         * driver.cs: Change the wording of message
988
989 2001-09-25  Ravi Pratap  <ravi@ximian.com>
990
991         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
992         the type of the expression to the return type of the method if
993         we have an overloaded operator match ! The regression tests pass again !
994         (Unary::ResolveOperator): Ditto.
995
996         * expression.cs (Invocation::ConversionExists): Correct the member lookup
997         to find "op_Implicit", not "implicit" ;-)
998         (UserImplicitCast): New class to take care of user-defined implicit conversions.
999         (ConvertImplicit, ForceConversion): Take TypeContainer argument
1000
1001         * everywhere : Correct calls to the above accordingly.
1002
1003         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
1004         (ConvertImplicit): Do user-defined conversion if it exists.
1005
1006 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
1007
1008         * assign.cs: track location.
1009         (Resolve): Use implicit conversions on assignment.
1010
1011         * literal.cs: Oops.  Not good, Emit of short access values should
1012         pass (Bytes) or the wrong argument will be selected.
1013
1014         * expression.cs (Unary::Emit): Emit code for -expr.
1015         
1016         (Unary::ResolveOperator): Handle `Substract' for non-constants
1017         (substract from zero from the non-constants).
1018         Deal with Doubles as well. 
1019         
1020         (Expression::ConvertImplicitRequired): New routine that reports an
1021         error if no implicit conversion exists. 
1022
1023         (Invocation::OverloadResolve): Store the converted implicit
1024         expressions if we make them
1025         
1026 2001-09-24  Ravi Pratap  <ravi@ximian.com>
1027
1028         * class.cs (ConstructorInitializer): Take a Location argument.
1029         (ConstructorBaseInitializer): Same here.
1030         (ConstructorThisInitializer): Same here.
1031
1032         * cs-parser.jay : Update all calls accordingly.
1033
1034         * expression.cs (Unary, Binary, New): Take location argument.
1035         Update accordingly everywhere.
1036
1037         * cs-parser.jay : Update all calls to the above to take a location
1038         argument.
1039
1040         * class.cs : Ditto.
1041
1042 2001-09-24  Ravi Pratap  <ravi@ximian.com>
1043
1044         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
1045         (Invocation::BetterConversion): Same here
1046         (Invocation::ConversionExists): Ditto.
1047
1048         (Invocation::ConversionExists): Implement.
1049
1050 2001-09-22  Ravi Pratap  <ravi@ximian.com>
1051
1052         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
1053         Also take an additional TypeContainer argument.
1054
1055         * All over : Pass in TypeContainer as argument to OverloadResolve.
1056
1057         * typemanager.cs (CSharpName): Update to check for the string type and return
1058         that too.
1059
1060         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
1061         a given method.
1062         
1063 2001-09-21  Ravi Pratap  <ravi@ximian.com>
1064
1065         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
1066         (Invocation::BetterFunction): Implement.
1067         (Invocation::BetterConversion): Implement.
1068         (Invocation::ConversionExists): Skeleton, no implementation yet.
1069
1070         Okay, things work fine !
1071
1072 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
1073
1074         * typemanager.cs: declare and load enum_type, delegate_type and
1075         void_type. 
1076
1077         * expression.cs (Expression::Emit): Now emit returns a value that
1078         tells whether a value is left on the stack or not.  This strategy
1079         might be reveted tomorrow with a mechanism that would address
1080         multiple assignments.
1081         (Expression::report118): Utility routine to report mismatches on
1082         the ExprClass.
1083
1084         (Unary::Report23): Report impossible type/operator combination
1085         utility function.
1086
1087         (Unary::IsIncrementableNumber): Whether the type can be
1088         incremented or decremented with add.
1089         (Unary::ResolveOperator): Also allow enumerations to be bitwise
1090         complemented. 
1091         (Unary::ResolveOperator): Implement ++, !, ~, ++ and --.
1092
1093         (Invocation::Emit): Deal with new Emit convetion.
1094         
1095         * All Expression derivatives: Updated their Emit method to return
1096         whether they leave values on the stack or not.
1097         
1098         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
1099         stack for expressions that are statements. 
1100
1101 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
1102
1103         * expression.cs (LValue): New interface.  Must be implemented by
1104         LValue objects.
1105         (LocalVariableReference, ParameterReference, FieldExpr): Implement
1106         LValue interface.
1107         
1108         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
1109         interface for generating code, simplifies the code.
1110
1111 2001-09-20  Ravi Pratap  <ravi@ximian.com>
1112
1113         * expression.cs (everywhere): Comment out return statements in ::Resolve
1114         methods to avoid the warnings.
1115
1116 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
1117
1118         * driver.cs (parse): Report error 2001 if we can not open the
1119         source file.
1120
1121         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
1122         not resolve it.
1123
1124         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
1125         object. 
1126
1127         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
1128         otherwise nested blocks end up with the same index.
1129
1130         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
1131
1132         * expression.cs:  Instead of having FIXMEs in the Resolve
1133         functions, throw exceptions so it is obvious that we are facing a
1134         bug. 
1135
1136         * cs-parser.jay (invocation_expression): Pass Location information.
1137
1138         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
1139         Use a basename for those routines because .NET does not like paths
1140         on them. 
1141
1142         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
1143         already defined.
1144
1145 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
1146
1147         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
1148         are loading the correct data types (throws an exception if not).
1149         (TypeManager::InitCoreTypes): Use CoreLookupType
1150
1151         * expression.cs (Unary::ResolveOperator): return the child
1152         expression for expressions which are just +expr.
1153         (Unary::ResolveOperator): Return negative literals for -LITERAL
1154         expressions (otherwise they are Unary {Literal}).
1155         (Invocation::Badness): Take into account `Implicit constant
1156         expression conversions'.
1157
1158         * literal.cs (LongLiteral): Implement long literal class.
1159         (IntLiteral): export the `Value' of the intliteral. 
1160
1161 2001-09-19  Ravi Pratap  <ravi@ximian.com>
1162
1163         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
1164
1165         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
1166         instead of 'Operator'
1167
1168         * expression.cs (Binary::ResolveOperator): Update accordingly.
1169         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
1170         and 'Minus'
1171
1172         * cs-parser.jay (unary_expression): Update to use the new names.
1173
1174         * gen-treedump.cs (GetUnary): Same here.
1175
1176         * expression.cs (Unary::Resolve): Implement.
1177         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
1178         operators are found instead of making noise ;-)
1179         (Unary::ResolveOperator): New method to do precisely the same thing which
1180         Binary::ResolveOperator does for Binary expressions.
1181         (Unary.method, .Arguments): Add.
1182         (Unary::OperName): Implement.   
1183         (Unary::ForceConversion): Copy and Paste !
1184
1185         * class.cs (Operator::Define): Fix a small bug for the case when we have 
1186         a unary operator.
1187
1188         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
1189         for the inbuilt operators. Only overloading works for now ;-)
1190
1191 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
1192
1193         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
1194         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
1195
1196         * expression.cs (This::Emit): Implement. 
1197         (This::Resolve): Implement.
1198         (TypeOf:Resolve): Implement.
1199         (Expression::ResolveSimpleName): Add an implicit this to instance
1200         field references. 
1201         (MemberAccess::Resolve): Deal with Parameters and Fields. 
1202         Bind instance variable to Field expressions.
1203         (FieldExpr::Instance): New field used to track the expression that
1204         represents the object instance.
1205         (FieldExpr::Resolve): Track potential errors from MemberLookup not
1206         binding 
1207         (FieldExpr::Emit): Implement.
1208
1209         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
1210         the last instruction contains a return opcode to avoid generating
1211         the last `ret' instruction (this generates correct code, and it is
1212         nice to pass the peverify output).
1213
1214         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
1215         initializer for static and instance variables.
1216         (Constructor::Emit): Allow initializer to be null in the case of
1217         static constructors.  Only emit initializer for instance
1218         constructors. 
1219
1220         (TypeContainer::FindMembers): Return a null array if there are no
1221         matches.
1222
1223         Also fix the code for the MemberTypes.Method branch, as it was not
1224         scanning that for operators (or tried to access null variables before).
1225
1226         * assign.cs (Assign::Emit): Handle instance and static fields. 
1227
1228         * TODO: Updated.
1229
1230         * driver.cs: Stop compilation if there are parse errors.
1231
1232         * cs-parser.jay (constructor_declaration): Provide default base
1233         initializer for non-static constructors.
1234         (constructor_declarator): Do not provide a default base
1235         initializers if none was specified.
1236         Catch the fact that constructors should not have parameters.
1237
1238         * class.cs: Do not emit parent class initializers for static
1239         constructors, that should be flagged as an error.
1240
1241 2001-09-18  Ravi Pratap  <ravi@ximian.com>
1242
1243         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
1244         Move back code into TypeContainer::Populate.
1245
1246 2001-09-18  Ravi Pratap  <ravi@ximian.com>
1247
1248         * class.cs (TypeContainer::AddConstructor): Fix the check to
1249         compare against Name, not Basename. 
1250         (Operator::OpType): Change Plus and Minus to Add and Subtract.
1251
1252         * cs-parser.jay : Update accordingly.
1253
1254         * class.cs (TypeContainer::FindMembers): For the case where we are searching
1255         for methods, don't forget to look into the operators too.
1256         (RegisterMethodBuilder): Helper method to take care of this for
1257         methods, constructors and operators.
1258         (Operator::Define): Completely revamp.
1259         (Operator.OperatorMethod, MethodName): New fields.
1260         (TypeContainer::Populate): Move the registering of builders into
1261         RegisterMethodBuilder.
1262         (Operator::Emit): Re-write.
1263
1264         * expression.cs (Binary::Emit): Comment out code path to emit method
1265         invocation stuff for the case when we have a user defined operator. I am
1266         just not able to get it right !
1267         
1268 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
1269
1270         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
1271         argument. 
1272
1273         (Expression::MemberLookup): Provide a version that allows to
1274         specify the MemberTypes and BindingFlags. 
1275
1276         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
1277         so it was not fetching variable information from outer blocks.
1278
1279         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
1280         Beforefieldinit as it was buggy.
1281
1282         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
1283         that Ravi put here.  
1284
1285         * class.cs (Constructor::Emit): Only emit if block is not null.
1286         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
1287         deal with this by semantically definining it as if the user had
1288         done it.
1289
1290         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
1291         constructors as we now "emit" them at a higher level.
1292
1293         (TypeContainer::DefineDefaultConstructor): Used to define the
1294         default constructors if none was provided.
1295
1296         (ConstructorInitializer): Add methods Resolve and Emit. 
1297         
1298         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
1299
1300 2001-09-17  Ravi Pratap  <ravi@ximian.com>
1301
1302         * class.cs (TypeContainer::EmitDefaultConstructor): Register
1303         the default constructor builder with our hashtable for methodbuilders
1304         to methodcores.
1305
1306         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
1307         and argument_count is 0 in which case we have a match.
1308         (Binary::ResolveOperator): More null checking and miscellaneous coding
1309         style cleanup.
1310
1311 2001-09-17  Ravi Pratap  <ravi@ximian.com>
1312
1313         * rootcontext.cs (IsNameSpace): Compare against null.
1314
1315         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
1316
1317         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
1318         and Unary::Operator.
1319
1320         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
1321         accordingly.
1322
1323         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
1324         we have overloaded operators.
1325         (Binary::ResolveOperator): Implement the part which does the operator overload
1326         resolution.
1327
1328         * class.cs (Operator::Emit): Implement.
1329         (TypeContainer::Emit): Emit the operators we have too.
1330
1331         * expression.cs (Binary::Emit): Update to emit the appropriate code for
1332         the case when we have a user-defined operator.
1333         
1334 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
1335
1336         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
1337
1338 2001-09-16  Ravi Pratap  <ravi@ximian.com>
1339
1340         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
1341         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
1342         (Constructor::Emit): Implement.
1343         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
1344         if we have no work to do. 
1345         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
1346         Emit method.
1347
1348         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
1349         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
1350
1351         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
1352         of parent.parent.
1353
1354 2001-09-15  Ravi Pratap  <ravi@ximian.com>
1355
1356         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
1357         in the source.
1358         (Tree::RecordNamespace): Method to do what the name says ;-)
1359         (Tree::Namespaces): Property to get at the namespaces hashtable.
1360
1361         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
1362         keep track.
1363
1364         * rootcontext.cs (IsNamespace): Fixed it :-)
1365
1366 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
1367
1368         * class.cs (TypeContainer::FindMembers): Add support for
1369         constructors. 
1370         (MethodCore): New class that encapsulates both the shared aspects
1371         of a Constructor and a Method.  
1372         (Method, Constructor): Factored pieces into MethodCore.
1373
1374         * driver.cs: Added --fatal which makes errors throw exceptions.
1375         Load System assembly as well as part of the standard library.
1376
1377         * report.cs: Allow throwing exceptions on errors for debugging.
1378
1379         * modifiers.cs: Do not use `parent', instead use the real type
1380         container to evaluate permission settings.
1381
1382         * class.cs: Put Ravi's patch back in.  He is right, and we will
1383         have to cope with the
1384
1385 2001-09-14  Ravi Pratap  <ravi@ximian.com>
1386
1387         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
1388         FamORAssem, not FamANDAssem.
1389         
1390 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
1391
1392         * driver.cs: Added --parse option that only parses its input files
1393         and terminates.
1394
1395         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
1396         incorrect.  IsTopLevel is not used to tell whether an object is
1397         root_types or not (that can be achieved by testing this ==
1398         root_types).  But to see if this is a top-level *class* (not
1399         necessarly our "toplevel" container). 
1400
1401 2001-09-14  Ravi Pratap  <ravi@ximian.com>
1402
1403         * enum.cs (Enum::Define): Modify to call the Lookup method on the
1404         parent instead of a direct call to GetType.
1405
1406 2001-09-14  Ravi Pratap  <ravi@ximian.com>
1407
1408         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
1409         Modifiers.TypeAttr. This should just be a call to that method.
1410
1411         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
1412         object so that we can determine if we are top-level or not.
1413
1414         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
1415         TypeContainer too.
1416
1417         * enum.cs (Enum::Define): Ditto.
1418
1419         * modifiers.cs (FieldAttr): Re-write.
1420
1421         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
1422         (TypeContainer::HaveStaticConstructor): New property to provide access
1423         to precisely that info.
1424
1425         * modifiers.cs (MethodAttr): Re-write.
1426         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
1427
1428         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
1429         of top-level types as claimed.
1430         
1431 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
1432
1433         * expression.cs (MemberLookup): Fruitless attempt to lookup
1434         constructors.  Maybe I need to emit default constructors?  That
1435         might be it (currently .NET emits this for me automatically).
1436         (Invocation::OverloadResolve): Cope with Arguments == null.
1437         (Invocation::EmitArguments): new function, shared by the new
1438         constructor and us.
1439         (Invocation::Emit): Handle static and instance methods.  Emit
1440         proper call instruction for virtual or non-virtual invocations.
1441         (New::Emit): Implement.
1442         (New::Resolve): Implement.
1443         (MemberAccess:Resolve): Implement.
1444         (MethodGroupExpr::InstanceExpression): used conforming to the spec
1445         to track instances.
1446         (FieldExpr::Resolve): Set type.
1447
1448         * support.cs: Handle empty arguments.
1449                 
1450         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
1451         SimpleLookup): Auxiliary routines to help parse a qualifier
1452         identifier.  
1453
1454         Update qualifier_identifier rule.
1455
1456         * codegen.cs: Removed debugging messages.
1457
1458         * class.cs: Make this a global thing, this acts just as a "key" to
1459         objects that we might have around.
1460
1461         (Populate): Only initialize method_builders_to_methods once.
1462
1463         * expression.cs (PropertyExpr): Initialize type from the
1464         PropertyType. 
1465
1466         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
1467         Resolve pattern.  Attempt to implicitly convert value to boolean.
1468         Emit code.
1469
1470         * expression.cs: Set the type for the int32/int32 argument case.
1471         (Binary::ResolveOperator): Set the return type to boolean for
1472         comparission operators
1473
1474         * typemanager.cs: Remove debugging print code.
1475
1476         (Invocation::Resolve): resolve type.
1477
1478         * class.cs: Allocate a MemberInfo of the correct size, as the code
1479         elsewhere depends on the test to reflect the correct contents.
1480
1481         (Method::) Keep track of parameters, due to System.Reflection holes
1482
1483         (TypeContainer::Populate): Keep track of MethodBuilders to Method
1484         mapping here.
1485
1486         (TypeContainer::FindMembers): Use ArrayList and then copy an array
1487         of the exact size and return that.
1488
1489         (Class::LookupMethodByBuilder): New function that maps
1490         MethodBuilders to its methods.  Required to locate the information
1491         on methods because System.Reflection bit us again.
1492
1493         * support.cs: New file, contains an interface ParameterData and
1494         two implementations: ReflectionParameters and InternalParameters
1495         used to access Parameter information.  We will need to grow this
1496         as required.
1497
1498         * expression.cs (Invocation::GetParameterData): implement a cache
1499         and a wrapper around the ParameterData creation for methods. 
1500         (Invocation::OverloadResolve): Use new code.
1501
1502 2001-09-13  Ravi Pratap  <ravi@ximian.com>
1503
1504         * class.cs (TypeContainer::EmitField): Remove and move into 
1505         (Field::Define): here and modify accordingly.
1506         (Field.FieldBuilder): New member.
1507         (TypeContainer::Populate): Update accordingly.
1508         (TypeContainer::FindMembers): Implement.
1509
1510 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
1511
1512         * statement.cs: (VariableInfo::VariableType): New field to be
1513         initialized with the full type once it is resolved. 
1514
1515 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
1516
1517         * parameter.cs (GetParameterInfo): Use a type cache to compute
1518         things only once, and to reuse this information
1519
1520         * expression.cs (LocalVariableReference::Emit): Implement.
1521         (OpcodeCast::Emit): fix.
1522
1523         (ParameterReference::Resolve): Implement.
1524         (ParameterReference::Emit): Implement.
1525
1526         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
1527         that are expressions need to stay as Expressions.
1528
1529         * typemanager.cs (CSharpName): Returns the C# name of a type if
1530         possible. 
1531
1532         * expression.cs (Expression::ConvertImplicit): New function that
1533         implements implicit type conversions.
1534
1535         (Expression::ImplicitReferenceConversion): Implements implicit
1536         reference conversions.
1537
1538         (EmptyCast): New type for transparent casts.
1539
1540         (OpcodeCast): New type for casts of types that are performed with
1541         a sequence of bytecodes.
1542         
1543         (BoxedCast): New type used for casting value types into reference
1544         types.  Emits a box opcode.
1545
1546         (Binary::DoNumericPromotions): Implements numeric promotions of
1547         and computation of the Binary::Type.
1548
1549         (Binary::EmitBranchable): Optimization.
1550
1551         (Binary::Emit): Implement code emission for expressions.
1552         
1553         * typemanager.cs (TypeManager): Added two new core types: sbyte
1554         and byte.
1555
1556 2001-09-12  Ravi Pratap  <ravi@ximian.com>
1557
1558         * class.cs (TypeContainer::FindMembers): Method which does exactly
1559         what Type.FindMembers does, only we don't have to use reflection. No
1560         implementation yet.
1561
1562         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
1563         typecontainer objects as we need to get at them.
1564         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
1565
1566         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
1567         typecontainer object.
1568
1569         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
1570         of just a Report object.
1571
1572 2001-09-11  Ravi Pratap  <ravi@ximian.com>
1573
1574         * class.cs (Event::Define): Go back to using the prefixes "add_" and
1575         "remove_"
1576         (TypeContainer::Populate): Now define the delegates of the type too.
1577         (TypeContainer.Delegates): Property to access the list of delegates defined
1578         in the type.
1579
1580         * delegates.cs (Delegate::Define): Implement partially.
1581
1582         * modifiers.cs (TypeAttr): Handle more flags.
1583
1584 2001-09-11  Ravi Pratap  <ravi@ximian.com>
1585
1586         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
1587         and not <=
1588         (Operator::Define): Re-write logic to get types by using the LookupType method
1589         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
1590         (Indexer::Define): Ditto.
1591         (Event::Define): Ditto.
1592         (Property::Define): Ditto.
1593         
1594 2001-09-10  Ravi Pratap  <ravi@ximian.com>
1595
1596         * class.cs (TypeContainer::Populate): Now define operators too. 
1597         (TypeContainer.Operators): New property to access the list of operators
1598         in a type.
1599         (Operator.OperatorMethodBuilder): New member to hold the method builder
1600         for the operator we are defining.
1601         (Operator::Define): Implement.
1602
1603 2001-09-10  Ravi Pratap  <ravi@ximian.com>
1604
1605         * class.cs (Event::Define): Make the prefixes of the accessor methods
1606         addOn_ and removeOn_ 
1607
1608         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
1609         of the location being passed in too. Ideally, this should go later since all
1610         error reporting should be done through the Report object.
1611
1612         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
1613         (Populate): Iterate thru the indexers we have and define them too.
1614         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
1615         for the get and set accessors.
1616         (Indexer::Define): Implement.
1617         
1618 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
1619
1620         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
1621         my previous implementation, did not work.
1622
1623         * typemanager.cs: Add a couple of missing types (the longs).
1624
1625         * literal.cs: Use TypeManager.bool_type instead of getting it.
1626
1627         * expression.cs (EventExpr): New kind of expressions.
1628         (Expressio::ExprClassFromMemberInfo): finish
1629
1630 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
1631
1632         * assign.cs: Emit stores to static fields differently.
1633
1634 2001-09-08  Ravi Pratap  <ravi@ximian.com>
1635
1636         * Merge in changes and adjust code to tackle conflicts. Backed out my
1637         code in Assign::Resolve ;-) 
1638
1639 2001-09-08  Ravi Pratap  <ravi@ximian.com>
1640
1641         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
1642         instead Report.Error and also pass in the location.
1643         (CSharpParser::Lexer): New readonly property to return the reference
1644         to the Tokenizer object.
1645         (declare_local_variables): Use Report.Error with location instead of plain 
1646         old error.
1647         (CheckDef): Ditto.
1648
1649         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
1650         (Operator.CheckBinaryOperator): Ditto.
1651
1652         * cs-parser.jay (operator_declarator): Update accordingly.
1653
1654         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
1655         (CheckBinaryOperator): Same here.
1656
1657         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
1658         on the name without any prefixes of namespace names etc. This is because we
1659         already might have something already fully qualified like 
1660         'System.Console.WriteLine'
1661
1662         * assign.cs (Resolve): Begin implementation. Stuck ;-)
1663
1664 2001-09-07  Ravi Pratap  <ravi@ximian.com>
1665
1666         * cs-tokenizer.cs (location): Return a string which also contains
1667         the file name.
1668
1669         * expression.cs (ElementAccess): New class for expressions of the
1670         type 'element access.'
1671         (BaseAccess): New class for expressions of the type 'base access.'
1672         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
1673         respectively.
1674         
1675         * cs-parser.jay (element_access): Implement action.
1676         (base_access): Implement actions.
1677         (checked_expression, unchecked_expression): Implement.
1678
1679         * cs-parser.jay (local_variable_type): Correct and implement.
1680         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
1681
1682         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
1683
1684         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
1685         name and the specifiers.
1686
1687         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
1688         
1689         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
1690         making them all public ;-)
1691
1692         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
1693         class anyways.
1694         
1695 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
1696
1697         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
1698         PropertyExprs.
1699         (FieldExpr, PropertyExprs): New resolved expressions.
1700         (SimpleName::MemberStaticCheck): Perform static checks for access
1701         to non-static fields on static methods. Maybe this should be
1702         generalized for MemberAccesses. 
1703         (SimpleName::ResolveSimpleName): More work on simple name
1704         resolution. 
1705
1706         * cs-parser.jay (primary_expression/qualified_identifier): track
1707         the parameter index.
1708
1709         * codegen.cs (CodeGen::Save): Catch save exception, report error.
1710         (EmitContext::EmitBoolExpression): Chain to expression generation
1711         instead of temporary hack.
1712         (::EmitStatementExpression): Put generic expression code generation.
1713
1714         * assign.cs (Assign::Emit): Implement variable assignments to
1715         local variables, parameters and fields.
1716
1717 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
1718
1719         * statement.cs (Block::GetVariableInfo): New method, returns the
1720         VariableInfo for a variable name in a block.
1721         (Block::GetVariableType): Implement in terms of GetVariableInfo
1722
1723         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
1724         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
1725
1726 2001-09-06  Ravi Pratap  <ravi@ximian.com>
1727
1728         * cs-parser.jay (operator_declaration): Continue on my quest : update
1729         to take attributes argument.
1730         (event_declaration): Ditto.
1731         (enum_declaration): Ditto.
1732         (indexer_declaration): Ditto.
1733         
1734         * class.cs (Operator::Operator): Update constructor accordingly.
1735         (Event::Event): Ditto.
1736
1737         * delegate.cs (Delegate::Delegate): Same here.
1738
1739         * enum.cs (Enum::Enum): Same here.
1740         
1741 2001-09-05  Ravi Pratap  <ravi@ximian.com>
1742
1743         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
1744
1745         * ../tests/cs0658.cs : New file to demonstrate error 0658.
1746
1747         * attribute.cs (Attributes): New class to encapsulate all attributes which were
1748         being passed around as an arraylist.
1749         (Attributes::AddAttribute): Method to add attribute sections.
1750
1751         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
1752         (struct_declaration): Update accordingly.
1753         (constant_declaration): Update.
1754         (field_declaration): Update.
1755         (method_header): Update.
1756         (fixed_parameter): Update.
1757         (parameter_array): Ditto.
1758         (property_declaration): Ditto.
1759         (destructor_declaration): Ditto.
1760         
1761         * class.cs (Struct::Struct): Update constructors accordingly.
1762         (Class::Class): Ditto.
1763         (Field::Field): Ditto.
1764         (Method::Method): Ditto.
1765         (Property::Property): Ditto.
1766         (TypeContainer::OptAttribute): update property's return type.
1767         
1768         * interface.cs (Interface.opt_attributes): New member.
1769         (Interface::Interface): Update to take the extra Attributes argument.
1770
1771         * parameter.cs (Parameter::Parameter): Ditto.
1772
1773         * constant.cs (Constant::Constant): Ditto.
1774
1775         * interface.cs (InterfaceMemberBase): New OptAttributes field.
1776         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
1777         the attributes as a parameter.
1778         (InterfaceProperty): Update constructor call.
1779         (InterfaceEvent): Ditto.
1780         (InterfaceMethod): Ditto.
1781         (InterfaceIndexer): Ditto.
1782
1783         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
1784         pass the attributes too.
1785         (interface_event_declaration): Ditto.
1786         (interface_property_declaration): Ditto.
1787         (interface_method_declaration): Ditto.
1788         (interface_declaration): Ditto.
1789
1790 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
1791
1792         * class.cs (Method::Define): Track the "static Main" definition to
1793         create an entry point. 
1794
1795         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
1796         EntryPoint if we find it. 
1797
1798         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
1799         (EmitContext::ig): Make this variable public.
1800
1801         * driver.cs: Make the default output file be the first file name
1802         with the .exe extension.  
1803
1804         Detect empty compilations
1805
1806         Handle various kinds of output targets.  Handle --target and
1807         rename -t to --dumper.
1808
1809         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
1810         methods inherited from Expression return now an Expression.  This
1811         will is used during the tree rewriting as we resolve them during
1812         semantic analysis.
1813
1814         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
1815         the spec.  Missing entirely is the information about
1816         accessability of elements of it.
1817
1818         (Expression::ExprClassFromMemberInfo): New constructor for
1819         Expressions that creates a fully initialized Expression based on
1820         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
1821         a Type.
1822
1823         (Invocation::Resolve): Begin implementing resolution of invocations.
1824         
1825         * literal.cs (StringLiteral):  Implement Emit.
1826
1827 2001-09-05  Ravi Pratap  <ravi@ximian.com>
1828
1829         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
1830         member.
1831         
1832 2001-09-04  Ravi Pratap  <ravi@ximian.com>
1833
1834         * cs-parser.jay (attribute_arguments): Implement actions.
1835         (attribute): Fix bug in production. Implement action.
1836         (attribute_list): Implement.
1837         (attribute_target): Implement.
1838         (attribute_target_specifier, opt_target_specifier): Implement
1839         (CheckAttributeTarget): New method to check if the attribute target
1840         is valid.
1841         (attribute_section): Implement.
1842         (opt_attributes): Implement.
1843
1844         * attribute.cs : New file to handle attributes.
1845         (Attribute): Class to hold attribute info.
1846
1847         * cs-parser.jay (opt_attribute_target_specifier): Remove production
1848         (attribute_section): Modify production to use 2 different rules to 
1849         achieve the same thing. 1 s/r conflict down !
1850         Clean out commented, useless, non-reducing dimension_separator rules.
1851         
1852         * class.cs (TypeContainer.attributes): New member to hold list
1853         of attributes for a type.
1854         (Struct::Struct): Modify to take one more argument, the attribute list.
1855         (Class::Class): Ditto.
1856         (Field::Field): Ditto.
1857         (Method::Method): Ditto.
1858         (Property::Property): Ditto.
1859         
1860         * cs-parser.jay (struct_declaration): Update constructor call to
1861         pass in the attributes too.
1862         (class_declaration): Ditto.
1863         (constant_declaration): Ditto.
1864         (field_declaration): Ditto.
1865         (method_header): Ditto.
1866         (fixed_parameter): Ditto.
1867         (parameter_array): Ditto.
1868         (property_declaration): Ditto.
1869
1870         * constant.cs (Constant::Constant): Update constructor similarly.
1871         Use System.Collections.
1872
1873         * parameter.cs (Parameter::Parameter): Update as above.
1874
1875 2001-09-02  Ravi Pratap  <ravi@ximian.com>
1876
1877         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
1878         (TypeContainer.delegates): New member to hold list of delegates.
1879
1880         * cs-parser.jay (delegate_declaration): Implement the action correctly 
1881         this time as I seem to be on crack ;-)
1882
1883 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
1884
1885         * rootcontext.cs (RootContext::IsNamespace): new function, used to
1886         tell whether an identifier represents a namespace.
1887
1888         * expression.cs (NamespaceExpr): A namespace expression, used only
1889         temporarly during expression resolution.
1890         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
1891         utility functions to resolve names on expressions.
1892
1893 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
1894
1895         * codegen.cs: Add hook for StatementExpressions. 
1896
1897         * class.cs: Fix inverted test for static flag in methods.
1898
1899 2001-09-02  Ravi Pratap  <ravi@ximian.com>
1900
1901         * class.cs (Operator::CheckUnaryOperator): Correct error number used
1902         to make it coincide with MS' number.
1903         (Operator::CheckBinaryOperator): Ditto.
1904
1905         * ../errors/errors.txt : Remove error numbers added earlier.
1906
1907         * ../errors/cs1019.cs : Test case for error # 1019
1908
1909         * ../errros/cs1020.cs : Test case for error # 1020
1910
1911         * cs-parser.jay : Clean out commented cruft.
1912         (dimension_separators, dimension_separator): Comment out. Ostensibly not
1913         used anywhere - non-reducing rule.
1914         (namespace_declarations): Non-reducing rule - comment out.
1915
1916         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
1917         with TypeContainer::AddEnum.
1918
1919         * delegate.cs : New file for delegate handling classes.
1920         (Delegate): Class for declaring delegates.
1921
1922         * makefile : Update.
1923
1924         * cs-parser.jay (delegate_declaration): Implement.
1925
1926 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
1927
1928         * class.cs (Event::Define): Implement.
1929         (Event.EventBuilder): New member.
1930
1931         * class.cs (TypeContainer::Populate): Update to define all enums and events
1932         we have.
1933         (Events): New property for the events arraylist we hold. Shouldn't we move to using
1934         readonly fields for all these cases ?
1935
1936 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
1937
1938         * class.cs (Property): Revamp to use the convention of making fields readonly.
1939         Accordingly modify code elsewhere.
1940
1941         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
1942         the Define method of the Property class.
1943
1944         * class.cs : Clean up applied patch and update references to variables etc. Fix 
1945         trivial bug.
1946         (TypeContainer::Populate): Update to define all the properties we have. Also
1947         define all enumerations.
1948
1949         * enum.cs (Define): Implement.
1950         
1951 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
1952
1953         * cs-parser.jay (overloadable_operator): The semantic value is an
1954         enum of the Operator class.
1955         (operator_declarator): Implement actions.
1956         (operator_declaration): Implement.
1957
1958         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
1959         validity of definitions.
1960         (Operator::CheckBinaryOperator): Static method to check for binary operators
1961         (TypeContainer::AddOperator): New method to add an operator to a type.
1962
1963         * cs-parser.jay (indexer_declaration): Added line to actually call the
1964         AddIndexer method so it gets added ;-)
1965
1966         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
1967         already taken care of by the MS compiler ?  
1968
1969 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
1970
1971         * class.cs (Operator): New class for operator declarations.
1972         (Operator::OpType): Enum for the various operators.
1973
1974 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
1975
1976         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
1977         ostensibly handle this in semantic analysis.
1978
1979         * cs-parser.jay (general_catch_clause): Comment out
1980         (specific_catch_clauses, specific_catch_clause): Ditto.
1981         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
1982         (catch_args, opt_catch_args): New productions.
1983         (catch_clause): Rewrite to use the new productions above
1984         (catch_clauses): Modify accordingly.
1985         (opt_catch_clauses): New production to use in try_statement
1986         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
1987         and re-write the code in the actions to extract the specific and
1988         general catch clauses by being a little smart ;-)
1989
1990         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
1991         Hooray, try and catch statements parse fine !
1992         
1993 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
1994
1995         * statement.cs (Block::GetVariableType): Fix logic to extract the type
1996         string from the hashtable of variables.
1997
1998         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
1999         I end up making that mistake ;-)
2000         (catch_clauses): Fixed gross error which made Key and Value of the 
2001         DictionaryEntry the same : $1 !!
2002
2003 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
2004
2005         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
2006
2007         * cs-parser.jay (event_declaration): Correct to remove the semicolon
2008         when the add and remove accessors are specified. 
2009
2010 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
2011
2012         * cs-parser.jay (IndexerDeclaration): New helper class to hold
2013         information about indexer_declarator.
2014         (indexer_declarator): Implement actions.
2015         (parsing_indexer): New local boolean used to keep track of whether
2016         we are parsing indexers or properties. This is necessary because 
2017         implicit_parameters come into picture even for the get accessor in the 
2018         case of an indexer.
2019         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
2020
2021         * class.cs (Indexer): New class for indexer declarations.
2022         (TypeContainer::AddIndexer): New method to add an indexer to a type.
2023         (TypeContainer::indexers): New member to hold list of indexers for the
2024         type.
2025
2026 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
2027
2028         * cs-parser.jay (add_accessor_declaration): Implement action.
2029         (remove_accessor_declaration): Implement action.
2030         (event_accessors_declaration): Implement
2031         (variable_declarators): swap statements for first rule - trivial.
2032
2033         * class.cs (Event): New class to hold information about event
2034         declarations.
2035         (TypeContainer::AddEvent): New method to add an event to a type
2036         (TypeContainer::events): New member to hold list of events.
2037
2038         * cs-parser.jay (event_declaration): Implement actions.
2039
2040 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
2041
2042         * cs-parser.jay (dim_separators): Implement. Make it a string
2043         concatenating all the commas together, just as they appear.
2044         (opt_dim_separators): Modify accordingly
2045         (rank_specifiers): Update accordingly. Basically do the same
2046         thing - instead, collect the brackets here.
2047         (opt_rank_sepcifiers): Modify accordingly.
2048         (array_type): Modify to actually return the complete type string
2049         instead of ignoring the rank_specifiers.
2050         (expression_list): Implement to collect the expressions
2051         (variable_initializer): Implement. We make it a list of expressions
2052         essentially so that we can handle the array_initializer case neatly too.
2053         (variable_initializer_list): Implement.
2054         (array_initializer): Make it a list of variable_initializers
2055         (opt_array_initializer): Modify accordingly.
2056
2057         * expression.cs (New::NType): Add enumeration to help us
2058         keep track of whether we have an object/delegate creation
2059         or an array creation.
2060         (New:NewType, New::Rank, New::Indices, New::Initializers): New
2061         members to hold data about array creation.
2062         (New:New): Modify to update NewType
2063         (New:New): New Overloaded contructor for the array creation
2064         case.
2065
2066         * cs-parser.jay (array_creation_expression): Implement to call
2067         the overloaded New constructor.
2068         
2069 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
2070
2071         * class.cs (TypeContainer::Constructors): Return member
2072         constructors instead of returning null.
2073
2074 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
2075
2076         * typemanager.cs (InitCoreTypes): Initialize the various core
2077         types after we have populated the type manager with the user
2078         defined types (this distinction will be important later while
2079         compiling corlib.dll)
2080
2081         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
2082         on Expression Classification.  Now all expressions have a method
2083         `Resolve' and a method `Emit'.
2084
2085         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
2086         generation from working.     Also add some temporary debugging
2087         code. 
2088         
2089 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
2090
2091         * codegen.cs: Lots of code generation pieces.  This is only the
2092         beginning, will continue tomorrow with more touches of polish.  We
2093         handle the fundamentals of if, while, do, for, return.  Others are
2094         trickier and I need to start working on invocations soon.
2095         
2096         * gen-treedump.cs: Bug fix, use s.Increment here instead of
2097         s.InitStatement. 
2098
2099         * codegen.cs (EmitContext): New struct, used during code
2100         emission to keep a context.   Most of the code generation will be
2101         here. 
2102
2103         * cs-parser.jay: Add embedded blocks to the list of statements of
2104         this block.  So code generation proceeds in a top down fashion.
2105
2106 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
2107
2108         * statement.cs: Add support for multiple child blocks.
2109
2110 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
2111
2112         * codegen.cs (EmitCode): New function, will emit the code for a
2113         Block of code given a TypeContainer and its ILGenerator. 
2114
2115         * statement.cs (Block): Standard public readonly optimization.
2116         (Block::Block constructors): Link children. 
2117         (Block::Child): Child Linker.
2118         (Block::EmitVariables): Emits IL variable declarations.
2119
2120         * class.cs: Drop support for MethodGroups here, delay until
2121         Semantic Analysis.
2122         (Method::): Applied the same simplification that I did before, and
2123         move from Properties to public readonly fields.
2124         (Method::ParameterTypes): Returns the parameter types for the
2125         function, and implements a cache that will be useful later when I
2126         do error checking and the semantic analysis on the methods is
2127         performed.
2128         (Constructor::GetCallingConvention): Renamed from CallingConvetion
2129         and made a method, optional argument tells whether this is a class
2130         or a structure to apply the `has-this' bit.
2131         (Method::GetCallingConvention): Implement, returns the calling
2132         convention. 
2133         (Method::Define): Defines the type, a second pass is performed
2134         later to populate the methods.
2135
2136         (Constructor::ParameterTypes): implement a cache similar to the
2137         one on Method::ParameterTypes, useful later when we do semantic
2138         analysis. 
2139
2140         (TypeContainer::EmitMethod):  New method.  Emits methods.
2141
2142         * expression.cs: Removed MethodGroup class from here.
2143         
2144         * parameter.cs (Parameters::GetCallingConvention): new method.
2145
2146 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
2147
2148         * class.cs (TypeContainer::Populate): Drop RootContext from the
2149         argument. 
2150
2151         (Constructor::CallingConvention): Returns the calling convention.
2152         (Constructor::ParameterTypes): Returns the constructor parameter
2153         types. 
2154         
2155         (TypeContainer::AddConstructor): Keep track of default constructor
2156         and the default static constructor.
2157
2158         (Constructor::) Another class that starts using `public readonly'
2159         instead of properties. 
2160
2161         (Constructor::IsDefault): Whether this is a default constructor. 
2162
2163         (Field::) use readonly public fields instead of properties also.
2164
2165         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
2166         track of static constructors;  If none is used, turn on
2167         BeforeFieldInit in the TypeAttributes. 
2168
2169         * cs-parser.jay (opt_argument_list): now the return can be null
2170         for the cases where there are no arguments. 
2171
2172         (constructor_declarator): If there is no implicit `base' or
2173         `this', then invoke the default parent constructor. 
2174         
2175         * modifiers.cs (MethodAttr): New static function maps a set of
2176         modifiers flags into a MethodAttributes enum
2177         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
2178         MethodAttr, TypeAttr to represent the various mappings where the
2179         modifiers are used.
2180         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
2181
2182 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
2183
2184         * parameter.cs (GetParameterInfo): Fix bug where there would be no
2185         method arguments.
2186
2187         * interface.cs (PopulateIndexer): Implemented the code generator
2188         for interface indexers.
2189
2190 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
2191
2192         * interface.cs (InterfaceMemberBase): Now we track the new status
2193         here.  
2194
2195         (PopulateProperty): Implement property population.  Woohoo!  Got
2196         Methods and Properties going today. 
2197
2198         Removed all the properties for interfaces, and replaced them with
2199         `public readonly' fields. 
2200
2201 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
2202
2203         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
2204         initialize their hashtables/arraylists only when they are needed
2205         instead of doing this always.
2206
2207         * parameter.cs: Handle refs and out parameters.
2208
2209         * cs-parser.jay: Use an ArrayList to construct the arguments
2210         instead of the ParameterCollection, and then cast that to a
2211         Parameter[] array.
2212
2213         * parameter.cs: Drop the use of ParameterCollection and use
2214         instead arrays of Parameters.
2215
2216         (GetParameterInfo): Use the Type, not the Name when resolving
2217         types. 
2218
2219 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
2220
2221         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
2222         and instead use public readonly fields.
2223
2224         * class.cs: Put back walking code for type containers.
2225
2226 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
2227
2228         * class.cs (MakeConstant): Code to define constants.
2229
2230         * rootcontext.cs (LookupType): New function.  Used to locate types 
2231
2232         
2233 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
2234
2235         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
2236         this System.Reflection code is.  Kudos to Microsoft
2237         
2238         * typemanager.cs: Implement a type cache and avoid loading all
2239         types at boot time.  Wrap in LookupType the internals.  This made
2240         the compiler so much faster.  Wow.  I rule!
2241         
2242         * driver.cs: Make sure we always load mscorlib first (for
2243         debugging purposes, nothing really important).
2244
2245         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
2246         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
2247
2248         * rootcontext.cs: Lookup types on their namespace;  Lookup types
2249         on namespaces that have been imported using the `using' keyword.
2250
2251         * class.cs (TypeContainer::TypeAttr): Virtualize.
2252         (Class::TypeAttr): Return attributes suitable for this bad boy.
2253         (Struct::TypeAttr): ditto.
2254         Handle nested classes.
2255         (TypeContainer::) Remove all the type visiting code, it is now
2256         replaced with the rootcontext.cs code
2257
2258         * rootcontext.cs (GetClassBases): Added support for structs. 
2259
2260 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
2261
2262         * interface.cs, statement.cs, class.cs, parameter.cs,
2263         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
2264         Drop use of TypeRefs, and use strings instead.
2265
2266 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
2267
2268         * rootcontext.cs: 
2269
2270         * class.cs (Struct::Struct): set the SEALED flags after
2271         checking the modifiers.
2272         (TypeContainer::TypeAttr): new property, returns the
2273         TypeAttributes for a class.  
2274
2275         * cs-parser.jay (type_list): Oops, list production was creating a
2276         new list of base types.
2277
2278         * rootcontext.cs (StdLib): New property.
2279         (GetInterfaceTypeByName): returns an interface by type name, and
2280         encapsulates error handling here.
2281         (GetInterfaces): simplified.
2282         (ResolveTree): Encapsulated all the tree resolution here.
2283         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
2284         types. 
2285         
2286         * driver.cs: Add support for --nostdlib, to avoid loading the
2287         default assemblies.
2288         (Main): Do not put tree resolution here. 
2289
2290         * rootcontext.cs: Beginning of the class resolution.
2291
2292 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
2293
2294         * rootcontext.cs: Provide better error reporting. 
2295
2296         * cs-parser.jay (interface_base): set our $$ to be interfaces.
2297
2298         * rootcontext.cs (CreateInterface): Handle the case where there
2299         are no parent interfaces.
2300         
2301         (CloseTypes): Routine to flush types at the end.
2302         (CreateInterface): Track types.
2303         (GetInterfaces): Returns an array of Types from the list of
2304         defined interfaces.
2305
2306         * typemanager.c (AddUserType): Mechanism to track user types (puts
2307         the type on the global type hash, and allows us to close it at the
2308         end). 
2309         
2310 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
2311
2312         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
2313         RecordInterface instead.
2314
2315         * cs-parser.jay: Updated to reflect changes above.
2316
2317         * decl.cs (Definition): Keep track of the TypeBuilder type that
2318         represents this type here.  Not sure we will use it in the long
2319         run, but wont hurt for now.
2320
2321         * driver.cs: Smaller changes to accomodate the new code.
2322
2323         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
2324         when done. 
2325
2326         * rootcontext.cs (CreateInterface):  New method, used to create
2327         the System.TypeBuilder type for interfaces.
2328         (ResolveInterfaces): new entry point to resolve the interface
2329         hierarchy. 
2330         (CodeGen): Property, used to keep track of the code generator.
2331
2332 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
2333
2334         * cs-parser.jay: Add a second production for delegate_declaration
2335         with `VOID'.
2336
2337         (enum_body): Put an opt_comma here instead of putting it on
2338         enum_body or enum_member_declarations so we can handle trailing
2339         commas on enumeration members.  Gets rid of a shift/reduce.
2340         
2341         (type_list): Need a COMMA in the middle.
2342
2343         (indexer_declaration): Tell tokenizer to recognize get/set
2344
2345         * Remove old targets.
2346
2347         * Re-add the parser target.
2348
2349 2001-07-13  Simon Cozens <simon@simon-cozens.org>
2350
2351         * cs-parser.jay: Add precendence rules for a number of operators
2352         ot reduce the number of shift/reduce conflicts in the grammar.
2353         
2354 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
2355
2356         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
2357         and put it here.
2358
2359         Get rid of old crufty code.
2360
2361         * rootcontext.cs: Use this to keep track of the parsed
2362         representation and the defined types available to the program. 
2363
2364         * gen-treedump.cs: adjust for new convention.
2365
2366         * type.cs: Split out the type manager, and the assembly builder
2367         from here. 
2368
2369         * typemanager.cs: the type manager will live here now.
2370
2371         * cil-codegen.cs: And the code generator here. 
2372
2373 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
2374
2375         * makefile: Fixed up for easy making.
2376
2377 2001-07-13  Simon Cozens <simon@simon-cozens.org>
2378
2379         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
2380         the 
2381
2382         (unary_expression): Expand pre_increment_expression and
2383         post_decrement_expression to reduce a shift/reduce.
2384
2385 2001-07-11  Simon Cozens
2386
2387         * cs-tokenizer.cs: Hex numbers should begin with a 0.
2388
2389         Improve allow_keyword_as_indent name.
2390
2391 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
2392
2393         * Adjustments for Beta2. 
2394
2395 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
2396
2397         * decl.cs: Added `Define' abstract method.
2398         (InTransit): new property, used to catch recursive definitions. 
2399
2400         * interface.cs: Implement `Define'. 
2401
2402         * modifiers.cs: Map Modifiers.constants to
2403         System.Reflection.TypeAttribute flags.
2404
2405         * class.cs: Keep track of types and user-defined types.
2406         (BuilderInit): New method for creating an assembly
2407         (ResolveType): New function to launch the resolution process, only
2408         used by interfaces for now.
2409
2410         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
2411         that are inserted into the name space. 
2412
2413 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
2414
2415         * ARGH.  I have screwed up my tree so many times due to the use of
2416         rsync rather than using CVS.  Going to fix this at once. 
2417
2418         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
2419         load types.
2420
2421 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
2422
2423         * Experiment successful: Use System.Type rather that our own
2424         version of Type.  
2425
2426 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
2427
2428         * cs-parser.jay: Removed nsAliases from here.
2429
2430         Use new namespaces, handle `using XXX;' 
2431
2432         * namespace.cs: Reimplemented namespace handling, use a recursive
2433         definition of the class.  Now we can keep track of using clauses
2434         and catch invalid using clauses.
2435
2436 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
2437
2438         * gen-treedump.cs: Adapted for all the renaming.
2439
2440         * expression.cs (Expression): this class now has a Type property
2441         which returns an expression Type.
2442
2443         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
2444         `Type', as this has a different meaning now in the base
2445
2446 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
2447
2448         * interface.cs, class.cs: Removed from all the sources the
2449         references to signature computation, as we can not do method
2450         signature computation during the parsing time, as we are not
2451         trying to solve at that point distinguishing:
2452
2453         class X {
2454                 void a (Blah x) {}
2455                 void a (NS.Blah x) {}
2456         }
2457
2458         Which depending on the context might be valid or not, as we do not
2459         know if Blah is the same thing as NS.Blah at that point.
2460
2461         * Redid everything so the code uses TypeRefs now instead of
2462         Types.  TypeRefs are just temporary type placeholders, that need
2463         to be resolved.  They initially have a pointer to a string and the
2464         current scope in which they are used.  This is used later by the
2465         compiler to resolve the reference to an actual Type. 
2466
2467         * DeclSpace is no longer a CIR.Type, and neither are
2468         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
2469         are all DeclSpaces, but no Types. 
2470
2471         * type.cs (TypeRefManager): This implements the TypeRef manager,
2472         which keeps track of all the types that need to be resolved after
2473         the parsing has finished. 
2474
2475 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
2476
2477         * ARGH.  We are going to have to store `foreach' as a class rather
2478         than resolving it, as we need to verify error 1579 after name
2479         resolution.   *OR* we could keep a flag that says `This request to
2480         IEnumerator comes from a foreach statement' which we can then use
2481         to generate the error.
2482
2483 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
2484
2485         * class.cs (TypeContainer.AddMethod): we now add methods to the
2486         MethodGroup instead of the method hashtable.  
2487
2488         * expression.cs: Add MethodGroup abstraction, which gets us one
2489         step closer to the specification in the way we handle method
2490         declarations.  
2491
2492         * cs-parser.jay (primary_expression): qualified_identifier now
2493         tried to match up an identifier to a local variable reference or
2494         to a parameter reference.
2495
2496         current_local_parameters is now a parser global variable that
2497         points to the current parameters for the block, used during name
2498         lookup.
2499
2500         (property_declaration): Now creates an implicit `value' argument to
2501         the set accessor.
2502
2503 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
2504
2505         * parameter.cs: Do not use `param' arguments as part of the
2506         signature, per the spec.
2507
2508 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
2509
2510         * decl.cs: Base class for classes, structs and interfaces.  This
2511         is the "Declaration Space" 
2512
2513         * cs-parser.jay: Use CheckDef for checking declaration errors
2514         instead of having one on each function.
2515
2516         * class.cs: Factor out some code for handling error handling in
2517         accordance to the "Declarations" section in the "Basic Concepts"
2518         chapter in the ECMA C# spec.
2519
2520         * interface.cs: Make all interface member classes derive from
2521         InterfaceMemberBase.
2522
2523 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
2524
2525         * Many things: all interfaces are parsed and generated in
2526         gen-treedump.  Support for member variables, constructors,
2527         destructors, properties, constants is there.
2528
2529         Beginning of the IL backend, but very little done, just there for
2530         testing purposes. 
2531
2532 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
2533
2534         * cs-parser.jay: Fix labeled statement.
2535
2536         * cs-tokenizer.cs (escape): Escape " and ' always.
2537         ref_line, ref_name: keep track of the line/filename as instructed
2538         by #line by the compiler.
2539         Parse #line.
2540
2541 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
2542
2543         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
2544         to match the values in System.CodeDOM.
2545
2546         Divid renamed to Divide.
2547
2548         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
2549         statements. 
2550         (Statements.set): remove.
2551
2552         * System.CodeDOM/CodeCatchClause.cs: always have a valid
2553         statements. 
2554
2555         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
2556         falseStatements always have valid values. 
2557
2558         * cs-parser.jay: Use System.CodeDOM now.
2559