* Makefile: Build the make-map.exe in Mono.Unix.Native; add /nowarn:0618 to
[mono.git] / mcs / class / PEAPI / ChangeLog
1 2005-09-16  Ankit Jain  <jankit@novell.com>
2
3         * PEAPI.cs: Clean up indentation. Split into ...
4           Metadata.cs, Code.cs, PEAPI.cs: ... these.
5
6 2005-09-08  Ankit Jain  <jankit@novell.com>
7
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.
11
12 2005-09-06  Ankit Jain  <jankit@novell.com>
13
14         * PEAPI.cs (MetaData.WriteTildeStream): Change minor version back to 0.
15
16 2005-08-30  Ankit Jain  <jankit@novell.com>
17
18         * PEAPI.cs (MetaData.WriteTildeStream): Change minor version to 1.
19
20 2005-08-29  Ankit Jain  <jankit@novell.com>
21
22         * PEAPI.cs (CustomMarshaller.ctor): New.
23           (CustomMarshaller.ToBlob): Emit marshallerName and cookie strings with
24           their lengths.
25
26 2005-08-26  Ankit Jain  <jankit@novell.com>
27
28         * PEAPI.cs (PEFile.ctor): Restore old constructor overload to avoid
29           changing public API.
30
31 2005-08-26  Ankit Jain  <jankit@novell.com>
32
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.
38
39 2005-08-23  Ankit Jain  <jankit@novell.com>
40
41         * PEAPI.cs (MetaData.version): Change from 1.0.3705 to 1.1.4322.
42
43 2005-08-23  Ankit Jain  <jankit@novell.com>
44
45         * PEAPI.cs (MSCorLib.systemClasses): Change type from ClassRef[] to
46           Class[].
47           (MSCorLib.ctor): Add assembly ref to mscorlib for non-mscorlib assemblies
48           only.
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.
55           (MSCorLib.ValueType),
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.
71
72 2005-08-16  Ankit Jain  <jankit@novell.com>
73
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
81           for it.
82           (FixedSysString): New. Class to represent Fixed SysString native type.
83           (NativeArray): Rename len to numElem. Init numElem, parNum and elemMult
84           to -1.
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.
93
94 2005-08-08  Ankit Jain  <jankit@novell.com>
95
96         * PEAPI.cs (CodeBlock): Set maxCodeSize to 255 instead of 256 for checking
97           Fat format.
98           (CILInstructions.CheckCode): Use 255 instead of 256 for checking Fat format.
99
100 2005-08-08  Ankit Jain  <jankit@novell.com>
101
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
104           .exe.
105
106 2005-08-05  Ankit Jain  <jankit@novell.com>
107
108         * PEAPI.cs (FileImage.WriteCLIHeader): Throw Exception if an EXE has been
109           requested but the source file has no entrypoint defined.
110
111 2005-08-05  Ankit Jain  <jankit@novell.com>
112
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.
121
122 2005-04-30  Ankit Jain  <ankit@corewars.org>
123
124         * PEAPI.cs (InterfaceImpl.SortKey): New.
125         (MetaData.BuildMetaData): Sort InterfaceImpl table.
126         (MethodSemantics.SortKey): Compute key correctly.
127
128 2005-04-18  Ankit Jain  <ankit@corewars.org>
129
130         * PEAPI.cs (ManifestResource.InitResource): New. Used by constructors
131         to initialize the resource. 
132         (ManifestResource.ctor): New. Constructor to accept resource as a 
133         byte array.
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 
137         resourcesSize.
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.
142
143 2005-04-12  Ankit Jain  <ankit@corewars.org>
144
145         * PEAPI.cs (CustomAttribute.ctor): Dont throw 
146         NotYetImplementedException.
147         (MethodSemantics.SortKey): Should be sorted by 
148         'Association' column.
149         
150 2005-04-08  Ankit Jain  <radical@corewars.org>
151
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
159         System.Enum.
160         (ClassDef.AddNestedClass): Don't encode System.ValueType and
161         System.Enum as value types.
162
163 2005-03-17  Ankit Jain  <radical@corewars.org>
164
165         * PEAPI.cs: Metadata tables that must be sorted are sorted now.
166         Fixes the code for ParamAttr.Opt. Fix bug #73517.
167                 
168 2004-12-08  Sebastien Pouliot  <sebastien@ximian.com>
169
170         * PEAPI.cs: Added support for allocating and storing strongname 
171         signatures when a .publickey directive is present in source. Fix bug
172         #69721.
173
174 2004-12-01  Jackson Harper  <jackson@ximian.com>
175
176         * PEAPI.cs: Allow underlying types of ByteArrConsts to be set when
177         they are used as field init data.
178
179 2004-07-29  Martin Baulig  <martin@ximian.com>
180
181         * PEAPI.cs (Module.Guid): New public property.
182
183 2004-07-27  Martin Baulig  <martin@ximian.com>
184
185         * PEAPI.cs (CILInstructions.Offset): New public property.
186
187 2004-07-23  Jackson Harper  <jackson@ximian.com>
188
189         * PEAPI.cs: Make the type index modifiable so ClassRefInsts will
190         be emitted properly. This is in desperate need of some API love.
191         
192 2004-07-21  Jackson Harper  <jackson@ximian.com>
193
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).
199         
200 2004-07-21  Jackson Harper  <jackson@ximian.com>
201
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.
205         
206 2004-07-16  Jackson Harper  <jackson@ximian.com>
207
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
212         here?
213         
214 2004-07-13  Jackson Harper  <jackson@ximian.com>
215
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.
219         
220 2004-07-09  Jackson Harper  <jackson@ximian.com>
221
222         * PEAPI.cs: Don't build custom attributes twice.
223         
224 2004-07-08  Jackson Harper  <jackson@ximian.com>
225
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.
229         
230 2004-06-26  Jackson Harper  <jackson@ximian.com>
231
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.
238         
239 2004-06-19  Jackson Harper  <jackson@ximian.com>
240
241         * PEAPI.cs: Make sure the sentinel is placed properly for vararg
242         method pointers.
243         
244 2004-06-19  Jackson Harper  <jackson@ximian.com>
245
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 ;-).
249         
250 2004-06-14  Jackson Harper  <jackson@ximian.com>
251
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.
256         
257 2004-06-14  Jackson Harper  <jackson@ximian.com>
258
259         * PEAPI.cs: Add new constructor so we can explicitly set the
260         module name.
261         
262 2004-06-03  Jackson Harper  <jackson@ximian.com>
263
264         * PEAPI.cs: Do not null terminate byte arrays when writing to the
265         blob stream.
266         
267 2004-05-25  Jackson Harper  <jackson@ximian.com>
268
269         * PEAPI.cs: When writing to the blob heap we always set a size.
270         
271 2004-05-25  Jackson Harper  <jackson@ximian.com>
272
273         * PEAPI.cs: Set the has default flag on fields when a default data
274         constant is assigned to them.
275         
276 2004-05-25  Jackson Harper  <jackson@ximian.com>
277
278         * PEAPI.cs: Encode string constants as unicode before putting them
279         in the blob.
280         
281 2004-05-25  Jackson Harper  <jackson@ximian.com>
282
283         * PEAPI.cs: zero RVAs for abstract, runtime, and internal call
284         methods.
285         
286 2004-04-30  Duncan Mak  <duncan@ximian.com>
287
288         * PEAPI.dll.sources: Added Assembly/AssemblyInfo.cs and 
289         Locale.cs to build.
290
291 2004-04-02  Jackson Harper  <jackson@ximian.com>
292
293         * PEAPI.cs: Allow hash algorithms to be any integer.
294         
295 2004-02-18  Jackson Harper <jackson@ximian.com>
296
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'.
300         
301 2003-11-18 Jackson Harper <jackson@ximian.com>
302
303         * PEAPI.cs: If the data length for a methods seh section is
304         greater then 255 use fat format headers.
305         
306 2003-11-17 Jackson Harper <jackson@ximian.com>
307
308         * PEAPI.cs: Allow strings to be loaded as bytearrays.
309         
310 2003-10-19 Jackson Harper <jackson@ximian.com>
311
312         * PEAPI.cs: Use bytes not bits for constant sizes.
313         
314 2003-10-18 Jackson Harper <jackson@ximian.com>
315
316         * PEAPI.cs: Add proper support for short instructions, removing
317         PEAPI's auto selection of short/long branch operations feature.
318         
319 2003-10-10 Jackson Harper <jackson@ximian.com>
320
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.
325         
326 2003-10-09 Jackson Harper <jackson@ximian.com>
327
328         * PEAPI.cs: Add generic method Mvar type. Add MethodSpec table,
329         and an Api method for adding methods to the methodspec table.
330         
331 2003-10-08 Jackson Harper <jackson@ximian.com>
332
333         * PEAPI.cs: Remove some old hacks for adding methods to arrays,
334         typespecs are used for this now. Add Generic call conv.
335         
336 2003-10-08 Jackson Harper <jackson@ximian.com>
337
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.
343         
344 2003-10-07 Jackson Harper <jackson@ximian.com>
345
346         * PEAPI.cs: Add unbox.any instruction.
347         
348 2003-09-27 Jackson Harper <jackson@latitudegeo.com>
349
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.
355         
356 2003-09-21 Jackson Harper <jackson@latitudegeo.com>
357
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.
361         
362 2003-09-20 Jackson Harper <jackson@latitudegeo.com>
363
364         * PEAPI.cs: Rework to allow multiple constraints to be added to a
365         single generic parameter.
366         
367 2003-08-19 Jackson Harper <jackson@latitudegeo.com>
368
369         * PEAPI.cs: Make no super method public so we can have types
370         with no super type.
371         
372 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
373
374         * PEAPI.cs: New Sentinel type.
375         
376 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
377
378         * PEAPI.cs: Only give method definitions 0 RVAs if they are
379         marked abstract.
380         
381 2003-08-03 Jackson Harper <jackson@latitudegeo.com>
382
383         * PEAPI.cs: Offsets are not explicit offsets, they are just
384         byte offsets from the current position.
385
386 2003-07-29 Jackson Harper <jackson@latitudegeo.com>
387
388         * PEAPI.cs: Allow labels to be created with an explicit offset
389         
390 Fri Jul 25 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
391
392         * PEAPI.cs: added coded index for the owner field in the GenericParam
393         table.
394
395 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
396
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.
401
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
406         parameters.
407         
408 2003-07-17 Jackson Harper <jackson@latitudegeo.com>
409
410         * PEAPI.cs: Add GenericTypeSpec so generic members can be
411         referenced. Add the ldelem and stelem opcodes (these are part of
412         the new spec).
413         
414 2003-07-15 Jackson Harper <jackson@latitudegeo.com>
415
416         * PEAPI.cs: Allow generic constraints to be added, emit generic
417         constraints.
418                 
419 2003-07-14 Jackson Harper <jackson@latitudegeo.com>
420
421         * PEAPI.cs: Cleanup methods for generics, now that constraints and
422         params are seperated.
423                 
424 2003-05-31 Jackson Harper <jackson@latitudegeo.com>
425
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)
431                 
432 2003-05-25 Jackson Harper <jackson@latitudegeo.com>
433
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
436         per method.
437                 
438 2003-05-18 Jackson Harper <jackson@latitudegeo.com>
439
440         * PEAPI.cs: Add methods to allow methods to be added to arrays.
441                 
442 2003-05-11 Jackson Harper <jackson@latitudegeo.com>
443
444         * PEAPI.cs: The class size in class layout metadata table is a
445         uint not a short.
446                 
447 2003-04-05 Jackson Harper <jackson@latitudegeo.com>
448
449         * PEAPI.cs: Add indexes to GenericParameters, make string index
450         always a full 4 bytes.
451                 
452 2003-04-05 Jackson Harper <jackson@latitudegeo.com>
453
454         * PEAPI.cs: Add GenericParameter table, and method to add generic
455         parameters.
456                 
457 2003-03-15 Daniel Morgan <danmorg@sc.rr.com>
458
459         * PEAPI.build: added file for windows build
460
461 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
462
463         * PEAPI.cs: (ImplAttr) Add Optil implementation flag (not supported 
464         in first release of CLR)
465         (Class) And Name property
466
467 2003-03-06 Jackson Harper <jackson@latitudegeo.com>
468
469         * makefile.gnu: Add file
470         * list.unix: Add file
471
472 2003-03-02 Jackson Harper <jackson@latitudegeo.com>
473
474         * PEAPI.cs: Do not add file extensions to output names
475         
476 2003-03-02 Jackson Harper <jackson@latitudegeo.com>
477
478         * PEAPI.cs: Add file
479         * README.txt: Add file