* CodeGen.cs: Add methods for setting corflags, subsystem, and corflags.
[mono.git] / mcs / ilasm / codegen / ChangeLog
1 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
2
3         * CodeGen.cs: Add methods for setting corflags, subsystem, and corflags.
4         
5 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
6
7         * ITypeRef.cs, PeapiTypeRef.cs, TypeRef.cs: Quick hack for custom
8         modified types.
9                 
10 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
11
12         * EventDef.cs: Only add one method for addon, fire, other, and
13         removeon
14                 
15 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
16
17         * TypeDef.cs: Add properties to types.
18         * PropertyDef.cs: New file - Implementation of a type property feature
19                 
20 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
21
22         * TypeDef.cs: Fix silly null reference bug.
23                 
24 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
25
26         * EventDef.cs: New file - An event definition.
27         * FeatureAttr.cs: New file - Attributes for features (events and
28         properties)
29         * MethodRef.cs: Only resolve methods once.
30         * TypeDef.cs: Allow Events to be added to types. Also add
31         functionality to add generic type parameters to types. The
32         actually emission of these type parameters is commented out untill
33         I commit my patches to PEAPI and work out the syntax of constraints.
34                 
35 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
36
37         * CodeGen.cs: Allow this assembly name to be set.
38         * HandlerBlock.cs: Make label fields public so they can be
39         accessed in a TryBlocks constructor.
40         * MethodDef.cs: Allow random labels to be inserted at the current
41         position. These are use for scope blocks.
42         * TryBlock.cs: New constructor takes from and to labels as a HandlerBlock
43                 
44 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
45
46         * CustomAttr.cs: New file - Custom attributes
47         * InstrTable.cs: Add stelem.r4 and stelem.r8 instructions. Add
48         . tail to unaligned modifier.
49         * LdtokenInstr.cs: Add type tokens.
50         * MethodDef.cs: Fix IsVararg, add method to add custom attributes,
51         emitting custom attributes when writing code, allow for Ellipsises
52         in param lists, add coma between args in signatures.
53         * ParamDef.cs: Add the Ellipsis pseudo param
54         * PrimitiveTypeRef.cs: System.String and System.Object can be
55         referenced without an [mscorlib] assembly prefix. 
56         * TypeDef.cs: Add Custom attributes.
57                 
58 2003-05-25 Jackson Harper <jackson@latitudegeo.com>
59
60         * CodeGen.cs: Add method to resolve global vararg methods.
61         * ExternMethodRef.cs: Resolve vararg methods
62         * GlobalMethodRef.cs: Set calling conventions, add vararg methods
63         * MethodDef.cs: Set calling conventions, add vararg methods
64         * MethodRef.cs: Set calling conventions, add vararg methods
65         * TypeDef.cs: Resolve vararg methods
66         * TypeRef.cs: Add Ellipsis pseudo type, this should never really
67         be used as a type, but is stored in arrays with other types. Pass
68         call convs to methodref constructor.
69                 
70 2003-05-24 Jackson Harper <jackson@latitudegeo.com>
71
72         * CatchBlock.cs: Remove typo causing to labels to be the same as
73         from labels.
74         * FaultBlock.cs: Remove typo causing to labels to be the same as
75         from labels.
76         * FilterBlock.cs: Remove typo causing to labels to be the same as
77         from labels.
78         * MethodDef.cs: Allow for multiple labels to point to the same
79         line. ie:
80         END_BLOCK:
81         PASS:
82         do stuff
83                 
84 2003-05-23 Jackson Harper <jackson@latitudegeo.com>
85
86         * CatchBlock.cs: New file - Initial implementation of a catch
87         block
88         * FaultBlock.cs: New file - Initial implementation of a fault
89         block
90         * FilterBlock.cs: New file - Initial implementation of a filter
91         block
92         * FinallyBlock.cs: New file - Initial implementation of a finally
93         block
94         * HandlerBlock.cs: New file - A handler block is the block
95         assosciated with a SEH clause
96         * ISehClause: New file - Interface that structured exception
97         handling clauses must implement.
98         * TryBlock.cs: New file - Initial implementation only supports
99         label form SEH. This TryBlock is added to a method as an
100         instruction out of convenience, tryblock is not an instruction.
101                 
102 2003-05-22 Jackson Harper <jackson@latitudegeo.com>
103
104         * InstrTable.cs: Add unsigned conversion instructions.
105                 
106 2003-05-21 Jackson Harper <jackson@latitudegeo.com>
107
108         * CalliInstr.cs: New file - The calli instruction
109         * Ldtoken.cs: New file - The ldtoken instruction
110         * InstrTable.cs: ldc.i8 is a TOKEN_I8 and should be given the
111         MiscToken.ldc_i8 value.
112                 
113 2003-05-18 Jackson Harper <jackson@latitudegeo.com>
114
115         * ExternMethodRef.cs: Accept and add calling conventions. Add
116         methods using array methods if owners are arrays, resolve methods
117         named <init> as .ctor.
118         * ExternTable.cs: Add method to get value classes.
119         * ExternTypeRef.cs: Add AsClassRef method, GetMethodRef now takes
120         calling conventions.
121         * IClassRef.cs: GetMethodRef now takes calling conventions
122         * ITypeRef.cs: Add IsArray IsRef and AsClassRef methods
123         * MethodRef.cs: Change <init> to .ctor
124         * PeapiTypeRef.cs: This class is no longer an ITypeRef because it
125         cannot be converted to a IClassRef. Add IsArray and IsRef, use new
126         Class::GetArray* methods to convert to arrays.
127         * PrimitiveTypeRef.cs: Add method to convert to an IClassRef
128         * TypeRef.cs: Add IsArray and IsRef, add method to convert to
129         IClassRef. GetMethodRef now takes calling conventions
130                 
131 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
132
133         * MethodDef.cs: Add named param table and methods to get named param
134         positions. Add method to get named local variables slot
135         number. Make sure param_lists aren't null when defining them. Add
136         specialname and rtspecialname attributes if the method being
137         defined is named '.ctor' or '.cctor'. Add new method for creating
138         signatures using a list of typerefs.
139         * GlobalMethodRef.cs: Use new CreateSignature method that takes an
140         array of typerefs.
141         * MethodRef.cs: Use new CreateSignature method
142         * InstrTable.cs: Use INSTR_LOCAL and INSTR_PARAM tokens for
143         instructions that take local and param operands.
144                 
145 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
146
147         * TypeDef.cs: Add size and packing information
148                 
149 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
150
151         * IFieldRef.cs: New file - interface field references must implement
152         * ExternFieldRef.cs: New file - Reference to a field in another
153         assembly
154         * FieldRef.cs: New file - Reference to a field in this assembly
155         * GlobalFieldRef.cs: New file - Reference to a global field
156         * FieldInstr.cs: New file - Instruction that takes a field
157         instruction
158         * CodeGen.cs: Add method to resolve global methods
159         * ExternTypeRef.cs: Add method to get method references
160         * FieldDef.cs: Allow methods to be resolved before being defined
161         * IClassRef.cs: Add method to get field references.
162         * TypeDef.cs: Add method to resolve member fields.
163         * TypeRef.cs: Add method to get field references
164                 
165 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
166
167         * GlobalMethodRef.cs: New file - A reference to a global method
168         * CodeGen.cs: Store global methods and fields in hashtables to
169         make lookup easier. Add method to resolve global methods.
170                 
171 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
172
173         * MethodDef.cs: Allways set max stack
174                 
175 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
176
177         * ExternTable.cs: Alias corlib to mscorlib since these seem to get
178         used interchangably
179                 
180 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
181
182         * IMethodRef.cs: New file - Interface that method references must
183         implement
184         * ExternMethodRef.cs: New file - Reference to a method in another
185         assembly
186         * Local.cs: New file - A Local variable
187         * MethodInstr.cs: New file - an instruction that takes a method
188         reference operand
189         * IClassRef.cs: Add method to get a method reference from a class
190         reference
191         * MethodDef.cs: Add ability to resolve methods before defining
192         them, add max stack, locals, and entry point. Make CreateSignature
193         method public and static so other classes can use it.
194         * TypeDef.cs: Store methods and fields in hashtables so they can
195         be easily retrieved, add method to resolve member methods.
196         * TypeRef.cs: Add method for resolving member methods.
197         * ExternTypeRef.cs: Add methods to get classref and methodrefs
198         * MethodRef.cs: New file - Reference to a method in this assembly.
199         
200                 
201 2003-05-07 Jackson Harper <jackson@latitudegeo.com>
202
203         * TypeInstr.cs: New file - implementation of instructions that
204         take a single type instruction.
205                 
206 2003-05-06 Jackson Harper <jackson@latitudegeo.com>
207
208         * SwitchInstr.cs: New file - implementation of switch instructions
209                 
210 2003-05-05 Jackson Harper <jackson@lattidegeo.com>
211
212         * MethodDef.cs: Add ability to add and emit labels
213         * BranchInstr.cs: New file - Branch instructions
214                 
215 2003-05-04 Jackson Harper <jackson@latitudegeo.com>
216
217         * LdcInstr.cs: New file - lcd* instructions
218         * MiscInstr.cs: New file - Just an enum that gives me constant
219         values for instructions PEAPI does not define in an enum
220         * InstrTable.cs: Use new MiscInstr constants instead of string values.
221                 
222 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
223
224         * CodeGen.cs: Define the contents of types after all types have
225         been resolved, this avoids the infinite loop that would occur if a
226         type was a member of its base type.
227         * TypeDef.cs: Method to define contents after being defined. 
228                 
229 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
230
231         * TypeManager.cs: Check if type is defined before defining it.
232                 
233 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
234
235         * CodeGen.cs: Add outer classes to typedefs if necesary
236         * InstrTable.cs: ldtoken instruction is a INSTR_TOK token
237         * TypeDef.cs: Add outer class property
238                 
239 2003-04-30 Jackson Harper <jackson@latitudegeo.com>
240
241         * MethodDef.cs: Accept and emit instructions.
242         * CodeGen.cs: Fix typo
243         * IInstr.cs: New file - Interface for instructions that are added to methods
244         * IntInstr.cs: New file - Instruction that takes a single int
245         param
246         * LdstrInstr.cs: New file - ldstr instruction (the only
247         instruction that takes a string parameter)
248                 
249 2003-04-28 Jackson Harper <jackson@latitudegeo.com>
250
251         * InstrTable.cs: Much simpler system. All tokens go into one
252         hashtable now. There is no reason to have them seperated out.
253                 
254 2003-04-20 Jackson Harper <jackson@latitudegeo.com>
255
256         * CodeGen.cs: Add method to add data
257         * FieldDef.cs: Add method to set a fields value
258         * TypeDef.cs: Add method to add data
259         * DataDef.cs: New file - Definition of a data constant
260                 
261 2003-04-18 Jackson Harper <jackson@latitudegeo.com>
262
263         * FieldDef.cs: Change peapi fielddef name.
264         * MethodDef.cs: Change peapi methoddef name.
265                 
266 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
267
268         * MethodDef.cs: New file - definition of a method.
269         * ParamDef.cs: New file - definition of a parameter to a method
270         * TypeDef.cs: Add method definitions, set intransit flag to false
271         before defining members, so a false circular reference is not
272         created.
273         * CodeGen.cs: Add methods to add method definitions
274
275 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
276
277         * ExternTypeRef.cs: external types are classrefs
278                 
279 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
280
281         * PeapiTypeRef.cs: New file - base wrapper for type refs that are
282         just peapi types.
283         * PrimitiveTypeRef.cs: New file - A primitive type (char, int, string)
284                 
285 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
286
287         * TypeRef.cs: Rewrite - Typerefs are now resolved after parsing.
288         * TypeManager.cs: Rewrite - Just a simple table for looking up
289         typedefs
290         * ExternTable.cs: Create ClassRef's instead of Classes
291         * Location.cs: Make compile
292         * CodeGen.cs: Use new tree system
293                 
294 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
295
296         * ExternTypeRef.cs: New file - Represents a reference to a type in
297         an external assembly
298         * FieldDef.cs: New file - Represents a field definition
299         * IClassRef.cs: New file - Interface that classrefs must
300         implement. This needs some more thought though because once a
301         classref has been modified it is no longer a classref.
302         * ITypeRef.cs: New file - Interface that references to types must
303         implement
304         * TypeDef.cs: New file - Represents the a class definition, and
305         will hold all of the classes members.
306
307 2003-04-07 Jackson Harper <jackson@latitudegeo.com>
308
309         * TypeRef.cs: Return FieldDef when adding a field def to a class
310                 
311 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
312
313         * TypeRef.cs: Add flag for making types pinned
314         
315 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
316
317         * ClassTable.cs: Do not append a . to names that are not in a
318         namespace
319         * CodeGen.cs: Handle nested classes
320                 
321 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
322
323         * ExternTable.cs: Remove some unsed fields.
324         
325 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
326
327         * ExternTable.cs: Add method to lookup classes with a full name,
328         instead of having to have namespace and name seperate.
329         * ClassTable.cs: Make method that seprates full names into
330         name/namespaces public.
331                 
332 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
333
334         * InstrTable.cs: Add Calli, detabify
335                 
336 2003-03-29 Jackson Harper <jackson@latitudegeo.com>
337
338         * InstrTable.cs: Add branch ops switch, and lc.r*, also fix some
339         typos for other ops.
340
341 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
342
343         * ClassTable.cs: Set defined flag and type attributes for referenced 
344         classes when they are defined.
345
346 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
347
348         * MethodTable.cs: Add method to Check if all methods have been defined, set referenced methods properties
349         when defining them
350         * FieldTable.cs: Add method to check if all fields have been defined, set referenced fields properties
351         when defining them
352         * ClassTable.cs: Make sure all methods and fields are defined.
353
354 2003-03-16 Jackson Harper <jackson@latitudegeo.com>
355
356         * MethodTable.cs: Fire events when methods are defined and referenced
357
358 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
359
360         * ClassTable.cs: Classes now store field tables
361         * CodeGen.cs: Add methods to add fields and get field references
362
363 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
364
365         * FieldTable.cs: New file, holds a classes fields
366
367 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
368
369         * InstrTable.cs: Add FieldOp instructions
370
371 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
372
373         * InstrTable.cs: Add ldstr instruction
374
375 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
376
377         * CodeGen.cs: Add method to get method references.
378         * MethodTable.cs: Complete GetReference method
379         * InstrTable.cs: Add MethodOps (instructions that take a method ref param)
380
381 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
382
383         * InstrTable.cs: Add TypeOps (instructions that take a type param)
384
385 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
386
387         * InstrTable.cs: Add IntOps (instructions that take an integer param)
388
389 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
390
391         * InstrTable.cs: Fix instructions that have dots in their name
392
393 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
394
395         * CodeGen.cs: Add code buffer for il instructions when a new method is added.
396         * InstrTable.cs: New file, this is a table of all the instructions (just simple 
397         instructions right now)
398
399 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
400
401         * CodeGen.cs: Set current method when a new method is added.
402
403 2003-03-12 Jackson Harper <jackson@latitudegeo.com>
404
405         * ClassTable.cs: Add Method tables to Class tables, add method to get a 
406         class's method table.
407         * CodeGen.cs: Add Method to add methods :p
408         * MethodTable.cs: Add file, this class is used to add methods to a class.
409
410 2003-03-11 Jackson Harper <jackson@latitudegeo.com>
411
412         * TypeRef.cs: New file, used for pairing types and their names.
413
414 2003-03-09 Jackson Harper <jackson@latitudegeo.com>
415
416         * ExternTable.cs: Do not verify the existence of external types
417
418 2003-03-08: Jackson Harper <jackson@latitudegeo.com>
419
420         * CodeGen.cs: Add ExternTable property
421         * ExternTable.cs: New file, this will is used for pulling 
422         types and methods from external assemblies.
423
424 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
425
426         * ClassTable.cs, CodeGen.cs: Add methods to allow types to inherit from another type.
427
428 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
429
430         * ClassTable.cs: Add method to check for undefined types
431
432 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
433
434         * CodeGen.cs: Use class table for adding type definitions
435         * ClassTable.cs: Return ClassDef when defining types
436         
437 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
438
439         * ClassTable.cs: Add method for adding class definitions to the 
440         the table.
441
442 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
443
444         * CodeGen.cs: Reconfigure to work with new PEAPI emission system
445
446 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
447
448         * ClassTable.cs: Add file, this is a 'table' for storing classes
449         * Location.cs: Add file, this will eventually be used for marking
450         locations in IL files
451
452 2003-02-10 Jackson Harper <jackson@latitudegeo.com>
453
454         * Method.cs: Add method to set parameters, 
455                set parameters when defining type
456         * Class.cs: Fix very silly bug in GetMethod method
457         
458
459 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
460
461         * Class.cs: Resolve Methods before emiting
462         * InstrBase.cs: Take a Class instead of CodeGen when emiting
463         * Method.cs: Replace MethodInfo property with MethodBuilder property,
464                 Add resolve method
465         * Instructions.cs: Take Class instead of CodeGen when emitting, 
466                 get member methods from Class.
467         * TypeManager.cs: Add set indexer
468
469 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
470
471         * Instructions.cs: Use TypeManager to lookup types
472
473 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
474
475         * TypeManager.cs: Fix error parsing type names
476         * Method.cs: Display the name of types that can't be found
477
478 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
479
480         * TypeManager.cs: Add file
481         * CodeGen.cs: Add TypeManager attribute
482         * InstrBase.cs: Take a CodeGen in Emit method
483         * Instructions.cs: Take a CodeGen in Emit method, handle arg lists better
484         * Method.cs: Handle local variables better
485         
486
487 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
488
489         * Method.cs: Add functionality to define local variables
490         * Instructions.cs: Add newobj instruction, cleanup call instruction
491
492 2003-02-03 Jackson Harper <jackson@latitudegeo.com>
493
494         * AssemblyNameStore.cs: Added file
495
496 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
497
498         * Instructions.cs: Resolve parameters types in a more proper manner.
499
500 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
501
502         * Class.cs: Don't try to emit methods if we don't have any
503         * Class.cs: Test for entry point of methods, and set Assembly entrypoint
504         * CodeGen.cs: Add method to set an Assemblys entry point
505         * Method.cs: Add IsEntryPoint property
506         * Method.cs Add MethodInfo property, and set this while Emiting
507         * Instructions.cs: Add new InstrCall instruction