1 2005-09-16 Ankit Jain <jankit@novell.com>
3 * PEAPI.cs: Clean up indentation. Split into ...
4 Metadata.cs, Code.cs, PEAPI.cs: ... these.
6 2005-09-08 Ankit Jain <jankit@novell.com>
8 * PEAPI.cs (FileImage.stackReserve): New. Set to default value of 0x100000 (1Mb).
9 (FileImage.WritePEHeader): Write stackReserve instead of the default value.
10 (PEFile.SetStackReserve): Set stack reserve for fileImage.
12 2005-09-06 Ankit Jain <jankit@novell.com>
14 * PEAPI.cs (MetaData.WriteTildeStream): Change minor version back to 0.
16 2005-08-30 Ankit Jain <jankit@novell.com>
18 * PEAPI.cs (MetaData.WriteTildeStream): Change minor version to 1.
20 2005-08-29 Ankit Jain <jankit@novell.com>
22 * PEAPI.cs (CustomMarshaller.ctor): New.
23 (CustomMarshaller.ToBlob): Emit marshallerName and cookie strings with
26 2005-08-26 Ankit Jain <jankit@novell.com>
28 * PEAPI.cs (PEFile.ctor): Restore old constructor overload to avoid
31 2005-08-26 Ankit Jain <jankit@novell.com>
33 * PEAPI.cs (IResolutionScope): New. Empty interface.
34 (ClassRef): Implement IResolutionScope.
35 (ClassRef.parent): Change type from ResolutionScope to IResolutionScope.
36 (ClassRef.AddClass): New. Add nested class.
37 (ClassRef.AddValueClass): New. Add nested value class.
39 2005-08-23 Ankit Jain <jankit@novell.com>
41 * PEAPI.cs (MetaData.version): Change from 1.0.3705 to 1.1.4322.
43 2005-08-23 Ankit Jain <jankit@novell.com>
45 * PEAPI.cs (MSCorLib.systemClasses): Change type from ClassRef[] to
47 (MSCorLib.ctor): Add assembly ref to mscorlib for non-mscorlib assemblies
49 (MSCorLib.AddClass): Use Class instead of ClassRef.
50 (MSCorLib.GetSpecialClass): Change return type to Class from ClassRef.
51 Don't instantiate object of SystemClass if this assembly is mscorlib.
52 (MSCorLib.SetSpecialSystemClass): New. Set a System.* class for primitive
53 types, used for compiling mscorlib.
54 (MSCorLib.GetValueClass): Change to handle new type of systemClasses.
56 (MSCorLib.EnumType): Don't instantiate ClassRef if this assembly is mscorlib.
57 (ClassDef.ctor): Don't superType to System.Object for System.Object and <Module>.
58 (ClassDef.MakeValueClass): Set typeIndex to ValueType's typeIndex.
59 (ClassDef.IsValueType),
60 (ClassDef.IsEnum): Use "==" instead of .CompareTo for string comparison.
61 (ClassDef.AddNestedClass): Set typeIndexChecked = true for the nested class.
62 (PEFile.isMSCorlib): New. bool field.
63 (PEFile.ctor): Move all ctor logic into one overload and call that from others.
64 (PEFile.ctor): Add outputDir parameter.
65 (PEFile.SetName): Set name of the assembly and set isMSCorlib accordingly.
66 (PEFile.IsMSCorlib): New. bool Property.
67 (PEFile.AddClass): Call overload.
68 (PEFile.AddClass): Set superType and SetSpecialSystemClass if compiling mscorlib.
69 (PEFile.AddValueClass): Call MakeValueClass only if the class is not System.ValueType
70 or System.Enum itself, else set the supertype correctly.
72 2005-08-16 Ankit Jain <jankit@novell.com>
74 * PEAPI.cs (FieldAttr): Move HasFieldMarshal from FieldDef to this.
75 (ParamAttr): Move HasDefault and HasFieldMarshal from Param to this.
76 (ManifestResource.ctor): Use 'mres' param to clone.
77 (MethodDef.ret_param): New.
78 (MethodDef.AddRetTypeMarshallInfo): New.
79 (MethodDef.TypeSig): Set seqNo for ret_param to zero.
80 (MethodDef.BuildTables): Add ret_param to Param table, and BuildTables
82 (FixedSysString): New. Class to represent Fixed SysString native type.
83 (NativeArray): Rename len to numElem. Init numElem, parNum and elemMult
85 (NativeArray.ctor): Uncomment ctor with one param (elemType).
86 (NativeArray.ctor): Move ctor logic to the one with all params.
87 (NativeArray.ToBlob): Emit values in correct order.
88 (SafeArray.hasElemType): New. bool var to indicate presence of ElemType.
89 (SafeArray.ctor): New. Parameterless constructor.
90 (SafeArray.ToBlob): Emit correctly.
91 (FixedArray.ctor): Remove elemType param.
92 (FixedArray.ToBlob): Don't emit elemType.
94 2005-08-08 Ankit Jain <jankit@novell.com>
96 * PEAPI.cs (CodeBlock): Set maxCodeSize to 255 instead of 256 for checking
98 (CILInstructions.CheckCode): Use 255 instead of 256 for checking Fat format.
100 2005-08-08 Ankit Jain <jankit@novell.com>
102 * PEAPI.cs (FileImage.WriteCLIHeader): Move the check for no entrypoint
103 in case of an EXE to ilasm/codegen/CodeGen.cs to avoid creating unnecessary
106 2005-08-05 Ankit Jain <jankit@novell.com>
108 * PEAPI.cs (FileImage.WriteCLIHeader): Throw Exception if an EXE has been
109 requested but the source file has no entrypoint defined.
111 2005-08-05 Ankit Jain <jankit@novell.com>
113 * PEAPI.cs (TypeAttr): Add HasSecurity.
114 (MethAttr): Likewise.
115 (SecurityAction): New enum.
116 (DeclSecurity.ctor): Add 'byte []' as the third parameter.
117 (DeclSecurity.BuildTables): Write the byte array to the blob.
118 (MetaData.AddDeclSecurity): Add DeclSecurity to declsec_list.
119 (MetaData.BuildMetaData): Call BuildTables for declsec_list members.
120 (PEFile.AddDeclSecurity): New. Add DeclSecurity to metaData.
122 2005-04-30 Ankit Jain <ankit@corewars.org>
124 * PEAPI.cs (InterfaceImpl.SortKey): New.
125 (MetaData.BuildMetaData): Sort InterfaceImpl table.
126 (MethodSemantics.SortKey): Compute key correctly.
128 2005-04-18 Ankit Jain <ankit@corewars.org>
130 * PEAPI.cs (ManifestResource.InitResource): New. Used by constructors
131 to initialize the resource.
132 (ManifestResource.ctor): New. Constructor to accept resource as a
134 (ManifestResource.ctor): New. Constructor to accept an object of self.
135 (ManifestResource.BuildTables): Update.
136 (MetaData.AddResource): New. Add the resource to the list, adjust
138 (MetaData.WriteResource): New. Write resources to the FileImage.
139 (PEFile.AddExternalManagedResource): New. Add a new resource.
140 (PEFile.GetResource): New. Get resource by name.
141 (PEFile.GetResources): New. Get array of resources.
143 2005-04-12 Ankit Jain <ankit@corewars.org>
145 * PEAPI.cs (CustomAttribute.ctor): Dont throw
146 NotYetImplementedException.
147 (MethodSemantics.SortKey): Should be sorted by
148 'Association' column.
150 2005-04-08 Ankit Jain <radical@corewars.org>
152 * PEAPI.cs (MSCorLib.GetSpecialClass): Don't encode
153 System.ValueType and System.Enum as value types.
154 (ValueClass): New enum.
155 (Class.MakeValueClass): Add a 'ValueClass' parameter.
156 (ClassDef.MakeValueClass): Set supertype to ValueType or Enum
157 according to ValueClass parameter.
158 (IsValueType,IsEnum): New. Test if type is System.ValueType or
160 (ClassDef.AddNestedClass): Don't encode System.ValueType and
161 System.Enum as value types.
163 2005-03-17 Ankit Jain <radical@corewars.org>
165 * PEAPI.cs: Metadata tables that must be sorted are sorted now.
166 Fixes the code for ParamAttr.Opt. Fix bug #73517.
168 2004-12-08 Sebastien Pouliot <sebastien@ximian.com>
170 * PEAPI.cs: Added support for allocating and storing strongname
171 signatures when a .publickey directive is present in source. Fix bug
174 2004-12-01 Jackson Harper <jackson@ximian.com>
176 * PEAPI.cs: Allow underlying types of ByteArrConsts to be set when
177 they are used as field init data.
179 2004-07-29 Martin Baulig <martin@ximian.com>
181 * PEAPI.cs (Module.Guid): New public property.
183 2004-07-27 Martin Baulig <martin@ximian.com>
185 * PEAPI.cs (CILInstructions.Offset): New public property.
187 2004-07-23 Jackson Harper <jackson@ximian.com>
189 * PEAPI.cs: Make the type index modifiable so ClassRefInsts will
190 be emitted properly. This is in desperate need of some API love.
192 2004-07-21 Jackson Harper <jackson@ximian.com>
194 * PEAPI.cs: Do all the index size checks. I always wondered why
195 the code was like that and finally realized today that it was like
196 that because it was wrong. Wait until the opportune momement to
197 calculate the index sizes (after everything has been added to the
198 streams, and before writing anything).
200 2004-07-21 Jackson Harper <jackson@ximian.com>
202 * PEAPI.cs: Create ClassRefInsts with types not just
203 ClassRefs. This way modified types can be used. I am having alot
204 of trouble remembering why I actually even need this class though.
206 2004-07-16 Jackson Harper <jackson@ximian.com>
208 * PEAPI.cs: make sure small index sizes get set properly. Use a
209 continue to reduce nesting a little and make code almost mildly
210 readable. Add MDTable.Field to the list of tables that can
211 increase the CustomAttributeType shift. TODO: What else should be
214 2004-07-13 Jackson Harper <jackson@ximian.com>
216 * PEAPI.cs: Use a byte array hash code provider and comprarer, so
217 checking the byte hashtable for duplicate entries actually
218 works. Old method was valid but created larger then needed binaries.
220 2004-07-09 Jackson Harper <jackson@ximian.com>
222 * PEAPI.cs: Don't build custom attributes twice.
224 2004-07-08 Jackson Harper <jackson@ximian.com>
226 * PEAPI.cs: Add custom attributes through the pefile so that we
227 can ensure they are emitted no matter what table they are
228 in. Previously not all custom attributes were getting emitted.
230 2004-06-26 Jackson Harper <jackson@ximian.com>
232 * PEAPI.cs: Add a method to set the fields list. This is needed so
233 that sequentially laid out fields are laid out in the right
234 order. When building custom attribute tables actually emit the
235 custom attribute data. When writing the .sdata section make sure
236 to pad to its size. The constants itself will not make up the
237 entire section because it is aligned on 512 byte blocks.
239 2004-06-19 Jackson Harper <jackson@ximian.com>
241 * PEAPI.cs: Make sure the sentinel is placed properly for vararg
244 2004-06-19 Jackson Harper <jackson@ximian.com>
246 * PEAPI.cs: Allow MethPtrTypes to be created from a signature
247 instead of from a method reference because it really doesn't make
248 sense to do it that way ;-).
250 2004-06-14 Jackson Harper <jackson@ximian.com>
252 * PEAPI.cs: Add IExternRef interface and modify sigs so it can be
253 used. So we can easily add stuff to modules and assemblies. Fix
254 the nometadata flag, it should be set when there is NO metadata
255 not when there is metadata.
257 2004-06-14 Jackson Harper <jackson@ximian.com>
259 * PEAPI.cs: Add new constructor so we can explicitly set the
262 2004-06-03 Jackson Harper <jackson@ximian.com>
264 * PEAPI.cs: Do not null terminate byte arrays when writing to the
267 2004-05-25 Jackson Harper <jackson@ximian.com>
269 * PEAPI.cs: When writing to the blob heap we always set a size.
271 2004-05-25 Jackson Harper <jackson@ximian.com>
273 * PEAPI.cs: Set the has default flag on fields when a default data
274 constant is assigned to them.
276 2004-05-25 Jackson Harper <jackson@ximian.com>
278 * PEAPI.cs: Encode string constants as unicode before putting them
281 2004-05-25 Jackson Harper <jackson@ximian.com>
283 * PEAPI.cs: zero RVAs for abstract, runtime, and internal call
286 2004-04-30 Duncan Mak <duncan@ximian.com>
288 * PEAPI.dll.sources: Added Assembly/AssemblyInfo.cs and
291 2004-04-02 Jackson Harper <jackson@ximian.com>
293 * PEAPI.cs: Allow hash algorithms to be any integer.
295 2004-02-18 Jackson Harper <jackson@ximian.com>
297 * PEAPI.cs: Add a class for creating instances of class refs, this
298 is used for setting the class or valuetype of a types instance so the class
299 reference isn't modified. Allows things like 'valuetype [mscorlib]System.Object'.
301 2003-11-18 Jackson Harper <jackson@ximian.com>
303 * PEAPI.cs: If the data length for a methods seh section is
304 greater then 255 use fat format headers.
306 2003-11-17 Jackson Harper <jackson@ximian.com>
308 * PEAPI.cs: Allow strings to be loaded as bytearrays.
310 2003-10-19 Jackson Harper <jackson@ximian.com>
312 * PEAPI.cs: Use bytes not bits for constant sizes.
314 2003-10-18 Jackson Harper <jackson@ximian.com>
316 * PEAPI.cs: Add proper support for short instructions, removing
317 PEAPI's auto selection of short/long branch operations feature.
319 2003-10-10 Jackson Harper <jackson@ximian.com>
321 * PEAPI.cs: New GenericMethodSig class for creating generic method
322 signatures. Use this class instead of GenericTypeInst for creating
323 generic methods. Fix Generic call conv. according to two of my
324 docs it is 0x10 and only one says 0x50 so I will go with 0x10.
326 2003-10-09 Jackson Harper <jackson@ximian.com>
328 * PEAPI.cs: Add generic method Mvar type. Add MethodSpec table,
329 and an Api method for adding methods to the methodspec table.
331 2003-10-08 Jackson Harper <jackson@ximian.com>
333 * PEAPI.cs: Remove some old hacks for adding methods to arrays,
334 typespecs are used for this now. Add Generic call conv.
336 2003-10-08 Jackson Harper <jackson@ximian.com>
338 * PEAPI.cs: Remove methods for creating generic parameters without
339 a name, names are mandatory. Add method to add type parameters to
340 methods. Allow GenericParameters to have either a type or a
341 method as its owner. Also fix visibility of GenericParameters, a
342 GenericParameter should not be created outside of PEAPI.
344 2003-10-07 Jackson Harper <jackson@ximian.com>
346 * PEAPI.cs: Add unbox.any instruction.
348 2003-09-27 Jackson Harper <jackson@latitudegeo.com>
350 * PEAPI.cs: Fix pinvoke attributes, zero a methods RVA if it has
351 pinvoke info. This isn't entirely correct because native unmanaged
352 methods can have pinvoke info and not have 0 RVAs PEAPI can't
353 handle native unmanged code though. Expose the ModuleClass so
354 'global' items can be referenced like this '<Module>'::foo.
356 2003-09-21 Jackson Harper <jackson@latitudegeo.com>
358 * PEAPI.cs: sigh, sometimes it is best to calculate variables
359 before using them. This fixes PEAPI creating broken images when
360 the sdata section is used.
362 2003-09-20 Jackson Harper <jackson@latitudegeo.com>
364 * PEAPI.cs: Rework to allow multiple constraints to be added to a
365 single generic parameter.
367 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
369 * PEAPI.cs: Make no super method public so we can have types
372 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
374 * PEAPI.cs: New Sentinel type.
376 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
378 * PEAPI.cs: Only give method definitions 0 RVAs if they are
381 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
383 * PEAPI.cs: Offsets are not explicit offsets, they are just
384 byte offsets from the current position.
386 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
388 * PEAPI.cs: Allow labels to be created with an explicit offset
390 Fri Jul 25 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
392 * PEAPI.cs: added coded index for the owner field in the GenericParam
395 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
397 * PEAPI.cs: Add methods to PEFile to allow fields and methods to
398 be added to type specs. This fixing bah-zillions of little
399 problems in ilasm. We can now add fields and methods to arrays,
400 reference types, and most importantly generics.
402 Add the GenericTypeInst class. This is an instance of a generic
403 type. ie Hash<int32, string>. GenericTypeSpecs now write their id
404 number as a compressed number, this matches the way the runtime
405 loads them and will allow generic types to have more then 255 type
408 2003-07-17 Jackson Harper <jackson@latitudegeo.com>
410 * PEAPI.cs: Add GenericTypeSpec so generic members can be
411 referenced. Add the ldelem and stelem opcodes (these are part of
414 2003-07-15 Jackson Harper <jackson@latitudegeo.com>
416 * PEAPI.cs: Allow generic constraints to be added, emit generic
419 2003-07-14 Jackson Harper <jackson@latitudegeo.com>
421 * PEAPI.cs: Cleanup methods for generics, now that constraints and
422 params are seperated.
424 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
426 * PEAPI.cs: Initial work on implementing custom
427 attributes. Attributes can now be added to ClassDefs and
428 MethodDefs. Still need to implement for other metadata elements.
429 Added the stele.r4 and stelem.r8 instructions, this should also
430 shift the stelem.ref instruction to the proper value (0xA2)
432 2003-05-25 Jackson Harper <jackson@latitudegeo.com>
434 * PEAPI.cs: Create a list of vararg signatures and add them all to
435 tables. this allows more then one vararg signature to be created
438 2003-05-18 Jackson Harper <jackson@latitudegeo.com>
440 * PEAPI.cs: Add methods to allow methods to be added to arrays.
442 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
444 * PEAPI.cs: The class size in class layout metadata table is a
447 2003-04-05 Jackson Harper <jackson@latitudegeo.com>
449 * PEAPI.cs: Add indexes to GenericParameters, make string index
450 always a full 4 bytes.
452 2003-04-05 Jackson Harper <jackson@latitudegeo.com>
454 * PEAPI.cs: Add GenericParameter table, and method to add generic
457 2003-03-15 Daniel Morgan <danmorg@sc.rr.com>
459 * PEAPI.build: added file for windows build
461 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
463 * PEAPI.cs: (ImplAttr) Add Optil implementation flag (not supported
464 in first release of CLR)
465 (Class) And Name property
467 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
469 * makefile.gnu: Add file
470 * list.unix: Add file
472 2003-03-02 Jackson Harper <jackson@latitudegeo.com>
474 * PEAPI.cs: Do not add file extensions to output names
476 2003-03-02 Jackson Harper <jackson@latitudegeo.com>
479 * README.txt: Add file