In ilasm/codegen:
[mono.git] / mcs / ilasm / codegen / ChangeLog
1 2006-01-09  Ankit Jain  <jankit@novell.com>
2
3         * GenericTypeRef.cs: Rename to ..
4         * GenericParamRef.cs: .. this.
5         (IGenericTypeRef): New.
6         (GenericParamRef): Implement IGenericTypeRef.
7         * GenericTypeInst.cs (GenericTypeInst): Implement IGenericTypeRef instead
8         of IClassRef.
9         (GenericTypeInst.ResolveOnly): Rename to ResolveNoTypeSpec to implement
10         IGenericTypeRef.ResolveNoTypeSpec .
11         * MethodDef.cs (MethodDef.ResolveGenParams): Update to use GenericParamRef.
12         * Local.cs (Local.GetPeapiLocal): Use IGenericTypeRef.
13
14 2006-01-08  Ankit Jain  <jankit@novell.com>
15
16         * InstrTable.cs (inst_table): Add stelem.any, ldelem.any and
17         constrained. instructions.
18
19 2006-01-07  Ankit Jain  <jankit@novell.com>
20
21         * GenericParameters.cs (GenericParameter): New.
22         (GenericParameters): Collection of Generic parameters.
23         * TypeDef.cs:
24         * CodeGen.cs:
25         * MethodDef.cs: Update to use the new GenericParameters class.
26
27 2006-01-06  Ankit Jain  <jankit@novell.com>
28
29         GenericTypeInst.Resolve should do the expected thing ie., resolve and add
30         the Generic Inst to the typespec table. Use ResolveOnly to Resolve w/o 
31         adding to the table.
32         * GenericTypeInst.cs (GenericTypeInst.Resolve): Rename to ..
33         (GenericTypeInst.ResolveOnly): .. this.
34         (GenericTypeInst.ResolveAsClass): Rename to Resolve.
35
36         * TypeDef.cs (TypeDef.Define): Revert the ResolveAsClass calls added here.
37         * Local.cs (Local.GetPeapiLocal): Use new GenericTypeInst.ResolveOnly if type is
38         GenericTypeInst.
39
40 2006-01-06  Ankit Jain  <jankit@novell.com>
41
42         * IClassRef.cs (IClassRef.Clone): New.
43         (IClassRef.GetGenericTypeInst): Get the Generic Instance of the IClassRef.
44         (IClassRef.ResolveInstance): Resolves the generic instance and returns the
45         resolved PEAPI type.     
46
47         * TypeRef.cs:
48         * ExternTypeRef.cs: Implement new methods of IClassRef.
49         Classes implementing IClassRef cache their generic instances (GenericTypeInst)
50         and their corresponding resolved PEAPI types.
51
52         * CodeGen.cs (CodeGen.GetTypeRef): Gets a TypeRef given a type name and caches them.
53
54         GenericTypeInst is now used for any Generic Type Instance, including any
55         extern types. ExternTypeRefInst is not used now.
56         * GenericTypeInst.cs (GenericTypeInst): Implement IClassRef instead of ITypeRef.
57         (GenericTypeInst.ResolveAsClass): Adds the instance to the TypeSpec table after Resolve()'ing it.
58         Clone () returns a cloned instance which shares its class_ref and generic arguments.
59
60         * TypeDef.cs (TypeDef.Define): Use ResolveAsClass for base class and interfaces
61         being implemented if they are GenericTypeInsts.
62
63 2005-12-24  Jb Evain  <jbevain@gmail.com>
64
65         * FeatureAttr.cs: tag as Flags, add an Instance value.
66         * PropertyDef.cs (PropertyDef.Resolve): Tag the property as instance or class.
67
68 2005-12-22  Ankit Jain  <jankit@novell.com>
69
70         * MethodDef.cs (MethodDef.ctor): Add type_def param. Use this for all uses of
71         the owner type_def. ResolveGenParams () before creating signature.
72         (MethodDef.ResolveGenParams):
73         (MethodDef.ResolveGenParam): Remove type_def param, instead use type_def field.
74         (MethodDef.Define): Remove overload with typedef param.
75         (MethodDef.CreateSignature): Put "`0" right after the name instead of at the end.
76         * TypeDef.cs (TypeDef.DefineContents): Update usage of MethodDef.Define .
77
78 2005-12-21  Ankit Jain  <jankit@novell.com>
79
80         * GenericArguments.cs (GenericArguments): New.
81         * ExternTypeRefInst.cs (ExternTypeRefInst):
82         * GenericTypeInst.cs (GenericTypeInst):
83         * GenericMethodSig.cs (GenericMethodSig): Update to use new GenericArguments class.
84
85 2005-12-16  Ankit Jain  <jankit@novell.com>
86
87         Use tuple of (field name, type_name) for fielddef hashtable in TypeDef.cs and
88         CodeGen.cs
89         * FieldDef.cs (FieldDef.Type): New.
90         * TypeDef.cs (TypeDef.ResolveField): Add 'type_name' param.
91         * CodeGen.cs (CodeGen.ResolveField): Add 'type_name' param.
92         * FieldRef.cs (FieldRef.Resolve): Update usage of .ResolveField .
93         * GlobalFieldRef (GlobalFieldRef.Resolve): Likewise.
94         * ExternTable.cs (IScope.FullName): New. Returns full name including and enclosing class
95         or assembly/module name.
96         (ExternRef.FullName):
97         (ExternModule.FullName):
98         (ExternAssembly.FullName): Implement new IScope.FullName .
99         * ExternTypeRef.cs (ExternTypeRef.Clone): Clone SigMod also.
100         (ExternTypeRef.FullName): Update to return full name including enclosing type or assembly
101         or module name. 
102         (ExternTypeRef.Name): Update to return only full_name with modifiers (array/pointers etc).
103         (ExternTypeRef.GetReflectedType): Use Name instead of FullName as only type name is required here.
104         * GenericTypeRef.cs (GenericTypeRef.FullName): Return proper fullname of the form (!0 or !!0).
105         * GenericTypeInst.cs (GenericTypeInst.ctor): Change param 'full_name' to 'name'. 'full_name' is
106         constructed here using the type parameter list.
107         Update code to use name instead of full_name.
108                                
109 2005-12-15  Ankit Jain  <jankit@novell.com>
110
111         * CodeGen.cs (CodeGen.SetAssemblyName): Multiple .assembly declarations with different
112         names are not allowed.
113
114 2005-12-14  Ankit Jain  <jankit@novell.com>
115
116         * PeapiTypeRef.cs (PeapiTypeRef.MakeBoundArray): Handle the case when only
117         lower bound (no size info) is available.
118
119 2005-12-14  Ankit Jain  <jankit@novell.com>
120
121         * TypeDef.cs (TypeDef.ctor): name_space can be null.
122
123 2005-12-13  Ankit Jain  <jankit@novell.com>
124
125         * TypeDef.cs (TypeDef.ctor): Ensure that 'name' contains only the last part
126         of the full (namespace + name) dotted name.
127
128 2005-12-12  Ankit Jain  <jankit@novell.com>
129
130         * TypeDef.cs (TypeDef.Define): Ensure nested visibility for a nested class.
131         (TypeDef.NestedFullName): New.
132
133 2005-12-09  Ankit Jain  <jankit@novell.com>
134
135         * MethodDef.cs (MethodDef.GenParamCount): typar_list can be null.
136
137 2005-12-09  Ankit Jain  <jankit@novell.com>
138
139         * ITypeRef.cs (ITypeRef.GetMethodRef): Add 'gen_param_count' param.
140         * Sentinel.cs (Sentinel.GetMethodRef): Update.
141         * GlobalMethodRef.cs (GlobalMethodRef.ctor): Add 'gen_param_count' param.
142         (GlobalMethodRef.Resolve): Update usage of MethodDef.CreateSignature .
143         * TypeDef.cs (TypeDef.GetGenericParamNum): New.
144         (TypeDef.DefineContents): Update usage of ITypeRef.GetMethodRef .
145         * ExternTypeRefInst.cs (ExternTypeRefInst.ctor): Add parameter for list of type
146         parameters (type_list).
147         (ExternTypeRefInst.Clone): Clone type_list also.
148         (ExternTypeRefInst.Resolve): Resolve the list of type parameters, and create
149         instance of PEAPI.GenericTypeInst instead of PEAPI.ClassRefInst .
150         (ExternTypeRefInst.GetMethodRef): Update.
151         * GenericTypeInst.cs (GenericTypeInst.GetMethodRef): Update signature. Update
152         usage of TypeSpecMethodRef.ctor .
153         * MethodRef.cs (MethodRef.ctor): Add 'gen_param_count' param.
154         (MethodRef.Resolve): Throw exception for non-existant owner. Update usage of
155         MethodDef.CreateSignature .
156         * ExternMethodRef.cs (ExternMethodRef.ctor): Add 'gen_param_count' param.
157         (ExternMethodRef.Resolve): Update usage of PEFile.AddMethodToTypeSpec and .AddMethod
158         * GenericMethodRef.cs (GenericMethodRef.PeapiMethod): Return PEAPI.Method obtained in 
159         .Resolve .
160         * GenericTypeRef.cs (GenericTypeRef.GetMethodRef): Update.
161         * MethodPointerTypeRef.cs (MethodPointerTypeRef.GetMethodRef): Likewise.
162         * TypeSpecMethodRef.cs (TypeSpecMethodRef.ctor): Add 'gen_param_count' param.
163         (TypeSpecMethodRef.Resolve): Update usage of PEFile.AddMethodToTypeSpec .
164         * MethodDef.cs (MethodDef.ctor): Add 'typars_list' param.
165         (MethodDef.AddGenericParam): Replace .. 
166         (MethodDef.AddGenericParams): .. with this.
167         (MethodDef.GenParamCount): New.
168         (MethodDef.GetGenericParamNum): New. Returns index for a given method type parameter name.
169         (MethodDef.ResolveGenParams): Resolves type parameter names in the parameter
170         list to their corresponding indices.
171         (MethodDef.ResolveGenParam): Resolves a give type parameter to its corresponding
172         index.
173         (MethodDef.CreateSignature): Add 'gen_param_count' param.
174         * TypeRef.cs (TypeRef.GetMethodRef): Update.
175         * ExternTypeRef.cs (ExternTypeRef.GetMethodRef): Likewise.
176         * PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Likewise.
177
178 2005-12-05  Ankit Jain  <jankit@novell.com>
179
180         * TypeDef.cs (TypeDef.GenericInfo.num): New.
181         (TypeDef.AddGenericParam): Set num for GenericInfo.
182         * MethodDef.cs (MethodDef.GenericInfo.num): New.
183         (MethodDef.AddGenericParam): Set num for GenericInfo.
184         * GenericTypeRef.cs (GenericTypeRef.ctor): Update to use PEAPI.GenParam
185         instead of PEAPI.MVar and PEAPI.GenericTypeSpec.
186
187 2005-11-28  Ankit Jain  <jankit@novell.com>
188
189         * ExternTypeRef.cs (extern_table): Remove unused field.
190         (.ctor): Remove parameter for extern_table. Update usage accordingly.
191         * ExternTable.cs (IScope): Remove unused 'table' parameter.
192         (ExternRef): Change IScope interface implementation accordingly. Update
193         call to ExternTypeRef.ctor for the previous change.
194
195 2005-09-15  Ankit Jain  <jankit@novell.com>
196
197         * DeclSecurity.cs (IDeclSecurityTarget.AddDeclSecurity): Remove.
198           (IDeclSecurityTarget.AddPermission),
199           (IDeclSecurityTarget.AddPermissionSet): New.
200           (DeclSecurity.IDeclSecurityTarget): Implement new interface methods.
201           (DeclSecurity.sec_action),
202           (DeclSecurity.data): Remove.
203           (DeclSecurity.permissionset_table): New.
204           (DeclSecurity.ctor): Replace parameterized constructor with a default one.
205           (DeclSecurity.AddTo): AddDeclSecurity for all Security Actions in the permissionset_table.
206         * TypeDef.cs (TypeDef.declsecurity_list): Remove.
207           (TypeDef.decl_sec): New.
208           (TypeDef.IDeclSecurityTarget): Implement new interface methods.
209           (TypeDef.DefineContents): Use new decl_sec instead of declsecurity_list.
210         * CodeGen.cs (CodeGen.assembly_declsec): Change type from ArrayList to DeclSecurity.
211           (CodeGen.EndAssemblyRef): Set current_customattrtarget and current_declsectarget to null.
212           (CodeGen.IDeclSecurityTarget): Implement new interface methods.
213           (CodeGen.Write): Add assembly_declsec to the assembly (using DeclSecurity.AddTo).
214         * ExternTable.cs (ExternAssembly.declsec_list): Remove.
215           (ExternAssembly.decl_sec): New.
216           (ExternAssembly.Resolve): Use new decl_sec instead of declsec_list.
217           (ExternAssembly.IDeclSecurityTarget): Implement new interface methods.
218         * MethodDef.cs (MethodDef.declsecurity_list): Remove.
219           (MethodDef.decl_sec): New.
220           (MethodDef.IDeclSecurityTarget): Implement new interface methods.
221           (MethodDef.WriteCode): Use new decl_sec instead of declsecurity_list.
222         * ExternTypeRef.cs (ExternTypeRef.GetReflectedType): New.  
223
224 2005-09-08  Ankit Jain  <jankit@novell.com>
225
226         * CodeGen.cs (CodeGen.stack_reserve): New.
227           (CodeGen.SetStackReserve): New.
228           (CodeGen.Write): SetStackReserve on the pefile.
229
230 2005-09-06  Ankit Jain  <jankit@novell.com>
231
232         * ExternTable.cs (ExternRef.is_resolved): New.
233           (ExternModule.Resolve, ExternAssembly.Resolve,
234           ExternTable.Resolve): Return if is_resolved. Set to true at the end.
235
236 2005-08-29  Ankit Jain  <jankit@novell.com>
237
238         * InstrTable.cs (inst_table): Comment out stelem and ldelem opcodes.
239
240 2005-08-26  Ankit Jain  <jankit@novell.com>
241
242         * ExternTable.cs (IScope): New. Interface for ResolutionScope.
243           (ExternRef): Implement IScope.
244           (ExternRef.GetTypeRef): Handle references to nested classes.
245           (ExternRef.GetValueType): Remove. Logic combined with GetType.
246           (ExternRef.GetType): Add param 'is_valuetype' and handle accordingly.
247         * ExternTypeRef.cs (ExternTypeRef): Implement IScope.
248           (ExternTypeRef.extern_ref),
249           (ExternTypeRef.ctor),
250           (ExternTypeRef.ExternRef): Change extern_ref type from ExternRef to IScope.
251           (ExternTypeRef.nestedtypes_table),
252           (ExternTypeRef.nestedclass_table): New. Hashtables for nested classes.
253           (ExternTypeRef.Resolve): Resolve parent if it is ExternTypeRef type.
254           (ExternTypeRef.GetTypeRef): New.
255           (ExternTypeRef.GetExternTypeRef): New. Returns the resolve PEAPI type.
256           (ExternTypeRef.GetType): New.
257
258 2005-08-23  Ankit Jain  <jankit@novell.com>
259
260         * ExternTable.cs (ExternTable.ctor): Remove. Move the initialization code
261           to the new method AddCorlib.
262           (ExternTable.AddCorlib): New.
263           (ExternTable.Resolve): Assembly_table can be null so check before using it.
264           (ExternTable.GetTypeRef): AddCorlib if mscorlib is being referenced but
265           assembly_table is still null.
266         * CodeGen.cs (CodeGen.SetAssemblyName): Call AddCorlib if name is not mscorlib.
267           (CodeGen.Write): Pass null for new outputDir param for PEFile ctor. 
268         * (PrimitiveTypeRef.Name): New. Returns the full_name.
269
270 2005-08-18  Ankit Jain  <jankit@novell.com>
271
272         * IMethodRef.cs (IMethodRef.Owner): New. Returns owner of the method.
273         * GlobalMethodRef.cs (GlobalMethodRef),
274           MethodRef.cs (MethodRef),
275           ExternMethodRef.cs (ExternMethodRef),
276           GenericMethodRef.cs (GenericMethodRef),
277           TypeSpecMethodRef.cs (TypeSpecMethodRef): Implement IMethodRef.Owner.
278         * CustomAttr.cs (CustomAttr.IsSuppressUnmanaged): New. Checks if the
279           it is a "System.Security.SuppressUnmanagedCodeSecurityAttribute" and 
280           is from "mscorlib" or the current assembly is mscorlib itself.
281         * TypeDef.cs (TypeDef.DefineContents),
282           MethodDef.cs (MethodDef.WriteCode): Set HasSecurity attribute if
283           SuppressUnmanagedCodeSecurity custom attribute is present.
284         * ExternTable.cs (ExternRef.Name): New.  
285         * ExternTypeRef.cs (ExternTypeRef.ExternRef): New. Returns the corresponding
286           extern ref.
287
288 2005-08-18  Ankit Jain  <jankit@novell.com>
289
290         * MethodDef.cs (MethodDef.WriteCode): Process custom attributes and decl security
291           lists even for abstract methods.
292
293 2005-08-16  Ankit Jain  <jankit@novell.com>
294
295         * CodeGen.cs (CodeGen.current_field_native_type): New.
296           (CodeGen.AddFieldMarshalInfo): New. Add marshal info for the current field.
297           (CodeGen.AddFieldDef): Add marshal info for the field.
298         * FieldDef.cs (FieldDef.native_type): New. Native type for marshalling.
299           (FieldDef.AddMarshalInfo): New. Set native_type.
300           (FieldDef.Resolve): Set MarshalInfo for field_def.
301         * MethodDef.cs (MethodDef.ret_native_type): New. Native type for return type.  
302           (MethodDef.AddRetTypeMarshalInfo): New.
303           (MethodDef.EntryPoint): Throw exception is the method is not static.
304           (MethodDef.Resolve): Call overload with class_def=null.
305           (MethodDef.Resolve): Add global methods to code_gen.PEFile. 
306           Add marshal info for return type.
307         * ParamDef.cs (ParamDef.native_type): New. Native type for marshalling.
308           (ParamDef.AddMarshalInfo): New.
309           (ParamDef.Define): Add marshal info to peapi_param.
310
311 2005-08-08  Ankit Jain  <jankit@novell.com>
312
313         * ExternTypeRef.cs (ExternTypeRef.Clone): Use full_name instead of FullName
314           to avoid cloning modifiers (like []).
315
316 2005-08-08  Ankit Jain  <jankit@novell.com>
317
318         * CodeGen.cs (CodeGen.entry_point): New bool field.
319           (CodeGen.HasEntryPoint): New. Property to mark that the assembly
320           has an entrypoint.
321           (CodeGen.Write): Throw Exception if an EXE has been requested but the
322           source file has no entrypoint defined.
323
324 2005-08-05  Ankit Jain  <jankit@novell.com>
325
326         * DeclSecurity.cs: New File.
327           (DeclSecurity): New class.
328           (IDeclSecurityTarget): New interface.
329         * TypeDef.cs (TypeDef): Implement IDeclSecurityTarget.
330           (TypeDef.DefineContents): Add DeclSecurity info.
331         * CodeGen.cs (CurrentDeclSecurityTarget): New. Property for current
332           DeclSecurity target.
333           (BeginTypeDef, BeginMethodDef, BeginAssemblyRef): Set current DeclSecurity
334           target accordingly.
335           (AddAssemblyDeclSecurity): New. Add DeclSecurity info to assembly.
336         * ExternTable.cs (ExternAssembly): Implement IDeclSecurityTarget.
337           (Resolve): Add DeclSecurity info to AssemblyRef.
338         * MethodDef.cs (MethodDef): Implement IDeclSecurityTarget.
339           (WriteCode): Add DeclSecurity info to MethodDef.
340
341 2005-08-03  Ankit Jain  <jankit@novell.com>
342
343         * GlobalMethodRef.cs (GlobalMethodRef.Resolve): Use CreateVarargSignature
344           to create method's signature for a vararg method.
345
346 2005-08-02  Ankit Jain  <ankit@corewars.org>
347
348         Fix #61512.
349         * TypeDef.cs (TypeDef.Define): Use default values for pack and size if only
350           one of them is unspecified.
351
352 2005-05-10  Ankit Jain  <ankit@corewars.org>
353
354         Fix #74768.
355         * ExternTable.cs (ExternRef.GetTypeRef): Make ValueClass if requested.
356         Hack alongwith Hari.
357
358 2005-05-06  Ankit Jain  <ankit@corewars.org>
359
360         * MethodDef.cs (MethodDef.GetNamedParamPos): Param num starts from 1 for instance
361         methods.
362         * CodeGen.cs (CodeGen.BeginTypeDef): Set current_customattrtarget when reopening a
363         class.
364         
365 2005-04-27  Ankit Jain  <ankit@corewars.org>
366
367         * ExternTypeRefInst.cs (ExternTypeRefInst.GetMethodRef): Use method_table to avoid
368         creating duplicates.
369         * PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Use method_table to avoid 
370         creating duplicates
371         * PeapiTypeRef.cs (Pair): New class. Tuple of PEAPI.Type and string.
372         (PeapiTypeRef.type_table): New.
373         (PeapiTypeRef.MakeArray, MakeBoundArray, MakeManagedPointer, MakeUnmanagedPointer,
374         MakeCustomModified): Use type_table to avoid creating duplicates.
375         
376 2005-04-22  Atsushi Enomoto  <atsushi@ximian.com>
377
378         * InstrTable.cs :
379           ble.un.s and blt.un.s were incorrectly added to the table.
380
381 2005-04-22  Ankit Jain  <ankit@corewars.org>
382
383         * TypeSpecMethodRef.cs (TypeSpecMethodRef.Resolve): Set is_resolved
384         to true.
385         
386 2005-04-18  Ankit Jain  <ankit@corewars.org>
387
388         * CodeGen.cs (CodeGen.AddManifestResource): Add a
389         ManifestResource to manifestResources ArrayList.
390         (CodeGen.Write): Add all resources to the pefile.
391
392 2005-04-12  Ankit Jain  <ankit@corewars.org>
393
394         * CustomAttr.cs (ICustomAttrTarget): New interface.
395         * TypeDef.cs: Implement ICustomAttrTarget.
396         * FieldDef.cs, PropertyDef.cs, ParamDef.cs, EventDef.cs
397         (AddCustomAttribute): Implement ICustomAttrTarget
398         (.Resolve): Add custom attributes.
399         * CodeGen.cs (CurrentCustomAttrTarget): New. Property for 
400         current CustomAttr target.
401         (BeginTypeDef, BeginMethodDef, BeginAssemblyRef): Set
402         current_customattrtarget accordingly.
403         * ExternTable.cs (ExternRef): Implement ICustomAttrTarget.
404         (ExternModule.Resolve): Add custom attributes to ModuleRef.
405         (ExternAssembly.Resolve): Add custom attributes to AssemblyRef.
406         * MethodDef.cs: Implement ICustomAttrTarget and add custom
407         attributes.
408         (GetParam): New. Get ParamDef by index.
409
410 2005-04-08  Ankit Jain  <radical@corewars.org>
411
412         * MethodDef.cs (named_param_table, CreateNamedParamTable): Remove.
413         (GetNamedParamPos): Implement using a linear scan.
414
415         * TypeDef.cs (TypeDef): Initialize 'is_enum_class'.
416         (Define): Set 'is_value_class' or 'is_enum_class' depending on
417         whether the parent is System.ValueType or System.Enum.  Update to
418         changes in PEAPI.cs.
419
420 2005-03-17  Ankit Jain  <radical@corewars.org>
421
422         * MethodDef.cs: Added method AddParamDefaultValue for adding DefaultValue
423         to a method parameter.
424         * ParamDef.cs: Added method AddDefaultValue and handling of default value.
425
426 2005-02-07  Jackson Harper  <jackson@ximian.com>
427
428         * MethodDef.cs: Don't die on duplicate local symbols. Fixes bug
429         72149. Patch by Sohail Somani.
430
431 2004-12-14  Raja R Harinath  <rharinath@novell.com>
432
433         * MethodDef.cs (CreateSignature): Add a space in generated signature.
434
435 2004-12-02  Jackson Harper  <jackson@ximian.com>
436
437         * ExternTypeRefInst.cs: When converting to arrays we loose our valuetypedness.
438
439 2004-12-02  Jackson Harper  <jackson@ximian.com>
440
441         * MethodDef.cs: Abstract methods don't get bodies. Even if there
442         are bodies there.
443
444 2004-12-02  Jackson Harper  <jackson@ximian.com>
445
446         * MethodDef.cs: If the type is an interface auto set fields to
447         static (and give a warning if they are not static), and set
448         methods to abstract virtual (and give warning if they were not already).
449         * FieldDef.cs:
450         * TypeDef.cs: Accessors and convience properties for getting and
451         setting the method/field attributes.
452         
453         
454 2004-12-02  Jackson Harper  <jackson@ximian.com>
455
456         * FieldDef.cs: Set the underlying type for bytearray data constants. This
457         fixes bug #70153 and #70154 which my previous fix caused.
458
459 2004-08-01  Atsushi Enomoto  <atsushi@ximian.com>
460
461         * DebuggingInfo.cs : csc build fix (see bug #62230).
462
463 2004-07-27  Martin Baulig  <martin@ximian.com>
464
465         * IInstr.cs (IInstr): Made this an abstract class and not an
466         interface, added a .ctor which takes a Location.
467         (IInstr.Location): New public readonly field.
468
469         * CodeGen.cs (CodeGen.SymbolWriter): New public property.
470         (CodeGen.BeginSourceFile, EndSourceFile): New public methods.
471         (CodeGen.EndMethodDef): Take a `Location' argument.
472         (CodeGen.Write): Create debugging info if the user requested it.
473
474         * MethodDef.cs (MethodDef.ctor): Added `CodeGen codegen' and
475         `Location start' arguments.  If the user requested debugging
476         information, register ourselves with the symbol writer.
477         (MethodDef.WriteCode): Emit debugging information.
478
479         * DebuggingInfo.cs: New file.
480
481 2004-07-23  Jackson Harper  <jackson@ximian.com>
482
483         * MethodDef.cs: Params are 1 based if the method is instance
484         because of the 'this' arg.
485         
486 2004-07-21  Jackson Harper  <jackson@ximian.com>
487
488         * ExternTypeRefInst.cs: Use the PeapiType so that modified types
489         will actually work. Add a Clone method so that type ref insts
490         aren't duplicated making them modified multiple times.
491         
492 2004-07-12  Jackson Harper  <jackson@ximian.com>
493
494         * MethodDef.cs: Local lists are not lazyily allocated so they were
495         getting added to every method. This is legal but wastes space.
496
497 2004-07-08  Jackson Harper  <jackson@ximian.com>
498
499         * CodeGen.cs: Add assembly custom attributes to the pe file.
500         * CustomAttr.cs: Custom attributes are now added through the
501         pefile, this ensures that they get emitted properly.
502         * ExternTable.cs: Allow adding custom attributes to assembly
503         refs.
504         
505 2004-06-26  Jackson Harper  <jackson@ximian.com>
506
507         * TypeDef.cs: Preserve the order of fields in a class. Then after
508         all the fields have been defined reset the order in PEAPI to the
509         correct order. This is done so sequential layouts actually
510         work. The order needs to be reset because it can be lost during
511         the recursive definition phase.
512         * MethodDef.cs: Use and ExternModule for pinvoke data's module
513         refs. This way we don't get duplicate module refs.
514         
515 2004-06-24  Jackson Harper  <jackson@ximian.com>
516
517         * MethodDef.cs: Report when defining methods just like MS.
518         * TypeDef.cs: Error message when we can't find a locla method.
519         
520 2004-06-23  Jackson Harper  <jackson@ximian.com>
521
522         * MethodDef.cs: sigh, another varargs fix that probably breaks
523         other varargs tets. Someday I will get this right, I don't think
524         today is that day though. This fix basically just makes sure to
525         trim the sentinel off of signatures. Also eliminated some code
526         duplication.
527         * ParamDef.cs: Make IsSentinel work for both cases of generating a
528         sentinel param def.
529         
530 2004-06-20  Jackson Harper  <jackson@ximian.com>
531
532         * SwitchInstr.cs: Allow switches with no labels.
533         
534 2004-06-20  Jackson Harper  <jackson@ximian.com>
535
536         * InstrTable.cs: Add .u8 opcodes for ldind and ldelem these are
537         just aliases to their .i8 equivelents.
538         
539 2004-06-19  Jackson Harper  <jackson@ximian.com>
540
541         * MethodPointerTypeRef.cs: New File - represents a method pointer
542         that is being treated as a typeref. For example method void*() in
543         the statement castclass method void*().
544         
545 2004-06-19  Jackson Harper  <jackson@ximian.com>
546
547         * InstrTable.cs: Add undocumented brnull opcode. This is really
548         just an alias for brfalse.
549         
550 2004-06-19  Jackson Harper  <jackson@ximian.com>
551
552         * MethodDef.cs: Add a method to create vararg signatures from a
553         list of typerefs that matches the algorithm for creating vararg
554         signatures from paramdefs. This is used when creating methodref
555         signatures.
556         * MethodRef.cs: Use the new CreateVarargSignature method to create
557         the methods signature if it is a vararg method.
558         
559 2004-06-14  Jackson Harper  <jackson@ximian.com>
560
561         * CodeGen.cs: Allow file refs to be added.
562         * FileRef.cs: New file - represents a file ref.
563         
564 2004-06-14  Jackson Harper  <jackson@ximian.com>
565
566         * CodeGen.cs: Allow adding module refs.
567         * ExternTable.cs: Add ExternModule refs.
568         * ExternTypeRef.cs: Take an ExternRef which can be either an
569         assmebly ref or a module ref.
570         
571 2004-06-14  Jackson Harper  <jackson@ximian.com>
572
573         * CodeGen.cs: Implement setting module names.
574         
575 2004-05-23  Jackson Harper  <jackson@ximian.com>
576
577         * MethodDef.cs: Cache vararg signatures so a new memberref is not
578         created for each vararg pattern.
579         
580 2004-05-22  Jackson Harper  <jackson@ximian.com>
581
582         * InstrTable.cs: ldc.i4.M1 is aliased to ldc.i4.m1. Fixes bug #58524.
583         
584 2004-05-22  Jackson Harper  <jackson@ximian.com>
585
586         * GlobalMethodRef.cs: Check for sentinel properly.
587         
588 2004-04-03  Jackson Harper  <jackson@ximian.com>
589
590         * CodeGen.cs: cast
591         
592 2004-04-02  Jackson Harper  <jackson@ximian.com>
593
594         * CodeGen.cs: Allow setting assembly info.
595         
596 2004-04-01  Jackson Harper  <jackson@ximian.com>
597
598         * CodeGen.cs: Add a current assembly ref and methods to create/end
599         it so we can set assembly ref attributes.
600         * ExternTable.cs: Make the ExternAssembly public so that its
601         attributes can be set.
602
603 2004-03-28  Jackson Harper  <jackson@ximian.com>
604
605         * PeapiTypeRef.cs: Check for null bounds in bound arrays. Patch by
606         Vladimir Vukicevic.
607         * ModifiablyType.cs: Set names properly for bound arrays.
608         
609 2004-02-18  Jackson Harper <jackson@ximian.com>
610
611         * ExternTypeRefInst.cs: New file - represents an instance of an
612         extern type ref, used for making value type tokens.
613         * TypeDef.cs: Add implementing classes.
614         
615 2003-12-10  Jackson Harper <jackson@ximian.com>
616
617         * ModifiableType.cs: Allow the conversion list to be got/set.
618         * ExternTypeRef.cs: Add a Clone method. Remove table modification.
619         
620 2003-12-10  Jackson Harper <jackson@ximian.com>
621
622         * ExternTable.cs: Add methods to update a types name.
623         * ExternTypeRef.cs: When a types name is modified update it in the
624         table.
625         
626 2003-12-08  Jackson Harper <jackson@ximian.com>
627
628         * ModifiableType.cs: Put modifier and class in the list in the
629         correct order.
630         
631 2003-11-18  Jackson Harper <jackson@ximian.com>
632
633         * MethodDef.cs: Add support for .zeroinit. This is just another
634         way of initializing locals.
635         
636 2003-11-17  Jackson Harper <jackson@ximian.com>
637
638         * LdstrInstr.cs: Allow strings to be created as bytearrays.
639         
640 2003-10-28 Jackson Harper <jackson@ximian.com>
641
642         * ExternTable.cs: Revert back to resolving value and class types
643         into the same table. This avoids types being resolved multiple
644         times when classrefs are used with valuetypes.
645         
646 2003-10-28 Jackson Harper <jackson@ximian.com>
647
648         * ExternTable.cs: This is now used to store ExternTypeRefs so we
649         only create 1 for each external type.
650         * ExternTypeRef.cs: Only create one method and field per a
651         signature/name.
652         
653 2003-10-18 Jackson Harper <jackson@ximian.com>
654
655         * ExternTable.cs: Separate class and value types into diff tables.
656         
657 2003-10-18 Jackson Harper <jackson@ximian.com>
658
659         * InstrTable.cs: Use short branch instructions instead of aliasing them
660         to the long branch instructions.
661         
662 2003-10-13 Jackson Harper <jackson@ximian.com>
663
664         * MethodDef.cs: Check for null param lists in vararg
665         methods. Fixes bug #49614.
666         
667 2003-10-11 Jackson Harper <jackson@ximian.com>
668
669         * GenericTypeRef.cs: Allow Mvars to be a base type.
670         * GenericMethodRef.cs: Basically just a wrapper around an existing
671         method making it into a generic method. 
672         * GenericMethodSig.cs: Signature for a generic method.
673         
674 2003-10-08 Jackson Harper <jackson@ximian.com>
675
676         * PeapiTypeRef.cs: Remove old hackery for adding methods to
677         arrays, use typespecs now.
678         
679 2003-10-08 Jackson Harper <jackson@ximian.com>
680
681         * InstrTable.cs: Add unbox.any instruction.
682         * MethodDef.cs: Allow generic parameters to be added to methods.
683         
684 2003-10-06 Jackson Harper <jackson@latitudegeo.com>
685
686         * MethodInfo.cs: Use report to display no label error message.
687         
688 2003-10-01 Jackson Harper <jackson@latitudegeo.com>
689
690         * LabelInfo.cs: Fix tabbing, add ToString so labels are printed
691         properly in error messages.
692         
693 2003-09-27 Jackson Harper <jackson@latitudegeo.com>
694
695         * MethodDef.cs: Allow PInvoke info to be added.
696         
697 2003-09-21 Jackson Harper <jackson@latitudegeo.com>
698
699         * CodeGen.cs: Add methods for adding data. CodeGen now takes a
700         report object for giving users errors/warnings/info.
701         * FieldDef.cs: When a data constant is assigned to a field the
702         constant might not exist yet. So just take the constants name and
703         look it up when writting code.
704         * Local.cs: Starting to add some error handling. Still playing
705         with diff ways to do this.
706         * MethodDef.cs: Add some error handling for local var lookups
707         * TypeDef.cs: Data is allways global so it should never be added
708         to a class
709         * TypeRef.cs: Error message for lookups.
710         
711 2003-09-20 Jackson Harper <jackson@latitudegeo.com>
712
713         * TypeDef.cs: Rework so multiple constraints can be added to a
714         generic parameter.
715         
716 2003-09-16 Jackson Harper <jackson@latitudegeo.com>
717
718         * InstrTable.cs: endfault instruction (which is just endfinally
719         with a costume on).
720         
721 2003-09-15 Jackson Harper <jackson@latitudegeo.com>
722
723         * FinallyBlock.cs: The sad thing is how long it took me to realize
724         what was going on here...
725                 
726 2003-09-13 Jackson Harper <jackson@latitudegeo.com>
727
728         * MethodInstr.cs: callvirt operation is implicitly instance.
729         
730 2003-09-12 Jackson Harper <jackson@latitudegeo.com>
731
732         * TypeRef.cs: Remove unused enum, this has been moved to the
733         ModifiableType base class.
734         
735 2003-09-08 Jackson Harper <jackson@latitudegeo.com>
736
737         * TypeDef.cs: By default types will have System.Object as their
738         parent type if no parent type is specified (this is what PEAPI
739         does) however if we are assembling corlib the System.Object type
740         will not have System.Object as its parent type.
741         
742 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
743
744         * DataDef.cs: Make name public so data names can be looked up
745         * FieldDef.cs: Stub method for adding data values
746         * TypeDef.cs: Implement long form overrides, fix some backwords
747         variable naming, add a method to lookup data definitions.
748         
749 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
750
751         * IClassRef.cs: Removed methods that have been moved into ITypeRef
752         * MethodDef.cs: Make some properties public, Add method to get a
753         list of parameter types. This is used to build signatures. Alow
754         sentinels in signatures and in param lists. Fix some tabbing.
755         * ParamDef.cs: Expose the parameters type so they can be used when
756         building signatures.
757         * TypeDef.cs: Add and emit overrides.
758                 
759 2003-08-10 Jackson Harper <jackson@latitudegeo.com>
760
761         * CodeGen.cs: Fix tabbing
762         * ModifiableType.cs: Modify a types signature when the type is
763         modified instead of waiting untill the end. Signatures need to be
764         modified immediatly because they are used in method signatures and
765         would fail for overloaded operations if sigs weren't modified
766         right away.
767         * ExternTypeRef.cs: Add signature modifications, fix some tabbing
768         * GenericTypeInst.cs: Use ModifiableType as a base
769         * GenericTypeRef.cs: Use ModifiableType as a base
770         * PeapiTypeRef.cs: No longer take or modify type names.
771         * PrimitiveTypeRef.cs: Add signature modifications, fix some tabbing.
772         * Sentinel.cs: Add signature modifications, fix some tabbing.
773         * TypeRef.cs: Add signature modifications, fix some tabbing.
774                 
775 2003-08-05  Nick Drochak <ndrochak@gol.com>
776
777         * IClassRef.cs: Fix build on .NET
778
779 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
780
781         * IClassRef.cs: Add method for making types into value types
782         * ExternTypeRef.cs: Add functionality for valuetypes
783         * MethodDef.cs: Handle Vararg signatures individually. Fixes for
784         new Sentinel type in vararg signatures
785         * MethodRef.cs: Use new SentinelTypeRef instead of Sentinel type 
786         ref constant.
787         * ParamDef.cs: New method to check if this parameter is the sentinel
788         * TypeRef.cs: Add some functionality for creating valuetypes
789         * Sentinel.cs: New type represents the sentinel
790
791 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
792
793         * TypeDef.cs: Make types into value types if specified. Also
794         add the functionality to make types into Enums.
795         TODO: Value types of nested classes.
796
797 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
798
799         * LabelInfo.cs: Move this type outside of MethodDef, because other
800         types use LabelInfos for label references now.
801         * BranchInstr.cs: Take a LabelInfo instead of information on a label.
802         * HandlerBlock.cs: Take a LabelInfo instead of information on a label.
803         * MethodDef.cs: Return LabelInfo from AddLabel methods. New method for
804         adding a reference to a label.
805         
806 2003-08-02 Jackson Harper <jackson@latitudegeo.com>
807
808         * ExternMethodRef.cs: Remove top secret debugging code.
809         * MethodDef.cs: Less elegant but more bugfree method of doing explicit
810         offsets for labels. Just put the offset labels in another list and 
811         define them in another loop.
812         
813 2003-08-02 Jackson Harper <jackson@latitudegeo.com>
814
815         * IMethodRef.cs: Method refs should expose their call conv. This is
816         needed so the call conv can be modified for the newobj operation which
817         is implicitly instance.
818         * ExternMethodRef.cs: Expose call conv. Don't resolve vararg methods
819         more then once.
820         * GlobalMethodRef.cs: Expose call conv
821         * TypeSpecMethodRef.cs: Expose call conv
822         * MethodInstr.cs: For newobj operations set the call conv to instance
823
824 2003-07-31 Jackson Harper <jackson@latitudegeo.com>
825
826         * MethodDef.cs: Allow 0 offsets for labels, and make sure to only
827         use offsets when we are supposed to.
828         
829 2003-07-30 Jackson Harper <jackson@latitudegeo.com>
830
831         * BranchInstr.cs: Allow explicit offsets for labels
832         
833 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
834
835         * FilterBlock.cs: Use a handler block for the this block. This
836         makes it easier to create filters using braces, labels, or offsets
837         * HandlerBlock.cs: Allow handler blocks to be created using positions,
838         offsets, and labels.
839         * MethodDef.cs: Add methods to create labels all 3 ways, and emit
840         labels created by each of the methods.
841         * TryBlock.cs: Use a handler block instead of label strings. This 
842         allows all three methods of label creation to be used.
843         
844 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
845
846         * IInstr.cs: Instructions now get their parent method when being 
847         emitted.
848         * *Instr.cs: Adjust emit method to accept a methoddef
849         
850 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
851
852         * CodeGen.cs: Set the assembly name when creating the PEFile. 
853
854 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
855
856         * CodeGen.cs: Do not create the PEFile untill the resolve phase. This 
857         fixes the problem with ilasm creating blank files if their is a 
858         failure in the parsing phase and not being able to set the assembly
859         name.
860         * ExternTable.cs: Do not reference the assemblies untill after the 
861         PEFile untill the Resolve phase.
862         
863 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
864
865         * ExternFieldRef.cs: Resolve as a typespec field if neccasary, make 
866         sure to not resolve more then once.
867         * ExternMethodRef.cs: Resolve as a typespec method if neccasary
868         * ExternTypeRef.cs: Use modifiable type as base class
869         * FieldRef.cs: Make sure to not resolve more then once.
870         * GlobalFieldRef.cs: Make sure to not resolve more then once.
871         * GlobalMethodRef.cs: Make sure to not resolve more then once.
872         * ITypeRef.cs: Types no longer need the AsClassRef method
873         * MethodDef.cs: Only decriment param count for vararg methods if there
874         is an ellipsis on the end of the param list. 
875         Fix little bug so return types allways get resolved.
876         * PeapiTypeRef.cs: Use TypeRef.Ellipsis for a place holder in bound
877         arrays instead of null
878         * PrimitiveTypeRef.cs: Use modifiable type as a base
879         * TypeRef.cs: Use modifable type as base, and let it do all the
880         modifications
881         * TypeSpecFieldRef.cs: Make sure to not resolve more then once.
882         * ModifiableType.cs: New base class for all types. This class will
883         handle all of the typemodification and determine whether methods
884         should be added to the type or the types typespec.
885         
886 2003-07-25 Jackson Harper <jackson@latitudegeo.com>
887
888         * MethodDef.cs: If methods do not have the static attribute give
889         them the instance calling convention.
890                 
891 2003-07-21 Jackson Harper <jackson@latitudegeo.com>
892
893         * MethodDef.cs: Do not decremint param count for vararg methods,
894         the ellipsis is needed later
895         
896 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
897
898         * GenericTypeInst.cs: New File - A type reference to an instance
899         of a generic type. ie Set<int32>
900         * TypeSpecFieldRef.cs: New File - A field ref that is attached to
901         a typespec. This can be used with modified types, and generic types.
902         * TypeSpecMethodRef.cs: New File - A method ref that is attached
903         to a typespec. This can be used with modified types, and generic types.
904         * GenericTypeRef.cs: Create method refs and field refs using the
905         new typespec classes.
906         * ITypeRef.cs: Types should now be able to have methods and fields
907         attached to them
908         * PeapiTypeRef.cs: Set UseTypeSpec to true if the type is modified
909         * PrimitiveTypeRef.cs: Add methods to attach fields and
910         methods. This just uses the TypeSpec* classes so I don't need to
911         create classrefs.
912         * TypeRef.cs: Set UseTypeSpec to true if a type is modified.
913         
914 2003-07-17 Jackson Harper <jackson@latitudegeo.com>
915
916         * GenericTypeRef.cs:  New File - A reference to a generic type
917         spec. ie !0 or !1
918         * InstrTable.cs: Add the stelem and ldelem opcodes.
919         
920 2003-07-15 Jackson Harper <jackson@latitudegeo.com>
921
922         * TypeDef.cs: Allow adding and emitting generic type constraints.
923                 
924 2003-07-14 Jackson Harper <jackson@latitudegeo.com>
925
926         * TypeDef.cs: Emit generic parameters.
927
928 2003-06-15 Jackson Harper <jackson@latitudegeo.com>
929
930         * CodeGen.cs: Fix buglet in cache name creating (I will claim this
931         was a typo). 
932                 
933 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
934
935         * CodeGen.cs: When creating nested types cache their names using
936         the parent/type method but emit their short name.
937                 
938 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
939
940         * CodeGen.cs: Add methods for setting corflags, subsystem, and corflags.
941         
942 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
943
944         * ITypeRef.cs, PeapiTypeRef.cs, TypeRef.cs: Quick hack for custom
945         modified types.
946                 
947 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
948
949         * EventDef.cs: Only add one method for addon, fire, other, and
950         removeon
951                 
952 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
953
954         * TypeDef.cs: Add properties to types.
955         * PropertyDef.cs: New file - Implementation of a type property feature
956                 
957 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
958
959         * TypeDef.cs: Fix silly null reference bug.
960                 
961 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
962
963         * EventDef.cs: New file - An event definition.
964         * FeatureAttr.cs: New file - Attributes for features (events and
965         properties)
966         * MethodRef.cs: Only resolve methods once.
967         * TypeDef.cs: Allow Events to be added to types. Also add
968         functionality to add generic type parameters to types. The
969         actually emission of these type parameters is commented out untill
970         I commit my patches to PEAPI and work out the syntax of constraints.
971                 
972 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
973
974         * CodeGen.cs: Allow this assembly name to be set.
975         * HandlerBlock.cs: Make label fields public so they can be
976         accessed in a TryBlocks constructor.
977         * MethodDef.cs: Allow random labels to be inserted at the current
978         position. These are use for scope blocks.
979         * TryBlock.cs: New constructor takes from and to labels as a HandlerBlock
980                 
981 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
982
983         * CustomAttr.cs: New file - Custom attributes
984         * InstrTable.cs: Add stelem.r4 and stelem.r8 instructions. Add
985         . tail to unaligned modifier.
986         * LdtokenInstr.cs: Add type tokens.
987         * MethodDef.cs: Fix IsVararg, add method to add custom attributes,
988         emitting custom attributes when writing code, allow for Ellipsises
989         in param lists, add coma between args in signatures.
990         * ParamDef.cs: Add the Ellipsis pseudo param
991         * PrimitiveTypeRef.cs: System.String and System.Object can be
992         referenced without an [mscorlib] assembly prefix. 
993         * TypeDef.cs: Add Custom attributes.
994                 
995 2003-05-25 Jackson Harper <jackson@latitudegeo.com>
996
997         * CodeGen.cs: Add method to resolve global vararg methods.
998         * ExternMethodRef.cs: Resolve vararg methods
999         * GlobalMethodRef.cs: Set calling conventions, add vararg methods
1000         * MethodDef.cs: Set calling conventions, add vararg methods
1001         * MethodRef.cs: Set calling conventions, add vararg methods
1002         * TypeDef.cs: Resolve vararg methods
1003         * TypeRef.cs: Add Ellipsis pseudo type, this should never really
1004         be used as a type, but is stored in arrays with other types. Pass
1005         call convs to methodref constructor.
1006                 
1007 2003-05-24 Jackson Harper <jackson@latitudegeo.com>
1008
1009         * CatchBlock.cs: Remove typo causing to labels to be the same as
1010         from labels.
1011         * FaultBlock.cs: Remove typo causing to labels to be the same as
1012         from labels.
1013         * FilterBlock.cs: Remove typo causing to labels to be the same as
1014         from labels.
1015         * MethodDef.cs: Allow for multiple labels to point to the same
1016         line. ie:
1017         END_BLOCK:
1018         PASS:
1019         do stuff
1020                 
1021 2003-05-23 Jackson Harper <jackson@latitudegeo.com>
1022
1023         * CatchBlock.cs: New file - Initial implementation of a catch
1024         block
1025         * FaultBlock.cs: New file - Initial implementation of a fault
1026         block
1027         * FilterBlock.cs: New file - Initial implementation of a filter
1028         block
1029         * FinallyBlock.cs: New file - Initial implementation of a finally
1030         block
1031         * HandlerBlock.cs: New file - A handler block is the block
1032         assosciated with a SEH clause
1033         * ISehClause: New file - Interface that structured exception
1034         handling clauses must implement.
1035         * TryBlock.cs: New file - Initial implementation only supports
1036         label form SEH. This TryBlock is added to a method as an
1037         instruction out of convenience, tryblock is not an instruction.
1038                 
1039 2003-05-22 Jackson Harper <jackson@latitudegeo.com>
1040
1041         * InstrTable.cs: Add unsigned conversion instructions.
1042                 
1043 2003-05-21 Jackson Harper <jackson@latitudegeo.com>
1044
1045         * CalliInstr.cs: New file - The calli instruction
1046         * Ldtoken.cs: New file - The ldtoken instruction
1047         * InstrTable.cs: ldc.i8 is a TOKEN_I8 and should be given the
1048         MiscToken.ldc_i8 value.
1049                 
1050 2003-05-18 Jackson Harper <jackson@latitudegeo.com>
1051
1052         * ExternMethodRef.cs: Accept and add calling conventions. Add
1053         methods using array methods if owners are arrays, resolve methods
1054         named <init> as .ctor.
1055         * ExternTable.cs: Add method to get value classes.
1056         * ExternTypeRef.cs: Add AsClassRef method, GetMethodRef now takes
1057         calling conventions.
1058         * IClassRef.cs: GetMethodRef now takes calling conventions
1059         * ITypeRef.cs: Add IsArray IsRef and AsClassRef methods
1060         * MethodRef.cs: Change <init> to .ctor
1061         * PeapiTypeRef.cs: This class is no longer an ITypeRef because it
1062         cannot be converted to a IClassRef. Add IsArray and IsRef, use new
1063         Class::GetArray* methods to convert to arrays.
1064         * PrimitiveTypeRef.cs: Add method to convert to an IClassRef
1065         * TypeRef.cs: Add IsArray and IsRef, add method to convert to
1066         IClassRef. GetMethodRef now takes calling conventions
1067                 
1068 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
1069
1070         * MethodDef.cs: Add named param table and methods to get named param
1071         positions. Add method to get named local variables slot
1072         number. Make sure param_lists aren't null when defining them. Add
1073         specialname and rtspecialname attributes if the method being
1074         defined is named '.ctor' or '.cctor'. Add new method for creating
1075         signatures using a list of typerefs.
1076         * GlobalMethodRef.cs: Use new CreateSignature method that takes an
1077         array of typerefs.
1078         * MethodRef.cs: Use new CreateSignature method
1079         * InstrTable.cs: Use INSTR_LOCAL and INSTR_PARAM tokens for
1080         instructions that take local and param operands.
1081                 
1082 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
1083
1084         * TypeDef.cs: Add size and packing information
1085                 
1086 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1087
1088         * IFieldRef.cs: New file - interface field references must implement
1089         * ExternFieldRef.cs: New file - Reference to a field in another
1090         assembly
1091         * FieldRef.cs: New file - Reference to a field in this assembly
1092         * GlobalFieldRef.cs: New file - Reference to a global field
1093         * FieldInstr.cs: New file - Instruction that takes a field
1094         instruction
1095         * CodeGen.cs: Add method to resolve global methods
1096         * ExternTypeRef.cs: Add method to get method references
1097         * FieldDef.cs: Allow methods to be resolved before being defined
1098         * IClassRef.cs: Add method to get field references.
1099         * TypeDef.cs: Add method to resolve member fields.
1100         * TypeRef.cs: Add method to get field references
1101                 
1102 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1103
1104         * GlobalMethodRef.cs: New file - A reference to a global method
1105         * CodeGen.cs: Store global methods and fields in hashtables to
1106         make lookup easier. Add method to resolve global methods.
1107                 
1108 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1109
1110         * MethodDef.cs: Allways set max stack
1111                 
1112 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1113
1114         * ExternTable.cs: Alias corlib to mscorlib since these seem to get
1115         used interchangably
1116                 
1117 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1118
1119         * IMethodRef.cs: New file - Interface that method references must
1120         implement
1121         * ExternMethodRef.cs: New file - Reference to a method in another
1122         assembly
1123         * Local.cs: New file - A Local variable
1124         * MethodInstr.cs: New file - an instruction that takes a method
1125         reference operand
1126         * IClassRef.cs: Add method to get a method reference from a class
1127         reference
1128         * MethodDef.cs: Add ability to resolve methods before defining
1129         them, add max stack, locals, and entry point. Make CreateSignature
1130         method public and static so other classes can use it.
1131         * TypeDef.cs: Store methods and fields in hashtables so they can
1132         be easily retrieved, add method to resolve member methods.
1133         * TypeRef.cs: Add method for resolving member methods.
1134         * ExternTypeRef.cs: Add methods to get classref and methodrefs
1135         * MethodRef.cs: New file - Reference to a method in this assembly.
1136         
1137                 
1138 2003-05-07 Jackson Harper <jackson@latitudegeo.com>
1139
1140         * TypeInstr.cs: New file - implementation of instructions that
1141         take a single type instruction.
1142                 
1143 2003-05-06 Jackson Harper <jackson@latitudegeo.com>
1144
1145         * SwitchInstr.cs: New file - implementation of switch instructions
1146                 
1147 2003-05-05 Jackson Harper <jackson@lattidegeo.com>
1148
1149         * MethodDef.cs: Add ability to add and emit labels
1150         * BranchInstr.cs: New file - Branch instructions
1151                 
1152 2003-05-04 Jackson Harper <jackson@latitudegeo.com>
1153
1154         * LdcInstr.cs: New file - lcd* instructions
1155         * MiscInstr.cs: New file - Just an enum that gives me constant
1156         values for instructions PEAPI does not define in an enum
1157         * InstrTable.cs: Use new MiscInstr constants instead of string values.
1158                 
1159 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
1160
1161         * CodeGen.cs: Define the contents of types after all types have
1162         been resolved, this avoids the infinite loop that would occur if a
1163         type was a member of its base type.
1164         * TypeDef.cs: Method to define contents after being defined. 
1165                 
1166 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
1167
1168         * TypeManager.cs: Check if type is defined before defining it.
1169                 
1170 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
1171
1172         * CodeGen.cs: Add outer classes to typedefs if necesary
1173         * InstrTable.cs: ldtoken instruction is a INSTR_TOK token
1174         * TypeDef.cs: Add outer class property
1175                 
1176 2003-04-30 Jackson Harper <jackson@latitudegeo.com>
1177
1178         * MethodDef.cs: Accept and emit instructions.
1179         * CodeGen.cs: Fix typo
1180         * IInstr.cs: New file - Interface for instructions that are added to methods
1181         * IntInstr.cs: New file - Instruction that takes a single int
1182         param
1183         * LdstrInstr.cs: New file - ldstr instruction (the only
1184         instruction that takes a string parameter)
1185                 
1186 2003-04-28 Jackson Harper <jackson@latitudegeo.com>
1187
1188         * InstrTable.cs: Much simpler system. All tokens go into one
1189         hashtable now. There is no reason to have them seperated out.
1190                 
1191 2003-04-20 Jackson Harper <jackson@latitudegeo.com>
1192
1193         * CodeGen.cs: Add method to add data
1194         * FieldDef.cs: Add method to set a fields value
1195         * TypeDef.cs: Add method to add data
1196         * DataDef.cs: New file - Definition of a data constant
1197                 
1198 2003-04-18 Jackson Harper <jackson@latitudegeo.com>
1199
1200         * FieldDef.cs: Change peapi fielddef name.
1201         * MethodDef.cs: Change peapi methoddef name.
1202                 
1203 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1204
1205         * MethodDef.cs: New file - definition of a method.
1206         * ParamDef.cs: New file - definition of a parameter to a method
1207         * TypeDef.cs: Add method definitions, set intransit flag to false
1208         before defining members, so a false circular reference is not
1209         created.
1210         * CodeGen.cs: Add methods to add method definitions
1211
1212 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1213
1214         * ExternTypeRef.cs: external types are classrefs
1215                 
1216 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1217
1218         * PeapiTypeRef.cs: New file - base wrapper for type refs that are
1219         just peapi types.
1220         * PrimitiveTypeRef.cs: New file - A primitive type (char, int, string)
1221                 
1222 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1223
1224         * TypeRef.cs: Rewrite - Typerefs are now resolved after parsing.
1225         * TypeManager.cs: Rewrite - Just a simple table for looking up
1226         typedefs
1227         * ExternTable.cs: Create ClassRef's instead of Classes
1228         * Location.cs: Make compile
1229         * CodeGen.cs: Use new tree system
1230                 
1231 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1232
1233         * ExternTypeRef.cs: New file - Represents a reference to a type in
1234         an external assembly
1235         * FieldDef.cs: New file - Represents a field definition
1236         * IClassRef.cs: New file - Interface that classrefs must
1237         implement. This needs some more thought though because once a
1238         classref has been modified it is no longer a classref.
1239         * ITypeRef.cs: New file - Interface that references to types must
1240         implement
1241         * TypeDef.cs: New file - Represents the a class definition, and
1242         will hold all of the classes members.
1243
1244 2003-04-07 Jackson Harper <jackson@latitudegeo.com>
1245
1246         * TypeRef.cs: Return FieldDef when adding a field def to a class
1247                 
1248 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
1249
1250         * TypeRef.cs: Add flag for making types pinned
1251         
1252 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
1253
1254         * ClassTable.cs: Do not append a . to names that are not in a
1255         namespace
1256         * CodeGen.cs: Handle nested classes
1257                 
1258 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1259
1260         * ExternTable.cs: Remove some unsed fields.
1261         
1262 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1263
1264         * ExternTable.cs: Add method to lookup classes with a full name,
1265         instead of having to have namespace and name seperate.
1266         * ClassTable.cs: Make method that seprates full names into
1267         name/namespaces public.
1268                 
1269 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1270
1271         * InstrTable.cs: Add Calli, detabify
1272                 
1273 2003-03-29 Jackson Harper <jackson@latitudegeo.com>
1274
1275         * InstrTable.cs: Add branch ops switch, and lc.r*, also fix some
1276         typos for other ops.
1277
1278 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
1279
1280         * ClassTable.cs: Set defined flag and type attributes for referenced 
1281         classes when they are defined.
1282
1283 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
1284
1285         * MethodTable.cs: Add method to Check if all methods have been defined, set referenced methods properties
1286         when defining them
1287         * FieldTable.cs: Add method to check if all fields have been defined, set referenced fields properties
1288         when defining them
1289         * ClassTable.cs: Make sure all methods and fields are defined.
1290
1291 2003-03-16 Jackson Harper <jackson@latitudegeo.com>
1292
1293         * MethodTable.cs: Fire events when methods are defined and referenced
1294
1295 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1296
1297         * ClassTable.cs: Classes now store field tables
1298         * CodeGen.cs: Add methods to add fields and get field references
1299
1300 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1301
1302         * FieldTable.cs: New file, holds a classes fields
1303
1304 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1305
1306         * InstrTable.cs: Add FieldOp instructions
1307
1308 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1309
1310         * InstrTable.cs: Add ldstr instruction
1311
1312 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1313
1314         * CodeGen.cs: Add method to get method references.
1315         * MethodTable.cs: Complete GetReference method
1316         * InstrTable.cs: Add MethodOps (instructions that take a method ref param)
1317
1318 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
1319
1320         * InstrTable.cs: Add TypeOps (instructions that take a type param)
1321
1322 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
1323
1324         * InstrTable.cs: Add IntOps (instructions that take an integer param)
1325
1326 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1327
1328         * InstrTable.cs: Fix instructions that have dots in their name
1329
1330 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1331
1332         * CodeGen.cs: Add code buffer for il instructions when a new method is added.
1333         * InstrTable.cs: New file, this is a table of all the instructions (just simple 
1334         instructions right now)
1335
1336 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1337
1338         * CodeGen.cs: Set current method when a new method is added.
1339
1340 2003-03-12 Jackson Harper <jackson@latitudegeo.com>
1341
1342         * ClassTable.cs: Add Method tables to Class tables, add method to get a 
1343         class's method table.
1344         * CodeGen.cs: Add Method to add methods :p
1345         * MethodTable.cs: Add file, this class is used to add methods to a class.
1346
1347 2003-03-11 Jackson Harper <jackson@latitudegeo.com>
1348
1349         * TypeRef.cs: New file, used for pairing types and their names.
1350
1351 2003-03-09 Jackson Harper <jackson@latitudegeo.com>
1352
1353         * ExternTable.cs: Do not verify the existence of external types
1354
1355 2003-03-08: Jackson Harper <jackson@latitudegeo.com>
1356
1357         * CodeGen.cs: Add ExternTable property
1358         * ExternTable.cs: New file, this will is used for pulling 
1359         types and methods from external assemblies.
1360
1361 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1362
1363         * ClassTable.cs, CodeGen.cs: Add methods to allow types to inherit from another type.
1364
1365 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1366
1367         * ClassTable.cs: Add method to check for undefined types
1368
1369 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1370
1371         * CodeGen.cs: Use class table for adding type definitions
1372         * ClassTable.cs: Return ClassDef when defining types
1373         
1374 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1375
1376         * ClassTable.cs: Add method for adding class definitions to the 
1377         the table.
1378
1379 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
1380
1381         * CodeGen.cs: Reconfigure to work with new PEAPI emission system
1382
1383 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
1384
1385         * ClassTable.cs: Add file, this is a 'table' for storing classes
1386         * Location.cs: Add file, this will eventually be used for marking
1387         locations in IL files
1388
1389 2003-02-10 Jackson Harper <jackson@latitudegeo.com>
1390
1391         * Method.cs: Add method to set parameters, 
1392                set parameters when defining type
1393         * Class.cs: Fix very silly bug in GetMethod method
1394         
1395
1396 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
1397
1398         * Class.cs: Resolve Methods before emiting
1399         * InstrBase.cs: Take a Class instead of CodeGen when emiting
1400         * Method.cs: Replace MethodInfo property with MethodBuilder property,
1401                 Add resolve method
1402         * Instructions.cs: Take Class instead of CodeGen when emitting, 
1403                 get member methods from Class.
1404         * TypeManager.cs: Add set indexer
1405
1406 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
1407
1408         * Instructions.cs: Use TypeManager to lookup types
1409
1410 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1411
1412         * TypeManager.cs: Fix error parsing type names
1413         * Method.cs: Display the name of types that can't be found
1414
1415 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1416
1417         * TypeManager.cs: Add file
1418         * CodeGen.cs: Add TypeManager attribute
1419         * InstrBase.cs: Take a CodeGen in Emit method
1420         * Instructions.cs: Take a CodeGen in Emit method, handle arg lists better
1421         * Method.cs: Handle local variables better
1422         
1423
1424 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1425
1426         * Method.cs: Add functionality to define local variables
1427         * Instructions.cs: Add newobj instruction, cleanup call instruction
1428
1429 2003-02-03 Jackson Harper <jackson@latitudegeo.com>
1430
1431         * AssemblyNameStore.cs: Added file
1432
1433 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
1434
1435         * Instructions.cs: Resolve parameters types in a more proper manner.
1436
1437 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
1438
1439         * Class.cs: Don't try to emit methods if we don't have any
1440         * Class.cs: Test for entry point of methods, and set Assembly entrypoint
1441         * CodeGen.cs: Add method to set an Assemblys entry point
1442         * Method.cs: Add IsEntryPoint property
1443         * Method.cs Add MethodInfo property, and set this while Emiting
1444         * Instructions.cs: Add new InstrCall instruction