40ec8708dcd2fab7b48c250eb9b038c882521e5f
[mono.git] / mcs / ilasm / codegen / ChangeLog
1 2009-05-27  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * TypeDef.cs: Add field method_list to preserve definition
4         order of methods when emiting the PE file.
5
6 2009-04-20  Ankit Jain  <jankit@novell.com>
7
8         Fix bug #494221
9         * MethodDef.cs (BeginLocalsScope): New.
10         (EndLocalsScope): New.
11         (AddLocals):
12         (GetNamedLocal): Support scoping for .locals
13
14 2009-04-15  Ankit Jain  <jankit@novell.com>
15
16         * MethodDef.cs (GetNamedLocalSlot): Return -1 if local var not found.
17
18 2009-03-31  Rodrigo Kumpera  <rkumpera@novell.com>
19
20         * MethodDef.cs (WriteCode): Emit labels which use offsets as absolute PEAPI
21         CilLabels.
22
23 2008-07-02  Ankit Jain  <jankit@novell.com>
24
25         Fix bug #405383
26         * MethodPointerTypeRef (Clone): Add missing null ref check.
27         Patch from Andrea Carlo Ornstein <andrea.ornstein@st.com>
28
29 2008-06-07  Martin Baulig  <martin@ximian.com>
30
31         * DebuggingInfo.cs: Reflect latest symbol writer changes.
32
33 2008-06-02  Ankit Jain  <jankit@novell.com>
34
35         Fix bug #367114.
36         * CatchBlock.cs: Allow exception to be of any type (BaseTypeRef) and not
37         just a class (BaseClassRef).
38
39 2008-06-01  Ankit Jain  <jankit@novell.com>
40
41         Fix bug #364580.
42         * MethodDef.cs (CreateSignature): Add new @include_optional and
43         @call_conv param. Make private.
44         (CreateVarargSignature): Likewise.
45         (CreateSignature): Add new static method for vararg and other methods.
46         (GetVarargSig): Add new @full_signature param to uniquely identify
47         vararg methods.
48
49         * CodeGen.cs (ResolveVarargMethod): This now takes two signatures - one
50         with only the required params and the other with the optional ones, to
51         correctly resolve global vararg methods.
52
53         * BaseTypeRef.cs:
54         * GenericTypeInst.cs:
55         * GlobalMethodRef.cs:
56         * PrimitiveTypeRef.cs:
57         * TypeDef.cs: Track api changes.
58
59 2008-04-10  Erven Rohou <erven.rohou@st.com>
60
61         * DebuggingInfo.cs: use new DefineMethod API. Remove useless
62         variable.
63         * MethodDef.cs: remove useless variable.
64
65 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
66
67         * MethodDef.cs: Mono.CompilerServices API has changed in an incompatible way
68         since Erven's patch. Fixed it to follow the new one.
69
70 2008-04-07  Erven Rohou <erven.rohou@st.com>
71
72         * DebugInfo.cs, MethodDef.cs: Add support for emitting variable names
73         in mdb file.
74
75 2008-02-07  Gert Driesen  <drieseng@users.sourceforge.net>
76
77         * CodeGen.cs: Use original filename as base name for debug file.
78         Symbol writer will already add .mdb to it. Fixes bug #359516.
79
80 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
81
82         * EmiteByteInstr.cs: Fixed typo in class name.
83
84 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
85
86         * EmiteByteInstr.cs: added. Implements support
87         for the .emitbyte directive.
88
89 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
90
91         * SwitchInstr.cs (Emit): Switch from using strings
92         to LabelInfo.
93
94 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
95
96         * MethodPointerTypeRef.cs (.ctor): generate
97         full name of the method pointer. This is required
98         to alow overloading with method pointers.
99
100 2007-07-18  Jb Evain  <jbevain@novell.com>
101
102         * InstrTable.cs: add brzero alias.
103
104 2007-01-10  Ankit Jain  <jankit@novell.com>
105
106         * BaseClassRef.cs (Clone): Move to ..
107         * BaseTypeRef.cs (Clone): .. here.
108         * Sentinel.cs: Implement abstract Clone method.
109         * MethodPointerTypeRef.cs: Likewise.
110         * PrimitiveTypeRef.cs: Likewise.
111         * ModifiableType (MakeCustomModified): Add to SigMod.
112         * GenericTypeInst.cs:
113         * GenericParamRef.cs:
114         * TypeRef.cs:
115         * ExternTypeRef.cs: Update.
116
117 Tue Dec 12 19:23:34 CET 2006 Paolo Molaro <lupus@ximian.com>
118
119         * PropertyDef.cs: support more than one .other method in properties.
120
121 Tue Dec 12 19:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
122
123         * EventDef.cs: support more than one .other method in events.
124
125 2006-11-09  Ankit Jain  <jankit@novell.com>
126
127         * CodeGen.cs (CodeGen.BeginAssemblyRef): Add param for attributes.
128         (SetAssemblyName): Rename to .. 
129         (SetThisAssembly): .. this. Add param for attributes.
130         * ExternTable (ExternAssembly.ctor): Likewise.
131         (ExternAssembly.Resolve): Add attributes.
132         (ExternTable.AddAssembly): Add param for attributes.
133         (ExternTable): Update to changes.
134         * Assembly.cs (Assembly.SetAssemblyAttr): New.
135         (Assembly.Resolve): Add the flags.
136
137 2006-07-20  Ankit Jain  <jankit@novell.com>
138
139         * TypeDef.cs (.ctor): If the type is an interface, then make it
140         abstract.
141         (TypeDef.AddMethodDef): Set an interface method abstract and virtual if
142         it lacks either of the attributes.
143         * MethodDef.cs (MethodDef.FullName): New.
144         (MethodDef.WriteCode): Make global methods, non-abstract and static.
145         Interface cannot have a non-static method with a body.
146         Update error messages to use new FullName property.
147
148 2006-06-07  Ankit Jain  <jankit@novell.com>
149
150         * TypeDef.cs (TypeDef.IsAbstract): New.
151         * MethodDef.cs (MethodDef.WriteCode): Parent type must also be abstract
152         for an abstract method. Abstract methods cannot have a body.
153         Report errors for body with different implementation attributes like
154         native/runtime/unmanaged etc.
155         If the method has no body, then emit a 'ret'.
156
157 2006-06-07  Ankit Jain  <jankit@novell.com>
158
159         * TypeDef.cs (TypeDef.AddFieldDef):
160         (TypeDef.Define): Use Report.Warning instead of Console.Error.WriteLine
161         (TypeDef.AddMethodDef): Likewise. Also, use methoddef.Location .
162         * ExternTable.cs (ExternTable.GetTypeRef): Likewise.
163         * MethodDef.cs (MethodDef.StartLocation): New.
164
165 2006-06-01  Ankit Jain  <jankit@novell.com>
166
167         * MethodDef.cs (GetNamedParamPos): Return -1 if param_list is null.
168
169 2006-06-01  Ankit Jain  <jankit@novell.com>
170
171         * MethodDef.cs (MethodDef): Use a ParamDef for return type, instead of a
172         BaseTypeRef.
173         (MethodDef.ctor): Update.
174         (MethodDef.AddParamDefaultValue): Remove.
175         (MethodDef.GetParam): Likewise.
176         (MethodDef.Resolve): Update to use ret_param instead of ret_type.
177
178 2006-05-31  Ankit Jain  <jankit@novell.com>
179
180         * TypeDef.cs (TypeDef.IsValueType): New.
181         (TypeDef.IsEnumType): New.
182         (TypeDef.Define): Don't seal System.ValueType or System.Enum .
183
184 2006-05-26  Ankit Jain  <jankit@novell.com>
185
186         * Assembly.cs: New. Represents a '.assembly {}' (assembly manifest).
187         * CodeGen.cs: Update to use the Assembly class.
188
189 2006-05-26  Ankit Jain  <jankit@novell.com>
190
191         * PermissionSet.cs: New.
192         * Permission.cs: New.
193         * PermissionMember.cs: New. Classes for 2.0 metadata format of
194         declarative security.
195
196         * DeclSecurity.cs (DeclSecurity.AddPermissionSet): New. Overload for new
197         PermissionSet class.
198         (DeclSecurity.AddTo): Add new style PermissionSets also.
199         * CodeGen.cs (CodeGen.AddPermisson): Handle new PermissionSets also.
200         * ExternTable.cs (ExternAssembly.AssemblyName): New.
201
202 2006-05-23  Ankit Jain  <jankit@novell.com>
203
204         * DeclSecurity.cs (IDeclSecurityTarget): Remove AddPermission &
205         AddPermissionSet methods. Add 'DeclSecurity' property.
206         * TypeDef.cs: Update implementation of IDeclSecurityTarget interface.
207         * MethodDef.cs: Likewise.
208         * ExternTable.cs: Likewise.
209         * CodeGen.cs (CodeGen.AddPermission): Use IDeclSecurityTarget.DeclSecurity .
210
211 2006-05-11  Ankit Jain  <jankit@novell.com>
212
213         * CodeGen.cs (CodeGen.AddDataDef): Use Report.Error for consistent error
214         reporting.
215         * MethodDef.cs (MethodDef.AddLabel): Likewise.
216
217 2006-05-11  Ankit Jain  <jankit@novell.com>
218
219         * MethodDef.cs (MethodDef.AddLabel): Fix exception message.
220
221 2006-05-09  Ankit Jain  <jankit@novell.com>
222
223         * MethodDef.cs (MethodDef.AddLabel): Throw exception for duplicate
224         labels.
225
226 2006-05-09 Ankit Jain  <jankit@novell.com>
227
228         * CodeGen.cs (CodeGen.data_list): Change to ..
229         (CodeGen.data_table): .. a hashtable.
230         (CodeGen.AddDataDef): Update to throw exception for duplicate .data
231         labels.
232         (CodeGen.GetDataConst): Update to use data_table.
233
234 2006-04-24  Ankit Jain  <jankit@novell.com>
235
236         * CodeGen.cs (CodeGen.ctor): Remove 'is_assembly' param.
237         (CodeGen.Write): Emit assembly manifest only if the source
238         had it.
239
240 2006-02-22  Ankit Jain  <jankit@novell.com>
241
242         * ExternTable.cs (ExternTable.GetTypeRef): Emit a warning if mscorlib is
243         referenced without a corresponding '.assembly extern' directive. 
244         * TypeDef.cs (TypeDef.Define): Valuetype class should be sealed. Emit
245         warning if its not, and make it so.
246
247 2006-02-20  Ankit Jain  <jankit@novell.com>
248
249         * *.cs: Update all .cs files to use Report.Error instead of directly
250         throwing an exception.
251         * CodeGen.cs (CodeGen.ctor): Remove 'report' param, and the related
252         field & property.
253
254 2006-02-19  Ankit Jain  <jankit@novell.com>
255
256         * ExternTable.cs (ExternTable.GetModuleTypeRef): 'module_table' can be
257         null.
258
259 2006-02-19  Ankit Jain  <jankit@novell.com>
260
261         * CodeGen.cs (CodeGen.Write): Use only filename as the name of the
262         module.
263         * TypeDef.cs (TypeDef.ResolveAsMethodRef): New.
264         (TypeDef.ResolveMethod): Change signature to take ret_type, params
265         etc instead of a signature string. Also, if the method does not exist,
266         then use ResolveAsMethodRef to return a MethodRef for it.
267         (TypeDef.ResolveVarargMethod): Likewise.
268         (TypeDef.ResolveField): Likewise.
269         * MethodRef.cs (MethodRef.Resolve): Update use of TypeDef.Resolve*
270         methods.
271         * FieldRef.cs (FieldRef.Resolve): Update use of TypeDef.ResolveField.
272         * PropertyDef.cs (PropertyDef.AsMethodDef): Throws an exception is the
273         method is not a MethodDef.
274         (PropertyDef.Define): Use AsMethodDef to ensure that get/set/other are
275         MethodDefs.
276         * EventDef.cs (EventDef.AsMethodDef): Same as PropertyDef.
277         (EventDef.Define): Likewise.    
278  
279 2006-02-19  Ankit Jain  <jankit@novell.com>
280
281         * CodeGen.cs (CodeGen.ThisModule): New.
282         (CodeGen.Write): Set module name if not set by '.module' directive.
283         * Module.cs: Inherit from ExternRef. 
284
285 2006-02-10  Ankit Jain  <jankit@novell.com>
286
287         * CodeGen.cs (CodeGen.ResolveMethod): Throw exception if global method
288         not found.
289         (CodeGen.ResolveField): Likewise for global field.
290
291 2006-02-08  Ankit Jain  <jankit@novell.com>
292
293         * PeapiTypeRef.cs (PeapiTypeRef.MakeBoundArray): Simplify and fix
294         behavior.
295
296 2006-01-31  Ankit Jain  <jankit@novell.com>
297
298         * TypeDef.cs (TypeDef.AddMethodDef): Throw exception with proper message
299         if adding a duplicate method.
300
301 2006-01-31  Ankit Jain  <jankit@novell.com>
302
303         * InstrTable.cs (inst_table): Add 'readonly.' .
304
305 2006-01-31  Ankit Jain  <jankit@novell.com>
306
307         * ExternTable.cs (ExternTable.GetTypeRef): If type is from an 
308         undeclared assembly, then add reference to the assembly.
309
310 2006-01-28  Ankit Jain  <jankit@novell.com>
311
312         * MethodDef.cs:
313         * TypeManager.cs:
314         * MethodPointerTypeRef.cs:
315         * ExternMethodRef.cs: Remove unused variables to fix warnings.
316
317 2006-01-28  Ankit Jain  <jankit@novell.com>
318
319         * TypeDef.cs (GenericInfo):
320         * MethodDef.cs (GenericInfo): Remove (unused).
321
322 2006-01-23  Ankit Jain  <jankit@novell.com>
323
324         * TypeDef.cs (TypeDef.AddFieldDef): Throw exception if duplicate field being
325         added.
326
327 2006-01-19  Ankit Jain  <jankit@novell.com>
328
329         * Module.cs (Module): New. Class for representing this module.
330         * CodeGen.cs (CodeGen): Update to use the new Module class.
331         (CodeGen.Write): Resolve this_module.
332
333 2006-01-19  Ankit Jain  <jankit@novell.com>
334
335         * GenericParameters.cs (GenericParameter): Implement ICustomAttrTarget.
336         (GenericParameter.Resolve): New overload, reduce code duplication.
337         (GenericParameters.GetGenericParam): New. Returns a GenericParameter.
338         (GenericParameters.GetGenericParamNum): Update to use new GetGenericParam.
339
340         * TypeDef.cs (TypeDef.GetGenericParam): New. Two overloads for id and index.
341         * MethodDef.cs (MethodDef.GetGenericParam): Likewise.
342
343 2006-01-19  Ankit Jain  <jankit@novell.com>
344
345         * MethodRef.cs (MethodRef.Resolve): Resolve owner.
346
347 2006-01-16  Ankit Jain  <jankit@novell.com>
348
349         * TypeDef.cs (TypeDef.IComparable): Implement IComparable interface.
350         * TypeManager.cs (TypeManager.DefineAll): Sort type_table before Define()'ing.
351
352 2006-01-16  Ankit Jain  <jankit@novell.com>
353
354         * TypeRef.cs (TypeRef.CreateMethodRef): Return a TypeSpecMethodRef if
355         this is a modified (eg. []) type.       
356
357 2006-01-16  Ankit Jain  <jankit@novell.com>
358
359         * BaseTypeRef.cs (BaseTypeRef.Resolve): Make this abstract.
360         (BaseTypeRef.CreateMethodRef):
361         (BaseTypeRef.CreateFieldRef): Make protected and abstract.
362         * BaseClassRef.cs (BaseClassRef.Clone): Make this abstract.
363         Update all derived classes.
364         * PrimitiveTypeRef.cs (PrimitiveTypeRef.CreateMethodRef):
365         * GenericTypeInst.cs (GenericTypeInst.CreateMethodRef): Implement, but throw
366         exception as this method is not used.
367
368 2006-01-14  Ankit Jain  <jankit@novell.com>
369
370         * GenericParamRef.cs (GenericParamRef.Resolve): Apply modifications to the
371         cached type.
372
373 2006-01-14  Ankit Jain  <jankit@novell.com>
374
375         * GenericParamRef.cs (GenericParamRef.Resolve): Set PeapiType of the instance
376         to the cached one.
377
378 2006-01-13  Ankit Jain  <jankit@novell.com>
379
380         * GenericParamRef.cs (GenericParamRef.Resolve): Ensure no duplicate
381         GenParams get added to the TypeSpec table.
382         * GenericMethodSig.cs (GenericMethodSig.GetInstance): Cache sigs in a
383         static hashtable.
384         * BaseMethodRef.cs (BaseMethodRef.GetGenericMethodRef): Cache GenericMethodRefs.
385
386 2006-01-13  Ankit Jain  <jankit@novell.com>
387
388         Create BaseMethodRef from IMethodRef. Replace usage of IMethodRef
389         with BaseMethodRef in *all* files. 
390         Remove implementations of IMethodRef's methods from derived classes.
391         * BaseMethodRef.cs: New.
392
393 2006-01-13  Ankit Jain  <jankit@novell.com>
394
395         Move caching of method-refs and field-refs to BaseTypeRef, and use
396         CreateMethodRef & CreateFieldRef for creating the actual object.
397         Override these in derived classes to return the right objects.
398
399         * BaseTypeRef.cs (BaseTypeRef.CreateMethodRef): New.
400         (BaseTypeRef.CreateFieldRef): New.
401         (BaseTypeRef.GetMethodRef): Implement caching.
402         (BaseTypeRef.GetFieldRef): Likewise.
403         
404         GenericTypeInst and PrimitiveTypeRef are not cached, so static hashtables
405         are used here for caching their MethodRefs n FieldRefs.
406
407         * GenericTypeInst.cs (GenericTypeInst.GetMethodRef): Override and use
408         static hashtable to do caching.
409         (GenericTypeInst.GetFieldRef): Likewise.
410         * PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Likewise.
411         (PrimitiveTypeRef.GetFieldRef): Likewise.
412
413         * CodeGen.cs (CodeGen.GetGlobalMethodRef): New. Cache global method refs.
414         (CodeGen.GetGlobalFieldRef): New. Cache global field refs.
415
416 2006-01-13  Ankit Jain  <jankit@novell.com>
417
418         Create BaseClassRef, BaseGenericTypeRef from IClassRef & IGenTypeRef.
419         Replace usage of interfaces ITypeRef, IClassRef & IGenTypeRef with their
420         corresponding Base* types.
421         * BaseTypeRef.cs: New. Combine ITypeRef and ModifiableType into this.
422         * BaseClassRef.cs: New.
423         * BaseGenericTypeRef.cs: New.
424         * TypeSpecMethodRef.cs (TypeSpecMethodRef.ctor): Slight change in order
425         of params.
426
427 2006-01-12  Ankit Jain  <jankit@novell.com>
428
429         * MethodDef.cs (MethodDef.CreateSignature): Use "`n" only for generic
430         methods.
431
432 2006-01-11  Ankit Jain  <jankit@novell.com>
433
434         * InstrTable.cs (inst_table): Uncomment stelem and ldelem .
435
436 2006-01-11  Ankit Jain  <jankit@novell.com>
437
438         Support new syntax of specifying namespace, ie., as
439         part of the type name. (gen-nested2.il)
440         * TypeDef.cs (TypeDef.ctor): Add outer as a param.
441         Don't split name on '.' for inner classes.
442         * CodeGen.cs (CodeGen.BeginTypeDef): Update to use only 'name'
443         for inner classes and FullName for outermost class.
444
445 2006-01-10  Ankit Jain  <jankit@novell.com>
446
447         * TypeDef.cs (TypeDef.GetGenericParamNum): Return -1 if type has no
448         generic parameters.
449         * MethodDef.cs (MethodDef.GetGenericParamNum): Likewise.
450
451 2006-01-10  Ankit Jain  <jankit@novell.com>
452
453         * MethodDef.cs (MethodDef.WriteCode): Resolve generic params for abstract
454         methods also.
455
456 2006-01-10  Ankit Jain  <jankit@novell.com>
457
458         * TypeDef.cs (TypeDef.TypeParameters): New.
459         (TypeDef.ResolveGenParams): New. Resolve any gen param refs in
460         constraints, base class ref or implemented interfaces.
461         * MethodDef.cs (MethodDef.ResolveGenParams): Update to use new Resolve
462         overloads and ResolveConstraints for GenericParameters.
463
464         * GenericTypeInst.cs (GenericTypeInst.Resolve): Resolve generic args.
465         * GenericParamRef.cs (GenericParamRef.Resolve): Implement.
466         * GenericParameters.cs (GenericParameter.ResolveConstraints): New.
467         (GenericParameters.ResolveConstraints): New.
468         * GenericArguments.cs (GenericArguments.Resolve): New.
469
470         * TypeRef.cs (TypeRef.GetGenericTypeInst): Don't cache.
471         * ExternTypeRef.cs (ExternTypeRef.GetGenericTypeInst): Likewise.
472
473 2006-01-09  Ankit Jain  <jankit@novell.com>
474
475         * GenericArguments.cs (GenericArguments.is_resolved): New.
476         (GenericArguments.p_type_list): New. Resolve only once and return this.
477
478 2006-01-09  Ankit Jain  <jankit@novell.com>
479
480         * TypeDef.cs (TypeDef.Define): Set is_defined to true as soon as the
481         Peapi type gets created.
482
483 2006-01-09  Ankit Jain  <jankit@novell.com>
484
485         * GenericTypeRef.cs: Rename to ..
486         * GenericParamRef.cs: .. this.
487         (IGenericTypeRef): New.
488         (GenericParamRef): Implement IGenericTypeRef.
489         * GenericTypeInst.cs (GenericTypeInst): Implement IGenericTypeRef instead
490         of IClassRef.
491         (GenericTypeInst.ResolveOnly): Rename to ResolveNoTypeSpec to implement
492         IGenericTypeRef.ResolveNoTypeSpec .
493         * MethodDef.cs (MethodDef.ResolveGenParams): Update to use GenericParamRef.
494         * Local.cs (Local.GetPeapiLocal): Use IGenericTypeRef.
495
496 2006-01-08  Ankit Jain  <jankit@novell.com>
497
498         * InstrTable.cs (inst_table): Add stelem.any, ldelem.any and
499         constrained. instructions.
500
501 2006-01-07  Ankit Jain  <jankit@novell.com>
502
503         * GenericParameters.cs (GenericParameter): New.
504         (GenericParameters): Collection of Generic parameters.
505         * TypeDef.cs:
506         * CodeGen.cs:
507         * MethodDef.cs: Update to use the new GenericParameters class.
508
509 2006-01-06  Ankit Jain  <jankit@novell.com>
510
511         GenericTypeInst.Resolve should do the expected thing ie., resolve and add
512         the Generic Inst to the typespec table. Use ResolveOnly to Resolve w/o 
513         adding to the table.
514         * GenericTypeInst.cs (GenericTypeInst.Resolve): Rename to ..
515         (GenericTypeInst.ResolveOnly): .. this.
516         (GenericTypeInst.ResolveAsClass): Rename to Resolve.
517
518         * TypeDef.cs (TypeDef.Define): Revert the ResolveAsClass calls added here.
519         * Local.cs (Local.GetPeapiLocal): Use new GenericTypeInst.ResolveOnly if type is
520         GenericTypeInst.
521
522 2006-01-06  Ankit Jain  <jankit@novell.com>
523
524         * IClassRef.cs (IClassRef.Clone): New.
525         (IClassRef.GetGenericTypeInst): Get the Generic Instance of the IClassRef.
526         (IClassRef.ResolveInstance): Resolves the generic instance and returns the
527         resolved PEAPI type.     
528
529         * TypeRef.cs:
530         * ExternTypeRef.cs: Implement new methods of IClassRef.
531         Classes implementing IClassRef cache their generic instances (GenericTypeInst)
532         and their corresponding resolved PEAPI types.
533
534         * CodeGen.cs (CodeGen.GetTypeRef): Gets a TypeRef given a type name and caches them.
535
536         GenericTypeInst is now used for any Generic Type Instance, including any
537         extern types. ExternTypeRefInst is not used now.
538         * GenericTypeInst.cs (GenericTypeInst): Implement IClassRef instead of ITypeRef.
539         (GenericTypeInst.ResolveAsClass): Adds the instance to the TypeSpec table after Resolve()'ing it.
540         Clone () returns a cloned instance which shares its class_ref and generic arguments.
541
542         * TypeDef.cs (TypeDef.Define): Use ResolveAsClass for base class and interfaces
543         being implemented if they are GenericTypeInsts.
544
545 2005-12-24  Jb Evain  <jbevain@gmail.com>
546
547         * FeatureAttr.cs: tag as Flags, add an Instance value.
548         * PropertyDef.cs (PropertyDef.Resolve): Tag the property as instance or class.
549
550 2005-12-22  Ankit Jain  <jankit@novell.com>
551
552         * MethodDef.cs (MethodDef.ctor): Add type_def param. Use this for all uses of
553         the owner type_def. ResolveGenParams () before creating signature.
554         (MethodDef.ResolveGenParams):
555         (MethodDef.ResolveGenParam): Remove type_def param, instead use type_def field.
556         (MethodDef.Define): Remove overload with typedef param.
557         (MethodDef.CreateSignature): Put "`0" right after the name instead of at the end.
558         * TypeDef.cs (TypeDef.DefineContents): Update usage of MethodDef.Define .
559
560 2005-12-21  Ankit Jain  <jankit@novell.com>
561
562         * GenericArguments.cs (GenericArguments): New.
563         * ExternTypeRefInst.cs (ExternTypeRefInst):
564         * GenericTypeInst.cs (GenericTypeInst):
565         * GenericMethodSig.cs (GenericMethodSig): Update to use new GenericArguments class.
566
567 2005-12-16  Ankit Jain  <jankit@novell.com>
568
569         Use tuple of (field name, type_name) for fielddef hashtable in TypeDef.cs and
570         CodeGen.cs
571         * FieldDef.cs (FieldDef.Type): New.
572         * TypeDef.cs (TypeDef.ResolveField): Add 'type_name' param.
573         * CodeGen.cs (CodeGen.ResolveField): Add 'type_name' param.
574         * FieldRef.cs (FieldRef.Resolve): Update usage of .ResolveField .
575         * GlobalFieldRef (GlobalFieldRef.Resolve): Likewise.
576         * ExternTable.cs (IScope.FullName): New. Returns full name including and enclosing class
577         or assembly/module name.
578         (ExternRef.FullName):
579         (ExternModule.FullName):
580         (ExternAssembly.FullName): Implement new IScope.FullName .
581         * ExternTypeRef.cs (ExternTypeRef.Clone): Clone SigMod also.
582         (ExternTypeRef.FullName): Update to return full name including enclosing type or assembly
583         or module name. 
584         (ExternTypeRef.Name): Update to return only full_name with modifiers (array/pointers etc).
585         (ExternTypeRef.GetReflectedType): Use Name instead of FullName as only type name is required here.
586         * GenericTypeRef.cs (GenericTypeRef.FullName): Return proper fullname of the form (!0 or !!0).
587         * GenericTypeInst.cs (GenericTypeInst.ctor): Change param 'full_name' to 'name'. 'full_name' is
588         constructed here using the type parameter list.
589         Update code to use name instead of full_name.
590                                
591 2005-12-15  Ankit Jain  <jankit@novell.com>
592
593         * CodeGen.cs (CodeGen.SetAssemblyName): Multiple .assembly declarations with different
594         names are not allowed.
595
596 2005-12-14  Ankit Jain  <jankit@novell.com>
597
598         * PeapiTypeRef.cs (PeapiTypeRef.MakeBoundArray): Handle the case when only
599         lower bound (no size info) is available.
600
601 2005-12-14  Ankit Jain  <jankit@novell.com>
602
603         * TypeDef.cs (TypeDef.ctor): name_space can be null.
604
605 2005-12-13  Ankit Jain  <jankit@novell.com>
606
607         * TypeDef.cs (TypeDef.ctor): Ensure that 'name' contains only the last part
608         of the full (namespace + name) dotted name.
609
610 2005-12-12  Ankit Jain  <jankit@novell.com>
611
612         * TypeDef.cs (TypeDef.Define): Ensure nested visibility for a nested class.
613         (TypeDef.NestedFullName): New.
614
615 2005-12-09  Ankit Jain  <jankit@novell.com>
616
617         * MethodDef.cs (MethodDef.GenParamCount): typar_list can be null.
618
619 2005-12-09  Ankit Jain  <jankit@novell.com>
620
621         * ITypeRef.cs (ITypeRef.GetMethodRef): Add 'gen_param_count' param.
622         * Sentinel.cs (Sentinel.GetMethodRef): Update.
623         * GlobalMethodRef.cs (GlobalMethodRef.ctor): Add 'gen_param_count' param.
624         (GlobalMethodRef.Resolve): Update usage of MethodDef.CreateSignature .
625         * TypeDef.cs (TypeDef.GetGenericParamNum): New.
626         (TypeDef.DefineContents): Update usage of ITypeRef.GetMethodRef .
627         * ExternTypeRefInst.cs (ExternTypeRefInst.ctor): Add parameter for list of type
628         parameters (type_list).
629         (ExternTypeRefInst.Clone): Clone type_list also.
630         (ExternTypeRefInst.Resolve): Resolve the list of type parameters, and create
631         instance of PEAPI.GenericTypeInst instead of PEAPI.ClassRefInst .
632         (ExternTypeRefInst.GetMethodRef): Update.
633         * GenericTypeInst.cs (GenericTypeInst.GetMethodRef): Update signature. Update
634         usage of TypeSpecMethodRef.ctor .
635         * MethodRef.cs (MethodRef.ctor): Add 'gen_param_count' param.
636         (MethodRef.Resolve): Throw exception for non-existant owner. Update usage of
637         MethodDef.CreateSignature .
638         * ExternMethodRef.cs (ExternMethodRef.ctor): Add 'gen_param_count' param.
639         (ExternMethodRef.Resolve): Update usage of PEFile.AddMethodToTypeSpec and .AddMethod
640         * GenericMethodRef.cs (GenericMethodRef.PeapiMethod): Return PEAPI.Method obtained in 
641         .Resolve .
642         * GenericTypeRef.cs (GenericTypeRef.GetMethodRef): Update.
643         * MethodPointerTypeRef.cs (MethodPointerTypeRef.GetMethodRef): Likewise.
644         * TypeSpecMethodRef.cs (TypeSpecMethodRef.ctor): Add 'gen_param_count' param.
645         (TypeSpecMethodRef.Resolve): Update usage of PEFile.AddMethodToTypeSpec .
646         * MethodDef.cs (MethodDef.ctor): Add 'typars_list' param.
647         (MethodDef.AddGenericParam): Replace .. 
648         (MethodDef.AddGenericParams): .. with this.
649         (MethodDef.GenParamCount): New.
650         (MethodDef.GetGenericParamNum): New. Returns index for a given method type parameter name.
651         (MethodDef.ResolveGenParams): Resolves type parameter names in the parameter
652         list to their corresponding indices.
653         (MethodDef.ResolveGenParam): Resolves a give type parameter to its corresponding
654         index.
655         (MethodDef.CreateSignature): Add 'gen_param_count' param.
656         * TypeRef.cs (TypeRef.GetMethodRef): Update.
657         * ExternTypeRef.cs (ExternTypeRef.GetMethodRef): Likewise.
658         * PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Likewise.
659
660 2005-12-05  Ankit Jain  <jankit@novell.com>
661
662         * TypeDef.cs (TypeDef.GenericInfo.num): New.
663         (TypeDef.AddGenericParam): Set num for GenericInfo.
664         * MethodDef.cs (MethodDef.GenericInfo.num): New.
665         (MethodDef.AddGenericParam): Set num for GenericInfo.
666         * GenericTypeRef.cs (GenericTypeRef.ctor): Update to use PEAPI.GenParam
667         instead of PEAPI.MVar and PEAPI.GenericTypeSpec.
668
669 2005-11-28  Ankit Jain  <jankit@novell.com>
670
671         * ExternTypeRef.cs (extern_table): Remove unused field.
672         (.ctor): Remove parameter for extern_table. Update usage accordingly.
673         * ExternTable.cs (IScope): Remove unused 'table' parameter.
674         (ExternRef): Change IScope interface implementation accordingly. Update
675         call to ExternTypeRef.ctor for the previous change.
676
677 2005-09-15  Ankit Jain  <jankit@novell.com>
678
679         * DeclSecurity.cs (IDeclSecurityTarget.AddDeclSecurity): Remove.
680           (IDeclSecurityTarget.AddPermission),
681           (IDeclSecurityTarget.AddPermissionSet): New.
682           (DeclSecurity.IDeclSecurityTarget): Implement new interface methods.
683           (DeclSecurity.sec_action),
684           (DeclSecurity.data): Remove.
685           (DeclSecurity.permissionset_table): New.
686           (DeclSecurity.ctor): Replace parameterized constructor with a default one.
687           (DeclSecurity.AddTo): AddDeclSecurity for all Security Actions in the permissionset_table.
688         * TypeDef.cs (TypeDef.declsecurity_list): Remove.
689           (TypeDef.decl_sec): New.
690           (TypeDef.IDeclSecurityTarget): Implement new interface methods.
691           (TypeDef.DefineContents): Use new decl_sec instead of declsecurity_list.
692         * CodeGen.cs (CodeGen.assembly_declsec): Change type from ArrayList to DeclSecurity.
693           (CodeGen.EndAssemblyRef): Set current_customattrtarget and current_declsectarget to null.
694           (CodeGen.IDeclSecurityTarget): Implement new interface methods.
695           (CodeGen.Write): Add assembly_declsec to the assembly (using DeclSecurity.AddTo).
696         * ExternTable.cs (ExternAssembly.declsec_list): Remove.
697           (ExternAssembly.decl_sec): New.
698           (ExternAssembly.Resolve): Use new decl_sec instead of declsec_list.
699           (ExternAssembly.IDeclSecurityTarget): Implement new interface methods.
700         * MethodDef.cs (MethodDef.declsecurity_list): Remove.
701           (MethodDef.decl_sec): New.
702           (MethodDef.IDeclSecurityTarget): Implement new interface methods.
703           (MethodDef.WriteCode): Use new decl_sec instead of declsecurity_list.
704         * ExternTypeRef.cs (ExternTypeRef.GetReflectedType): New.  
705
706 2005-09-08  Ankit Jain  <jankit@novell.com>
707
708         * CodeGen.cs (CodeGen.stack_reserve): New.
709           (CodeGen.SetStackReserve): New.
710           (CodeGen.Write): SetStackReserve on the pefile.
711
712 2005-09-06  Ankit Jain  <jankit@novell.com>
713
714         * ExternTable.cs (ExternRef.is_resolved): New.
715           (ExternModule.Resolve, ExternAssembly.Resolve,
716           ExternTable.Resolve): Return if is_resolved. Set to true at the end.
717
718 2005-08-29  Ankit Jain  <jankit@novell.com>
719
720         * InstrTable.cs (inst_table): Comment out stelem and ldelem opcodes.
721
722 2005-08-26  Ankit Jain  <jankit@novell.com>
723
724         * ExternTable.cs (IScope): New. Interface for ResolutionScope.
725           (ExternRef): Implement IScope.
726           (ExternRef.GetTypeRef): Handle references to nested classes.
727           (ExternRef.GetValueType): Remove. Logic combined with GetType.
728           (ExternRef.GetType): Add param 'is_valuetype' and handle accordingly.
729         * ExternTypeRef.cs (ExternTypeRef): Implement IScope.
730           (ExternTypeRef.extern_ref),
731           (ExternTypeRef.ctor),
732           (ExternTypeRef.ExternRef): Change extern_ref type from ExternRef to IScope.
733           (ExternTypeRef.nestedtypes_table),
734           (ExternTypeRef.nestedclass_table): New. Hashtables for nested classes.
735           (ExternTypeRef.Resolve): Resolve parent if it is ExternTypeRef type.
736           (ExternTypeRef.GetTypeRef): New.
737           (ExternTypeRef.GetExternTypeRef): New. Returns the resolve PEAPI type.
738           (ExternTypeRef.GetType): New.
739
740 2005-08-23  Ankit Jain  <jankit@novell.com>
741
742         * ExternTable.cs (ExternTable.ctor): Remove. Move the initialization code
743           to the new method AddCorlib.
744           (ExternTable.AddCorlib): New.
745           (ExternTable.Resolve): Assembly_table can be null so check before using it.
746           (ExternTable.GetTypeRef): AddCorlib if mscorlib is being referenced but
747           assembly_table is still null.
748         * CodeGen.cs (CodeGen.SetAssemblyName): Call AddCorlib if name is not mscorlib.
749           (CodeGen.Write): Pass null for new outputDir param for PEFile ctor. 
750         * (PrimitiveTypeRef.Name): New. Returns the full_name.
751
752 2005-08-18  Ankit Jain  <jankit@novell.com>
753
754         * IMethodRef.cs (IMethodRef.Owner): New. Returns owner of the method.
755         * GlobalMethodRef.cs (GlobalMethodRef),
756           MethodRef.cs (MethodRef),
757           ExternMethodRef.cs (ExternMethodRef),
758           GenericMethodRef.cs (GenericMethodRef),
759           TypeSpecMethodRef.cs (TypeSpecMethodRef): Implement IMethodRef.Owner.
760         * CustomAttr.cs (CustomAttr.IsSuppressUnmanaged): New. Checks if the
761           it is a "System.Security.SuppressUnmanagedCodeSecurityAttribute" and 
762           is from "mscorlib" or the current assembly is mscorlib itself.
763         * TypeDef.cs (TypeDef.DefineContents),
764           MethodDef.cs (MethodDef.WriteCode): Set HasSecurity attribute if
765           SuppressUnmanagedCodeSecurity custom attribute is present.
766         * ExternTable.cs (ExternRef.Name): New.  
767         * ExternTypeRef.cs (ExternTypeRef.ExternRef): New. Returns the corresponding
768           extern ref.
769
770 2005-08-18  Ankit Jain  <jankit@novell.com>
771
772         * MethodDef.cs (MethodDef.WriteCode): Process custom attributes and decl security
773           lists even for abstract methods.
774
775 2005-08-16  Ankit Jain  <jankit@novell.com>
776
777         * CodeGen.cs (CodeGen.current_field_native_type): New.
778           (CodeGen.AddFieldMarshalInfo): New. Add marshal info for the current field.
779           (CodeGen.AddFieldDef): Add marshal info for the field.
780         * FieldDef.cs (FieldDef.native_type): New. Native type for marshalling.
781           (FieldDef.AddMarshalInfo): New. Set native_type.
782           (FieldDef.Resolve): Set MarshalInfo for field_def.
783         * MethodDef.cs (MethodDef.ret_native_type): New. Native type for return type.  
784           (MethodDef.AddRetTypeMarshalInfo): New.
785           (MethodDef.EntryPoint): Throw exception is the method is not static.
786           (MethodDef.Resolve): Call overload with class_def=null.
787           (MethodDef.Resolve): Add global methods to code_gen.PEFile. 
788           Add marshal info for return type.
789         * ParamDef.cs (ParamDef.native_type): New. Native type for marshalling.
790           (ParamDef.AddMarshalInfo): New.
791           (ParamDef.Define): Add marshal info to peapi_param.
792
793 2005-08-08  Ankit Jain  <jankit@novell.com>
794
795         * ExternTypeRef.cs (ExternTypeRef.Clone): Use full_name instead of FullName
796           to avoid cloning modifiers (like []).
797
798 2005-08-08  Ankit Jain  <jankit@novell.com>
799
800         * CodeGen.cs (CodeGen.entry_point): New bool field.
801           (CodeGen.HasEntryPoint): New. Property to mark that the assembly
802           has an entrypoint.
803           (CodeGen.Write): Throw Exception if an EXE has been requested but the
804           source file has no entrypoint defined.
805
806 2005-08-05  Ankit Jain  <jankit@novell.com>
807
808         * DeclSecurity.cs: New File.
809           (DeclSecurity): New class.
810           (IDeclSecurityTarget): New interface.
811         * TypeDef.cs (TypeDef): Implement IDeclSecurityTarget.
812           (TypeDef.DefineContents): Add DeclSecurity info.
813         * CodeGen.cs (CurrentDeclSecurityTarget): New. Property for current
814           DeclSecurity target.
815           (BeginTypeDef, BeginMethodDef, BeginAssemblyRef): Set current DeclSecurity
816           target accordingly.
817           (AddAssemblyDeclSecurity): New. Add DeclSecurity info to assembly.
818         * ExternTable.cs (ExternAssembly): Implement IDeclSecurityTarget.
819           (Resolve): Add DeclSecurity info to AssemblyRef.
820         * MethodDef.cs (MethodDef): Implement IDeclSecurityTarget.
821           (WriteCode): Add DeclSecurity info to MethodDef.
822
823 2005-08-03  Ankit Jain  <jankit@novell.com>
824
825         * GlobalMethodRef.cs (GlobalMethodRef.Resolve): Use CreateVarargSignature
826           to create method's signature for a vararg method.
827
828 2005-08-02  Ankit Jain  <ankit@corewars.org>
829
830         Fix #61512.
831         * TypeDef.cs (TypeDef.Define): Use default values for pack and size if only
832           one of them is unspecified.
833
834 2005-05-10  Ankit Jain  <ankit@corewars.org>
835
836         Fix #74768.
837         * ExternTable.cs (ExternRef.GetTypeRef): Make ValueClass if requested.
838         Hack alongwith Hari.
839
840 2005-05-06  Ankit Jain  <ankit@corewars.org>
841
842         * MethodDef.cs (MethodDef.GetNamedParamPos): Param num starts from 1 for instance
843         methods.
844         * CodeGen.cs (CodeGen.BeginTypeDef): Set current_customattrtarget when reopening a
845         class.
846         
847 2005-04-27  Ankit Jain  <ankit@corewars.org>
848
849         * ExternTypeRefInst.cs (ExternTypeRefInst.GetMethodRef): Use method_table to avoid
850         creating duplicates.
851         * PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Use method_table to avoid 
852         creating duplicates
853         * PeapiTypeRef.cs (Pair): New class. Tuple of PEAPI.Type and string.
854         (PeapiTypeRef.type_table): New.
855         (PeapiTypeRef.MakeArray, MakeBoundArray, MakeManagedPointer, MakeUnmanagedPointer,
856         MakeCustomModified): Use type_table to avoid creating duplicates.
857         
858 2005-04-22  Atsushi Enomoto  <atsushi@ximian.com>
859
860         * InstrTable.cs :
861           ble.un.s and blt.un.s were incorrectly added to the table.
862
863 2005-04-22  Ankit Jain  <ankit@corewars.org>
864
865         * TypeSpecMethodRef.cs (TypeSpecMethodRef.Resolve): Set is_resolved
866         to true.
867         
868 2005-04-18  Ankit Jain  <ankit@corewars.org>
869
870         * CodeGen.cs (CodeGen.AddManifestResource): Add a
871         ManifestResource to manifestResources ArrayList.
872         (CodeGen.Write): Add all resources to the pefile.
873
874 2005-04-12  Ankit Jain  <ankit@corewars.org>
875
876         * CustomAttr.cs (ICustomAttrTarget): New interface.
877         * TypeDef.cs: Implement ICustomAttrTarget.
878         * FieldDef.cs, PropertyDef.cs, ParamDef.cs, EventDef.cs
879         (AddCustomAttribute): Implement ICustomAttrTarget
880         (.Resolve): Add custom attributes.
881         * CodeGen.cs (CurrentCustomAttrTarget): New. Property for 
882         current CustomAttr target.
883         (BeginTypeDef, BeginMethodDef, BeginAssemblyRef): Set
884         current_customattrtarget accordingly.
885         * ExternTable.cs (ExternRef): Implement ICustomAttrTarget.
886         (ExternModule.Resolve): Add custom attributes to ModuleRef.
887         (ExternAssembly.Resolve): Add custom attributes to AssemblyRef.
888         * MethodDef.cs: Implement ICustomAttrTarget and add custom
889         attributes.
890         (GetParam): New. Get ParamDef by index.
891
892 2005-04-08  Ankit Jain  <radical@corewars.org>
893
894         * MethodDef.cs (named_param_table, CreateNamedParamTable): Remove.
895         (GetNamedParamPos): Implement using a linear scan.
896
897         * TypeDef.cs (TypeDef): Initialize 'is_enum_class'.
898         (Define): Set 'is_value_class' or 'is_enum_class' depending on
899         whether the parent is System.ValueType or System.Enum.  Update to
900         changes in PEAPI.cs.
901
902 2005-03-17  Ankit Jain  <radical@corewars.org>
903
904         * MethodDef.cs: Added method AddParamDefaultValue for adding DefaultValue
905         to a method parameter.
906         * ParamDef.cs: Added method AddDefaultValue and handling of default value.
907
908 2005-02-07  Jackson Harper  <jackson@ximian.com>
909
910         * MethodDef.cs: Don't die on duplicate local symbols. Fixes bug
911         72149. Patch by Sohail Somani.
912
913 2004-12-14  Raja R Harinath  <rharinath@novell.com>
914
915         * MethodDef.cs (CreateSignature): Add a space in generated signature.
916
917 2004-12-02  Jackson Harper  <jackson@ximian.com>
918
919         * ExternTypeRefInst.cs: When converting to arrays we loose our valuetypedness.
920
921 2004-12-02  Jackson Harper  <jackson@ximian.com>
922
923         * MethodDef.cs: Abstract methods don't get bodies. Even if there
924         are bodies there.
925
926 2004-12-02  Jackson Harper  <jackson@ximian.com>
927
928         * MethodDef.cs: If the type is an interface auto set fields to
929         static (and give a warning if they are not static), and set
930         methods to abstract virtual (and give warning if they were not already).
931         * FieldDef.cs:
932         * TypeDef.cs: Accessors and convience properties for getting and
933         setting the method/field attributes.
934         
935         
936 2004-12-02  Jackson Harper  <jackson@ximian.com>
937
938         * FieldDef.cs: Set the underlying type for bytearray data constants. This
939         fixes bug #70153 and #70154 which my previous fix caused.
940
941 2004-08-01  Atsushi Enomoto  <atsushi@ximian.com>
942
943         * DebuggingInfo.cs : csc build fix (see bug #62230).
944
945 2004-07-27  Martin Baulig  <martin@ximian.com>
946
947         * IInstr.cs (IInstr): Made this an abstract class and not an
948         interface, added a .ctor which takes a Location.
949         (IInstr.Location): New public readonly field.
950
951         * CodeGen.cs (CodeGen.SymbolWriter): New public property.
952         (CodeGen.BeginSourceFile, EndSourceFile): New public methods.
953         (CodeGen.EndMethodDef): Take a `Location' argument.
954         (CodeGen.Write): Create debugging info if the user requested it.
955
956         * MethodDef.cs (MethodDef.ctor): Added `CodeGen codegen' and
957         `Location start' arguments.  If the user requested debugging
958         information, register ourselves with the symbol writer.
959         (MethodDef.WriteCode): Emit debugging information.
960
961         * DebuggingInfo.cs: New file.
962
963 2004-07-23  Jackson Harper  <jackson@ximian.com>
964
965         * MethodDef.cs: Params are 1 based if the method is instance
966         because of the 'this' arg.
967         
968 2004-07-21  Jackson Harper  <jackson@ximian.com>
969
970         * ExternTypeRefInst.cs: Use the PeapiType so that modified types
971         will actually work. Add a Clone method so that type ref insts
972         aren't duplicated making them modified multiple times.
973         
974 2004-07-12  Jackson Harper  <jackson@ximian.com>
975
976         * MethodDef.cs: Local lists are not lazyily allocated so they were
977         getting added to every method. This is legal but wastes space.
978
979 2004-07-08  Jackson Harper  <jackson@ximian.com>
980
981         * CodeGen.cs: Add assembly custom attributes to the pe file.
982         * CustomAttr.cs: Custom attributes are now added through the
983         pefile, this ensures that they get emitted properly.
984         * ExternTable.cs: Allow adding custom attributes to assembly
985         refs.
986         
987 2004-06-26  Jackson Harper  <jackson@ximian.com>
988
989         * TypeDef.cs: Preserve the order of fields in a class. Then after
990         all the fields have been defined reset the order in PEAPI to the
991         correct order. This is done so sequential layouts actually
992         work. The order needs to be reset because it can be lost during
993         the recursive definition phase.
994         * MethodDef.cs: Use and ExternModule for pinvoke data's module
995         refs. This way we don't get duplicate module refs.
996         
997 2004-06-24  Jackson Harper  <jackson@ximian.com>
998
999         * MethodDef.cs: Report when defining methods just like MS.
1000         * TypeDef.cs: Error message when we can't find a locla method.
1001         
1002 2004-06-23  Jackson Harper  <jackson@ximian.com>
1003
1004         * MethodDef.cs: sigh, another varargs fix that probably breaks
1005         other varargs tets. Someday I will get this right, I don't think
1006         today is that day though. This fix basically just makes sure to
1007         trim the sentinel off of signatures. Also eliminated some code
1008         duplication.
1009         * ParamDef.cs: Make IsSentinel work for both cases of generating a
1010         sentinel param def.
1011         
1012 2004-06-20  Jackson Harper  <jackson@ximian.com>
1013
1014         * SwitchInstr.cs: Allow switches with no labels.
1015         
1016 2004-06-20  Jackson Harper  <jackson@ximian.com>
1017
1018         * InstrTable.cs: Add .u8 opcodes for ldind and ldelem these are
1019         just aliases to their .i8 equivelents.
1020         
1021 2004-06-19  Jackson Harper  <jackson@ximian.com>
1022
1023         * MethodPointerTypeRef.cs: New File - represents a method pointer
1024         that is being treated as a typeref. For example method void*() in
1025         the statement castclass method void*().
1026         
1027 2004-06-19  Jackson Harper  <jackson@ximian.com>
1028
1029         * InstrTable.cs: Add undocumented brnull opcode. This is really
1030         just an alias for brfalse.
1031         
1032 2004-06-19  Jackson Harper  <jackson@ximian.com>
1033
1034         * MethodDef.cs: Add a method to create vararg signatures from a
1035         list of typerefs that matches the algorithm for creating vararg
1036         signatures from paramdefs. This is used when creating methodref
1037         signatures.
1038         * MethodRef.cs: Use the new CreateVarargSignature method to create
1039         the methods signature if it is a vararg method.
1040         
1041 2004-06-14  Jackson Harper  <jackson@ximian.com>
1042
1043         * CodeGen.cs: Allow file refs to be added.
1044         * FileRef.cs: New file - represents a file ref.
1045         
1046 2004-06-14  Jackson Harper  <jackson@ximian.com>
1047
1048         * CodeGen.cs: Allow adding module refs.
1049         * ExternTable.cs: Add ExternModule refs.
1050         * ExternTypeRef.cs: Take an ExternRef which can be either an
1051         assmebly ref or a module ref.
1052         
1053 2004-06-14  Jackson Harper  <jackson@ximian.com>
1054
1055         * CodeGen.cs: Implement setting module names.
1056         
1057 2004-05-23  Jackson Harper  <jackson@ximian.com>
1058
1059         * MethodDef.cs: Cache vararg signatures so a new memberref is not
1060         created for each vararg pattern.
1061         
1062 2004-05-22  Jackson Harper  <jackson@ximian.com>
1063
1064         * InstrTable.cs: ldc.i4.M1 is aliased to ldc.i4.m1. Fixes bug #58524.
1065         
1066 2004-05-22  Jackson Harper  <jackson@ximian.com>
1067
1068         * GlobalMethodRef.cs: Check for sentinel properly.
1069         
1070 2004-04-03  Jackson Harper  <jackson@ximian.com>
1071
1072         * CodeGen.cs: cast
1073         
1074 2004-04-02  Jackson Harper  <jackson@ximian.com>
1075
1076         * CodeGen.cs: Allow setting assembly info.
1077         
1078 2004-04-01  Jackson Harper  <jackson@ximian.com>
1079
1080         * CodeGen.cs: Add a current assembly ref and methods to create/end
1081         it so we can set assembly ref attributes.
1082         * ExternTable.cs: Make the ExternAssembly public so that its
1083         attributes can be set.
1084
1085 2004-03-28  Jackson Harper  <jackson@ximian.com>
1086
1087         * PeapiTypeRef.cs: Check for null bounds in bound arrays. Patch by
1088         Vladimir Vukicevic.
1089         * ModifiablyType.cs: Set names properly for bound arrays.
1090         
1091 2004-02-18  Jackson Harper <jackson@ximian.com>
1092
1093         * ExternTypeRefInst.cs: New file - represents an instance of an
1094         extern type ref, used for making value type tokens.
1095         * TypeDef.cs: Add implementing classes.
1096         
1097 2003-12-10  Jackson Harper <jackson@ximian.com>
1098
1099         * ModifiableType.cs: Allow the conversion list to be got/set.
1100         * ExternTypeRef.cs: Add a Clone method. Remove table modification.
1101         
1102 2003-12-10  Jackson Harper <jackson@ximian.com>
1103
1104         * ExternTable.cs: Add methods to update a types name.
1105         * ExternTypeRef.cs: When a types name is modified update it in the
1106         table.
1107         
1108 2003-12-08  Jackson Harper <jackson@ximian.com>
1109
1110         * ModifiableType.cs: Put modifier and class in the list in the
1111         correct order.
1112         
1113 2003-11-18  Jackson Harper <jackson@ximian.com>
1114
1115         * MethodDef.cs: Add support for .zeroinit. This is just another
1116         way of initializing locals.
1117         
1118 2003-11-17  Jackson Harper <jackson@ximian.com>
1119
1120         * LdstrInstr.cs: Allow strings to be created as bytearrays.
1121         
1122 2003-10-28 Jackson Harper <jackson@ximian.com>
1123
1124         * ExternTable.cs: Revert back to resolving value and class types
1125         into the same table. This avoids types being resolved multiple
1126         times when classrefs are used with valuetypes.
1127         
1128 2003-10-28 Jackson Harper <jackson@ximian.com>
1129
1130         * ExternTable.cs: This is now used to store ExternTypeRefs so we
1131         only create 1 for each external type.
1132         * ExternTypeRef.cs: Only create one method and field per a
1133         signature/name.
1134         
1135 2003-10-18 Jackson Harper <jackson@ximian.com>
1136
1137         * ExternTable.cs: Separate class and value types into diff tables.
1138         
1139 2003-10-18 Jackson Harper <jackson@ximian.com>
1140
1141         * InstrTable.cs: Use short branch instructions instead of aliasing them
1142         to the long branch instructions.
1143         
1144 2003-10-13 Jackson Harper <jackson@ximian.com>
1145
1146         * MethodDef.cs: Check for null param lists in vararg
1147         methods. Fixes bug #49614.
1148         
1149 2003-10-11 Jackson Harper <jackson@ximian.com>
1150
1151         * GenericTypeRef.cs: Allow Mvars to be a base type.
1152         * GenericMethodRef.cs: Basically just a wrapper around an existing
1153         method making it into a generic method. 
1154         * GenericMethodSig.cs: Signature for a generic method.
1155         
1156 2003-10-08 Jackson Harper <jackson@ximian.com>
1157
1158         * PeapiTypeRef.cs: Remove old hackery for adding methods to
1159         arrays, use typespecs now.
1160         
1161 2003-10-08 Jackson Harper <jackson@ximian.com>
1162
1163         * InstrTable.cs: Add unbox.any instruction.
1164         * MethodDef.cs: Allow generic parameters to be added to methods.
1165         
1166 2003-10-06 Jackson Harper <jackson@latitudegeo.com>
1167
1168         * MethodInfo.cs: Use report to display no label error message.
1169         
1170 2003-10-01 Jackson Harper <jackson@latitudegeo.com>
1171
1172         * LabelInfo.cs: Fix tabbing, add ToString so labels are printed
1173         properly in error messages.
1174         
1175 2003-09-27 Jackson Harper <jackson@latitudegeo.com>
1176
1177         * MethodDef.cs: Allow PInvoke info to be added.
1178         
1179 2003-09-21 Jackson Harper <jackson@latitudegeo.com>
1180
1181         * CodeGen.cs: Add methods for adding data. CodeGen now takes a
1182         report object for giving users errors/warnings/info.
1183         * FieldDef.cs: When a data constant is assigned to a field the
1184         constant might not exist yet. So just take the constants name and
1185         look it up when writting code.
1186         * Local.cs: Starting to add some error handling. Still playing
1187         with diff ways to do this.
1188         * MethodDef.cs: Add some error handling for local var lookups
1189         * TypeDef.cs: Data is allways global so it should never be added
1190         to a class
1191         * TypeRef.cs: Error message for lookups.
1192         
1193 2003-09-20 Jackson Harper <jackson@latitudegeo.com>
1194
1195         * TypeDef.cs: Rework so multiple constraints can be added to a
1196         generic parameter.
1197         
1198 2003-09-16 Jackson Harper <jackson@latitudegeo.com>
1199
1200         * InstrTable.cs: endfault instruction (which is just endfinally
1201         with a costume on).
1202         
1203 2003-09-15 Jackson Harper <jackson@latitudegeo.com>
1204
1205         * FinallyBlock.cs: The sad thing is how long it took me to realize
1206         what was going on here...
1207                 
1208 2003-09-13 Jackson Harper <jackson@latitudegeo.com>
1209
1210         * MethodInstr.cs: callvirt operation is implicitly instance.
1211         
1212 2003-09-12 Jackson Harper <jackson@latitudegeo.com>
1213
1214         * TypeRef.cs: Remove unused enum, this has been moved to the
1215         ModifiableType base class.
1216         
1217 2003-09-08 Jackson Harper <jackson@latitudegeo.com>
1218
1219         * TypeDef.cs: By default types will have System.Object as their
1220         parent type if no parent type is specified (this is what PEAPI
1221         does) however if we are assembling corlib the System.Object type
1222         will not have System.Object as its parent type.
1223         
1224 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
1225
1226         * DataDef.cs: Make name public so data names can be looked up
1227         * FieldDef.cs: Stub method for adding data values
1228         * TypeDef.cs: Implement long form overrides, fix some backwords
1229         variable naming, add a method to lookup data definitions.
1230         
1231 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
1232
1233         * IClassRef.cs: Removed methods that have been moved into ITypeRef
1234         * MethodDef.cs: Make some properties public, Add method to get a
1235         list of parameter types. This is used to build signatures. Alow
1236         sentinels in signatures and in param lists. Fix some tabbing.
1237         * ParamDef.cs: Expose the parameters type so they can be used when
1238         building signatures.
1239         * TypeDef.cs: Add and emit overrides.
1240                 
1241 2003-08-10 Jackson Harper <jackson@latitudegeo.com>
1242
1243         * CodeGen.cs: Fix tabbing
1244         * ModifiableType.cs: Modify a types signature when the type is
1245         modified instead of waiting untill the end. Signatures need to be
1246         modified immediatly because they are used in method signatures and
1247         would fail for overloaded operations if sigs weren't modified
1248         right away.
1249         * ExternTypeRef.cs: Add signature modifications, fix some tabbing
1250         * GenericTypeInst.cs: Use ModifiableType as a base
1251         * GenericTypeRef.cs: Use ModifiableType as a base
1252         * PeapiTypeRef.cs: No longer take or modify type names.
1253         * PrimitiveTypeRef.cs: Add signature modifications, fix some tabbing.
1254         * Sentinel.cs: Add signature modifications, fix some tabbing.
1255         * TypeRef.cs: Add signature modifications, fix some tabbing.
1256                 
1257 2003-08-05  Nick Drochak <ndrochak@gol.com>
1258
1259         * IClassRef.cs: Fix build on .NET
1260
1261 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
1262
1263         * IClassRef.cs: Add method for making types into value types
1264         * ExternTypeRef.cs: Add functionality for valuetypes
1265         * MethodDef.cs: Handle Vararg signatures individually. Fixes for
1266         new Sentinel type in vararg signatures
1267         * MethodRef.cs: Use new SentinelTypeRef instead of Sentinel type 
1268         ref constant.
1269         * ParamDef.cs: New method to check if this parameter is the sentinel
1270         * TypeRef.cs: Add some functionality for creating valuetypes
1271         * Sentinel.cs: New type represents the sentinel
1272
1273 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
1274
1275         * TypeDef.cs: Make types into value types if specified. Also
1276         add the functionality to make types into Enums.
1277         TODO: Value types of nested classes.
1278
1279 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
1280
1281         * LabelInfo.cs: Move this type outside of MethodDef, because other
1282         types use LabelInfos for label references now.
1283         * BranchInstr.cs: Take a LabelInfo instead of information on a label.
1284         * HandlerBlock.cs: Take a LabelInfo instead of information on a label.
1285         * MethodDef.cs: Return LabelInfo from AddLabel methods. New method for
1286         adding a reference to a label.
1287         
1288 2003-08-02 Jackson Harper <jackson@latitudegeo.com>
1289
1290         * ExternMethodRef.cs: Remove top secret debugging code.
1291         * MethodDef.cs: Less elegant but more bugfree method of doing explicit
1292         offsets for labels. Just put the offset labels in another list and 
1293         define them in another loop.
1294         
1295 2003-08-02 Jackson Harper <jackson@latitudegeo.com>
1296
1297         * IMethodRef.cs: Method refs should expose their call conv. This is
1298         needed so the call conv can be modified for the newobj operation which
1299         is implicitly instance.
1300         * ExternMethodRef.cs: Expose call conv. Don't resolve vararg methods
1301         more then once.
1302         * GlobalMethodRef.cs: Expose call conv
1303         * TypeSpecMethodRef.cs: Expose call conv
1304         * MethodInstr.cs: For newobj operations set the call conv to instance
1305
1306 2003-07-31 Jackson Harper <jackson@latitudegeo.com>
1307
1308         * MethodDef.cs: Allow 0 offsets for labels, and make sure to only
1309         use offsets when we are supposed to.
1310         
1311 2003-07-30 Jackson Harper <jackson@latitudegeo.com>
1312
1313         * BranchInstr.cs: Allow explicit offsets for labels
1314         
1315 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
1316
1317         * FilterBlock.cs: Use a handler block for the this block. This
1318         makes it easier to create filters using braces, labels, or offsets
1319         * HandlerBlock.cs: Allow handler blocks to be created using positions,
1320         offsets, and labels.
1321         * MethodDef.cs: Add methods to create labels all 3 ways, and emit
1322         labels created by each of the methods.
1323         * TryBlock.cs: Use a handler block instead of label strings. This 
1324         allows all three methods of label creation to be used.
1325         
1326 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
1327
1328         * IInstr.cs: Instructions now get their parent method when being 
1329         emitted.
1330         * *Instr.cs: Adjust emit method to accept a methoddef
1331         
1332 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
1333
1334         * CodeGen.cs: Set the assembly name when creating the PEFile. 
1335
1336 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
1337
1338         * CodeGen.cs: Do not create the PEFile untill the resolve phase. This 
1339         fixes the problem with ilasm creating blank files if their is a 
1340         failure in the parsing phase and not being able to set the assembly
1341         name.
1342         * ExternTable.cs: Do not reference the assemblies untill after the 
1343         PEFile untill the Resolve phase.
1344         
1345 2003-07-27 Jackson Harper <jackson@latitudegeo.com>
1346
1347         * ExternFieldRef.cs: Resolve as a typespec field if neccasary, make 
1348         sure to not resolve more then once.
1349         * ExternMethodRef.cs: Resolve as a typespec method if neccasary
1350         * ExternTypeRef.cs: Use modifiable type as base class
1351         * FieldRef.cs: Make sure to not resolve more then once.
1352         * GlobalFieldRef.cs: Make sure to not resolve more then once.
1353         * GlobalMethodRef.cs: Make sure to not resolve more then once.
1354         * ITypeRef.cs: Types no longer need the AsClassRef method
1355         * MethodDef.cs: Only decriment param count for vararg methods if there
1356         is an ellipsis on the end of the param list. 
1357         Fix little bug so return types allways get resolved.
1358         * PeapiTypeRef.cs: Use TypeRef.Ellipsis for a place holder in bound
1359         arrays instead of null
1360         * PrimitiveTypeRef.cs: Use modifiable type as a base
1361         * TypeRef.cs: Use modifable type as base, and let it do all the
1362         modifications
1363         * TypeSpecFieldRef.cs: Make sure to not resolve more then once.
1364         * ModifiableType.cs: New base class for all types. This class will
1365         handle all of the typemodification and determine whether methods
1366         should be added to the type or the types typespec.
1367         
1368 2003-07-25 Jackson Harper <jackson@latitudegeo.com>
1369
1370         * MethodDef.cs: If methods do not have the static attribute give
1371         them the instance calling convention.
1372                 
1373 2003-07-21 Jackson Harper <jackson@latitudegeo.com>
1374
1375         * MethodDef.cs: Do not decremint param count for vararg methods,
1376         the ellipsis is needed later
1377         
1378 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
1379
1380         * GenericTypeInst.cs: New File - A type reference to an instance
1381         of a generic type. ie Set<int32>
1382         * TypeSpecFieldRef.cs: New File - A field ref that is attached to
1383         a typespec. This can be used with modified types, and generic types.
1384         * TypeSpecMethodRef.cs: New File - A method ref that is attached
1385         to a typespec. This can be used with modified types, and generic types.
1386         * GenericTypeRef.cs: Create method refs and field refs using the
1387         new typespec classes.
1388         * ITypeRef.cs: Types should now be able to have methods and fields
1389         attached to them
1390         * PeapiTypeRef.cs: Set UseTypeSpec to true if the type is modified
1391         * PrimitiveTypeRef.cs: Add methods to attach fields and
1392         methods. This just uses the TypeSpec* classes so I don't need to
1393         create classrefs.
1394         * TypeRef.cs: Set UseTypeSpec to true if a type is modified.
1395         
1396 2003-07-17 Jackson Harper <jackson@latitudegeo.com>
1397
1398         * GenericTypeRef.cs:  New File - A reference to a generic type
1399         spec. ie !0 or !1
1400         * InstrTable.cs: Add the stelem and ldelem opcodes.
1401         
1402 2003-07-15 Jackson Harper <jackson@latitudegeo.com>
1403
1404         * TypeDef.cs: Allow adding and emitting generic type constraints.
1405                 
1406 2003-07-14 Jackson Harper <jackson@latitudegeo.com>
1407
1408         * TypeDef.cs: Emit generic parameters.
1409
1410 2003-06-15 Jackson Harper <jackson@latitudegeo.com>
1411
1412         * CodeGen.cs: Fix buglet in cache name creating (I will claim this
1413         was a typo). 
1414                 
1415 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
1416
1417         * CodeGen.cs: When creating nested types cache their names using
1418         the parent/type method but emit their short name.
1419                 
1420 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
1421
1422         * CodeGen.cs: Add methods for setting corflags, subsystem, and corflags.
1423         
1424 2003-06-14 Jackson Harper <jackson@latitudegeo.com>
1425
1426         * ITypeRef.cs, PeapiTypeRef.cs, TypeRef.cs: Quick hack for custom
1427         modified types.
1428                 
1429 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
1430
1431         * EventDef.cs: Only add one method for addon, fire, other, and
1432         removeon
1433                 
1434 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
1435
1436         * TypeDef.cs: Add properties to types.
1437         * PropertyDef.cs: New file - Implementation of a type property feature
1438                 
1439 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
1440
1441         * TypeDef.cs: Fix silly null reference bug.
1442                 
1443 2003-06-08 Jackson Harper <jackson@latitudegeo.com>
1444
1445         * EventDef.cs: New file - An event definition.
1446         * FeatureAttr.cs: New file - Attributes for features (events and
1447         properties)
1448         * MethodRef.cs: Only resolve methods once.
1449         * TypeDef.cs: Allow Events to be added to types. Also add
1450         functionality to add generic type parameters to types. The
1451         actually emission of these type parameters is commented out untill
1452         I commit my patches to PEAPI and work out the syntax of constraints.
1453                 
1454 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
1455
1456         * CodeGen.cs: Allow this assembly name to be set.
1457         * HandlerBlock.cs: Make label fields public so they can be
1458         accessed in a TryBlocks constructor.
1459         * MethodDef.cs: Allow random labels to be inserted at the current
1460         position. These are use for scope blocks.
1461         * TryBlock.cs: New constructor takes from and to labels as a HandlerBlock
1462                 
1463 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
1464
1465         * CustomAttr.cs: New file - Custom attributes
1466         * InstrTable.cs: Add stelem.r4 and stelem.r8 instructions. Add
1467         . tail to unaligned modifier.
1468         * LdtokenInstr.cs: Add type tokens.
1469         * MethodDef.cs: Fix IsVararg, add method to add custom attributes,
1470         emitting custom attributes when writing code, allow for Ellipsises
1471         in param lists, add coma between args in signatures.
1472         * ParamDef.cs: Add the Ellipsis pseudo param
1473         * PrimitiveTypeRef.cs: System.String and System.Object can be
1474         referenced without an [mscorlib] assembly prefix. 
1475         * TypeDef.cs: Add Custom attributes.
1476                 
1477 2003-05-25 Jackson Harper <jackson@latitudegeo.com>
1478
1479         * CodeGen.cs: Add method to resolve global vararg methods.
1480         * ExternMethodRef.cs: Resolve vararg methods
1481         * GlobalMethodRef.cs: Set calling conventions, add vararg methods
1482         * MethodDef.cs: Set calling conventions, add vararg methods
1483         * MethodRef.cs: Set calling conventions, add vararg methods
1484         * TypeDef.cs: Resolve vararg methods
1485         * TypeRef.cs: Add Ellipsis pseudo type, this should never really
1486         be used as a type, but is stored in arrays with other types. Pass
1487         call convs to methodref constructor.
1488                 
1489 2003-05-24 Jackson Harper <jackson@latitudegeo.com>
1490
1491         * CatchBlock.cs: Remove typo causing to labels to be the same as
1492         from labels.
1493         * FaultBlock.cs: Remove typo causing to labels to be the same as
1494         from labels.
1495         * FilterBlock.cs: Remove typo causing to labels to be the same as
1496         from labels.
1497         * MethodDef.cs: Allow for multiple labels to point to the same
1498         line. ie:
1499         END_BLOCK:
1500         PASS:
1501         do stuff
1502                 
1503 2003-05-23 Jackson Harper <jackson@latitudegeo.com>
1504
1505         * CatchBlock.cs: New file - Initial implementation of a catch
1506         block
1507         * FaultBlock.cs: New file - Initial implementation of a fault
1508         block
1509         * FilterBlock.cs: New file - Initial implementation of a filter
1510         block
1511         * FinallyBlock.cs: New file - Initial implementation of a finally
1512         block
1513         * HandlerBlock.cs: New file - A handler block is the block
1514         assosciated with a SEH clause
1515         * ISehClause: New file - Interface that structured exception
1516         handling clauses must implement.
1517         * TryBlock.cs: New file - Initial implementation only supports
1518         label form SEH. This TryBlock is added to a method as an
1519         instruction out of convenience, tryblock is not an instruction.
1520                 
1521 2003-05-22 Jackson Harper <jackson@latitudegeo.com>
1522
1523         * InstrTable.cs: Add unsigned conversion instructions.
1524                 
1525 2003-05-21 Jackson Harper <jackson@latitudegeo.com>
1526
1527         * CalliInstr.cs: New file - The calli instruction
1528         * Ldtoken.cs: New file - The ldtoken instruction
1529         * InstrTable.cs: ldc.i8 is a TOKEN_I8 and should be given the
1530         MiscToken.ldc_i8 value.
1531                 
1532 2003-05-18 Jackson Harper <jackson@latitudegeo.com>
1533
1534         * ExternMethodRef.cs: Accept and add calling conventions. Add
1535         methods using array methods if owners are arrays, resolve methods
1536         named <init> as .ctor.
1537         * ExternTable.cs: Add method to get value classes.
1538         * ExternTypeRef.cs: Add AsClassRef method, GetMethodRef now takes
1539         calling conventions.
1540         * IClassRef.cs: GetMethodRef now takes calling conventions
1541         * ITypeRef.cs: Add IsArray IsRef and AsClassRef methods
1542         * MethodRef.cs: Change <init> to .ctor
1543         * PeapiTypeRef.cs: This class is no longer an ITypeRef because it
1544         cannot be converted to a IClassRef. Add IsArray and IsRef, use new
1545         Class::GetArray* methods to convert to arrays.
1546         * PrimitiveTypeRef.cs: Add method to convert to an IClassRef
1547         * TypeRef.cs: Add IsArray and IsRef, add method to convert to
1548         IClassRef. GetMethodRef now takes calling conventions
1549                 
1550 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
1551
1552         * MethodDef.cs: Add named param table and methods to get named param
1553         positions. Add method to get named local variables slot
1554         number. Make sure param_lists aren't null when defining them. Add
1555         specialname and rtspecialname attributes if the method being
1556         defined is named '.ctor' or '.cctor'. Add new method for creating
1557         signatures using a list of typerefs.
1558         * GlobalMethodRef.cs: Use new CreateSignature method that takes an
1559         array of typerefs.
1560         * MethodRef.cs: Use new CreateSignature method
1561         * InstrTable.cs: Use INSTR_LOCAL and INSTR_PARAM tokens for
1562         instructions that take local and param operands.
1563                 
1564 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
1565
1566         * TypeDef.cs: Add size and packing information
1567                 
1568 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1569
1570         * IFieldRef.cs: New file - interface field references must implement
1571         * ExternFieldRef.cs: New file - Reference to a field in another
1572         assembly
1573         * FieldRef.cs: New file - Reference to a field in this assembly
1574         * GlobalFieldRef.cs: New file - Reference to a global field
1575         * FieldInstr.cs: New file - Instruction that takes a field
1576         instruction
1577         * CodeGen.cs: Add method to resolve global methods
1578         * ExternTypeRef.cs: Add method to get method references
1579         * FieldDef.cs: Allow methods to be resolved before being defined
1580         * IClassRef.cs: Add method to get field references.
1581         * TypeDef.cs: Add method to resolve member fields.
1582         * TypeRef.cs: Add method to get field references
1583                 
1584 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1585
1586         * GlobalMethodRef.cs: New file - A reference to a global method
1587         * CodeGen.cs: Store global methods and fields in hashtables to
1588         make lookup easier. Add method to resolve global methods.
1589                 
1590 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1591
1592         * MethodDef.cs: Allways set max stack
1593                 
1594 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1595
1596         * ExternTable.cs: Alias corlib to mscorlib since these seem to get
1597         used interchangably
1598                 
1599 2003-05-10 Jackson Harper <jackson@latitudegeo.com>
1600
1601         * IMethodRef.cs: New file - Interface that method references must
1602         implement
1603         * ExternMethodRef.cs: New file - Reference to a method in another
1604         assembly
1605         * Local.cs: New file - A Local variable
1606         * MethodInstr.cs: New file - an instruction that takes a method
1607         reference operand
1608         * IClassRef.cs: Add method to get a method reference from a class
1609         reference
1610         * MethodDef.cs: Add ability to resolve methods before defining
1611         them, add max stack, locals, and entry point. Make CreateSignature
1612         method public and static so other classes can use it.
1613         * TypeDef.cs: Store methods and fields in hashtables so they can
1614         be easily retrieved, add method to resolve member methods.
1615         * TypeRef.cs: Add method for resolving member methods.
1616         * ExternTypeRef.cs: Add methods to get classref and methodrefs
1617         * MethodRef.cs: New file - Reference to a method in this assembly.
1618         
1619                 
1620 2003-05-07 Jackson Harper <jackson@latitudegeo.com>
1621
1622         * TypeInstr.cs: New file - implementation of instructions that
1623         take a single type instruction.
1624                 
1625 2003-05-06 Jackson Harper <jackson@latitudegeo.com>
1626
1627         * SwitchInstr.cs: New file - implementation of switch instructions
1628                 
1629 2003-05-05 Jackson Harper <jackson@lattidegeo.com>
1630
1631         * MethodDef.cs: Add ability to add and emit labels
1632         * BranchInstr.cs: New file - Branch instructions
1633                 
1634 2003-05-04 Jackson Harper <jackson@latitudegeo.com>
1635
1636         * LdcInstr.cs: New file - lcd* instructions
1637         * MiscInstr.cs: New file - Just an enum that gives me constant
1638         values for instructions PEAPI does not define in an enum
1639         * InstrTable.cs: Use new MiscInstr constants instead of string values.
1640                 
1641 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
1642
1643         * CodeGen.cs: Define the contents of types after all types have
1644         been resolved, this avoids the infinite loop that would occur if a
1645         type was a member of its base type.
1646         * TypeDef.cs: Method to define contents after being defined. 
1647                 
1648 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
1649
1650         * TypeManager.cs: Check if type is defined before defining it.
1651                 
1652 2003-05-01 Jackson Harper <jackson@latitudegeo.com>
1653
1654         * CodeGen.cs: Add outer classes to typedefs if necesary
1655         * InstrTable.cs: ldtoken instruction is a INSTR_TOK token
1656         * TypeDef.cs: Add outer class property
1657                 
1658 2003-04-30 Jackson Harper <jackson@latitudegeo.com>
1659
1660         * MethodDef.cs: Accept and emit instructions.
1661         * CodeGen.cs: Fix typo
1662         * IInstr.cs: New file - Interface for instructions that are added to methods
1663         * IntInstr.cs: New file - Instruction that takes a single int
1664         param
1665         * LdstrInstr.cs: New file - ldstr instruction (the only
1666         instruction that takes a string parameter)
1667                 
1668 2003-04-28 Jackson Harper <jackson@latitudegeo.com>
1669
1670         * InstrTable.cs: Much simpler system. All tokens go into one
1671         hashtable now. There is no reason to have them seperated out.
1672                 
1673 2003-04-20 Jackson Harper <jackson@latitudegeo.com>
1674
1675         * CodeGen.cs: Add method to add data
1676         * FieldDef.cs: Add method to set a fields value
1677         * TypeDef.cs: Add method to add data
1678         * DataDef.cs: New file - Definition of a data constant
1679                 
1680 2003-04-18 Jackson Harper <jackson@latitudegeo.com>
1681
1682         * FieldDef.cs: Change peapi fielddef name.
1683         * MethodDef.cs: Change peapi methoddef name.
1684                 
1685 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1686
1687         * MethodDef.cs: New file - definition of a method.
1688         * ParamDef.cs: New file - definition of a parameter to a method
1689         * TypeDef.cs: Add method definitions, set intransit flag to false
1690         before defining members, so a false circular reference is not
1691         created.
1692         * CodeGen.cs: Add methods to add method definitions
1693
1694 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1695
1696         * ExternTypeRef.cs: external types are classrefs
1697                 
1698 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1699
1700         * PeapiTypeRef.cs: New file - base wrapper for type refs that are
1701         just peapi types.
1702         * PrimitiveTypeRef.cs: New file - A primitive type (char, int, string)
1703                 
1704 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1705
1706         * TypeRef.cs: Rewrite - Typerefs are now resolved after parsing.
1707         * TypeManager.cs: Rewrite - Just a simple table for looking up
1708         typedefs
1709         * ExternTable.cs: Create ClassRef's instead of Classes
1710         * Location.cs: Make compile
1711         * CodeGen.cs: Use new tree system
1712                 
1713 2003-04-17 Jackson Harper <jackson@latitudegeo.com>
1714
1715         * ExternTypeRef.cs: New file - Represents a reference to a type in
1716         an external assembly
1717         * FieldDef.cs: New file - Represents a field definition
1718         * IClassRef.cs: New file - Interface that classrefs must
1719         implement. This needs some more thought though because once a
1720         classref has been modified it is no longer a classref.
1721         * ITypeRef.cs: New file - Interface that references to types must
1722         implement
1723         * TypeDef.cs: New file - Represents the a class definition, and
1724         will hold all of the classes members.
1725
1726 2003-04-07 Jackson Harper <jackson@latitudegeo.com>
1727
1728         * TypeRef.cs: Return FieldDef when adding a field def to a class
1729                 
1730 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
1731
1732         * TypeRef.cs: Add flag for making types pinned
1733         
1734 2003-04-01 Jackson Harper <jackson@latitudegeo.com>
1735
1736         * ClassTable.cs: Do not append a . to names that are not in a
1737         namespace
1738         * CodeGen.cs: Handle nested classes
1739                 
1740 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1741
1742         * ExternTable.cs: Remove some unsed fields.
1743         
1744 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1745
1746         * ExternTable.cs: Add method to lookup classes with a full name,
1747         instead of having to have namespace and name seperate.
1748         * ClassTable.cs: Make method that seprates full names into
1749         name/namespaces public.
1750                 
1751 2003-03-30 Jackson Harper <jackson@latitudegeo.com>
1752
1753         * InstrTable.cs: Add Calli, detabify
1754                 
1755 2003-03-29 Jackson Harper <jackson@latitudegeo.com>
1756
1757         * InstrTable.cs: Add branch ops switch, and lc.r*, also fix some
1758         typos for other ops.
1759
1760 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
1761
1762         * ClassTable.cs: Set defined flag and type attributes for referenced 
1763         classes when they are defined.
1764
1765 2003-03-17 Jackson Harper <jackson@latitudegeo.com>
1766
1767         * MethodTable.cs: Add method to Check if all methods have been defined, set referenced methods properties
1768         when defining them
1769         * FieldTable.cs: Add method to check if all fields have been defined, set referenced fields properties
1770         when defining them
1771         * ClassTable.cs: Make sure all methods and fields are defined.
1772
1773 2003-03-16 Jackson Harper <jackson@latitudegeo.com>
1774
1775         * MethodTable.cs: Fire events when methods are defined and referenced
1776
1777 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1778
1779         * ClassTable.cs: Classes now store field tables
1780         * CodeGen.cs: Add methods to add fields and get field references
1781
1782 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1783
1784         * FieldTable.cs: New file, holds a classes fields
1785
1786 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1787
1788         * InstrTable.cs: Add FieldOp instructions
1789
1790 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1791
1792         * InstrTable.cs: Add ldstr instruction
1793
1794 2003-03-15 Jackson Harper <jackson@latitudegeo.com>
1795
1796         * CodeGen.cs: Add method to get method references.
1797         * MethodTable.cs: Complete GetReference method
1798         * InstrTable.cs: Add MethodOps (instructions that take a method ref param)
1799
1800 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
1801
1802         * InstrTable.cs: Add TypeOps (instructions that take a type param)
1803
1804 2003-03-14 Jackson Harper <jackson@latitudegeo.com>
1805
1806         * InstrTable.cs: Add IntOps (instructions that take an integer param)
1807
1808 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1809
1810         * InstrTable.cs: Fix instructions that have dots in their name
1811
1812 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1813
1814         * CodeGen.cs: Add code buffer for il instructions when a new method is added.
1815         * InstrTable.cs: New file, this is a table of all the instructions (just simple 
1816         instructions right now)
1817
1818 2003-03-13 Jackson Harper <jackson@latitudegeo.com>
1819
1820         * CodeGen.cs: Set current method when a new method is added.
1821
1822 2003-03-12 Jackson Harper <jackson@latitudegeo.com>
1823
1824         * ClassTable.cs: Add Method tables to Class tables, add method to get a 
1825         class's method table.
1826         * CodeGen.cs: Add Method to add methods :p
1827         * MethodTable.cs: Add file, this class is used to add methods to a class.
1828
1829 2003-03-11 Jackson Harper <jackson@latitudegeo.com>
1830
1831         * TypeRef.cs: New file, used for pairing types and their names.
1832
1833 2003-03-09 Jackson Harper <jackson@latitudegeo.com>
1834
1835         * ExternTable.cs: Do not verify the existence of external types
1836
1837 2003-03-08: Jackson Harper <jackson@latitudegeo.com>
1838
1839         * CodeGen.cs: Add ExternTable property
1840         * ExternTable.cs: New file, this will is used for pulling 
1841         types and methods from external assemblies.
1842
1843 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1844
1845         * ClassTable.cs, CodeGen.cs: Add methods to allow types to inherit from another type.
1846
1847 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1848
1849         * ClassTable.cs: Add method to check for undefined types
1850
1851 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1852
1853         * CodeGen.cs: Use class table for adding type definitions
1854         * ClassTable.cs: Return ClassDef when defining types
1855         
1856 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
1857
1858         * ClassTable.cs: Add method for adding class definitions to the 
1859         the table.
1860
1861 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
1862
1863         * CodeGen.cs: Reconfigure to work with new PEAPI emission system
1864
1865 2003-03-6 Jackson Harper <jackson@latitudegeo.com>
1866
1867         * ClassTable.cs: Add file, this is a 'table' for storing classes
1868         * Location.cs: Add file, this will eventually be used for marking
1869         locations in IL files
1870
1871 2003-02-10 Jackson Harper <jackson@latitudegeo.com>
1872
1873         * Method.cs: Add method to set parameters, 
1874                set parameters when defining type
1875         * Class.cs: Fix very silly bug in GetMethod method
1876         
1877
1878 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
1879
1880         * Class.cs: Resolve Methods before emiting
1881         * InstrBase.cs: Take a Class instead of CodeGen when emiting
1882         * Method.cs: Replace MethodInfo property with MethodBuilder property,
1883                 Add resolve method
1884         * Instructions.cs: Take Class instead of CodeGen when emitting, 
1885                 get member methods from Class.
1886         * TypeManager.cs: Add set indexer
1887
1888 2003-02-09 Jackson Harper <jackson@latitudegeo.com>
1889
1890         * Instructions.cs: Use TypeManager to lookup types
1891
1892 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1893
1894         * TypeManager.cs: Fix error parsing type names
1895         * Method.cs: Display the name of types that can't be found
1896
1897 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1898
1899         * TypeManager.cs: Add file
1900         * CodeGen.cs: Add TypeManager attribute
1901         * InstrBase.cs: Take a CodeGen in Emit method
1902         * Instructions.cs: Take a CodeGen in Emit method, handle arg lists better
1903         * Method.cs: Handle local variables better
1904         
1905
1906 2003-02-08 Jackson Harper <jackson@latitudegeo.com>
1907
1908         * Method.cs: Add functionality to define local variables
1909         * Instructions.cs: Add newobj instruction, cleanup call instruction
1910
1911 2003-02-03 Jackson Harper <jackson@latitudegeo.com>
1912
1913         * AssemblyNameStore.cs: Added file
1914
1915 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
1916
1917         * Instructions.cs: Resolve parameters types in a more proper manner.
1918
1919 2003-02-02 Jackson Harper <jackson@latitudegeo.com>
1920
1921         * Class.cs: Don't try to emit methods if we don't have any
1922         * Class.cs: Test for entry point of methods, and set Assembly entrypoint
1923         * CodeGen.cs: Add method to set an Assemblys entry point
1924         * Method.cs: Add IsEntryPoint property
1925         * Method.cs Add MethodInfo property, and set this while Emiting
1926         * Instructions.cs: Add new InstrCall instruction