1 2006-01-09 Ankit Jain <jankit@novell.com>
3 * GenericTypeRef.cs: Rename to ..
4 * GenericParamRef.cs: .. this.
5 (IGenericTypeRef): New.
6 (GenericParamRef): Implement IGenericTypeRef.
7 * GenericTypeInst.cs (GenericTypeInst): Implement IGenericTypeRef instead
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.
14 2006-01-08 Ankit Jain <jankit@novell.com>
16 * InstrTable.cs (inst_table): Add stelem.any, ldelem.any and
17 constrained. instructions.
19 2006-01-07 Ankit Jain <jankit@novell.com>
21 * GenericParameters.cs (GenericParameter): New.
22 (GenericParameters): Collection of Generic parameters.
25 * MethodDef.cs: Update to use the new GenericParameters class.
27 2006-01-06 Ankit Jain <jankit@novell.com>
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
32 * GenericTypeInst.cs (GenericTypeInst.Resolve): Rename to ..
33 (GenericTypeInst.ResolveOnly): .. this.
34 (GenericTypeInst.ResolveAsClass): Rename to Resolve.
36 * TypeDef.cs (TypeDef.Define): Revert the ResolveAsClass calls added here.
37 * Local.cs (Local.GetPeapiLocal): Use new GenericTypeInst.ResolveOnly if type is
40 2006-01-06 Ankit Jain <jankit@novell.com>
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
48 * ExternTypeRef.cs: Implement new methods of IClassRef.
49 Classes implementing IClassRef cache their generic instances (GenericTypeInst)
50 and their corresponding resolved PEAPI types.
52 * CodeGen.cs (CodeGen.GetTypeRef): Gets a TypeRef given a type name and caches them.
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.
60 * TypeDef.cs (TypeDef.Define): Use ResolveAsClass for base class and interfaces
61 being implemented if they are GenericTypeInsts.
63 2005-12-24 Jb Evain <jbevain@gmail.com>
65 * FeatureAttr.cs: tag as Flags, add an Instance value.
66 * PropertyDef.cs (PropertyDef.Resolve): Tag the property as instance or class.
68 2005-12-22 Ankit Jain <jankit@novell.com>
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 .
78 2005-12-21 Ankit Jain <jankit@novell.com>
80 * GenericArguments.cs (GenericArguments): New.
81 * ExternTypeRefInst.cs (ExternTypeRefInst):
82 * GenericTypeInst.cs (GenericTypeInst):
83 * GenericMethodSig.cs (GenericMethodSig): Update to use new GenericArguments class.
85 2005-12-16 Ankit Jain <jankit@novell.com>
87 Use tuple of (field name, type_name) for fielddef hashtable in TypeDef.cs and
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.
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
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.
109 2005-12-15 Ankit Jain <jankit@novell.com>
111 * CodeGen.cs (CodeGen.SetAssemblyName): Multiple .assembly declarations with different
112 names are not allowed.
114 2005-12-14 Ankit Jain <jankit@novell.com>
116 * PeapiTypeRef.cs (PeapiTypeRef.MakeBoundArray): Handle the case when only
117 lower bound (no size info) is available.
119 2005-12-14 Ankit Jain <jankit@novell.com>
121 * TypeDef.cs (TypeDef.ctor): name_space can be null.
123 2005-12-13 Ankit Jain <jankit@novell.com>
125 * TypeDef.cs (TypeDef.ctor): Ensure that 'name' contains only the last part
126 of the full (namespace + name) dotted name.
128 2005-12-12 Ankit Jain <jankit@novell.com>
130 * TypeDef.cs (TypeDef.Define): Ensure nested visibility for a nested class.
131 (TypeDef.NestedFullName): New.
133 2005-12-09 Ankit Jain <jankit@novell.com>
135 * MethodDef.cs (MethodDef.GenParamCount): typar_list can be null.
137 2005-12-09 Ankit Jain <jankit@novell.com>
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
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
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.
178 2005-12-05 Ankit Jain <jankit@novell.com>
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.
187 2005-11-28 Ankit Jain <jankit@novell.com>
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.
195 2005-09-15 Ankit Jain <jankit@novell.com>
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.
224 2005-09-08 Ankit Jain <jankit@novell.com>
226 * CodeGen.cs (CodeGen.stack_reserve): New.
227 (CodeGen.SetStackReserve): New.
228 (CodeGen.Write): SetStackReserve on the pefile.
230 2005-09-06 Ankit Jain <jankit@novell.com>
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.
236 2005-08-29 Ankit Jain <jankit@novell.com>
238 * InstrTable.cs (inst_table): Comment out stelem and ldelem opcodes.
240 2005-08-26 Ankit Jain <jankit@novell.com>
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.
258 2005-08-23 Ankit Jain <jankit@novell.com>
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.
270 2005-08-18 Ankit Jain <jankit@novell.com>
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
288 2005-08-18 Ankit Jain <jankit@novell.com>
290 * MethodDef.cs (MethodDef.WriteCode): Process custom attributes and decl security
291 lists even for abstract methods.
293 2005-08-16 Ankit Jain <jankit@novell.com>
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.
311 2005-08-08 Ankit Jain <jankit@novell.com>
313 * ExternTypeRef.cs (ExternTypeRef.Clone): Use full_name instead of FullName
314 to avoid cloning modifiers (like []).
316 2005-08-08 Ankit Jain <jankit@novell.com>
318 * CodeGen.cs (CodeGen.entry_point): New bool field.
319 (CodeGen.HasEntryPoint): New. Property to mark that the assembly
321 (CodeGen.Write): Throw Exception if an EXE has been requested but the
322 source file has no entrypoint defined.
324 2005-08-05 Ankit Jain <jankit@novell.com>
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
333 (BeginTypeDef, BeginMethodDef, BeginAssemblyRef): Set current DeclSecurity
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.
341 2005-08-03 Ankit Jain <jankit@novell.com>
343 * GlobalMethodRef.cs (GlobalMethodRef.Resolve): Use CreateVarargSignature
344 to create method's signature for a vararg method.
346 2005-08-02 Ankit Jain <ankit@corewars.org>
349 * TypeDef.cs (TypeDef.Define): Use default values for pack and size if only
350 one of them is unspecified.
352 2005-05-10 Ankit Jain <ankit@corewars.org>
355 * ExternTable.cs (ExternRef.GetTypeRef): Make ValueClass if requested.
358 2005-05-06 Ankit Jain <ankit@corewars.org>
360 * MethodDef.cs (MethodDef.GetNamedParamPos): Param num starts from 1 for instance
362 * CodeGen.cs (CodeGen.BeginTypeDef): Set current_customattrtarget when reopening a
365 2005-04-27 Ankit Jain <ankit@corewars.org>
367 * ExternTypeRefInst.cs (ExternTypeRefInst.GetMethodRef): Use method_table to avoid
369 * PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Use method_table to avoid
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.
376 2005-04-22 Atsushi Enomoto <atsushi@ximian.com>
379 ble.un.s and blt.un.s were incorrectly added to the table.
381 2005-04-22 Ankit Jain <ankit@corewars.org>
383 * TypeSpecMethodRef.cs (TypeSpecMethodRef.Resolve): Set is_resolved
386 2005-04-18 Ankit Jain <ankit@corewars.org>
388 * CodeGen.cs (CodeGen.AddManifestResource): Add a
389 ManifestResource to manifestResources ArrayList.
390 (CodeGen.Write): Add all resources to the pefile.
392 2005-04-12 Ankit Jain <ankit@corewars.org>
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
408 (GetParam): New. Get ParamDef by index.
410 2005-04-08 Ankit Jain <radical@corewars.org>
412 * MethodDef.cs (named_param_table, CreateNamedParamTable): Remove.
413 (GetNamedParamPos): Implement using a linear scan.
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
420 2005-03-17 Ankit Jain <radical@corewars.org>
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.
426 2005-02-07 Jackson Harper <jackson@ximian.com>
428 * MethodDef.cs: Don't die on duplicate local symbols. Fixes bug
429 72149. Patch by Sohail Somani.
431 2004-12-14 Raja R Harinath <rharinath@novell.com>
433 * MethodDef.cs (CreateSignature): Add a space in generated signature.
435 2004-12-02 Jackson Harper <jackson@ximian.com>
437 * ExternTypeRefInst.cs: When converting to arrays we loose our valuetypedness.
439 2004-12-02 Jackson Harper <jackson@ximian.com>
441 * MethodDef.cs: Abstract methods don't get bodies. Even if there
444 2004-12-02 Jackson Harper <jackson@ximian.com>
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).
450 * TypeDef.cs: Accessors and convience properties for getting and
451 setting the method/field attributes.
454 2004-12-02 Jackson Harper <jackson@ximian.com>
456 * FieldDef.cs: Set the underlying type for bytearray data constants. This
457 fixes bug #70153 and #70154 which my previous fix caused.
459 2004-08-01 Atsushi Enomoto <atsushi@ximian.com>
461 * DebuggingInfo.cs : csc build fix (see bug #62230).
463 2004-07-27 Martin Baulig <martin@ximian.com>
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.
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.
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.
479 * DebuggingInfo.cs: New file.
481 2004-07-23 Jackson Harper <jackson@ximian.com>
483 * MethodDef.cs: Params are 1 based if the method is instance
484 because of the 'this' arg.
486 2004-07-21 Jackson Harper <jackson@ximian.com>
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.
492 2004-07-12 Jackson Harper <jackson@ximian.com>
494 * MethodDef.cs: Local lists are not lazyily allocated so they were
495 getting added to every method. This is legal but wastes space.
497 2004-07-08 Jackson Harper <jackson@ximian.com>
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
505 2004-06-26 Jackson Harper <jackson@ximian.com>
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.
515 2004-06-24 Jackson Harper <jackson@ximian.com>
517 * MethodDef.cs: Report when defining methods just like MS.
518 * TypeDef.cs: Error message when we can't find a locla method.
520 2004-06-23 Jackson Harper <jackson@ximian.com>
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
527 * ParamDef.cs: Make IsSentinel work for both cases of generating a
530 2004-06-20 Jackson Harper <jackson@ximian.com>
532 * SwitchInstr.cs: Allow switches with no labels.
534 2004-06-20 Jackson Harper <jackson@ximian.com>
536 * InstrTable.cs: Add .u8 opcodes for ldind and ldelem these are
537 just aliases to their .i8 equivelents.
539 2004-06-19 Jackson Harper <jackson@ximian.com>
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*().
545 2004-06-19 Jackson Harper <jackson@ximian.com>
547 * InstrTable.cs: Add undocumented brnull opcode. This is really
548 just an alias for brfalse.
550 2004-06-19 Jackson Harper <jackson@ximian.com>
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
556 * MethodRef.cs: Use the new CreateVarargSignature method to create
557 the methods signature if it is a vararg method.
559 2004-06-14 Jackson Harper <jackson@ximian.com>
561 * CodeGen.cs: Allow file refs to be added.
562 * FileRef.cs: New file - represents a file ref.
564 2004-06-14 Jackson Harper <jackson@ximian.com>
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.
571 2004-06-14 Jackson Harper <jackson@ximian.com>
573 * CodeGen.cs: Implement setting module names.
575 2004-05-23 Jackson Harper <jackson@ximian.com>
577 * MethodDef.cs: Cache vararg signatures so a new memberref is not
578 created for each vararg pattern.
580 2004-05-22 Jackson Harper <jackson@ximian.com>
582 * InstrTable.cs: ldc.i4.M1 is aliased to ldc.i4.m1. Fixes bug #58524.
584 2004-05-22 Jackson Harper <jackson@ximian.com>
586 * GlobalMethodRef.cs: Check for sentinel properly.
588 2004-04-03 Jackson Harper <jackson@ximian.com>
592 2004-04-02 Jackson Harper <jackson@ximian.com>
594 * CodeGen.cs: Allow setting assembly info.
596 2004-04-01 Jackson Harper <jackson@ximian.com>
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.
603 2004-03-28 Jackson Harper <jackson@ximian.com>
605 * PeapiTypeRef.cs: Check for null bounds in bound arrays. Patch by
607 * ModifiablyType.cs: Set names properly for bound arrays.
609 2004-02-18 Jackson Harper <jackson@ximian.com>
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.
615 2003-12-10 Jackson Harper <jackson@ximian.com>
617 * ModifiableType.cs: Allow the conversion list to be got/set.
618 * ExternTypeRef.cs: Add a Clone method. Remove table modification.
620 2003-12-10 Jackson Harper <jackson@ximian.com>
622 * ExternTable.cs: Add methods to update a types name.
623 * ExternTypeRef.cs: When a types name is modified update it in the
626 2003-12-08 Jackson Harper <jackson@ximian.com>
628 * ModifiableType.cs: Put modifier and class in the list in the
631 2003-11-18 Jackson Harper <jackson@ximian.com>
633 * MethodDef.cs: Add support for .zeroinit. This is just another
634 way of initializing locals.
636 2003-11-17 Jackson Harper <jackson@ximian.com>
638 * LdstrInstr.cs: Allow strings to be created as bytearrays.
640 2003-10-28 Jackson Harper <jackson@ximian.com>
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.
646 2003-10-28 Jackson Harper <jackson@ximian.com>
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
653 2003-10-18 Jackson Harper <jackson@ximian.com>
655 * ExternTable.cs: Separate class and value types into diff tables.
657 2003-10-18 Jackson Harper <jackson@ximian.com>
659 * InstrTable.cs: Use short branch instructions instead of aliasing them
660 to the long branch instructions.
662 2003-10-13 Jackson Harper <jackson@ximian.com>
664 * MethodDef.cs: Check for null param lists in vararg
665 methods. Fixes bug #49614.
667 2003-10-11 Jackson Harper <jackson@ximian.com>
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.
674 2003-10-08 Jackson Harper <jackson@ximian.com>
676 * PeapiTypeRef.cs: Remove old hackery for adding methods to
677 arrays, use typespecs now.
679 2003-10-08 Jackson Harper <jackson@ximian.com>
681 * InstrTable.cs: Add unbox.any instruction.
682 * MethodDef.cs: Allow generic parameters to be added to methods.
684 2003-10-06 Jackson Harper <jackson@latitudegeo.com>
686 * MethodInfo.cs: Use report to display no label error message.
688 2003-10-01 Jackson Harper <jackson@latitudegeo.com>
690 * LabelInfo.cs: Fix tabbing, add ToString so labels are printed
691 properly in error messages.
693 2003-09-27 Jackson Harper <jackson@latitudegeo.com>
695 * MethodDef.cs: Allow PInvoke info to be added.
697 2003-09-21 Jackson Harper <jackson@latitudegeo.com>
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
709 * TypeRef.cs: Error message for lookups.
711 2003-09-20 Jackson Harper <jackson@latitudegeo.com>
713 * TypeDef.cs: Rework so multiple constraints can be added to a
716 2003-09-16 Jackson Harper <jackson@latitudegeo.com>
718 * InstrTable.cs: endfault instruction (which is just endfinally
721 2003-09-15 Jackson Harper <jackson@latitudegeo.com>
723 * FinallyBlock.cs: The sad thing is how long it took me to realize
724 what was going on here...
726 2003-09-13 Jackson Harper <jackson@latitudegeo.com>
728 * MethodInstr.cs: callvirt operation is implicitly instance.
730 2003-09-12 Jackson Harper <jackson@latitudegeo.com>
732 * TypeRef.cs: Remove unused enum, this has been moved to the
733 ModifiableType base class.
735 2003-09-08 Jackson Harper <jackson@latitudegeo.com>
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.
742 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
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.
749 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
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
757 * TypeDef.cs: Add and emit overrides.
759 2003-08-10 Jackson Harper <jackson@latitudegeo.com>
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
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.
775 2003-08-05 Nick Drochak <ndrochak@gol.com>
777 * IClassRef.cs: Fix build on .NET
779 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
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
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
791 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
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.
797 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
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.
806 2003-08-02 Jackson Harper <jackson@latitudegeo.com>
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.
813 2003-08-02 Jackson Harper <jackson@latitudegeo.com>
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
820 * GlobalMethodRef.cs: Expose call conv
821 * TypeSpecMethodRef.cs: Expose call conv
822 * MethodInstr.cs: For newobj operations set the call conv to instance
824 2003-07-31 Jackson Harper <jackson@latitudegeo.com>
826 * MethodDef.cs: Allow 0 offsets for labels, and make sure to only
827 use offsets when we are supposed to.
829 2003-07-30 Jackson Harper <jackson@latitudegeo.com>
831 * BranchInstr.cs: Allow explicit offsets for labels
833 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
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,
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.
844 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
846 * IInstr.cs: Instructions now get their parent method when being
848 * *Instr.cs: Adjust emit method to accept a methoddef
850 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
852 * CodeGen.cs: Set the assembly name when creating the PEFile.
854 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
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
860 * ExternTable.cs: Do not reference the assemblies untill after the
861 PEFile untill the Resolve phase.
863 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
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
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.
886 2003-07-25 Jackson Harper <jackson@latitudegeo.com>
888 * MethodDef.cs: If methods do not have the static attribute give
889 them the instance calling convention.
891 2003-07-21 Jackson Harper <jackson@latitudegeo.com>
893 * MethodDef.cs: Do not decremint param count for vararg methods,
894 the ellipsis is needed later
896 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
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
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
912 * TypeRef.cs: Set UseTypeSpec to true if a type is modified.
914 2003-07-17 Jackson Harper <jackson@latitudegeo.com>
916 * GenericTypeRef.cs: New File - A reference to a generic type
918 * InstrTable.cs: Add the stelem and ldelem opcodes.
920 2003-07-15 Jackson Harper <jackson@latitudegeo.com>
922 * TypeDef.cs: Allow adding and emitting generic type constraints.
924 2003-07-14 Jackson Harper <jackson@latitudegeo.com>
926 * TypeDef.cs: Emit generic parameters.
928 2003-06-15 Jackson Harper <jackson@latitudegeo.com>
930 * CodeGen.cs: Fix buglet in cache name creating (I will claim this
933 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
935 * CodeGen.cs: When creating nested types cache their names using
936 the parent/type method but emit their short name.
938 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
940 * CodeGen.cs: Add methods for setting corflags, subsystem, and corflags.
942 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
944 * ITypeRef.cs, PeapiTypeRef.cs, TypeRef.cs: Quick hack for custom
947 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
949 * EventDef.cs: Only add one method for addon, fire, other, and
952 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
954 * TypeDef.cs: Add properties to types.
955 * PropertyDef.cs: New file - Implementation of a type property feature
957 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
959 * TypeDef.cs: Fix silly null reference bug.
961 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
963 * EventDef.cs: New file - An event definition.
964 * FeatureAttr.cs: New file - Attributes for features (events and
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.
972 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
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
981 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
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.
995 2003-05-25 Jackson Harper <jackson@latitudegeo.com>
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.
1007 2003-05-24 Jackson Harper <jackson@latitudegeo.com>
1009 * CatchBlock.cs: Remove typo causing to labels to be the same as
1011 * FaultBlock.cs: Remove typo causing to labels to be the same as
1013 * FilterBlock.cs: Remove typo causing to labels to be the same as
1015 * MethodDef.cs: Allow for multiple labels to point to the same
1021 2003-05-23 Jackson Harper <jackson@latitudegeo.com>
1023 * CatchBlock.cs: New file - Initial implementation of a catch
1025 * FaultBlock.cs: New file - Initial implementation of a fault
1027 * FilterBlock.cs: New file - Initial implementation of a filter
1029 * FinallyBlock.cs: New file - Initial implementation of a finally
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.
1039 2003-05-22 Jackson Harper <jackson@latitudegeo.com>
1041 * InstrTable.cs: Add unsigned conversion instructions.
1043 2003-05-21 Jackson Harper <jackson@latitudegeo.com>
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.
1050 2003-05-18 Jackson Harper <jackson@latitudegeo.com>
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
1068 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
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
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.
1082 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
1084 * TypeDef.cs: Add size and packing information
1086 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1088 * IFieldRef.cs: New file - interface field references must implement
1089 * ExternFieldRef.cs: New file - Reference to a field in another
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
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
1102 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
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.
1108 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1110 * MethodDef.cs: Allways set max stack
1112 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1114 * ExternTable.cs: Alias corlib to mscorlib since these seem to get
1117 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1119 * IMethodRef.cs: New file - Interface that method references must
1121 * ExternMethodRef.cs: New file - Reference to a method in another
1123 * Local.cs: New file - A Local variable
1124 * MethodInstr.cs: New file - an instruction that takes a method
1126 * IClassRef.cs: Add method to get a method reference from a class
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.
1138 2003-05-07 Jackson Harper <jackson@latitudegeo.com>
1140 * TypeInstr.cs: New file - implementation of instructions that
1141 take a single type instruction.
1143 2003-05-06 Jackson Harper <jackson@latitudegeo.com>
1145 * SwitchInstr.cs: New file - implementation of switch instructions
1147 2003-05-05 Jackson Harper <jackson@lattidegeo.com>
1149 * MethodDef.cs: Add ability to add and emit labels
1150 * BranchInstr.cs: New file - Branch instructions
1152 2003-05-04 Jackson Harper <jackson@latitudegeo.com>
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.
1159 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
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.
1166 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
1168 * TypeManager.cs: Check if type is defined before defining it.
1170 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
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
1176 2003-04-30 Jackson Harper <jackson@latitudegeo.com>
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
1183 * LdstrInstr.cs: New file - ldstr instruction (the only
1184 instruction that takes a string parameter)
1186 2003-04-28 Jackson Harper <jackson@latitudegeo.com>
1188 * InstrTable.cs: Much simpler system. All tokens go into one
1189 hashtable now. There is no reason to have them seperated out.
1191 2003-04-20 Jackson Harper <jackson@latitudegeo.com>
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
1198 2003-04-18 Jackson Harper <jackson@latitudegeo.com>
1200 * FieldDef.cs: Change peapi fielddef name.
1201 * MethodDef.cs: Change peapi methoddef name.
1203 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
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
1210 * CodeGen.cs: Add methods to add method definitions
1212 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1214 * ExternTypeRef.cs: external types are classrefs
1216 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1218 * PeapiTypeRef.cs: New file - base wrapper for type refs that are
1220 * PrimitiveTypeRef.cs: New file - A primitive type (char, int, string)
1222 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1224 * TypeRef.cs: Rewrite - Typerefs are now resolved after parsing.
1225 * TypeManager.cs: Rewrite - Just a simple table for looking up
1227 * ExternTable.cs: Create ClassRef's instead of Classes
1228 * Location.cs: Make compile
1229 * CodeGen.cs: Use new tree system
1231 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
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
1241 * TypeDef.cs: New file - Represents the a class definition, and
1242 will hold all of the classes members.
1244 2003-04-07 Jackson Harper <jackson@latitudegeo.com>
1246 * TypeRef.cs: Return FieldDef when adding a field def to a class
1248 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
1250 * TypeRef.cs: Add flag for making types pinned
1252 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
1254 * ClassTable.cs: Do not append a . to names that are not in a
1256 * CodeGen.cs: Handle nested classes
1258 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1260 * ExternTable.cs: Remove some unsed fields.
1262 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
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.
1269 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1271 * InstrTable.cs: Add Calli, detabify
1273 2003-03-29 Jackson Harper <jackson@latitudegeo.com>
1275 * InstrTable.cs: Add branch ops switch, and lc.r*, also fix some
1276 typos for other ops.
1278 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
1280 * ClassTable.cs: Set defined flag and type attributes for referenced
1281 classes when they are defined.
1283 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
1285 * MethodTable.cs: Add method to Check if all methods have been defined, set referenced methods properties
1287 * FieldTable.cs: Add method to check if all fields have been defined, set referenced fields properties
1289 * ClassTable.cs: Make sure all methods and fields are defined.
1291 2003-03-16 Jackson Harper <jackson@latitudegeo.com>
1293 * MethodTable.cs: Fire events when methods are defined and referenced
1295 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1297 * ClassTable.cs: Classes now store field tables
1298 * CodeGen.cs: Add methods to add fields and get field references
1300 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1302 * FieldTable.cs: New file, holds a classes fields
1304 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1306 * InstrTable.cs: Add FieldOp instructions
1308 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1310 * InstrTable.cs: Add ldstr instruction
1312 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
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)
1318 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
1320 * InstrTable.cs: Add TypeOps (instructions that take a type param)
1322 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
1324 * InstrTable.cs: Add IntOps (instructions that take an integer param)
1326 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1328 * InstrTable.cs: Fix instructions that have dots in their name
1330 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
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)
1336 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1338 * CodeGen.cs: Set current method when a new method is added.
1340 2003-03-12 Jackson Harper <jackson@latitudegeo.com>
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.
1347 2003-03-11 Jackson Harper <jackson@latitudegeo.com>
1349 * TypeRef.cs: New file, used for pairing types and their names.
1351 2003-03-09 Jackson Harper <jackson@latitudegeo.com>
1353 * ExternTable.cs: Do not verify the existence of external types
1355 2003-03-08: Jackson Harper <jackson@latitudegeo.com>
1357 * CodeGen.cs: Add ExternTable property
1358 * ExternTable.cs: New file, this will is used for pulling
1359 types and methods from external assemblies.
1361 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1363 * ClassTable.cs, CodeGen.cs: Add methods to allow types to inherit from another type.
1365 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1367 * ClassTable.cs: Add method to check for undefined types
1369 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1371 * CodeGen.cs: Use class table for adding type definitions
1372 * ClassTable.cs: Return ClassDef when defining types
1374 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1376 * ClassTable.cs: Add method for adding class definitions to the
1379 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
1381 * CodeGen.cs: Reconfigure to work with new PEAPI emission system
1383 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
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
1389 2003-02-10 Jackson Harper <jackson@latitudegeo.com>
1391 * Method.cs: Add method to set parameters,
1392 set parameters when defining type
1393 * Class.cs: Fix very silly bug in GetMethod method
1396 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
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,
1402 * Instructions.cs: Take Class instead of CodeGen when emitting,
1403 get member methods from Class.
1404 * TypeManager.cs: Add set indexer
1406 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
1408 * Instructions.cs: Use TypeManager to lookup types
1410 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1412 * TypeManager.cs: Fix error parsing type names
1413 * Method.cs: Display the name of types that can't be found
1415 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
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
1424 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1426 * Method.cs: Add functionality to define local variables
1427 * Instructions.cs: Add newobj instruction, cleanup call instruction
1429 2003-02-03 Jackson Harper <jackson@latitudegeo.com>
1431 * AssemblyNameStore.cs: Added file
1433 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
1435 * Instructions.cs: Resolve parameters types in a more proper manner.
1437 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
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