2004-01-27 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / corlib / System.Reflection.Emit / ChangeLog
1 2004-01-27  Zoltan Varga  <vargaz@freemail.hu>
2
3         * AssemblyBuilder.cs (SetCustomAttribute): Move the reading of the
4         keyfile to the Save () method.
5
6 2004-01-26  Sebastien Pouliot  <spouliot@videotron.ca>
7
8         * AssemblyBuilder.cs: Save will now strongname the assembly is (a) a
9         StrongName is present and (b) the signature isn't delayed.
10
11 2004-01-24 David Sheldon <dave-mono@earth.li>
12
13         * AssemblyBuilder.cs: Added override for GetFiles() that throws
14           NotSupportedException. 
15
16 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
17
18         * AssemblyBuilder.cs (Save): Handle entry points with an int return
19         type as well.
20         
21         * AssemblyBuilder.cs (Save): If the entry point is in a module, create
22         a new entry point which calls the real one, since the entry point must
23         be in the module which contains the manifest.
24
25         * ModuleBuilder.cs (Save): Create the global type automatically if not
26         already done.
27
28 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
29
30         * AssemblyBuilder.cs (DefineVersionInfoResource): Set more 
31         version info properties.
32
33 2004-01-08  Zoltan Varga  <vargaz@freemail.hu>
34
35         * CustomAttributeBuilder.cs (string_arg): New helper method.
36
37         * AssemblyBuilder.cs (DefineVersionInfoResource): Implement.
38
39         * AssemblyBuilder.cs (SetCustomAttribute): Use the new helper method.
40
41         * AssemblyBuilder.cs (DefineUnmanagedResource): Implement.
42
43         * AssemblyBuilder.cs (DefineIconResource): New internal method to
44         support mcs.
45
46         * TypeBuilder.cs (IsDefined): Implement this, since some corlib classes
47         make calls to IsDefined.
48
49 2004-01-06  Zoltan Varga  <vargaz@freemail.hu>
50
51         * AssemblyBuilder.cs: Fix warning.
52
53 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
54
55         * AssemblyBuilder.cs (DefineVersionInfoResource): Implement.
56
57 2003-12-29 Ben Maurer  <bmaurer@users.sourceforge.net>
58
59         * MethodBuilder.cs, ConstructorBuilder.cs: Override GetParameterCount.
60         * ILGenerator.cs: Use GetParameterCount.
61
62 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
63
64         * AssemblyBuilder.cs (AddModule): New internal method to support 
65         /addmodule in mcs.
66
67 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
68
69         * AssemblyBuilder.cs: New internal property to support /target:module in
70         mcs.
71
72 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
73
74         * ILGenerator.cs: Applied patch from Ben Maurer 
75         (bmaurer@users.sourceforge.net). Allocate arrays holding label data
76         lazily and reduce their size.
77
78 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
79
80         * AssemblyBuilder.cs (MonoResource): New 'offset' field used by the
81         runtime.
82
83         * ModuleBuilder: Implement DefineResource.
84
85 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
86
87         * AssemblyBuilder.cs (RefEmitPermissionSet): New helper structure.
88         
89         * MethodBuilder.cs (AddDeclarativeSecurity): Implement.
90
91         * ConstructorBuilder.cs (AddDeclarativeSecurity): Ditto.
92
93 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
94
95         * MethodBuilder.cs: Add stubs for missing methods.
96
97         * TypeBuilder.cs (GetEvents): Add new override.
98
99         * ModuleBuilder.cs: Implement some missing methods, add stubs for others.
100
101         * AssemblyBuilder.cs (GetFiles): Get rid of unneccessary override.
102
103         * AssemblyBuilder.cs (ImageRuntimeVersion): Add override to keep
104         signature compatibility with MS.NET.
105
106         * TypeBuilder.cs (MemberType): Get rid of unneccessary override.
107
108 2003-12-08  Martin Baulig  <martin@ximian.com>
109
110         * TypeBuilder.cs (TypeBuilder.MonoGenericParam): Removed; use the
111         new `MonoGenericParam' class instead (in S.R/MonoGenericInst.cs).
112
113 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
114
115         * ModuleBuilder.cs: Double the size of the types array during insertion
116         do avoid excessive memory allocation and copying. Track the number of
117         types in a separate variable.
118
119         * TypeBuilder.cs: Same for the 'fields' and 'methods' arrays.
120
121 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
122
123         * ModuleBuilder.cs (DefinePInvokeMethod): Implement.
124
125         * ModuleBuilder.cs (DefineGlobalMethod): Implement the Net 1.2 variants.
126
127 2003-11-28  Dick Porter  <dick@ximian.com>
128
129         * ModuleBuilder.cs: Do string compares with the Invariant culture.
130
131 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
132
133         * AssemblyBuilder.cs (SetCustomAttribute): Implement automatic 
134         generation of build and revision numbers. Fixes #46492.
135
136 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
137
138         * TypeBuilder.cs: Implement GetField.
139
140 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
141
142         * DynamicMethod.cs: New class.
143
144         * ILGenerator.cs MethodBuilder.cs ConstructorBuilder.cs: Retrieve 
145         tokens from a token generator object instead of from the ModuleBuilder,
146         to support the implementation of DynamicMethod. Also get rid of the 
147         unused 'mbuilder' field.
148
149         * ModuleBuilder.cs: Create a token generator object which can be
150         passed to ILGenerator.
151
152         * LocalBuilder.cs ILGenerator.cs: Get rid of 'module' field, obtain 
153         needed objects from the ilgen object instead.
154
155 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
156
157         * TypeBuilder.cs FieldBuilder.cs MethodBuilder.cs ConstructorBuilder.cs:  Add support for custom modifiers from NET 1.2.
158
159         * ILGenerator.cs: Remove unused abuilder member.
160
161 2003-11-19  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
162
163         * OpCodes.cs: Remove Boxval for v1.1+
164
165 2003-11-19  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
166
167         * OpCodes.cs: Small rearrange to fix csc compiler warning about obsolete member used
168
169 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
170
171         * AssemblyBuilderAccess.cs PackingSize: Add [Flags].
172
173         * AssemblyBuilder.cs (DefineDynamicModule): Make internal method
174         private.
175
176         * AssemblyBuilder.cs (Save): Write out the main module at the end.
177         
178 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
179         
180         * ConstructorBuilder.cs (.ctor): Automatically add RTSpecialName flag
181         as MS does.
182
183 2003-11-06  Martin Baulig  <martin@ximian.com>
184
185         * ModuleBuilder.cs (ModuleBuilder.Save): Call `build_metadata'
186         before writing the symbol file.
187
188 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
189
190         * AssemblyBuilder.cs (.ctor): Initialize the 'dir' field to something
191         sensible.
192         
193         * AssemblyBuilder.cs (Save): Set 'created' flag.
194
195         * AssemblyBuilder.cs (get_next_table_index): Moved to ModuleBuilder,
196         since table indexes are per-module.
197
198 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
199
200         * TypeBuilder.cs (DefineDefaultConstructor): Pass an array instead of 
201         null to DefineConstructor, to avoid NullReferenceExceptions in the 
202         binder code.
203
204         * AssemblyBuilder.cs ModuleBuilder.cs ILGenerator.cs: Move getUSIndex 
205         and getToken methods, and the associated icalls to ModuleBuilder, 
206         since tokens are per-module.
207
208         * AssemblyBuilder.cs ModuleBuilder.cs: Partially revert the previous
209         patch, since having the 'is_main' field is useful in the unmanaged 
210         code.
211
212         * AssemblyBuilder.cs ModuleBuilder.cs: Move the metadata creation and
213         file creation logic to ModuleBuilder:Save (), since this needs to be
214         done for every module. Also move the corresponding icalls to 
215         ModuleBuilder.
216
217 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
218
219         * AssemblyBuilder.cs ModuleBuilder.cs: First steps toward a fix for
220         #48700 (proper module support in Ref.Emit). Remove is_main field from
221         ModuleBuilder and add a mainModule field to AssemblyBuilder instead.
222         This is neccesary, since the main module is determined during the 
223         Save () call: the module with the same file name as the assembly is
224         the main module. Also create a default main module, if one is not
225         existing.
226
227 2003-11-03  Martin Baulig  <martin@ximian.com>
228
229         * OpCodes.cs: Added Ldelem_Any, Stelem_Any and Unbox_Any from .NET 1.2.
230
231 2003-10-18  Sebastien Pouliot  <spouliot@videotron.ca>
232
233         * AssemblyBuilder.cs (SetCustomAttribute): Changed PK extraction to
234         use Mono.Security.StrongName (#49785).
235
236 2003-10-18  Zoltan Varga  <vargaz@freemail.hu>
237
238         * AssemblyBuilder.cs (SetCustomAttribute): Extract the public key from
239         the keyfile.
240
241 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
242
243         * AssemblyBuilder.cs (SetCustomAttribute): Ignore empty keyfile name.
244         
245         * AssemblyBuilder.cs: Moved loading of the public key file into
246         managed code from reflection.c. 
247
248         * AssemblyBuilder.cs: Set cultureInfo and version from the AssemblyName
249         passed to the constructor.
250
251 2003-10-13  Martin Baulig  <martin@ximian.com>
252
253         * MethodBuilder.cs (MethodBuilder): Added
254         `TypeBuilder.MonoGenericParam[] generic_params' field.
255         (DefineGenericParameter, SetGenericMethodSignature): New public methods.
256
257         * TypeBuilder.cs (DefineGenericMethod): New public method.
258
259 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
260
261         * OpCode.cs: Fix Value property. Fixes #49328.
262
263 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
264
265         * TypeBuilder.cs (CreateType): Fire TypeResolve events for unfinished 
266         nested value types. Fixes #47022.
267
268 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
269
270         * TypeBuilder.cs: Really fix #48695.
271
272 Sat Sep 27 16:17:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
273
274         * ILGenerator.cs: instance fields are loaded from this.
275
276 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
277
278         * TypeBuilder.cs (DefineDefaultConstructor): Make this work on types
279         without a parent. Fixes #48695.
280
281 2003-09-17  Martin Baulig  <martin@ximian.com>
282
283         * TypeBuilder.cs (TypeBuilder.CreateType): Don't append the type
284         parameters to the type name; ie. use `Stack' instead of `Stack<T>'.
285
286 2003-09-06  Martin Baulig  <martin@ximian.com>
287
288         * TypeBuilder.cs (TypeBuilder.IsUnboundGenericParameter): Implemented.
289
290 2003-09-04  Martin Baulig  <martin@ximian.com>
291
292         * TypeBuilder.cs (TypeBuilder.MonoGenericParam): Make this nested
293         class internal, not protected.
294
295 2003-08-29  Martin Baulig  <martin@ximian.com>
296
297         * TypeBuilder.cs (TypeBuilder.DefineGenericParameter): New public
298         method.  We can now create generic types.
299         (TypeBuilder.GetGenericTypeDefinition): Override this; call the
300         `setup_internal_class' interncall before calling our base impl.
301
302 Sat Aug  2 13:04:55 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
303
304         * ILGenerator.cs: Emission of doubles now utilise the Double.AssertEndianity
305         icall to assert double word endianity on ARM.
306
307 2003-07-25  Duncan Mak  <duncan@ximian.com>
308
309         * OpCodes.cs (Boxval): Marked with ObsoleteAttribute.
310
311 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
312
313         * TypeBuilder.cs: Added generics stubs.
314
315         * EnumBuilder.cs: Added generics  stubs, changed bracing style for
316         routines.
317
318 2003-07-23  Duncan Mak  <duncan@ximian.com>
319
320         * SignatureHelper.cs: This class does not have the
321         SerializableAttribute.
322
323 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
324
325         * AssemblyBuilder.cs: Added argument checking to all methods according
326         to the MSDN docs. Also marked DefineUnmanagedResource and its friends
327         as not implemented.
328         * ModuleBuilder.cs: Added new property FileName used by AssemblyBuilder.
329         * ModuleBuilder.cs AssemblyBuilder.cs: Implemented IsTransient ().
330
331 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
332
333         * EventBuilder.cs: Add argument checking to methods.
334
335 Thu Jun 5 20:18:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
336
337         * AssemblyBuilder.cs: implemented DefineResource ().
338
339 Thu Jun 5 12:36:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
340
341         * OpCode.cs: implemented Equals/GetHashCode.
342
343 Tue Jun 3 11:14:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
344
345         * ILGenerator.cs, OpCode.cs: optimize opcode space usage.
346
347 Tue Jun 3 11:13:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
348
349         * UnmanagedMarshal.cs: add ability to define custom attributes (the MS
350         runtime doesn't support this).
351
352 2003-05-30  Zoltan Varga  <vargaz@freemail.hu>
353
354         * TypeBuilder.cs: Implement DefineTypeInitializer.
355
356 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
357
358         * ModuleBuilder.cs: 
359         - Implement DefineInitializedData in terms of DefineUninitializedData
360         - Name the types of global fields $ArrayType$<len> to cut back on the
361         number of types created
362         - Add argument checking
363
364 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
365
366         * AssemblyBuilder.cs: Implement GetDynamicModule. "Implement" various
367         methods not supported under MS.NET.
368
369 2003-05-18  Martin Baulig  <martin@ximian.com>
370
371         * AssemblyBuilder.cs (corlib_void_type): New internal field.
372         (SetCorlibTypeBuilders): Added overloaded version which takes 4
373         arguments to set the `corlib_void_type'.
374
375         * TypeBuilder.cs: Use `pmodule.assemblyb.corlib_void_type' instead
376         of `typeof (void)' to make this work when compiling corlib.
377
378 Thu May 15 19:16:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
379
380         * MethodBuilder.cs: off by one in CreateMethodBody().
381         * TypeBuilder.cs: if the return type for a method is null, use void.
382
383 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
384
385         * MethodBuilder.cs: Mono allows the parameter position to be zero
386         to indicate the "returns:" attribute.
387
388 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
389
390         * ILGenerator.cs (EmitCall): Implement.
391
392         Flag a few unimplemented methods with MonoTODO, make coding style
393         for method definitions Mono consistent.
394
395 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
396
397         * ILGenerator.cs: Implement EmitWriteLine methods.
398
399         * TypeBuilder.cs (CreateType): Avoid creating a default constructor
400         for the global type.
401
402 2003-04-15  Miguel de Icaza  <miguel@ximian.com>
403
404         * TypeBuilder.cs (DefineDefaultConstructor): Make it generate code
405         by default for a default constructor.  This is what the MS runtime
406         does.  The PythonNet code expected this.
407
408         (TypeBuilder.GetConstructorImpl): Implement this.
409
410         (TypeBuilder.CreateType): If there are no constructors defined, we
411         create one.
412
413 Tue Apr 15 13:50:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
414
415         * ModuleBuilder.cs, TypeBuilder.cs: set nesting_type before
416         calling setup_internal_class ().
417
418 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
419
420         * AssemblyBuilder.cs: Added 'access' member, which is needed by the
421         runtime.
422
423 2003-03-26  Zoltan Varga  <vargaz@freemail.hu>
424
425         * ILGenerator.cs: Implemented ThrowException.
426
427 2003-03-10  Zoltan Varga  <vargaz@freemail.hu>
428
429         * ILGenerator.cs: Propagate maxstack info along branches.
430
431 2003-03-06  Zoltan Varga  <vargaz@freemail.hu>
432
433         * ILGenerator.cs (Emit): Do not pop the arguments off the stack for
434         ldftn etc. Fixes bug #39196.
435
436 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
437
438         * ILGenerator.cs (Emit): Add fixup for already created methods and
439         fields. Do not add fixup for types since their table index do not 
440         change any more.
441
442 2003-02-26  Zoltan Varga  <vargaz@freemail.hu>
443
444         * TypeBuilder.cs (DefineInitializedData): Removed unnecessary assignments.
445
446         * ModuleBuilder.cs (DefineInitializedData): Do not call 
447         TypeBuilder::DefineInitializedData since that would mean defining a
448         nested type of the global type, which is wrong. Instead define a
449         new public type as MS does.
450
451         * ModuleBuilder.cs (DefineUninitializedData): Ditto.
452
453 Thu Feb 13 18:40:52 CET 2003 Paolo Molaro <lupus@ximian.com>
454
455         * ModuleBuilder.cs: add the basic initialization call.
456
457 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
458
459         * AssemblyBuilder.cs: Added basic error checking to some methods
460         according to the MSDN docs.
461
462 2003-02-10  Zoltan Varga  <vargaz@freemail.hu>
463
464         * ConstructorBuilder.cs: 
465         - Added basic error checking to all methods according to the MSDN docs.
466         - modified a lot of methods to throw NotSupportedException, to comply
467           with MS.NET.
468
469 2003-02-09  Zoltan Varga  <vargaz@freemail.hu>
470
471         * TypeBuilder.cs:
472         - Added basic error checking to all methods according to the MSDN docs.
473         - fixed AssemblyQualifiedName.
474         - implemented 'Size'.
475         - modified a lot of methods to throw NotSupportedException, to comply
476           with MS.NET.
477         - changes tested by running a full bootstrap.
478
479 2003-02-09  Martin Baulig  <martin@ximian.com>
480
481         * AssemblyBuilder.cs (AssemblyBuilder.methods): Removed.  This was
482         a hack for the symbol writer which is no longer needed.
483
484 2003-02-09  Martin Baulig  <martin@ximian.com>
485
486         * IMonoSymbolWriter.cs (DefineNamespace, OpenMethod): New methods.
487
488 2003-02-09  Martin Baulig  <martin@ximian.com>
489
490         * IMonoSymbolWriter.cs (MarkSequencePoint): New method which takes
491         just the required arguments as scalars, not arrays.
492
493         * ILGenerator.cs (ILGenerator.MarkSequencePoint): Use that new
494         interface method; unnecessarily creating such a large number of
495         arrays is both slow and too memory consuming.   
496
497 2003-02-08  Zoltan Varga  <vargaz@freemail.hu>
498
499         * MethodBuilder.cs: Added error checking to methods so they conform to
500         MSDN docs. Implemented 'GetModule' and 'CallingConvention' members. 
501         Some other tweaks to improve compatibility with MS .NET.
502
503         * TypeBuilder.cs: Added 'is_created' property which will be used for
504         checking 'type is already created' errors.
505
506 2003-02-07  Martin Baulig  <martin@ximian.com>
507
508         * ModuleBuilder.cs (.ctor): Added `bool IsMainModule' argument.
509         (Save): New internal method; creates the module's symbol file if
510         we're compiling with debugging information.
511
512         * AssemblyBuilder.cs (EmbedResource): Added internal overloaded
513         version of this method which takes a `byte[] blob' instead of a file.
514         (DefineDynamicMethod): If this is the first module, tell the
515         ModuleBuilder that this is the main module.
516         (Save): Call a new interncall `build_metadata' to create the final
517         metadata and save all the symbol files before creating the actual
518         output.
519
520         * IMonoSymbolWriter.cs: New public class; it is in the namespace
521         Mono.CSharp.Debugger.  The Mono symbol writer implements this interface.
522
523 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
524
525         * AssemblyBuilder.cs: added GetToken (SignatureHelper).
526
527         * ILGenerator.cs: implemented EmitCalli() methods
528
529         * SignatureHelper.cs: implemented GetMethoSigHelper() methods.
530
531 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
532
533         * MethodBuilder.cs: GetBaseDefinition () returns this.
534
535 Mon Jan 27 17:07:38 CET 2003 Paolo Molaro <lupus@ximian.com>
536
537         * CustomAttributeBuilder.cs, FieldBuilder.cs: applied
538         (reformatted) patch from "Jerome Laban" <jlaban@wanadoo.fr>
539         to fix ByValStr and ByValArray encodings.
540
541 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
542
543         * AssemblyBuilder.cs: fixed compilation with csc.
544
545 2003-01-26  Miguel de Icaza  <miguel@ximian.com>
546
547         * AssemblyBuilder.cs (Save): Set the executable bit at the end.
548         This uses a non-official enumeration value to call SetFileAttributes.
549
550 2003-01-17  Zoltan Varga  <vargaz@freemail.hu>
551
552         * MethodBuilder.cs ConstructorBuilder.cs: modify GetParameters() so it
553         returns information even when the app did not use DefineParameter() to
554         define the parameters.
555
556         * ConstructorBuilder.cs (ctor): allways define SpecialName attribute
557         for constructors as done by MS.
558
559 Mon Jan 13 11:37:14 CET 2003 Paolo Molaro <lupus@ximian.com>
560
561         * TypeBuilder.cs, ModuleBuilder.cs: better type name cache.
562
563 2003-01-10  Zoltan Varga  <vargaz@freemail.hu>
564
565         * ILGenerator.cs: Implemented EmitWriteLine(string).
566
567         * TypeBuilder.cs (DefineInitializedData): Call DefineNestedType() 
568         instead of DefineType() so the auxiliary types do not pollute the 
569         global namespace. This is consistent with the behaviour of MS .NET.
570
571 Fri Jan 10 16:03:30 CET 2003 Paolo Molaro <lupus@ximian.com>
572
573         * ILGenerator.cs, MethodBuilder.cs, TypeBuilder.cs,
574         ConstructorBuilder.cs: some tweaks to reduce memory usage.
575
576 Thu Jan 2 18:46:09 CET 2003 Paolo Molaro <lupus@ximian.com>
577
578         * ModuleBuilder.cs, TypeBuilder.cs: support global fields and methods.
579
580 Thu Dec 19 00:06:57 CET 2002 Paolo Molaro <lupus@ximian.com>
581
582         * AssemblyBuilder.cs: remove duplicated user string entries.
583
584 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
585
586         * FieldBuilder.cs: added 'handle' field which is needed by some new
587         code in reflection.c.
588
589 2002-12-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
590
591         * TypeBuilder.cs: implemented GetInterfaceMap () when the Type has been
592         created.
593
594 Fri Nov 8 14:53:03 CET 2002 Paolo Molaro <lupus@ximian.com>
595
596         * ILGenerator.cs: account for the exception object being passed to the
597         catch handler to calc max_stack.
598
599 2002-09-21  Martin Baulig  <martin@gnome.org>
600
601         * ModuleBuilder.cs (ModuleBuilder.symbol_writer): Make this
602         field internal, not private.
603         (ModuleBuilder.SymWriter_DefineLocalVariable): Removed.
604
605         * LocalBuilder.cs (LocalBuilder.SetLocalSymInfo): Use the
606         ISymbolWriter's DefineLocalVariable() method instead of the
607         IMonoSymbolWriter hack.
608
609 Mon Sep 16 19:02:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
610
611         * AssemblyBuilder.c: special case some custom attributes.
612
613 2002-09-12  Dick Porter  <dick@ximian.com>
614
615         * TypeBuilder.cs: Say _which_ Type has already been created
616
617 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
618
619         * ModuleBuilder.cs (GetTypes): Implement.
620
621 Tue Sep 10 12:12:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
622
623         * ConstructorBuilder.cs: added a field to hold the handle.
624
625 Mon Sep 9 17:31:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
626
627         * TypeBuilder.cs: prepare for the real CreateType implementation.
628
629 Tue Aug 27 16:57:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
630
631         * TypeBuilder.cs: remove duplicate code and fix
632         named field reading in custom attr.
633
634 2002-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
635
636         * TypeBuilder.cs: UnspecifiedTypeSize is 0.
637
638 Wed Aug 14 17:38:41 CEST 2002 Paolo Molaro <lupus@ximian.com>
639
640         * TypeBuilder.cs: ReflectedType and CreateType fixes.
641
642 Thu Aug 8 10:25:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
643
644         * AssemblyBuilder.cs: added API to embed managed resources.
645
646 2002-08-03  Martin Baulig  <martin@gnome.org>
647
648         * TypeBuilder.cs (TypeBuilder.DeclaringType): Implemented.
649
650 Thu Jul 25 13:57:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
651
652         * AssemblyBuilder.cs: support linking external resources.
653
654 2002-07-19  Martin Baulig  <martin@gnome.org>
655
656         * ILGenerator.cs (Emit (OpCode, LocalBuilder)): Throw an exception
657         when trying to emit a local that was defined in a different ILGenerator.
658
659         * LocalBuilder.cs (LocalBuilder): Added `ILGenetator' argument to
660         the constructor.
661
662 Tue Jul 16 19:32:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
663
664         * ILGenerator.cs: stack size check fix.
665
666 Sat Jul 13 17:30:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
667
668         * AssemblyBuilder.cs: add also the enum_type for compiling corlib.
669         * TypeBuilder.cs: complete IsValueType.
670
671 Sat Jul 13 15:08:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
672
673         * TypeBuilder.cs: better IsValueType.
674
675 2002-07-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
676
677         * CustomAttributeBuilder.cs: removed compile warning.
678
679 Fri Jul 12 11:34:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
680
681         * ILGenerator.cs: fixup typebuilder tokens as well.
682
683 Tue Jul 9 19:03:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
684
685         * TypeBuilder.cs: special case SerializarionAttribute.
686         Tweaks to get correct code in corlib.
687
688 2002-07-06  Miguel de Icaza  <miguel@ximian.com>
689
690         * ILGenerator.cs (ILGenerator.Emit): For doubles and floats, swap
691         the bytes on big endian systems. 
692
693 2002-07-03  Martin Baulig  <martin@gnome.org>
694
695         * AssemblyBuilder.cs (corlib_object_type, corlib_value_type): Moved
696         these fields up after the last entry in MonoReflectionAssemblyBuilder
697         in reflection.h.
698
699         * TypeBuilder.cs (IsValueTypeImpl): Use the AssemblyBuilder's
700         `corlib_value_type' instead of `typeof (System.ValueType)'.
701         (DefineNestedType): Use the AssemblyBuilder's `corlib_object_type'
702         instead of `typeof (object)'.
703
704 2002-07-02  Martin Baulig  <martin@gnome.org>
705
706         * AssemblyBuilder.cs (corlib_object_type, corlib_value_type): New
707         internal fields.  When compiling corlib, they point to the newly
708         created System.Object and System.ValueType types.
709         (SetCorlibTypeBuilders): New public function.  This will be
710         dynamically called from MCS when compiling corlib.
711
712         * TypeBuilder.cs (DefineInitializedData): Use the AssemblyBuilder's
713         `corlib_value_type' as parent type instead of `typeof (System.ValueType)'
714         to make it work when compiling corlib.
715
716         * ModuleBuilder.cs (assemblyb): Made this field internal, not private.
717
718 Tue Jul 2 18:34:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
719
720         * TypeBuilder.cs: implemented AssemblyQualifiedName.
721         * MethodBuilder.cs, ConstructorBuilder.cs: special case custom attr.
722
723 Mon Jul 1 16:17:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
724
725         * TypeBuilder.cs: implemented AddInterfaceImplementation().
726
727 2002-06-28  Martin Baulig  <martin@gnome.org>
728
729         * MethodBuilder.cs (GetParameters): Return all parameters, not all
730         but the last one.
731
732 2002-06-27  Martin Baulig  <martin@gnome.org>
733
734         * ConstructorBuilder.cs (GetParameters): Implemented.
735
736 Mon Jun 17 14:55:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
737
738         * ModuleBuilder.cs, TypeBuilder.cs: fixes for nested types handling.
739
740 Fri Jun 14 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
741
742         * CustomAttributeBuilder.cs: added custom attribute related internal
743         helper methods.
744         * FieldBuilder.cs, ParameterBuilder.cs: handle MarshalAs attribute.
745         * UnmanagedMarshal.cs: implemented.
746
747 Mon Jun 10 18:58:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
748
749         * PropertyBuilder.cs: implemented ReflectedType and DeclaringType
750         properties.
751
752 2002-06-07  Martin Baulig  <martin@gnome.org>
753
754         * TypeBuilder.cs (TypeBuilder): Added `PackingSize packing_size' and
755         `int type_size' fields to the constructor.
756         (DefineNestedType): Pass packing_size and type_size to the constructor.
757
758         * ModuleBuilder.cs (DefineType): Pass the packing_size and type_size
759         fields to the TypeBuilder's constructor.
760
761 2002-06-07  Martin Baulig  <martin@gnome.org>
762
763         * TypeBuilder.cs (DefineNestedType): There is no overload for this
764         method which takes 5 args in the specs, removed it.
765
766 Fri Jun 7 17:04:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
767
768         * AssemblyBuilder.cs: updates for PE/COFF rewrite.
769
770 2002-05-30  Martin Baulig  <martin@gnome.org>
771
772         * AssemblyBuilder.cs (methods): Made this internal and don't
773         initialize it.  It will be initialized by the ModuleBuilder's
774         GetSymbolWriter() method.
775         (get_next_table_index): Only store the method in the `methods'
776         array if it's not null.
777
778         * ModuleBuilder.cs (GetSymbolWriter): Initialize the AssemblyBuilder's
779         `methods' field if necessary and pass it as third argument to the
780         symbol writer's constructor.
781
782 2002-05-25  Martin Baulig  <martin@gnome.org>
783
784         * TypeBuilder.cs (TypeToken): Implemented.
785
786 2002-05-24  Martin Baulig  <martin@gnome.org>
787
788         * ModuleBuilder.cs (symwriter_define_local): New private variable.
789         (GetSymbolWriter): Look for a custom version of "DefineLocalVariable"
790         and store it in `symwriter_define_local'.
791         (SymWriter_DefineLocalVariable): New internal method to call the
792         symbol writer's custom DefineLocalVariable() method.  It is safe to
793         call this method if there's no symbol writer.
794
795         * LocalBuilder.cs (SetLocalSymInfo): Use the MethodBuilder'snew
796         SymWriter_DefineLocalVariable().
797
798         * MethodBuilder.cs (GetParameters): Implemented.
799
800 2002-05-22  Martin Baulig  <martin@gnome.org>
801
802         * ModuleBuilder.cs (GetSymbolWriter): Pass the this pointer to the
803         symbol writer's constructor.
804
805 2002-05-22  Martin Baulig  <martin@gnome.org>
806
807         * AssemblyBuilder.cs (methods): New field.
808         (get_next_table_index): Record all methods and constructors
809         (table 0x06) in the `methods' array.  This is read by the
810         Mono.CSharp.Debugger.MonoSymbolWriter::get_method interncall to
811         get the MethodBuilder / ConstructorBuilder back from the token.
812
813         * *Builder.cs (get_next_table_index): Added `object obj' argument.
814         (<constructors>): pass the this pointer to get_next_table_index ().
815
816 2002-05-20  Martin Baulig  <martin@gnome.org>
817
818         * TypeBuilder.cs (DefineField): Call the new `create_internal_class'
819         interncall after adding the first field.  This is used when creating
820         enum types to set `klass->enum_basetype'.
821
822 Thu May 16 16:09:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
823
824         * TypeBuilder.cs: complete special acse support for CharSet, Size and
825         Pack named args in StructLayout attribute.
826
827 Tue May 14 17:13:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
828
829         * MethodBuilder.cs: revert change in accessibility of
830         GetILGenerator(int).
831
832 Tue May 14 13:31:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
833
834         * FieldBuilder.cs, ParameterBuilder.cs: more special-casing of
835         attributes.
836
837 Fri May 10 20:57:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
838
839         * CustomAttributeBuilder.cs: expose internal data for use in
840         reflection.
841         * FieldBuilder.cs, TypeBuilder.cs: special case FieldOffset and
842         StructLayout attributes.
843
844 Fri May 10 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
845
846         * MethodBuilder.cs, ConstructorBuilder.cs: implemented InitLocals
847         property.
848
849 2002-04-26  Martin Baulig  <martin@gnome.org>
850
851         * ModuleBuilder.cs (DefineDocument): Implemented.
852
853 Tue Apr 16 13:02:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
854
855         * AssemblyBuilder.cs: pad output file to file alignment.
856         * FieldBuilder.cs: ReflectedType.
857         * ModuleBuilder.cs: added guid generation and array method creation.
858         * MonoArrayMethod.cs: array method support code.
859         
860 Wed Apr 10 12:57:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
861
862         * ILGenerator.cs: use a stack to keep track of exception blocks.
863
864 Mon Apr  8 06:19:01  2002 Piers Haken <piersh@friskit.com>
865
866         * ILGenerator.cs: added LabelField.label_base to allow for
867         arbitrary offsets (for switch statement)
868
869 Fri Apr 5 15:41:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
870
871         * AssemblyBuilder.cs: simpler protocol wih the runtime to
872         get the assembly data.
873
874 Tue Mar 26 20:10:24 CET 2002 Paolo Molaro <lupus@ximian.com>
875
876         * AssemblyBuilder.cs: use FileMode.Create.
877         * ILGenerator.cs: optimize localbuilder related opcodes.
878         Track parameters to adjust maxstack.
879         * LocalBuilder.cS: use unsigned for position.
880
881 2002-03-23  Miguel de Icaza  <miguel@ximian.com>
882
883         * LocalBuilder.cs: Drop the symbol_writer as LocalBuilder fields.
884         Do this lazily in SetLocalSymInfo.
885         
886 2002-03-24  Martin Baulig  <martin@gnome.org>
887
888         * ModuleBuilder.cs (GetSymbolWriter): The MonoSymbolWriter's constructor
889         now takes a `string assembly_filename' argument, pass it our fully
890         qualified assembly name.
891
892 2002-03-24  Nick Drochak  <ndrochak@gol.com>
893
894         * ILGenerator.cs: Use #if-#endif instead of if(false){} to disable
895         code.  This way there is no compiler warning.
896
897         * TypeBuilder.cs: Removed the returns that came after the throws.
898         This removes a few more compiler warnings. Also marked with MonoTODO
899         all places where we throw NotImplemented exceptions.
900
901 2002-03-23  Martin Baulig  <martin@gnome.org>
902
903         * SignatureHelper.cs (GetFieldSignatureHelper, GetLocalSignatureHelper):
904         Implemented.
905
906         * LocalBuilder.cs (LocalBuilder): This internal constructor now takes
907         a ModuleBuilder argument instead of a ISymbolWriter one.
908         (SetLocalSymInfo): Create and pass type signature to DefineLocalVariable.
909
910 2002-03-23  Martin Baulig  <martin@gnome.org>
911
912         * ILGenerator.cs (BeginScope, EndScope): Implemented.
913
914 2002-03-20  Martin Baulig  <martin@gnome.org>
915
916         * ModuleBuilder.cs (GetSymbolWriter): New internal function. Dynamically
917         loads the default symbol writer, catch all possible exceptions and return
918         null on failure.
919         (ModuleBuilder): Added `bool emitSymbolInfo' argument to this internal
920         constructor; if set, call GetSymbolWriter ().
921         (GetSymWriter): Implemented.
922
923         * LocalBuilder.cs (LocalBuilder): Added ISymbolWriter argument to this
924         internal method.
925         (SetLocalSymInfo): Implemented, call ISymbolWriter.DefineLocalVariable ()
926         if the symbol writer is not null.
927
928         * ILGenerator.cs (ILGenerator): Call ModuleBuilder.GetSymWriter () to get
929         and store the symbol writer.
930         (DeclareLocal): Pass the symbol writer to LocalBuilder's constructor.
931         (MarkSequencePoint): Implemented, call ISymbolWriter.DefineSequencePoints ()
932         if the symbol writer is not null.
933
934         * AssemblyBuilder.cs (DefineDynamicModule): Pass the `bool emitSymbolInfo'
935         to ModuleBuilder's constructor.
936
937 Sat Mar 16 19:11:47 CET 2002 Paolo Molaro <lupus@ximian.com>
938
939         * ModuleBuilder.cs: handle modified types correctly.
940
941 Thu Mar 7 17:10:42 CET 2002 Paolo Molaro <lupus@ximian.com>
942
943         * AssemblyBuilder.cs: allow saving bigger assemblies.
944         * ILGenerator.cs: add fixup table for fields and methods, since
945         at the end of the compile they may end up with a different table
946         index.
947         * ModuleBuilder.cs: add cache for type names to speed up the type
948         lookups from the compiler.
949         * TypeBuilder.cs: GetInterfaces () returns only interfaces in the
950         current type, not in parents (the docs are wrong).
951
952 Tue Mar 5 18:09:34 CET 2002 Paolo Molaro <lupus@ximian.com>
953
954         * EventBuilder.cs: implemented.
955         * TypeBuilder.cs: implemented DefineEvent() method and UnderlyingSystemType
956         property.
957
958 Mon Mar 4 20:34:52 CET 2002 Paolo Molaro <lupus@ximian.com>
959
960         * ILGenerator.cs: make enough room in the byte array for string
961         tokens.
962         * TypeBuilder.cs: fixed GetInterfaces().
963
964 Mon Mar 4 11:30:40 CET 2002 Paolo Molaro <lupus@ximian.com>
965
966         * TypeBuilder.cs: implemented GetConstructors(), GetFields(),
967         GetMethods(), GetProperties().
968
969 Thu Feb 28 19:15:10 CET 2002 Paolo Molaro <lupus@ximian.com>
970
971         * AssemblyBuilder.cs: call into the runtime to init some basic
972         assembly stuff. Reserve slot 1 of typedef table for .<Module>.
973         * ModuleBuilder.cs: call into the runtime if we need to create a
974         modief type, such as arrays, byref etc.
975         * TypeBuilder.cs: call into the runtime to create the MonoClass
976         representation for the type. Throw exceptions with not implemented
977         stuff.
978
979 Wed Feb 27 18:48:47 CET 2002 Paolo Molaro <lupus@ximian.com>
980
981         * ILGenerator.cs: fix nested exception blocks.
982
983 Wed Feb 20 22:30:49 CET 2002 Paolo Molaro <lupus@ximian.com>
984
985         * AssemblyBuilder.cs: upped compiled assembly size limit.
986         Implemented SetCustomAttribute () methods.
987         * CustomAttributeBuilder.cs: implemented the needed constructor
988         stuff.
989         * Cosntructorbuilder.cs, EnumBuilder.cs, FieldBuilder.cs,
990         MethodBuilder.cs, ModuleBuilder.cs, ParameterBuilder.cs,
991         PropertyBuilder.cs, TypeBuilder.cs: Implemented SetCustomAttribute () methods.
992
993 Wed Feb 20 14:54:01 CET 2002 Paolo Molaro <lupus@ximian.com>
994
995         * AssemblyBuilder.cs: add SetCustomAttribute () to keep the compiler
996         going.
997
998 Fri Feb 15 18:15:04 CET 2002 Paolo Molaro <lupus@ximian.com>
999
1000         * ILGenerator.cs: finally block support and fixes.
1001
1002 Thu Feb 14 18:55:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1003
1004         * FieldBuilder.cs: Add SetRVAData().
1005         * ILGenerator.cs: speed up code array growth.
1006         * TypeBuilder.cs: fix IsValueTypeImpl(). Add class_size member.
1007         Implement DefineInitializedData().
1008
1009 Tue Jan 22 23:01:11 CET 2002 Paolo Molaro <lupus@ximian.com>
1010
1011         * EnumBuilder.cs, TypeBuilder.cs: updates for changes in Type.cs.
1012         * ModuleBuilder.cs: fix lookup of nested types.
1013
1014 Tue Jan 15 22:46:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1015
1016         * ILGenerator.cs: implement some of the exception support methods.
1017
1018 Mon Jan 14 17:07:32 CET 2002 Paolo Molaro <lupus@ximian.com>
1019
1020         * ModulerBuilder.cs: search also for subtypes in GetTypes().
1021         * TypeBuilder.cs: bugfix in FullName. Implemented DefineNestedType().
1022
1023 Fri Jan 11 19:00:29 CET 2002 Paolo Molaro <lupus@ximian.com>
1024
1025         * MethodBuilder.cs, ConstructorBuilder.cs: save parameter info.
1026
1027 Thu Jan 10 21:07:54 CET 2002 Paolo Molaro <lupus@ximian.com>
1028
1029         * ILGenerator.cs: handle type tokens (used for box opcode).
1030
1031 Wed Jan 9 19:37:55 CET 2002 Paolo Molaro <lupus@ximian.com>
1032
1033         * ILGenerator.cs: emit float and doubles.
1034         * ModuleBuilder.cs: off-by-one error fix and GetType()
1035         implementations.
1036         * TypeBuilder.cs: AttributesImpl added.
1037         * UnmanagedMarshal.cs: stubbed out class.
1038
1039 Sat Jan 5 15:59:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1040
1041         * ILGenerator.cs: fix emission of two-bytes opcodes.
1042         Missing slot for locals array. Throw exceptions on unimplemented
1043         methods.
1044         * OpCode.cs: add a comment: the Value property is useless.
1045         * OpCodes.cs: fix name of tail opcode (Tail -> Tailcall).
1046
1047 2002-01-05  Ravi Pratap  <ravi@ximian.com>
1048
1049         * ConstructorBuilder.cs : Use the MonoTODO attribute.
1050
1051         * ILGenerator.cs, Label.cs, MethodBuilder.cs, ModuleBuilder.cs,
1052         ParameterBuilder.cs, TypeBuilder.cs : Ditto.
1053         
1054 Thu Jan 3 23:26:15 CET 2002 Paolo Molaro <lupus@ximian.com>
1055
1056         * ILGenerator.cs: typo fix.
1057
1058 Mon Dec 24 17:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
1059
1060         * TypeBuilder.cs: added DefineMethodOverride().
1061         * MethodBuilder.cs: add override_method member and setter.
1062
1063 Mon Nov 19 13:58:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1064
1065         * AssemblyBuilder.cs: add method to register a string in the "#US"
1066         stream.
1067         * EnumBuilder.cs, SignatureHelper.cs: added stubs.
1068         * ILGenerator.cs: more stuff implemented.
1069         * LocalBuilder.cs: keep track of local var index.
1070
1071 Thu Nov 15 18:11:23 CET 2001 Paolo Molaro <lupus@ximian.com>
1072
1073         * ConstructorBuilder.cs: implement the interesting methods.
1074         * ILGenerator.cs: adapt for use with both a MethodBuilder and a
1075         ConstructorBuilder.
1076         * MethodBuilder.cs: add ImplAttributes.
1077         * ParameterBuilder.cs: adapt for ConstructorBuilder.
1078         * TypeBuilder.cs: add constructors handling.
1079
1080 Wed Nov 14 17:01:45 CET 2001 Paolo Molaro <lupus@ximian.com>
1081
1082         * ConstructorBuilder.cs: added missing stubs and some implementation.
1083         * CustomAttributeBuilder.cs: added.
1084         * EventBuilder.cs: added.
1085         * FieldBuilder.cs: updates.
1086         * MethodBuilder.cs: stuff to implement P/Invoke methods.
1087         * ModuleBuilder.cs: added GetArrayMethod() stub.
1088         * ParameterBuilder.cs, PropertyBuilder.cs: updates.
1089         * TypeBuilder.cs: updates and stubs.
1090
1091 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
1092
1093         * TypeBuilder.cs: Added implementation for TypeHandle.
1094
1095 Tue Nov 6 09:13:45 CET 2001 Paolo Molaro <lupus@ximian.com>
1096
1097         * AssemblyBuilder.cs: define an internal constructor.
1098
1099 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
1100
1101         * AssemblyBuilder.cs: Reformatted.
1102
1103         Added override keywords to those that needed them.
1104
1105         Removed methods that we do not override, but just inherit
1106
1107 Tue Sep 25 16:53:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
1108
1109         * TypeBuilder.cs, ConstructorBuilder.cs, ModuleBuilder.cs: added.