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