2001-08-19 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / mcs / ChangeLog
1 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
2
3         * parameter.cs (GetParameterInfo): Fix bug where there would be no
4         method arguments.
5
6         * interface.cs (PopulateIndexer): Implemented the code generator
7         for interface indexers.
8
9 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
10
11         * interface.cs (InterfaceMemberBase): Now we track the new status
12         here.  
13
14         (PopulateProperty): Implement property population.  Woohoo!  Got
15         Methods and Properties going today. 
16
17         Removed all the properties for interfaces, and replaced them with
18         `public readonly' fields. 
19
20 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
21
22         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
23         initialize their hashtables/arraylists only when they are needed
24         instead of doing this always.
25
26         * parameter.cs: Handle refs and out parameters.
27
28         * cs-parser.jay: Use an ArrayList to construct the arguments
29         instead of the ParameterCollection, and then cast that to a
30         Parameter[] array.
31
32         * parameter.cs: Drop the use of ParameterCollection and use
33         instead arrays of Parameters.
34
35         (GetParameterInfo): Use the Type, not the Name when resolving
36         types. 
37
38 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
39
40         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
41         and instead use public readonly fields.
42
43         * class.cs: Put back walking code for type containers.
44
45 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
46
47         * class.cs (MakeConstant): Code to define constants.
48
49         * rootcontext.cs (LookupType): New function.  Used to locate types 
50
51         
52 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
53
54         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
55         this System.Reflection code is.  Kudos to Microsoft
56         
57         * typemanager.cs: Implement a type cache and avoid loading all
58         types at boot time.  Wrap in LookupType the internals.  This made
59         the compiler so much faster.  Wow.  I rule!
60         
61         * driver.cs: Make sure we always load mscorlib first (for
62         debugging purposes, nothing really important).
63
64         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
65         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
66
67         * rootcontext.cs: Lookup types on their namespace;  Lookup types
68         on namespaces that have been imported using the `using' keyword.
69
70         * class.cs (TypeContainer::TypeAttr): Virtualize.
71         (Class::TypeAttr): Return attributes suitable for this bad boy.
72         (Struct::TypeAttr): ditto.
73         Handle nested classes.
74         (TypeContainer::) Remove all the type visiting code, it is now
75         replaced with the rootcontext.cs code
76
77         * rootcontext.cs (GetClassBases): Added support for structs. 
78
79 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
80
81         * interface.cs, statement.cs, class.cs, parameter.cs,
82         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
83         Drop use of TypeRefs, and use strings instead.
84
85 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
86
87         * rootcontext.cs: 
88
89         * class.cs (Struct::Struct): set the SEALED flags after
90         checking the modifiers.
91         (TypeContainer::TypeAttr): new property, returns the
92         TypeAttributes for a class.  
93
94         * cs-parser.jay (type_list): Oops, list production was creating a
95         new list of base types.
96
97         * rootcontext.cs (StdLib): New property.
98         (GetInterfaceTypeByName): returns an interface by type name, and
99         encapsulates error handling here.
100         (GetInterfaces): simplified.
101         (ResolveTree): Encapsulated all the tree resolution here.
102         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
103         types. 
104         
105         * driver.cs: Add support for --nostdlib, to avoid loading the
106         default assemblies.
107         (Main): Do not put tree resolution here. 
108
109         * rootcontext.cs: Beginning of the class resolution.
110
111 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
112
113         * rootcontext.cs: Provide better error reporting. 
114
115         * cs-parser.jay (interface_base): set our $$ to be interfaces.
116
117         * rootcontext.cs (CreateInterface): Handle the case where there
118         are no parent interfaces.
119         
120         (CloseTypes): Routine to flush types at the end.
121         (CreateInterface): Track types.
122         (GetInterfaces): Returns an array of Types from the list of
123         defined interfaces.
124
125         * typemanager.c (AddUserType): Mechanism to track user types (puts
126         the type on the global type hash, and allows us to close it at the
127         end). 
128         
129 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
130
131         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
132         RecordInterface instead.
133
134         * cs-parser.jay: Updated to reflect changes above.
135
136         * decl.cs (Definition): Keep track of the TypeBuilder type that
137         represents this type here.  Not sure we will use it in the long
138         run, but wont hurt for now.
139
140         * driver.cs: Smaller changes to accomodate the new code.
141
142         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
143         when done. 
144
145         * rootcontext.cs (CreateInterface):  New method, used to create
146         the System.TypeBuilder type for interfaces.
147         (ResolveInterfaces): new entry point to resolve the interface
148         hierarchy. 
149         (CodeGen): Property, used to keep track of the code generator.
150
151 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
152
153         * cs-parser.jay: Add a second production for delegate_declaration
154         with `VOID'.
155
156         (enum_body): Put an opt_comma here instead of putting it on
157         enum_body or enum_member_declarations so we can handle trailing
158         commas on enumeration members.  Gets rid of a shift/reduce.
159         
160         (type_list): Need a COMMA in the middle.
161
162         (indexer_declaration): Tell tokenizer to recognize get/set
163
164         * Remove old targets.
165
166         * Re-add the parser target.
167
168 2001-07-13  Simon Cozens <simon@simon-cozens.org>
169
170         * cs-parser.jay: Add precendence rules for a number of operators
171         ot reduce the number of shift/reduce conflicts in the grammar.
172         
173 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
174
175         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
176         and put it here.
177
178         Get rid of old crufty code.
179
180         * rootcontext.cs: Use this to keep track of the parsed
181         representation and the defined types available to the program. 
182
183         * gen-treedump.cs: adjust for new convention.
184
185         * type.cs: Split out the type manager, and the assembly builder
186         from here. 
187
188         * typemanager.cs: the type manager will live here now.
189
190         * cil-codegen.cs: And the code generator here. 
191
192 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
193
194         * makefile: Fixed up for easy making.
195
196 2001-07-13  Simon Cozens <simon@simon-cozens.org>
197
198         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
199         the 
200
201         (unary_expression): Expand pre_increment_expression and
202         post_decrement_expression to reduce a shift/reduce.
203
204 2001-07-11  Simon Cozens
205
206         * cs-tokenizer.cs: Hex numbers should begin with a 0.
207
208         Improve allow_keyword_as_indent name.
209
210 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
211
212         * Adjustments for Beta2. 
213
214 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
215
216         * decl.cs: Added `Define' abstract method.
217         (InTransit): new property, used to catch recursive definitions. 
218
219         * interface.cs: Implement `Define'. 
220
221         * modifiers.cs: Map Modifiers.constants to
222         System.Reflection.TypeAttribute flags.
223
224         * class.cs: Keep track of types and user-defined types.
225         (BuilderInit): New method for creating an assembly
226         (ResolveType): New function to launch the resolution process, only
227         used by interfaces for now.
228
229         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
230         that are inserted into the name space. 
231
232 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
233
234         * ARGH.  I have screwed up my tree so many times due to the use of
235         rsync rather than using CVS.  Going to fix this at once. 
236
237         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
238         load types.
239
240 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
241
242         * Experiment successful: Use System.Type rather that our own
243         version of Type.  
244
245 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
246
247         * cs-parser.jay: Removed nsAliases from here.
248
249         Use new namespaces, handle `using XXX;' 
250
251         * namespace.cs: Reimplemented namespace handling, use a recursive
252         definition of the class.  Now we can keep track of using clauses
253         and catch invalid using clauses.
254
255 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
256
257         * gen-treedump.cs: Adapted for all the renaming.
258
259         * expression.cs (Expression): this class now has a Type property
260         which returns an expression Type.
261
262         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
263         `Type', as this has a different meaning now in the base
264
265 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
266
267         * interface.cs, class.cs: Removed from all the sources the
268         references to signature computation, as we can not do method
269         signature computation during the parsing time, as we are not
270         trying to solve at that point distinguishing:
271
272         class X {
273                 void a (Blah x) {}
274                 void a (NS.Blah x) {}
275         }
276
277         Which depending on the context might be valid or not, as we do not
278         know if Blah is the same thing as NS.Blah at that point.
279
280         * Redid everything so the code uses TypeRefs now instead of
281         Types.  TypeRefs are just temporary type placeholders, that need
282         to be resolved.  They initially have a pointer to a string and the
283         current scope in which they are used.  This is used later by the
284         compiler to resolve the reference to an actual Type. 
285
286         * DeclSpace is no longer a CIR.Type, and neither are
287         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
288         are all DeclSpaces, but no Types. 
289
290         * type.cs (TypeRefManager): This implements the TypeRef manager,
291         which keeps track of all the types that need to be resolved after
292         the parsing has finished. 
293
294 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
295
296         * ARGH.  We are going to have to store `foreach' as a class rather
297         than resolving it, as we need to verify error 1579 after name
298         resolution.   *OR* we could keep a flag that says `This request to
299         IEnumerator comes from a foreach statement' which we can then use
300         to generate the error.
301
302 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
303
304         * class.cs (TypeContainer.AddMethod): we now add methods to the
305         MethodGroup instead of the method hashtable.  
306
307         * expression.cs: Add MethodGroup abstraction, which gets us one
308         step closer to the specification in the way we handle method
309         declarations.  
310
311         * cs-parser.jay (primary_expression): qualified_identifier now
312         tried to match up an identifier to a local variable reference or
313         to a parameter reference.
314
315         current_local_parameters is now a parser global variable that
316         points to the current parameters for the block, used during name
317         lookup.
318
319         (property_declaration): Now creates an implicit `value' argument to
320         the set accessor.
321
322 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
323
324         * parameter.cs: Do not use `param' arguments as part of the
325         signature, per the spec.
326
327 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
328
329         * decl.cs: Base class for classes, structs and interfaces.  This
330         is the "Declaration Space" 
331
332         * cs-parser.jay: Use CheckDef for checking declaration errors
333         instead of having one on each function.
334
335         * class.cs: Factor out some code for handling error handling in
336         accordance to the "Declarations" section in the "Basic Concepts"
337         chapter in the ECMA C# spec.
338
339         * interface.cs: Make all interface member classes derive from
340         InterfaceMemberBase.
341
342 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
343
344         * Many things: all interfaces are parsed and generated in
345         gen-treedump.  Support for member variables, constructors,
346         destructors, properties, constants is there.
347
348         Beginning of the IL backend, but very little done, just there for
349         testing purposes. 
350
351 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
352
353         * cs-parser.jay: Fix labeled statement.
354
355         * cs-tokenizer.cs (escape): Escape " and ' always.
356         ref_line, ref_name: keep track of the line/filename as instructed
357         by #line by the compiler.
358         Parse #line.
359
360 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
361
362         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
363         to match the values in System.CodeDOM.
364
365         Divid renamed to Divide.
366
367         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
368         statements. 
369         (Statements.set): remove.
370
371         * System.CodeDOM/CodeCatchClause.cs: always have a valid
372         statements. 
373
374         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
375         falseStatements always have valid values. 
376
377         * cs-parser.jay: Use System.CodeDOM now.
378