2005-05-20 Miguel de Icaza <miguel@novell.com>
[mono.git] / mcs / class / corlib / System.Reflection.Emit / ChangeLog
1 2005-05-20  Miguel de Icaza  <miguel@novell.com>
2
3         * TypeBuilder.cs (UnderlyingSystemType): should always return this
4         according to Zoltan.  Old code left there, but should probably be removed.
5
6 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
7
8         * MethodBuilder.cs (fixup): Take into account CreateMethodBody as
9         well.
10
11         * ConstructorBuilder.cs MethodBuilder.cs: Check that elements of
12         parameterTypes are not null. Fixes #74928.
13
14 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
15
16         * ConstructorBuilder.cs MethodBuilder.cs (fixup): Fix this.
17         
18         * ConstructorBuilder.cs MethodBuilder.cs (fixup): Throw an exception if a
19         method body is empty. Fixes #74906.
20
21 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
22
23         * TypeBuilder.cs (SetCustomAttribute): StructLayoutAttribute.CharSet
24         has to overwrite current settings.
25
26 2005-04-05  Sebastien Pouliot  <sebastien@ximian.com>
27
28         * AssemblyBuilder.cs: Don't call GetCurrentDirectory if building an 
29         assembly that will never be serialized to disk (because CAS may not
30         allow disk access but still allow generating a in-memory assembly).
31
32 2005-03-24  Miguel de Icaza  <miguel@novell.com>
33
34         * DynamicMethod.cs (CreateDelegate): Add second overload based on
35         the first one that allows for a `target' argument.
36
37 2005-03-24  Sebastien Pouliot  <sebastien@ximian.com>
38
39         * MethodRental.cs: Added Demand for UnmanagedCode on SwapMethodBody 
40         method.
41
42 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
43
44         * MethodBuilder.cs: Add internal BestFitMapping and 
45         ThrowOnUnmappableChar properties used by mcs.
46
47 2005-03-09  Marek Safar  <marek.safar@seznam.cz>
48
49         * ILGenerator.cs (DeclareLocal): Throw an exception for null argument.
50
51 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
52
53         * CustomAttributeBuilder.cs UnmanagedMarshal.cs: Allow sizeConst and
54         sizeParamIndex to be -1, which means they are not given.
55         
56         * CustomAttributeBuilder.cs (get_umarshal): Only call the internal
57         LPArray creation method if sizeConst of sizeParamIndex is given.
58
59         * UnmanagedMarshal.cs: Add has_size field.
60
61 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
62
63         * CustomAttributeBuilder.cs (get_umarshal): Marshal sizeConst and
64         sizeParamIndex fields as well.
65
66         * UnmanagedMarshal.cs: Add param_num field and a new internal creation
67         method which sets it.
68
69 2005-02-11  Zoltan Varga  <vargaz@freemail.hu>
70
71         * TypeBuilder.cs (IsAssignableTo): New helper method. Fixes #70838.
72         
73         * TypeBuilder.cs: Fix warning.
74
75 2005-01-21 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
76         
77         * MethodBuilder.cs, TypeBuilder: missing 'params' in some method signature
78         patch by Kamil Skalski <nazgul@nemerle.org>
79
80 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
81
82         * ModuleBuilder.cs: Interfaces should have null BaseType.
83         Fixes #71301.
84
85 2005-01-18  Miguel de Icaza  <miguel@ximian.com>
86
87         * TypeBuilder.cs: Add check for creation.  Fix from Geoff.
88
89 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
90
91         * CustomAttributeBuilder.cs: Fix a warning.
92
93 Wed Dec 15 11:34:13 CET 2004 Paolo Molaro <lupus@ximian.com>
94
95         * ModuleBuilder.cs, EnumBuilder.cs: actually add the enumbuilder
96         to the type list of the module (bug#70488).
97
98 2004-12-09  Martin Baulig  <martin@ximian.com>
99
100         * GenericTypeParameterBuilder.cs
101         (GenericTypeParameterBuilder.IsValueType): Fixed the FIXME.
102
103 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
104
105         * AssemblyBuilder.cs: Move corlib_internal field here from Assembly.
106         
107         * AssemblyBuilder.cs: Add corlib_internal to the ctor parameters.
108
109 2004-12-06  Ben Maurer  <bmaurer@ximian.com>
110
111         * TypeBuilder.cs (CreateType): Creating a type twice does not
112         throw in msft.
113
114 2004-11-22  Zoltan Varga  <vargaz@freemail.hu>
115
116         * ModuleBuilder.cs: Check that all types inside the module are created.
117         Fixes #69780.
118
119 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
120
121         * ModuleBuilder.cs (Save): Use new WriteToFile icall.
122
123 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
124
125         * TypeBuilder.cs: Make some members work if the type is created since
126         MS does this.
127
128 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
129
130         * CustomAttributeBuilder.cs: Check that arguments are not 
131         multi-dimensional arrays.
132
133 2004-10-12  Martin Baulig  <martin@ximian.com>
134
135         * TypeBuilder.cs (TypeBuilder.setup_generic_class): Renamed to
136         create_generic_class() and added a new setup_generic_class().
137         (TypeBuilder.DefineGenericParameters): Call setup_generic_class()
138         before creating the type parameters.
139
140 2004-10-11  Martin Baulig  <martin@ximian.com>
141
142         * TypeBuilder.cs (TypeBuilder.generic_container): New private field.
143
144         * MethodBuilder.cs (MethodBuilder.generic_container): New private field.
145
146         * GenericTypeParameterBuilder.cs
147         (GenericTypeParameterBuilder.GetGenericTypeParameterConstraints):
148         Return `Type.EmptyTypes' instead of an array of `typeof (object)'.      
149
150 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
151
152         * ModuleBuilder.cs: Create global type after creation.
153
154 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
155
156         * ModuleBuilder.cs (GetTypes): Fix length of returned array. Fixes
157         #65931.
158
159 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
160
161         * ModuleBuilder.cs (DefineType): Check for duplicate type names. Fixes
162         #65988.
163
164 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
165
166         * AssemblyBuilderAccess.cs: Remove [Flags].
167
168         * PackingSize.cs: Add new 2.0 members. Remove [Flags].
169
170         * AssemblyBuilder.cs: Add net 2.0 Save method.
171
172         * LocalBuilder.cs: Make this inherit from LocalVariableInfo under
173         net 2.0. Reorganize fields so the layout visible to the runtime is the
174         same under 1.0 and 2.0. Add 2.0 properties.
175
176 2004-10-02  Gert Driesen  <drieseng@users.sourceforge.net>
177
178         * TypeBuilder.cs: throw NotSupportedException when defining default
179         ctor if parent type does not have default ctor
180
181 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
182
183         * TypeBuilder.cs: Make 'created' field visible to the runtime.
184
185 2004-09-28  Martin Baulig  <martin@ximian.com>
186
187         * GenericTypeParameterBuilder.cs
188         (GenericTypeParameterBuilder.ContainsGenericParameters): Return
189         true here; System.Type.ContainsGenericParameters returns true when
190         called on a type parameter, so let's do the same here.
191
192 2004-09-27  Zoltan Varga  <vargaz@freemail.hu>
193
194         * ConstructorBuilder.cs: Add 2.0 GetILGenerator(size) method.
195
196 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
197
198         * UnmanagedMarshal.cs: Add ToMarshalAsAttribute method.
199
200 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
201
202         * TypeBuilder.cs: Add IsCreated method.
203
204 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
205
206         * FieldBuilder.cs: Add dummy GetFieldOffset method.
207
208 2004-09-24  Martin Baulig  <martin@ximian.com>
209
210         * GenericTypeParameterBuilder.cs
211         (GenericTypeParameterBuilder.GetGenericParameterConstraints): Override.
212
213 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
214
215         * DynamicMethod.cs: Add MetadataToken property and tweak Module property.
216
217 2004-09-23  Martin Baulig  <martin@ximian.com>
218
219         * GenericTypeParameterBuilder.cs
220         (GenericTypeParameterBuilder.SetGenericParameterAttributes): New
221         public method, replaces the old Mono_* hacks.
222
223 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
224
225         * AssemblyBuilder.cs: Fixed assembly-level permissions. I don't know 
226         why I splitted them all into individual entries when only a single set
227         is accepted for each security action :(.
228
229 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
230
231         * CustomAttributeBuilder.cs: Applied patch from Marcus Urban
232         (mathpup@mylinuxisp.com). Add support for defining custom
233         marshallers by calling SetCustomAttribute.      
234
235 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
236
237         * AssemblyBuilder.cs: Keep a copy of the 3 permission set as an array
238         of RefEmitPermissionSet. This will allow to reuse existing 
239         functionalities already present in the runtime.
240
241 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
242
243         * TypeBuilder.cs: Do not create default constructor for
244         static classes.
245
246 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
247
248         * TypeBuilder.cs: Set the table_idx of the global type to 1.
249
250         * ModuleBuilder.cs: Save the main module of the assembly even if it is 
251         transient.
252
253 2004-09-02 Ben Maurer  <bmaurer@users.sourceforge.net>
254
255         * LocalBuilder.cs: another s.ioe
256
257 2004-09-02 Ben Maurer  <bmaurer@users.sourceforge.net>
258
259         * ModuleBuilder.cs: dont throw an S.IOE for debugging stuff.
260         makes sre apps work
261
262 2004-09-02  Martin Baulig  <martin@ximian.com>
263
264         * MethodBuilder.cs (MethodBuilder.GetParameters): Throw a
265         NotSupportedException() until the type has been fully created.
266
267 2004-09-01  Martin Baulig  <martin@ximian.com>
268
269         * IMonoSymbolWriter.cs: Removed.
270
271         * ModuleBuilder.cs, LocalBuilder.cs, ILGenerator.cs: Removed the
272         old debugging code.
273
274 2004-08-13  Sebastien Pouliot  <sebastien@ximian.com>
275
276         * AssemblyBuilder.cs: (Partly) Fix delay-signing issue (#56621) when 
277         MCS is used on the MS runtime (other part of the fix is for MCS).
278
279 2004-08-11  Marek Safar  <marek.safar@seznam.cz>
280
281         * AssemblyBuilder.cs: Added AddPermissionRequests method
282         used be mcs for SecurityPermissionAttribute handling.
283
284 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
285
286         * EnumBuilder.cs: Call setup_enum_type () in the constructor. Fixes
287         #62237.
288
289 2004-08-07  Jackson Harper  <jackson@ximian.com>
290
291         * AssemblyBuilder.cs: "neutral" culture is invariant culture
292         (String.Empty).
293
294 2004-08-07  Atsushi Enomoto  <atsushi@ximian.com>
295
296         * OpCodes.cs : csc complains CS1034 Line cannot exceed 2046 characters.
297
298 2004-08-05  Duncan Mak  <duncan@ximian.com>
299
300         * OpCodes.cs (TakesSingleByteArgument): Add this back.
301
302 2004-08-05  Duncan Mak  <duncan@ximian.com>     
303
304         This patch is based on an idea of Ben's to reduce the code size
305         in MCS. 
306
307         * OpCodes.cs: Instead pushing the data onto the stack when each
308         OpCode is initialized, pack the data into 2 ints and store only
309         that.  Furthermore, the names of each OpCode are stored in a
310         separate string array in the new OpCodeNames class.
311
312         * OpCodeNames.cs: The names of each OpCode are moved here to delay
313         the initialization of the strings, as they are not used frequently.
314
315         * OpCode.cs: Rewrote this to take in everything as 2 ints.
316
317 2004-07-29  Martin Baulig  <martin@ximian.com>
318
319         * ILGenerator.cs (ILGenerator.Mono_GetCurrentOffset): New static
320         internal method.
321
322         * ModuleBuilder.cs (ModuleBuilder.Mono_GetGuid): New static
323         internal method.
324
325 2004-07-24  Martin Baulig  <martin@ximian.com>
326
327         * TypeBuilder.cs (TypeBuilder.UnspecifiedTypeSize): Set this to 0
328         and initialize it to 0 everywhere.
329
330 2004-07-22  Martin Baulig  <martin@ximian.com>
331
332         * ILGenerator.cs (ILGenerator.BeginFaultBlock): Implemented.
333
334 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
335
336         * LocalBuilder.cs: Remove MakePinned, we are now going to use
337         ILGenerator.DeclaraLocal that takes the `bool pinned' argument. 
338
339         * ILGenerator.cs (DeclareLocal): Add `pinned' version of the
340         method on the 2.0 profile.
341
342 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
343
344         * EnumBuilder.cs (CreateType): Call a new icall to set the internal
345         type field. Fixes #59833.
346
347 Thu Jun 24 15:33:04 CEST 2004 Paolo Molaro <lupus@ximian.com>
348
349         * ParameterBuilder.cs: implement SetConstant ().
350
351 Wed Jun 23 15:40:48 CEST 2004 Paolo Molaro <lupus@ximian.com>
352
353         * TypeBuilder.cs: handle properly the case when SetParent() 
354         is called (requires an updated runtime, too bug#60474).
355
356 Wed Jun 23 14:20:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
357
358         * EnumBuilder.cs, TypeBuilder.cs: patch from Gert Driesen
359         to implement EnumBuilder (slightly tweaked).
360
361 2004-06-15  Gert Driesen <drieseng@users.sourceforge.net>
362
363         * MethodRental.cs: fixed value of JitOnDemand
364
365 2004-06-09  Gert Driesen <drieseng@users.sourceforge.net>
366
367         * FieldBuilder.cs: fixed implementation to match MS.NET,
368         meaning throw InvalidOperationException for methods that
369         should not be allowed to execute when type has been
370         created, and throw NotSupportedException for methods and
371         properties that should not be called on FieldBuilder
372
373 2004-06-09  Gert Driesen <drieseng@users.sourceforge.net>
374
375         * MethodBuilder.cs: move check to see if type has already 
376         been created up, to match MS.NET behaviour. Fix GetHashCode 
377         (removed TODO)
378
379 2004-06-09  Gert Driesen <drieseng@users.sourceforge.net>
380
381         * MethodRental.cs: Added check for method size
382
383 2004-06-08  Martin Baulig  <martin@ximian.com>
384
385         * ILGenerator.cs (TokenGenerator.GetToken): Added overloaded
386         version which takes a MethodInfo and a Type[].
387         (IlGenerator.EmitCall): When emitting a call to a varargs method,
388         use the new GetToken() to pass the optional argument types to the
389         runtime.
390
391         * ModuleBuilder.cs (ModuleBuilder.getMethodToken): New interncall.
392
393 2004-05-29  Gert Driesen (drieseng@users.sourceforge.net)
394
395         * AssemblyBuilder.cs: removed extra method, fixes public API
396         compatibility with MS.NET
397         * TypeBuilder.cs: removed extra method, fixes public API
398         compatibility with MS.NET
399
400 2004-05-28  Jackson Harper  <jackson@ximian.com>
401
402         * CustomAttributeBuilder.cs: GetBlob now takes a ref to the
403         assembly so it can encode type names properly.
404         
405 2004-05-25  Sebastien Pouliot  <sebastien@ximian.com>
406
407         * MethodBuilder.cs: Now use FastNewGuidArray to create new random 
408         Guids without using CryptoConfig. Speed up for MCS.
409
410 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
411
412         * MethodBuilder.cs: Add Equals and GetHashCode.
413
414         * TypeBuilder.cs: Add IsSubclassOf.
415
416 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
417
418         * AssemblyBuilder.cs: Make extra methods internal. mcs was changed
419         to handle this a long time ago.
420
421         * TypeBuilder.cs: Add IsAssignableFrom and IsInstanceOfType.
422         
423         * TypeBuilder.cs MethodBuilder.cs ConstructorBuilder.cs: Implement
424         ToString ().
425
426         * TypeBuilder.cs (ToString): Make this consistent with MS.NET.
427
428 2004-05-11  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
429
430         * OpCodes.cs: Refactored to avoid the static constructor
431
432 2004-05-10  Gert Driesen (drieseng@users.sourceforge.net)
433         * AssemblyBuilder.cs: fixed warning
434         * MethodRental.cs: added private default ctror to match MS.NET
435
436 2004-05-03 Lluis Sanches Gual  <lluis@ximian.com>
437
438         * ModuleBuilder.cs: Use name const to load the debugger assembly.
439
440 2004-05-01  Todd Berman  <tberman@sevenl.net>
441
442         * ModuleBuilder.cs: Load the proper assembly for a gac-only install.
443
444 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
445
446         * ILGenerator.cs, ModuleBuilder.cs: readonlyificate.
447
448 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
449
450         * MethodRental.cs: New file.
451
452 2004-04-28  Raja R Harinath  <rharinath@novell.com>
453
454         * TypeBuilder.cs (SetCustomAttribute): Handle the presence of the
455         full type name in the data stream.  This is emitted for value
456         types by the Mono runtime.
457
458 2004-04-23  Atsushi Enomoto  <atsushi@ximian.com>
459
460         * ConstructorBuilder.cs, DynamicMethod.cs, EnumBuilder.cs,
461           GenericTypeParameterBuilder.cs, MethodBuilder.cs, ModuleBuilder.cs,
462           OpCodes.cs, TypeBuilder.cs :
463           The fix should be easier ;)
464
465 2004-04-23  Atsushi Enomoto  <atsushi@ximian.com>
466
467         * ConstructorBuilder.cs, DynamicMethod.cs, EnumBuilder.cs,
468           GenericTypeParameterBuilder.cs, MethodBuilder.cs, ModuleBuilder.cs,
469           OpCodes.cs, TypeBuilder.cs :
470           NET_2_0 related build fix.
471
472 2004-04-07  Martin Baulig  <martin@ximian.com>
473
474         * GenericTypeParameterBuilder.cs
475         (Mono_SetReferenceTypeConstraint): New public method.
476         (Mono_SetValueTypeConstraint): New public method.
477
478 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
479
480         * MethodBuilder.cs, TypeBuilder.cs: always have 
481         slot for generic_params for consistent offsets.
482
483 2004-04-07  Martin Baulig  <martin@ximian.com>
484
485         * GenericTypeParameterBuilder.cs
486         (Mono_SetConstructorConstraint): New public method.     
487
488 2004-04-07  Martin Baulig  <martin@ximian.com>
489
490         * GenericTypeParameterBuilder.cs: New file.
491
492         * TypeBuilder.cs (TypeBuilder.DefineGenericParameters): New public
493         method.  This is the new public API.
494         (TypeBuilder.DefineGenericParameter): Removed.
495         (TypeBuilder.SetGenericParameterConstraints): Removed.
496
497         * MethodBuilder.cs (MethodBuilder.DefineGenericParameters): New public
498         method.  This is the new public API.
499         (MethodBuilder.DefineGenericParameter): Removed.
500         (MethodBuilder.SetGenericParameterConstraints): Removed.
501
502 2004-04-01  Martin Baulig  <martin@ximian.com>
503
504         * OpCodes.cs (OpCodes.Constrained): New opcode.
505
506 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
507
508         * LocalBuilder.cs: Fix pinned support.
509
510 2004-03-30  Martin Baulig  <martin@ximian.com>
511
512         * TypeBuilder.cs (TypeBuilder.SetGenericParameterConstraints):
513         Added `bool has_ctor_constraint' argument.
514
515         * MethodBuilder.cs (MethodBuilder.SetGenericParameterConstraints):
516         Added `bool has_ctor_constraint' argument.
517
518 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
519
520         * LocalBuilder.cs: pinned support.
521
522 2004-03-29  Martin Baulig  <martin@ximian.com>
523
524         * TypeBuilder.cs (TypeBuilder.ContainsGenericParameters): Implemented.
525
526 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
527
528         * AssemblyBuilder.cs: Changed strongname support to match MS 
529         implementation (i.e. attributes are used by the compiler - not by
530         AssemblyBuilder).
531
532 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
533
534         * TypeBuilder.cs (GetMethod): Implement.
535
536         * CustomAttributeBuilder.cs: Reenable argument checking with MS.NET
537         compatibility tweaks.
538
539 2004-03-23  Martin Baulig  <martin@ximian.com>
540
541         * TypeBuilder.cs (TypeBuilder.GetEvents_internal): New internal
542         method; this is basically GetEvents(), but see the FIXME in that method.
543
544 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
545
546         * CustomAttributeBuilder.cs: Disable argument checking since it causes
547         regressions.
548
549 2004-03-22  Zoltan Varga  <vargaz@freemail.hu>
550
551         * CustomAttributeBuilder.cs (Initialize): Add more argument checking. 
552         Fixes #55793.
553
554 2004-03-09  Jackson Harper  <jackson@ximian.com>
555
556         * CustomAttributeBuilder.cs: Add some argument checking. Handle
557         default arguments properly.
558
559 2004-03-09  Sebastien Pouliot  <spouliot@videotron.ca>
560
561         * AssemblyBuilder.cs: The strong name key file existance will now be
562         checked in the current compilation directory AND in the assembly
563         output directory. Fix bugzilla entry #55320.
564
565 2004-02-23  Martin Baulig  <martin@ximian.com>
566
567         * MethodBuilder.cs (MethodBuilder.SetGenericMethodSignature):
568         Added MethodAttributes and CallingConventions arguments.
569
570 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
571
572         * TypeBuilder.cs: Implement DefineUninitializedData and 
573         AddDeclarativeSecurity.
574
575 2004-01-27  Zoltan Varga  <vargaz@freemail.hu>
576
577         * AssemblyBuilder.cs (SetCustomAttribute): Move the reading of the
578         keyfile to the Save () method.
579
580 2004-01-26  Sebastien Pouliot  <spouliot@videotron.ca>
581
582         * AssemblyBuilder.cs: Save will now strongname the assembly is (a) a
583         StrongName is present and (b) the signature isn't delayed.
584
585 2004-01-24 David Sheldon <dave-mono@earth.li>
586
587         * AssemblyBuilder.cs: Added override for GetFiles() that throws
588           NotSupportedException. 
589
590 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
591
592         * AssemblyBuilder.cs (Save): Handle entry points with an int return
593         type as well.
594         
595         * AssemblyBuilder.cs (Save): If the entry point is in a module, create
596         a new entry point which calls the real one, since the entry point must
597         be in the module which contains the manifest.
598
599         * ModuleBuilder.cs (Save): Create the global type automatically if not
600         already done.
601
602 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
603
604         * AssemblyBuilder.cs (DefineVersionInfoResource): Set more 
605         version info properties.
606
607 2004-01-08  Zoltan Varga  <vargaz@freemail.hu>
608
609         * CustomAttributeBuilder.cs (string_arg): New helper method.
610
611         * AssemblyBuilder.cs (DefineVersionInfoResource): Implement.
612
613         * AssemblyBuilder.cs (SetCustomAttribute): Use the new helper method.
614
615         * AssemblyBuilder.cs (DefineUnmanagedResource): Implement.
616
617         * AssemblyBuilder.cs (DefineIconResource): New internal method to
618         support mcs.
619
620         * TypeBuilder.cs (IsDefined): Implement this, since some corlib classes
621         make calls to IsDefined.
622
623 2004-01-06  Zoltan Varga  <vargaz@freemail.hu>
624
625         * AssemblyBuilder.cs: Fix warning.
626
627 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
628
629         * AssemblyBuilder.cs (DefineVersionInfoResource): Implement.
630
631 2003-12-29 Ben Maurer  <bmaurer@users.sourceforge.net>
632
633         * MethodBuilder.cs, ConstructorBuilder.cs: Override GetParameterCount.
634         * ILGenerator.cs: Use GetParameterCount.
635
636 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
637
638         * AssemblyBuilder.cs (AddModule): New internal method to support 
639         /addmodule in mcs.
640
641 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
642
643         * AssemblyBuilder.cs: New internal property to support /target:module in
644         mcs.
645
646 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
647
648         * ILGenerator.cs: Applied patch from Ben Maurer 
649         (bmaurer@users.sourceforge.net). Allocate arrays holding label data
650         lazily and reduce their size.
651
652 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
653
654         * AssemblyBuilder.cs (MonoResource): New 'offset' field used by the
655         runtime.
656
657         * ModuleBuilder: Implement DefineResource.
658
659 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
660
661         * AssemblyBuilder.cs (RefEmitPermissionSet): New helper structure.
662         
663         * MethodBuilder.cs (AddDeclarativeSecurity): Implement.
664
665         * ConstructorBuilder.cs (AddDeclarativeSecurity): Ditto.
666
667 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
668
669         * MethodBuilder.cs: Add stubs for missing methods.
670
671         * TypeBuilder.cs (GetEvents): Add new override.
672
673         * ModuleBuilder.cs: Implement some missing methods, add stubs for others.
674
675         * AssemblyBuilder.cs (GetFiles): Get rid of unneccessary override.
676
677         * AssemblyBuilder.cs (ImageRuntimeVersion): Add override to keep
678         signature compatibility with MS.NET.
679
680         * TypeBuilder.cs (MemberType): Get rid of unneccessary override.
681
682 2003-12-08  Martin Baulig  <martin@ximian.com>
683
684         * TypeBuilder.cs (TypeBuilder.MonoGenericParam): Removed; use the
685         new `MonoGenericParam' class instead (in S.R/MonoGenericInst.cs).
686
687 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
688
689         * ModuleBuilder.cs: Double the size of the types array during insertion
690         do avoid excessive memory allocation and copying. Track the number of
691         types in a separate variable.
692
693         * TypeBuilder.cs: Same for the 'fields' and 'methods' arrays.
694
695 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
696
697         * ModuleBuilder.cs (DefinePInvokeMethod): Implement.
698
699         * ModuleBuilder.cs (DefineGlobalMethod): Implement the Net 1.2 variants.
700
701 2003-11-28  Dick Porter  <dick@ximian.com>
702
703         * ModuleBuilder.cs: Do string compares with the Invariant culture.
704
705 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
706
707         * AssemblyBuilder.cs (SetCustomAttribute): Implement automatic 
708         generation of build and revision numbers. Fixes #46492.
709
710 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
711
712         * TypeBuilder.cs: Implement GetField.
713
714 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
715
716         * DynamicMethod.cs: New class.
717
718         * ILGenerator.cs MethodBuilder.cs ConstructorBuilder.cs: Retrieve 
719         tokens from a token generator object instead of from the ModuleBuilder,
720         to support the implementation of DynamicMethod. Also get rid of the 
721         unused 'mbuilder' field.
722
723         * ModuleBuilder.cs: Create a token generator object which can be
724         passed to ILGenerator.
725
726         * LocalBuilder.cs ILGenerator.cs: Get rid of 'module' field, obtain 
727         needed objects from the ilgen object instead.
728
729 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
730
731         * TypeBuilder.cs FieldBuilder.cs MethodBuilder.cs ConstructorBuilder.cs:  Add support for custom modifiers from NET 1.2.
732
733         * ILGenerator.cs: Remove unused abuilder member.
734
735 2003-11-19  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
736
737         * OpCodes.cs: Remove Boxval for v1.1+
738
739 2003-11-19  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
740
741         * OpCodes.cs: Small rearrange to fix csc compiler warning about obsolete member used
742
743 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
744
745         * AssemblyBuilderAccess.cs PackingSize: Add [Flags].
746
747         * AssemblyBuilder.cs (DefineDynamicModule): Make internal method
748         private.
749
750         * AssemblyBuilder.cs (Save): Write out the main module at the end.
751         
752 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
753         
754         * ConstructorBuilder.cs (.ctor): Automatically add RTSpecialName flag
755         as MS does.
756
757 2003-11-06  Martin Baulig  <martin@ximian.com>
758
759         * ModuleBuilder.cs (ModuleBuilder.Save): Call `build_metadata'
760         before writing the symbol file.
761
762 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
763
764         * AssemblyBuilder.cs (.ctor): Initialize the 'dir' field to something
765         sensible.
766         
767         * AssemblyBuilder.cs (Save): Set 'created' flag.
768
769         * AssemblyBuilder.cs (get_next_table_index): Moved to ModuleBuilder,
770         since table indexes are per-module.
771
772 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
773
774         * TypeBuilder.cs (DefineDefaultConstructor): Pass an array instead of 
775         null to DefineConstructor, to avoid NullReferenceExceptions in the 
776         binder code.
777
778         * AssemblyBuilder.cs ModuleBuilder.cs ILGenerator.cs: Move getUSIndex 
779         and getToken methods, and the associated icalls to ModuleBuilder, 
780         since tokens are per-module.
781
782         * AssemblyBuilder.cs ModuleBuilder.cs: Partially revert the previous
783         patch, since having the 'is_main' field is useful in the unmanaged 
784         code.
785
786         * AssemblyBuilder.cs ModuleBuilder.cs: Move the metadata creation and
787         file creation logic to ModuleBuilder:Save (), since this needs to be
788         done for every module. Also move the corresponding icalls to 
789         ModuleBuilder.
790
791 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
792
793         * AssemblyBuilder.cs ModuleBuilder.cs: First steps toward a fix for
794         #48700 (proper module support in Ref.Emit). Remove is_main field from
795         ModuleBuilder and add a mainModule field to AssemblyBuilder instead.
796         This is neccesary, since the main module is determined during the 
797         Save () call: the module with the same file name as the assembly is
798         the main module. Also create a default main module, if one is not
799         existing.
800
801 2003-11-03  Martin Baulig  <martin@ximian.com>
802
803         * OpCodes.cs: Added Ldelem_Any, Stelem_Any and Unbox_Any from .NET 1.2.
804
805 2003-10-18  Sebastien Pouliot  <spouliot@videotron.ca>
806
807         * AssemblyBuilder.cs (SetCustomAttribute): Changed PK extraction to
808         use Mono.Security.StrongName (#49785).
809
810 2003-10-18  Zoltan Varga  <vargaz@freemail.hu>
811
812         * AssemblyBuilder.cs (SetCustomAttribute): Extract the public key from
813         the keyfile.
814
815 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
816
817         * AssemblyBuilder.cs (SetCustomAttribute): Ignore empty keyfile name.
818         
819         * AssemblyBuilder.cs: Moved loading of the public key file into
820         managed code from reflection.c. 
821
822         * AssemblyBuilder.cs: Set cultureInfo and version from the AssemblyName
823         passed to the constructor.
824
825 2003-10-13  Martin Baulig  <martin@ximian.com>
826
827         * MethodBuilder.cs (MethodBuilder): Added
828         `TypeBuilder.MonoGenericParam[] generic_params' field.
829         (DefineGenericParameter, SetGenericMethodSignature): New public methods.
830
831         * TypeBuilder.cs (DefineGenericMethod): New public method.
832
833 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
834
835         * OpCode.cs: Fix Value property. Fixes #49328.
836
837 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
838
839         * TypeBuilder.cs (CreateType): Fire TypeResolve events for unfinished 
840         nested value types. Fixes #47022.
841
842 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
843
844         * TypeBuilder.cs: Really fix #48695.
845
846 Sat Sep 27 16:17:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
847
848         * ILGenerator.cs: instance fields are loaded from this.
849
850 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
851
852         * TypeBuilder.cs (DefineDefaultConstructor): Make this work on types
853         without a parent. Fixes #48695.
854
855 2003-09-17  Martin Baulig  <martin@ximian.com>
856
857         * TypeBuilder.cs (TypeBuilder.CreateType): Don't append the type
858         parameters to the type name; ie. use `Stack' instead of `Stack<T>'.
859
860 2003-09-06  Martin Baulig  <martin@ximian.com>
861
862         * TypeBuilder.cs (TypeBuilder.IsUnboundGenericParameter): Implemented.
863
864 2003-09-04  Martin Baulig  <martin@ximian.com>
865
866         * TypeBuilder.cs (TypeBuilder.MonoGenericParam): Make this nested
867         class internal, not protected.
868
869 2003-08-29  Martin Baulig  <martin@ximian.com>
870
871         * TypeBuilder.cs (TypeBuilder.DefineGenericParameter): New public
872         method.  We can now create generic types.
873         (TypeBuilder.GetGenericTypeDefinition): Override this; call the
874         `setup_internal_class' interncall before calling our base impl.
875
876 Sat Aug  2 13:04:55 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
877
878         * ILGenerator.cs: Emission of doubles now utilise the Double.AssertEndianity
879         icall to assert double word endianity on ARM.
880
881 2003-07-25  Duncan Mak  <duncan@ximian.com>
882
883         * OpCodes.cs (Boxval): Marked with ObsoleteAttribute.
884
885 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
886
887         * TypeBuilder.cs: Added generics stubs.
888
889         * EnumBuilder.cs: Added generics  stubs, changed bracing style for
890         routines.
891
892 2003-07-23  Duncan Mak  <duncan@ximian.com>
893
894         * SignatureHelper.cs: This class does not have the
895         SerializableAttribute.
896
897 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
898
899         * AssemblyBuilder.cs: Added argument checking to all methods according
900         to the MSDN docs. Also marked DefineUnmanagedResource and its friends
901         as not implemented.
902         * ModuleBuilder.cs: Added new property FileName used by AssemblyBuilder.
903         * ModuleBuilder.cs AssemblyBuilder.cs: Implemented IsTransient ().
904
905 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
906
907         * EventBuilder.cs: Add argument checking to methods.
908
909 Thu Jun 5 20:18:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
910
911         * AssemblyBuilder.cs: implemented DefineResource ().
912
913 Thu Jun 5 12:36:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
914
915         * OpCode.cs: implemented Equals/GetHashCode.
916
917 Tue Jun 3 11:14:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
918
919         * ILGenerator.cs, OpCode.cs: optimize opcode space usage.
920
921 Tue Jun 3 11:13:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
922
923         * UnmanagedMarshal.cs: add ability to define custom attributes (the MS
924         runtime doesn't support this).
925
926 2003-05-30  Zoltan Varga  <vargaz@freemail.hu>
927
928         * TypeBuilder.cs: Implement DefineTypeInitializer.
929
930 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
931
932         * ModuleBuilder.cs: 
933         - Implement DefineInitializedData in terms of DefineUninitializedData
934         - Name the types of global fields $ArrayType$<len> to cut back on the
935         number of types created
936         - Add argument checking
937
938 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
939
940         * AssemblyBuilder.cs: Implement GetDynamicModule. "Implement" various
941         methods not supported under MS.NET.
942
943 2003-05-18  Martin Baulig  <martin@ximian.com>
944
945         * AssemblyBuilder.cs (corlib_void_type): New internal field.
946         (SetCorlibTypeBuilders): Added overloaded version which takes 4
947         arguments to set the `corlib_void_type'.
948
949         * TypeBuilder.cs: Use `pmodule.assemblyb.corlib_void_type' instead
950         of `typeof (void)' to make this work when compiling corlib.
951
952 Thu May 15 19:16:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
953
954         * MethodBuilder.cs: off by one in CreateMethodBody().
955         * TypeBuilder.cs: if the return type for a method is null, use void.
956
957 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
958
959         * MethodBuilder.cs: Mono allows the parameter position to be zero
960         to indicate the "returns:" attribute.
961
962 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
963
964         * ILGenerator.cs (EmitCall): Implement.
965
966         Flag a few unimplemented methods with MonoTODO, make coding style
967         for method definitions Mono consistent.
968
969 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
970
971         * ILGenerator.cs: Implement EmitWriteLine methods.
972
973         * TypeBuilder.cs (CreateType): Avoid creating a default constructor
974         for the global type.
975
976 2003-04-15  Miguel de Icaza  <miguel@ximian.com>
977
978         * TypeBuilder.cs (DefineDefaultConstructor): Make it generate code
979         by default for a default constructor.  This is what the MS runtime
980         does.  The PythonNet code expected this.
981
982         (TypeBuilder.GetConstructorImpl): Implement this.
983
984         (TypeBuilder.CreateType): If there are no constructors defined, we
985         create one.
986
987 Tue Apr 15 13:50:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
988
989         * ModuleBuilder.cs, TypeBuilder.cs: set nesting_type before
990         calling setup_internal_class ().
991
992 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
993
994         * AssemblyBuilder.cs: Added 'access' member, which is needed by the
995         runtime.
996
997 2003-03-26  Zoltan Varga  <vargaz@freemail.hu>
998
999         * ILGenerator.cs: Implemented ThrowException.
1000
1001 2003-03-10  Zoltan Varga  <vargaz@freemail.hu>
1002
1003         * ILGenerator.cs: Propagate maxstack info along branches.
1004
1005 2003-03-06  Zoltan Varga  <vargaz@freemail.hu>
1006
1007         * ILGenerator.cs (Emit): Do not pop the arguments off the stack for
1008         ldftn etc. Fixes bug #39196.
1009
1010 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
1011
1012         * ILGenerator.cs (Emit): Add fixup for already created methods and
1013         fields. Do not add fixup for types since their table index do not 
1014         change any more.
1015
1016 2003-02-26  Zoltan Varga  <vargaz@freemail.hu>
1017
1018         * TypeBuilder.cs (DefineInitializedData): Removed unnecessary assignments.
1019
1020         * ModuleBuilder.cs (DefineInitializedData): Do not call 
1021         TypeBuilder::DefineInitializedData since that would mean defining a
1022         nested type of the global type, which is wrong. Instead define a
1023         new public type as MS does.
1024
1025         * ModuleBuilder.cs (DefineUninitializedData): Ditto.
1026
1027 Thu Feb 13 18:40:52 CET 2003 Paolo Molaro <lupus@ximian.com>
1028
1029         * ModuleBuilder.cs: add the basic initialization call.
1030
1031 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
1032
1033         * AssemblyBuilder.cs: Added basic error checking to some methods
1034         according to the MSDN docs.
1035
1036 2003-02-10  Zoltan Varga  <vargaz@freemail.hu>
1037
1038         * ConstructorBuilder.cs: 
1039         - Added basic error checking to all methods according to the MSDN docs.
1040         - modified a lot of methods to throw NotSupportedException, to comply
1041           with MS.NET.
1042
1043 2003-02-09  Zoltan Varga  <vargaz@freemail.hu>
1044
1045         * TypeBuilder.cs:
1046         - Added basic error checking to all methods according to the MSDN docs.
1047         - fixed AssemblyQualifiedName.
1048         - implemented 'Size'.
1049         - modified a lot of methods to throw NotSupportedException, to comply
1050           with MS.NET.
1051         - changes tested by running a full bootstrap.
1052
1053 2003-02-09  Martin Baulig  <martin@ximian.com>
1054
1055         * AssemblyBuilder.cs (AssemblyBuilder.methods): Removed.  This was
1056         a hack for the symbol writer which is no longer needed.
1057
1058 2003-02-09  Martin Baulig  <martin@ximian.com>
1059
1060         * IMonoSymbolWriter.cs (DefineNamespace, OpenMethod): New methods.
1061
1062 2003-02-09  Martin Baulig  <martin@ximian.com>
1063
1064         * IMonoSymbolWriter.cs (MarkSequencePoint): New method which takes
1065         just the required arguments as scalars, not arrays.
1066
1067         * ILGenerator.cs (ILGenerator.MarkSequencePoint): Use that new
1068         interface method; unnecessarily creating such a large number of
1069         arrays is both slow and too memory consuming.   
1070
1071 2003-02-08  Zoltan Varga  <vargaz@freemail.hu>
1072
1073         * MethodBuilder.cs: Added error checking to methods so they conform to
1074         MSDN docs. Implemented 'GetModule' and 'CallingConvention' members. 
1075         Some other tweaks to improve compatibility with MS .NET.
1076
1077         * TypeBuilder.cs: Added 'is_created' property which will be used for
1078         checking 'type is already created' errors.
1079
1080 2003-02-07  Martin Baulig  <martin@ximian.com>
1081
1082         * ModuleBuilder.cs (.ctor): Added `bool IsMainModule' argument.
1083         (Save): New internal method; creates the module's symbol file if
1084         we're compiling with debugging information.
1085
1086         * AssemblyBuilder.cs (EmbedResource): Added internal overloaded
1087         version of this method which takes a `byte[] blob' instead of a file.
1088         (DefineDynamicMethod): If this is the first module, tell the
1089         ModuleBuilder that this is the main module.
1090         (Save): Call a new interncall `build_metadata' to create the final
1091         metadata and save all the symbol files before creating the actual
1092         output.
1093
1094         * IMonoSymbolWriter.cs: New public class; it is in the namespace
1095         Mono.CSharp.Debugger.  The Mono symbol writer implements this interface.
1096
1097 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
1098
1099         * AssemblyBuilder.cs: added GetToken (SignatureHelper).
1100
1101         * ILGenerator.cs: implemented EmitCalli() methods
1102
1103         * SignatureHelper.cs: implemented GetMethoSigHelper() methods.
1104
1105 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1106
1107         * MethodBuilder.cs: GetBaseDefinition () returns this.
1108
1109 Mon Jan 27 17:07:38 CET 2003 Paolo Molaro <lupus@ximian.com>
1110
1111         * CustomAttributeBuilder.cs, FieldBuilder.cs: applied
1112         (reformatted) patch from "Jerome Laban" <jlaban@wanadoo.fr>
1113         to fix ByValStr and ByValArray encodings.
1114
1115 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1116
1117         * AssemblyBuilder.cs: fixed compilation with csc.
1118
1119 2003-01-26  Miguel de Icaza  <miguel@ximian.com>
1120
1121         * AssemblyBuilder.cs (Save): Set the executable bit at the end.
1122         This uses a non-official enumeration value to call SetFileAttributes.
1123
1124 2003-01-17  Zoltan Varga  <vargaz@freemail.hu>
1125
1126         * MethodBuilder.cs ConstructorBuilder.cs: modify GetParameters() so it
1127         returns information even when the app did not use DefineParameter() to
1128         define the parameters.
1129
1130         * ConstructorBuilder.cs (ctor): allways define SpecialName attribute
1131         for constructors as done by MS.
1132
1133 Mon Jan 13 11:37:14 CET 2003 Paolo Molaro <lupus@ximian.com>
1134
1135         * TypeBuilder.cs, ModuleBuilder.cs: better type name cache.
1136
1137 2003-01-10  Zoltan Varga  <vargaz@freemail.hu>
1138
1139         * ILGenerator.cs: Implemented EmitWriteLine(string).
1140
1141         * TypeBuilder.cs (DefineInitializedData): Call DefineNestedType() 
1142         instead of DefineType() so the auxiliary types do not pollute the 
1143         global namespace. This is consistent with the behaviour of MS .NET.
1144
1145 Fri Jan 10 16:03:30 CET 2003 Paolo Molaro <lupus@ximian.com>
1146
1147         * ILGenerator.cs, MethodBuilder.cs, TypeBuilder.cs,
1148         ConstructorBuilder.cs: some tweaks to reduce memory usage.
1149
1150 Thu Jan 2 18:46:09 CET 2003 Paolo Molaro <lupus@ximian.com>
1151
1152         * ModuleBuilder.cs, TypeBuilder.cs: support global fields and methods.
1153
1154 Thu Dec 19 00:06:57 CET 2002 Paolo Molaro <lupus@ximian.com>
1155
1156         * AssemblyBuilder.cs: remove duplicated user string entries.
1157
1158 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
1159
1160         * FieldBuilder.cs: added 'handle' field which is needed by some new
1161         code in reflection.c.
1162
1163 2002-12-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1164
1165         * TypeBuilder.cs: implemented GetInterfaceMap () when the Type has been
1166         created.
1167
1168 Fri Nov 8 14:53:03 CET 2002 Paolo Molaro <lupus@ximian.com>
1169
1170         * ILGenerator.cs: account for the exception object being passed to the
1171         catch handler to calc max_stack.
1172
1173 2002-09-21  Martin Baulig  <martin@gnome.org>
1174
1175         * ModuleBuilder.cs (ModuleBuilder.symbol_writer): Make this
1176         field internal, not private.
1177         (ModuleBuilder.SymWriter_DefineLocalVariable): Removed.
1178
1179         * LocalBuilder.cs (LocalBuilder.SetLocalSymInfo): Use the
1180         ISymbolWriter's DefineLocalVariable() method instead of the
1181         IMonoSymbolWriter hack.
1182
1183 Mon Sep 16 19:02:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
1184
1185         * AssemblyBuilder.c: special case some custom attributes.
1186
1187 2002-09-12  Dick Porter  <dick@ximian.com>
1188
1189         * TypeBuilder.cs: Say _which_ Type has already been created
1190
1191 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
1192
1193         * ModuleBuilder.cs (GetTypes): Implement.
1194
1195 Tue Sep 10 12:12:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
1196
1197         * ConstructorBuilder.cs: added a field to hold the handle.
1198
1199 Mon Sep 9 17:31:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
1200
1201         * TypeBuilder.cs: prepare for the real CreateType implementation.
1202
1203 Tue Aug 27 16:57:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
1204
1205         * TypeBuilder.cs: remove duplicate code and fix
1206         named field reading in custom attr.
1207
1208 2002-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1209
1210         * TypeBuilder.cs: UnspecifiedTypeSize is 0.
1211
1212 Wed Aug 14 17:38:41 CEST 2002 Paolo Molaro <lupus@ximian.com>
1213
1214         * TypeBuilder.cs: ReflectedType and CreateType fixes.
1215
1216 Thu Aug 8 10:25:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
1217
1218         * AssemblyBuilder.cs: added API to embed managed resources.
1219
1220 2002-08-03  Martin Baulig  <martin@gnome.org>
1221
1222         * TypeBuilder.cs (TypeBuilder.DeclaringType): Implemented.
1223
1224 Thu Jul 25 13:57:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
1225
1226         * AssemblyBuilder.cs: support linking external resources.
1227
1228 2002-07-19  Martin Baulig  <martin@gnome.org>
1229
1230         * ILGenerator.cs (Emit (OpCode, LocalBuilder)): Throw an exception
1231         when trying to emit a local that was defined in a different ILGenerator.
1232
1233         * LocalBuilder.cs (LocalBuilder): Added `ILGenetator' argument to
1234         the constructor.
1235
1236 Tue Jul 16 19:32:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
1237
1238         * ILGenerator.cs: stack size check fix.
1239
1240 Sat Jul 13 17:30:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
1241
1242         * AssemblyBuilder.cs: add also the enum_type for compiling corlib.
1243         * TypeBuilder.cs: complete IsValueType.
1244
1245 Sat Jul 13 15:08:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
1246
1247         * TypeBuilder.cs: better IsValueType.
1248
1249 2002-07-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1250
1251         * CustomAttributeBuilder.cs: removed compile warning.
1252
1253 Fri Jul 12 11:34:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
1254
1255         * ILGenerator.cs: fixup typebuilder tokens as well.
1256
1257 Tue Jul 9 19:03:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
1258
1259         * TypeBuilder.cs: special case SerializarionAttribute.
1260         Tweaks to get correct code in corlib.
1261
1262 2002-07-06  Miguel de Icaza  <miguel@ximian.com>
1263
1264         * ILGenerator.cs (ILGenerator.Emit): For doubles and floats, swap
1265         the bytes on big endian systems. 
1266
1267 2002-07-03  Martin Baulig  <martin@gnome.org>
1268
1269         * AssemblyBuilder.cs (corlib_object_type, corlib_value_type): Moved
1270         these fields up after the last entry in MonoReflectionAssemblyBuilder
1271         in reflection.h.
1272
1273         * TypeBuilder.cs (IsValueTypeImpl): Use the AssemblyBuilder's
1274         `corlib_value_type' instead of `typeof (System.ValueType)'.
1275         (DefineNestedType): Use the AssemblyBuilder's `corlib_object_type'
1276         instead of `typeof (object)'.
1277
1278 2002-07-02  Martin Baulig  <martin@gnome.org>
1279
1280         * AssemblyBuilder.cs (corlib_object_type, corlib_value_type): New
1281         internal fields.  When compiling corlib, they point to the newly
1282         created System.Object and System.ValueType types.
1283         (SetCorlibTypeBuilders): New public function.  This will be
1284         dynamically called from MCS when compiling corlib.
1285
1286         * TypeBuilder.cs (DefineInitializedData): Use the AssemblyBuilder's
1287         `corlib_value_type' as parent type instead of `typeof (System.ValueType)'
1288         to make it work when compiling corlib.
1289
1290         * ModuleBuilder.cs (assemblyb): Made this field internal, not private.
1291
1292 Tue Jul 2 18:34:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
1293
1294         * TypeBuilder.cs: implemented AssemblyQualifiedName.
1295         * MethodBuilder.cs, ConstructorBuilder.cs: special case custom attr.
1296
1297 Mon Jul 1 16:17:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
1298
1299         * TypeBuilder.cs: implemented AddInterfaceImplementation().
1300
1301 2002-06-28  Martin Baulig  <martin@gnome.org>
1302
1303         * MethodBuilder.cs (GetParameters): Return all parameters, not all
1304         but the last one.
1305
1306 2002-06-27  Martin Baulig  <martin@gnome.org>
1307
1308         * ConstructorBuilder.cs (GetParameters): Implemented.
1309
1310 Mon Jun 17 14:55:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
1311
1312         * ModuleBuilder.cs, TypeBuilder.cs: fixes for nested types handling.
1313
1314 Fri Jun 14 16:21:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
1315
1316         * CustomAttributeBuilder.cs: added custom attribute related internal
1317         helper methods.
1318         * FieldBuilder.cs, ParameterBuilder.cs: handle MarshalAs attribute.
1319         * UnmanagedMarshal.cs: implemented.
1320
1321 Mon Jun 10 18:58:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
1322
1323         * PropertyBuilder.cs: implemented ReflectedType and DeclaringType
1324         properties.
1325
1326 2002-06-07  Martin Baulig  <martin@gnome.org>
1327
1328         * TypeBuilder.cs (TypeBuilder): Added `PackingSize packing_size' and
1329         `int type_size' fields to the constructor.
1330         (DefineNestedType): Pass packing_size and type_size to the constructor.
1331
1332         * ModuleBuilder.cs (DefineType): Pass the packing_size and type_size
1333         fields to the TypeBuilder's constructor.
1334
1335 2002-06-07  Martin Baulig  <martin@gnome.org>
1336
1337         * TypeBuilder.cs (DefineNestedType): There is no overload for this
1338         method which takes 5 args in the specs, removed it.
1339
1340 Fri Jun 7 17:04:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
1341
1342         * AssemblyBuilder.cs: updates for PE/COFF rewrite.
1343
1344 2002-05-30  Martin Baulig  <martin@gnome.org>
1345
1346         * AssemblyBuilder.cs (methods): Made this internal and don't
1347         initialize it.  It will be initialized by the ModuleBuilder's
1348         GetSymbolWriter() method.
1349         (get_next_table_index): Only store the method in the `methods'
1350         array if it's not null.
1351
1352         * ModuleBuilder.cs (GetSymbolWriter): Initialize the AssemblyBuilder's
1353         `methods' field if necessary and pass it as third argument to the
1354         symbol writer's constructor.
1355
1356 2002-05-25  Martin Baulig  <martin@gnome.org>
1357
1358         * TypeBuilder.cs (TypeToken): Implemented.
1359
1360 2002-05-24  Martin Baulig  <martin@gnome.org>
1361
1362         * ModuleBuilder.cs (symwriter_define_local): New private variable.
1363         (GetSymbolWriter): Look for a custom version of "DefineLocalVariable"
1364         and store it in `symwriter_define_local'.
1365         (SymWriter_DefineLocalVariable): New internal method to call the
1366         symbol writer's custom DefineLocalVariable() method.  It is safe to
1367         call this method if there's no symbol writer.
1368
1369         * LocalBuilder.cs (SetLocalSymInfo): Use the MethodBuilder'snew
1370         SymWriter_DefineLocalVariable().
1371
1372         * MethodBuilder.cs (GetParameters): Implemented.
1373
1374 2002-05-22  Martin Baulig  <martin@gnome.org>
1375
1376         * ModuleBuilder.cs (GetSymbolWriter): Pass the this pointer to the
1377         symbol writer's constructor.
1378
1379 2002-05-22  Martin Baulig  <martin@gnome.org>
1380
1381         * AssemblyBuilder.cs (methods): New field.
1382         (get_next_table_index): Record all methods and constructors
1383         (table 0x06) in the `methods' array.  This is read by the
1384         Mono.CSharp.Debugger.MonoSymbolWriter::get_method interncall to
1385         get the MethodBuilder / ConstructorBuilder back from the token.
1386
1387         * *Builder.cs (get_next_table_index): Added `object obj' argument.
1388         (<constructors>): pass the this pointer to get_next_table_index ().
1389
1390 2002-05-20  Martin Baulig  <martin@gnome.org>
1391
1392         * TypeBuilder.cs (DefineField): Call the new `create_internal_class'
1393         interncall after adding the first field.  This is used when creating
1394         enum types to set `klass->enum_basetype'.
1395
1396 Thu May 16 16:09:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
1397
1398         * TypeBuilder.cs: complete special acse support for CharSet, Size and
1399         Pack named args in StructLayout attribute.
1400
1401 Tue May 14 17:13:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
1402
1403         * MethodBuilder.cs: revert change in accessibility of
1404         GetILGenerator(int).
1405
1406 Tue May 14 13:31:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
1407
1408         * FieldBuilder.cs, ParameterBuilder.cs: more special-casing of
1409         attributes.
1410
1411 Fri May 10 20:57:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
1412
1413         * CustomAttributeBuilder.cs: expose internal data for use in
1414         reflection.
1415         * FieldBuilder.cs, TypeBuilder.cs: special case FieldOffset and
1416         StructLayout attributes.
1417
1418 Fri May 10 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
1419
1420         * MethodBuilder.cs, ConstructorBuilder.cs: implemented InitLocals
1421         property.
1422
1423 2002-04-26  Martin Baulig  <martin@gnome.org>
1424
1425         * ModuleBuilder.cs (DefineDocument): Implemented.
1426
1427 Tue Apr 16 13:02:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
1428
1429         * AssemblyBuilder.cs: pad output file to file alignment.
1430         * FieldBuilder.cs: ReflectedType.
1431         * ModuleBuilder.cs: added guid generation and array method creation.
1432         * MonoArrayMethod.cs: array method support code.
1433         
1434 Wed Apr 10 12:57:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
1435
1436         * ILGenerator.cs: use a stack to keep track of exception blocks.
1437
1438 Mon Apr  8 06:19:01  2002 Piers Haken <piersh@friskit.com>
1439
1440         * ILGenerator.cs: added LabelField.label_base to allow for
1441         arbitrary offsets (for switch statement)
1442
1443 Fri Apr 5 15:41:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
1444
1445         * AssemblyBuilder.cs: simpler protocol wih the runtime to
1446         get the assembly data.
1447
1448 Tue Mar 26 20:10:24 CET 2002 Paolo Molaro <lupus@ximian.com>
1449
1450         * AssemblyBuilder.cs: use FileMode.Create.
1451         * ILGenerator.cs: optimize localbuilder related opcodes.
1452         Track parameters to adjust maxstack.
1453         * LocalBuilder.cS: use unsigned for position.
1454
1455 2002-03-23  Miguel de Icaza  <miguel@ximian.com>
1456
1457         * LocalBuilder.cs: Drop the symbol_writer as LocalBuilder fields.
1458         Do this lazily in SetLocalSymInfo.
1459         
1460 2002-03-24  Martin Baulig  <martin@gnome.org>
1461
1462         * ModuleBuilder.cs (GetSymbolWriter): The MonoSymbolWriter's constructor
1463         now takes a `string assembly_filename' argument, pass it our fully
1464         qualified assembly name.
1465
1466 2002-03-24  Nick Drochak  <ndrochak@gol.com>
1467
1468         * ILGenerator.cs: Use #if-#endif instead of if(false){} to disable
1469         code.  This way there is no compiler warning.
1470
1471         * TypeBuilder.cs: Removed the returns that came after the throws.
1472         This removes a few more compiler warnings. Also marked with MonoTODO
1473         all places where we throw NotImplemented exceptions.
1474
1475 2002-03-23  Martin Baulig  <martin@gnome.org>
1476
1477         * SignatureHelper.cs (GetFieldSignatureHelper, GetLocalSignatureHelper):
1478         Implemented.
1479
1480         * LocalBuilder.cs (LocalBuilder): This internal constructor now takes
1481         a ModuleBuilder argument instead of a ISymbolWriter one.
1482         (SetLocalSymInfo): Create and pass type signature to DefineLocalVariable.
1483
1484 2002-03-23  Martin Baulig  <martin@gnome.org>
1485
1486         * ILGenerator.cs (BeginScope, EndScope): Implemented.
1487
1488 2002-03-20  Martin Baulig  <martin@gnome.org>
1489
1490         * ModuleBuilder.cs (GetSymbolWriter): New internal function. Dynamically
1491         loads the default symbol writer, catch all possible exceptions and return
1492         null on failure.
1493         (ModuleBuilder): Added `bool emitSymbolInfo' argument to this internal
1494         constructor; if set, call GetSymbolWriter ().
1495         (GetSymWriter): Implemented.
1496
1497         * LocalBuilder.cs (LocalBuilder): Added ISymbolWriter argument to this
1498         internal method.
1499         (SetLocalSymInfo): Implemented, call ISymbolWriter.DefineLocalVariable ()
1500         if the symbol writer is not null.
1501
1502         * ILGenerator.cs (ILGenerator): Call ModuleBuilder.GetSymWriter () to get
1503         and store the symbol writer.
1504         (DeclareLocal): Pass the symbol writer to LocalBuilder's constructor.
1505         (MarkSequencePoint): Implemented, call ISymbolWriter.DefineSequencePoints ()
1506         if the symbol writer is not null.
1507
1508         * AssemblyBuilder.cs (DefineDynamicModule): Pass the `bool emitSymbolInfo'
1509         to ModuleBuilder's constructor.
1510
1511 Sat Mar 16 19:11:47 CET 2002 Paolo Molaro <lupus@ximian.com>
1512
1513         * ModuleBuilder.cs: handle modified types correctly.
1514
1515 Thu Mar 7 17:10:42 CET 2002 Paolo Molaro <lupus@ximian.com>
1516
1517         * AssemblyBuilder.cs: allow saving bigger assemblies.
1518         * ILGenerator.cs: add fixup table for fields and methods, since
1519         at the end of the compile they may end up with a different table
1520         index.
1521         * ModuleBuilder.cs: add cache for type names to speed up the type
1522         lookups from the compiler.
1523         * TypeBuilder.cs: GetInterfaces () returns only interfaces in the
1524         current type, not in parents (the docs are wrong).
1525
1526 Tue Mar 5 18:09:34 CET 2002 Paolo Molaro <lupus@ximian.com>
1527
1528         * EventBuilder.cs: implemented.
1529         * TypeBuilder.cs: implemented DefineEvent() method and UnderlyingSystemType
1530         property.
1531
1532 Mon Mar 4 20:34:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1533
1534         * ILGenerator.cs: make enough room in the byte array for string
1535         tokens.
1536         * TypeBuilder.cs: fixed GetInterfaces().
1537
1538 Mon Mar 4 11:30:40 CET 2002 Paolo Molaro <lupus@ximian.com>
1539
1540         * TypeBuilder.cs: implemented GetConstructors(), GetFields(),
1541         GetMethods(), GetProperties().
1542
1543 Thu Feb 28 19:15:10 CET 2002 Paolo Molaro <lupus@ximian.com>
1544
1545         * AssemblyBuilder.cs: call into the runtime to init some basic
1546         assembly stuff. Reserve slot 1 of typedef table for .<Module>.
1547         * ModuleBuilder.cs: call into the runtime if we need to create a
1548         modief type, such as arrays, byref etc.
1549         * TypeBuilder.cs: call into the runtime to create the MonoClass
1550         representation for the type. Throw exceptions with not implemented
1551         stuff.
1552
1553 Wed Feb 27 18:48:47 CET 2002 Paolo Molaro <lupus@ximian.com>
1554
1555         * ILGenerator.cs: fix nested exception blocks.
1556
1557 Wed Feb 20 22:30:49 CET 2002 Paolo Molaro <lupus@ximian.com>
1558
1559         * AssemblyBuilder.cs: upped compiled assembly size limit.
1560         Implemented SetCustomAttribute () methods.
1561         * CustomAttributeBuilder.cs: implemented the needed constructor
1562         stuff.
1563         * Cosntructorbuilder.cs, EnumBuilder.cs, FieldBuilder.cs,
1564         MethodBuilder.cs, ModuleBuilder.cs, ParameterBuilder.cs,
1565         PropertyBuilder.cs, TypeBuilder.cs: Implemented SetCustomAttribute () methods.
1566
1567 Wed Feb 20 14:54:01 CET 2002 Paolo Molaro <lupus@ximian.com>
1568
1569         * AssemblyBuilder.cs: add SetCustomAttribute () to keep the compiler
1570         going.
1571
1572 Fri Feb 15 18:15:04 CET 2002 Paolo Molaro <lupus@ximian.com>
1573
1574         * ILGenerator.cs: finally block support and fixes.
1575
1576 Thu Feb 14 18:55:52 CET 2002 Paolo Molaro <lupus@ximian.com>
1577
1578         * FieldBuilder.cs: Add SetRVAData().
1579         * ILGenerator.cs: speed up code array growth.
1580         * TypeBuilder.cs: fix IsValueTypeImpl(). Add class_size member.
1581         Implement DefineInitializedData().
1582
1583 Tue Jan 22 23:01:11 CET 2002 Paolo Molaro <lupus@ximian.com>
1584
1585         * EnumBuilder.cs, TypeBuilder.cs: updates for changes in Type.cs.
1586         * ModuleBuilder.cs: fix lookup of nested types.
1587
1588 Tue Jan 15 22:46:21 CET 2002 Paolo Molaro <lupus@ximian.com>
1589
1590         * ILGenerator.cs: implement some of the exception support methods.
1591
1592 Mon Jan 14 17:07:32 CET 2002 Paolo Molaro <lupus@ximian.com>
1593
1594         * ModulerBuilder.cs: search also for subtypes in GetTypes().
1595         * TypeBuilder.cs: bugfix in FullName. Implemented DefineNestedType().
1596
1597 Fri Jan 11 19:00:29 CET 2002 Paolo Molaro <lupus@ximian.com>
1598
1599         * MethodBuilder.cs, ConstructorBuilder.cs: save parameter info.
1600
1601 Thu Jan 10 21:07:54 CET 2002 Paolo Molaro <lupus@ximian.com>
1602
1603         * ILGenerator.cs: handle type tokens (used for box opcode).
1604
1605 Wed Jan 9 19:37:55 CET 2002 Paolo Molaro <lupus@ximian.com>
1606
1607         * ILGenerator.cs: emit float and doubles.
1608         * ModuleBuilder.cs: off-by-one error fix and GetType()
1609         implementations.
1610         * TypeBuilder.cs: AttributesImpl added.
1611         * UnmanagedMarshal.cs: stubbed out class.
1612
1613 Sat Jan 5 15:59:05 CET 2002 Paolo Molaro <lupus@ximian.com>
1614
1615         * ILGenerator.cs: fix emission of two-bytes opcodes.
1616         Missing slot for locals array. Throw exceptions on unimplemented
1617         methods.
1618         * OpCode.cs: add a comment: the Value property is useless.
1619         * OpCodes.cs: fix name of tail opcode (Tail -> Tailcall).
1620
1621 2002-01-05  Ravi Pratap  <ravi@ximian.com>
1622
1623         * ConstructorBuilder.cs : Use the MonoTODO attribute.
1624
1625         * ILGenerator.cs, Label.cs, MethodBuilder.cs, ModuleBuilder.cs,
1626         ParameterBuilder.cs, TypeBuilder.cs : Ditto.
1627         
1628 Thu Jan 3 23:26:15 CET 2002 Paolo Molaro <lupus@ximian.com>
1629
1630         * ILGenerator.cs: typo fix.
1631
1632 Mon Dec 24 17:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
1633
1634         * TypeBuilder.cs: added DefineMethodOverride().
1635         * MethodBuilder.cs: add override_method member and setter.
1636
1637 Mon Nov 19 13:58:01 CET 2001 Paolo Molaro <lupus@ximian.com>
1638
1639         * AssemblyBuilder.cs: add method to register a string in the "#US"
1640         stream.
1641         * EnumBuilder.cs, SignatureHelper.cs: added stubs.
1642         * ILGenerator.cs: more stuff implemented.
1643         * LocalBuilder.cs: keep track of local var index.
1644
1645 Thu Nov 15 18:11:23 CET 2001 Paolo Molaro <lupus@ximian.com>
1646
1647         * ConstructorBuilder.cs: implement the interesting methods.
1648         * ILGenerator.cs: adapt for use with both a MethodBuilder and a
1649         ConstructorBuilder.
1650         * MethodBuilder.cs: add ImplAttributes.
1651         * ParameterBuilder.cs: adapt for ConstructorBuilder.
1652         * TypeBuilder.cs: add constructors handling.
1653
1654 Wed Nov 14 17:01:45 CET 2001 Paolo Molaro <lupus@ximian.com>
1655
1656         * ConstructorBuilder.cs: added missing stubs and some implementation.
1657         * CustomAttributeBuilder.cs: added.
1658         * EventBuilder.cs: added.
1659         * FieldBuilder.cs: updates.
1660         * MethodBuilder.cs: stuff to implement P/Invoke methods.
1661         * ModuleBuilder.cs: added GetArrayMethod() stub.
1662         * ParameterBuilder.cs, PropertyBuilder.cs: updates.
1663         * TypeBuilder.cs: updates and stubs.
1664
1665 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
1666
1667         * TypeBuilder.cs: Added implementation for TypeHandle.
1668
1669 Tue Nov 6 09:13:45 CET 2001 Paolo Molaro <lupus@ximian.com>
1670
1671         * AssemblyBuilder.cs: define an internal constructor.
1672
1673 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
1674
1675         * AssemblyBuilder.cs: Reformatted.
1676
1677         Added override keywords to those that needed them.
1678
1679         Removed methods that we do not override, but just inherit
1680
1681 Tue Sep 25 16:53:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
1682
1683         * TypeBuilder.cs, ConstructorBuilder.cs, ModuleBuilder.cs: added.