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