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