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