2004-04-25 Nick Drochak <ndrochak@gol.com>
[mono.git] / mono / metadata / ChangeLog
1 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
2
3         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
4           InternalToUpper/InternalToLower.
5         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
6           removed invariant culture shortcut.  This is now done in managed code.
7         * locales.c: (string_invariant_toupper/tolower) removed.
8
9 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10
11         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
12         Added Poll internal call.
13
14         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
15         call for Poll. Select was too heavy for polling a single socket.
16
17         * threadpool.[ch]: added mono_threadpool_cleanup.
18         * threads.c: use it. Don't use Thread_Abort on windows.
19
20 2004-04-23  Martin Baulig  <martin@ximian.com>
21
22         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
23
24 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
25
26         * icall.c: Registred new icalls for key pair protection and added an
27         icall for Environment.GetFolderPath on Windows.
28         * security.c|h: Added new icalls for key pair protection.
29
30 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31
32         * socket-io.c: don't display the non-supported family warning for known
33         families. Now this is not displayed on windows when checking support
34         for IPv4/IPv6.
35
36 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
37
38         * class.c: don't display the layout warning for static fields.
39
40 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
41
42         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
43         * locales.c, locales.h: Added new icalls for culture-specific
44         Char.ToLower and Char.ToUpper.
45
46 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
47
48         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
49         by David Waite.
50
51 2004-04-20  Martin Baulig  <martin@ximian.com>
52
53         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
54         of the type name before passing it to mono_reflection_type_from_name().
55
56 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
57
58         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
59         encodings here. Fixes #56965.
60
61 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
62
63         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
64         fix test on strstr result not that I can see anything that
65         relies on the result.
66
67 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
68
69         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
70         Fixes #57081.
71
72         * marshal.c (mono_marshal_get_string_encoding): New helper function.
73
74         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
75         function to determine which marshalling to use for strings. Fixes
76         #56965.
77
78         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
79
80         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
81
82 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
83
84         * icall.c: #include mono-config.h
85
86 2004-04-15  Jackson Harper  <jackson@ximian.com>
87
88         * culture-info-tables.h: Fix date formats for en-US culture.
89         
90 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
91
92         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
93         ThreadPool.SetMinThreads.
94         * threadpool.c: Implemented ThreadPool.GetMinThreads and
95         ThreadPool.SetMinThreads.
96
97 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
98
99         * mono-config.c: also load the .config file in the directory
100         where the assembly was found.
101
102 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
103
104         * assembly.c: load per-assembly config files.
105         * icall.c: decrapified code to get the config dir and moved to
106         mono-config.c.
107         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
108         per-assembly config files. When doing a dll map lookup give precedence
109         to the per-assembly data.
110
111 2004-04-14  Martin Baulig  <martin@ximian.com>
112
113         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
114         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
115         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
116
117         * mono-debugger-debugger.c: While the debugger is locked, remember
118         whether the symbol tables have changes and send one single
119         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
120
121 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
122
123         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
124
125         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
126         function.
127
128         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
129         account when marshalling string arrays. Fixes #56965.
130
131 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
132
133         * icall.c: Add new icalls mapping for security.
134         * security.c|h: Add internal calls for WindowsIdentity,
135         WindowsImpersonationContext and WindowsPrincipal.
136
137 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
138
139         * class.c: Added comment to ensure the System.MonoDummy class
140         is removed when no longer necessary
141
142 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
143
144         * appdomain.c: Pass arguments to the bootstraping exceptions to
145         minimize JITed methods at boot
146
147         * metadata.c (mono_exception_from_name_two_strings): Allow for the
148         second string to be null.
149
150         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
151         Change the protocol to minimize the JIT methods at startup.  Now
152         it Returns the internal codepage, if the value of "int_code_page"
153         is 1 at entry, and we can not compute a suitable code page
154         number, returns the code page as a string.
155
156 2004-04-13  Jackson Harper  <jackson@ximian.com>
157
158         * culture-info-tables.h: Fix number of decimal digits for all
159         english locales.
160
161 2004-04-13  Jackson Harper  <jackson@ximian.com>
162
163         * icall.c: Clairfy out of sync error message. It is not always
164         your corlib that is out of sync.
165
166 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
167
168         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
169         properties when only the set accessor is overriden. Fixes #55874.
170
171 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
172
173         * assembly.c (mono_assembly_load_references): Make this thread safe.
174         Fixes #56327.
175
176 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
177
178         * monosn.c: Add missing initialization calls.
179
180 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
181
182         * locales.c:
183         ves_icall_System_Globalization_CultureInfo_construct_number_format
184         Fix g_assert so it compiles on fussier compilers re int/ptr
185         mismatch
186
187 2004-04-08  Dick Porter  <dick@ximian.com>
188
189         * socket-io.h:
190         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
191         53992.  Also rearrange the code so that the internal calls return
192         an error value and exceptions are thrown from managed code.
193
194         * icall.c: Add type info to the socket icalls.
195
196 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
197
198         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
199         owes me a beer.
200
201 2004-04-07  Martin Baulig  <martin@ximian.com>
202
203         * class.c (mono_class_from_generic_parameter): Don't default
204         `klass->parent' to `mono_defaults.object_type'.
205
206 2004-04-07  Martin Baulig  <martin@ximian.com>
207
208         * reflection.c (mono_reflection_initialize_generic_parameter): Set
209         `param->pklass->reflection_info'.       
210
211 2004-04-07  Jackson Harper  <jackson@ximian.com>
212
213         * culture-info-tables.h: Fix date separator symbol.
214         
215 2004-04-07  Martin Baulig  <martin@ximian.com>
216
217         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
218         from System.Type to System.MonoType.
219
220 2004-04-07  Martin Baulig  <martin@ximian.com>
221
222         * reflection.h
223         (MonoReflectionGenericParam): Added `has_reference_type' and
224         `has_value_type' fields.
225
226         * reflection.c (mono_image_get_generic_param_info): Encode the
227         correct flags if we have the `class' or `struct' constraint.
228
229 2004-04-07  Martin Baulig  <martin@ximian.com>
230
231         * reflection.h
232         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
233
234 2004-04-07  Jackson Harper  <jackson@ximian.com>
235
236         * appdomain.c: Revert extra patches, just wanted to bump the
237         version number.
238         
239 2004-04-07  Jackson Harper  <jackson@ximian.com>
240
241         * Makefile.am: Add culture-info private headers.
242         * icall.c: Add new icalls for contructing locales.
243         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
244         * locales.h: Declare new culture info construction methods.
245         * object.h: Add new fields used to avoid the CultureMap to
246         MonoCultureInfo.
247         * culture-info.h: Definition of structs used in the culture info
248         tables.
249         * culture-info-tables.h: Autogenerated tables that contain culture
250         info data. This file was generated with the locale-builder tool.
251         * appdomain.c: Incement corlib version number.
252         
253 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
254
255         * appdomain.c: (mono_runtime_init) move mono_thread_init
256         to before mono_object_new calls so critical sections
257         are initialized before use.
258
259 2004-04-07  Martin Baulig  <martin@ximian.com>
260
261         * icall.c
262         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
263         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
264         (ves_icall_MonoGenericParam_initialize): Removed.
265         (monogenericparam_icalls): Removed.
266         (generictypeparambuilder_icalls): Added new table for
267         System.Reflection.Emit.GenericTypeParameterBuilder.
268
269         * reflection.c
270         (mono_reflection_define_generic_parameter): Removed.
271         (mono_reflection_initialize_generic_parameter): This is now called
272         from GenericTypeParameterBuilder's .ctor.
273
274 2004-04-06  Martin Baulig  <martin@ximian.com>
275
276         * class.c (mono_class_init): Don't inflate nested classes in a
277         generic instance.
278         (mono_type_get_name_recurse): Include the generic arguments for
279         generic instances and generic type declarations.
280         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
281         (_mono_class_get_instantiation_name): Removed.
282         (mono_class_create_generic): Always use `gklass->name' as our name.
283
284         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
285
286         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
287         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
288         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
289         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
290         closed generic methods here.
291
292         * reflection.c
293         (mono_reflection_generic_inst_get_nested_types): Removed.
294         (inflate_mono_method): Copy the generic parameters from the
295         MonoMethodHeader into out MonoGenericMethod.
296
297 2004-04-06  Martin Baulig  <martin@ximian.com>
298
299         * row-indexes.h
300         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
301
302         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
303
304         * reflection.c (build_compressed_metadata): If we have any entries
305         in the GenericParam, MethodSpec or GenericParamConstraint tables,
306         set the header version to 1.1.
307
308 >>>>>>> 1.1497
309 2004-04-06  Martin Baulig  <martin@ximian.com>
310
311         * class.c (mono_class_init): If we're a generic instance,
312         initialize our nested classes, too.
313         (_mono_class_get_instantiation_name): Deal with the new `!%d'
314         suffix. 
315
316 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
317
318         * process.c: quote the argument passed to the shell on windows.
319
320 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
321
322         * threads.c (mono_alloc_special_static_data): Allow this to be
323         called during startup.
324
325 2004-04-02  Martin Baulig  <martin@ximian.com>
326
327         * icall.c
328         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
329
330 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
331
332         * icall.c: Fix build.
333
334 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
335
336         * Makefile.am: Added security.c|h.
337         * icall.c: Added icall for get_UserName;
338         * security.c: New file for security related icalls. Added function
339         get_UserName for System.Environment (fix #56144).
340         * security.h: New. Header file for security.c
341
342 2004-04-02  Dick Porter  <dick@ximian.com>
343
344         * icall.c: Deleted the icalls that were obsoleted some time ago
345         by the ICU string code, and which were mixed into the icall
346         rearranging.  Fixes bug 55969.
347
348         * string-icalls.h: 
349         * string-icalls.c: Deleted the code that those icalls reference.
350
351 2004-04-01  Martin Baulig  <martin@ximian.com>
352
353         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
354
355         * class.c (mono_class_from_generic_parameter): Don't set 
356         TYPE_ATTRIBUTE_INTERFACE.
357         (my_mono_class_from_generic_parameter): Likewise.
358
359 2004-04-01  Martin Baulig  <martin@ximian.com>
360
361         * loader.c (find_method): Added an optional `MonoClass *ic'
362         argument to search in a specific interface.
363         (mono_get_method_constrained): New public function.
364
365 2004-04-01  Martin Baulig  <martin@ximian.com>
366
367         * reflection.c (mono_image_get_generic_field_token): Use the
368         `handleref' cache here.
369
370 2004-04-01  Martin Baulig  <martin@ximian.com>
371
372         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
373
374         * reflection.c (create_generic_typespec): Use the `typespec' hash
375         here, not the `typeref' one.    
376
377 2004-04-01  Martin Baulig  <martin@ximian.com>
378
379         * class.c (mono_class_inflate_generic_type): Moved the
380         functionality into a new static inflate_generic_type() which
381         returns NULL if it didn't do anything.  Only increment the
382         `mono_stats.inflated_type_count' if we actually inflated
383         something.
384         (mono_class_get_full): Check the classes type to see whether we
385         need to inflate it; also inflate MONO_TYPE_(M)VAR.
386
387 2004-04-01  Jackson Harper  <jackson@ximian.com>
388
389         * reflection.c: Set culture for assembly references.
390         
391 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
392
393         * reflection.[ch], icall.[ch], Fix support for pinning variables.
394
395 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
396
397         * assembly.c:
398         (do_mono_assembly_open): the critical section also covers
399         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
400
401 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
402
403         * threads.c:
404         (mono_manage_threads): abort the background threads when finishing.
405         Fixes bug #47232.
406
407 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
408
409         * gc.c: only close the done_event handle if there was no timeout.
410         C-ified comments.
411
412 2004-03-30  Martin Baulig  <martin@ximian.com>
413
414         * icall.c (icall_entries): It's called "System.Activator", not
415         "System.Activation".    
416
417 2004-03-30  Martin Baulig  <martin@ximian.com>
418
419         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
420         (mono_class_create_from_typespec): Likewise.
421
422 2004-03-30  Martin Baulig  <martin@ximian.com>
423
424         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
425         `has_ctor_constraint' and `initialized'.
426
427 2004-03-30  Martin Baulig  <martin@ximian.com>
428
429         * reflection.c (encode_new_constraint): New static function to add
430         the constructor constraint attribute to a type parameter.
431         (encode_constraints): Call encode_new_constraint() if necessary.
432
433         * reflection.h
434         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
435
436         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
437         
438 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
439
440         * reflection.c, icall.c: add support for pinning variables. 
441
442 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
443
444         * marshal.c (mono_marshal_get_managed_wrapper):
445         init bool local with zero rather than null.
446
447 2004-03-29  Martin Baulig  <martin@ximian.com>
448
449         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
450         the "official" behavior here.
451         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
452
453 2004-03-29  Martin Baulig  <martin@ximian.com>
454
455         * icall.c: Reflect latest API changes.
456
457 2004-03-29  Martin Baulig  <martin@ximian.com>
458
459         * loader.c (mono_get_method_from_token): Also call
460         mono_metadata_load_generic_params () for abstract and interface
461         methods; replace the type arguments in the method signature with
462         the ones which are loaded from the metadata.
463
464 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
465
466         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
467         of the lock is not the current thread. MS.NET don't do it, in spite of
468         what the documentation says. See bug #56157.
469
470 2004-03-28  Martin Baulig  <martin@ximian.com>
471
472         * class.c (mono_class_init): Don't call init_properties() and
473         init_events() for generic instances; set `prop->parent' when
474         inflating properties.
475
476         * reflection.c (mono_generic_inst_get_object): Call
477         `mono_class_init (ginst->klass)'.
478         (mono_type_get_object): Only create a MonoGenericInst if your
479         generic type is a TypeBuilder.
480         (do_mono_reflection_bind_generic_parameters): Only set
481         `ginst->is_dynamic' if our generic type is a TypeBuilder.
482
483 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
484
485         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
486         Fixes #56091.
487
488 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
489
490         * icall.c: added Kill_internal icall.
491         * process.[ch]: added Kill_internal icall.
492
493 2004-03-25  Martin Baulig  <martin@ximian.com>
494
495         * class.h (MonoStats): Added `generic_instance_count',
496         `inflated_method_count', `inflated_type_count' and
497         `generics_metadata_size'.       
498
499 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
500
501         * reflection.c: no warnings now.
502
503 2004-03-25  Martin Baulig  <martin@ximian.com>
504
505         * class.c (mono_class_get_full): New public function; does a
506         mono_class_get(), but also takes a `MonoGenericContext *'.
507
508         * loader.c (mono_field_from_memberref): Renamed to
509         `field_from_memberref', made static and added `MonoGenericContext *'
510         argument.
511         (mono_field_from_token): Added `MonoGenericInst *' argument.
512         (method_from_memberef): Likewise.
513         (mono_get_method_from_token): Likewise.
514         (mono_get_method_full): New public function; does a
515         mono_get_method(), but also takes a `MonoGenericContext *'.
516
517         * verify.c (mono_method_verify): Get the method's generic context
518         and pass it to mono_field_from_token(), mono_get_method_full() and
519         mono_class_get_full().
520
521 2004-03-25  Martin Baulig  <martin@ximian.com>
522
523         * class.c (mono_class_inflate_generic_type): Take a
524         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
525         `MonoGenericMethod *'.
526
527 2004-03-25  Martin Baulig  <martin@ximian.com>
528
529         * loader.h (MonoMethodInflated): Store the MonoGenericContext
530         instead of the MonoGenericMethod here.
531
532 2004-03-25  Martin Baulig  <martin@ximian.com>
533
534         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
535         each time we create a new MonoGenericInst, we also create a new
536         context which points back to us.
537
538         * class.c (inflate_method): Use `ginst->context' instead of
539         creating a new context.
540
541         * loader.c (method_from_memberref): Use
542         `klass->generic_inst->context' instead of creating a new context.
543
544 2004-03-25  Martin Baulig  <martin@ximian.com>
545
546         * class.h (MonoGenericContext): New struct.
547         (MonoGenericMethod): Removed `generic_inst'.
548
549         * class.c (mono_class_inflate_generic_method): Take a
550         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
551
552 2004-03-25  Martin Baulig  <martin@ximian.com>
553
554         * loader.h (MonoMethodInflated): New typedef.
555
556         * metadata.h (MonoMethodSignature): Removed `gen_method', make
557         `generic_param_count' consume just 30 bits, added `is_inflated'
558         and `has_type_parameters' flags (one bit each).
559
560         * class.c (mono_class_inflate_generic_method): Create a
561         MonoMethodInflated instead of a MonoMethodNormal and set
562         `is_inflated' in the method signature.
563
564         * class.h (MonoGenericMethod): Removed `generic_method'.
565
566 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
567
568         * image.c: Make sure the name of a MonoImage is always an absolute path.
569           This fixes bug #54415.
570
571 2004-03-24  Martin Baulig  <martin@ximian.com>
572
573         * class.c (mono_class_setup_vtable): If we're a generic instance,
574         use our generic type's vtable size.
575
576 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
577
578         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
579         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
580         problems.
581
582 2004-03-23  Martin Baulig  <martin@ximian.com>
583
584         * class.h (MonoDynamicGenericInst): Added `int count_events' and
585         `MonoEvent *events'.
586
587         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
588         (typebuilder_icalls): Added "get_event_info"; calls
589         mono_reflection_event_builder_get_event_info(). 
590
591         * reflection.c (mono_reflection_generic_inst_initialize): Added
592         `MonoArray *events'.
593         (mono_reflection_event_builder_get_event_info): New function.
594
595 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
596
597         * object.h: add mono_type_initialization_init
598
599         * object.c (mono_runtime_class_init): 
600         implement class constructor synchronization rules
601         to cope with threading issues.  
602         add mono_type_initialization_init
603
604         * appdomain.c (mono_runtime_init): call 
605         mono_type_initialization_init
606
607         * class.h: removing initializing field from MonoVTable
608
609 2004-03-23  Martin Baulig  <martin@ximian.com>
610
611         * class.c (my_mono_class_from_generic_parameter): Use
612         `param->name' if it's not NULL. 
613
614 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
615
616         * class.c: do not insert non-virtual methods in the vtable.
617         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
618         that means the method is non-virtual. This never would have
619         happened before.
620
621 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
622
623         * profiler.c: Added lock for accessing coverage_hash.
624
625 2004-03-22  Martin Baulig  <martin@ximian.com>
626
627         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
628         `method->method->signature->generic_param_count != 0' to make it
629         work for interface methods.
630
631 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
632
633         * process.c: quote the string passed to the shell using g_shell_quote.
634
635 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
636
637         * threads.c:
638         (mono_threads_manage): don't remove the finalizer thread and self
639         from the threads hash table so that mono_thread_manage can be called
640         more than once.
641
642 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
643
644         * process.c: quote the arguments when UseShellExecute is true. Fixes
645         bug #55790.
646
647 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
648
649         * threads.c: set mono_thread_detach as a cleanup routine for every
650         thread. This way it's always executed upon thread termination, either
651         aborted or finished normally. No more xsp hangs!
652
653 2004-03-17  Martin Baulig  <martin@ximian.com>
654
655         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
656         `int count_nested' and a `MonoType **nested'.
657
658         * reflection.c (mono_reflection_bind_generic_parameters): Moved
659         most of the functionality into a new static
660         do_mono_reflection_bind_generic_parameters() and don't take a
661         `MonoType *nested_in' argument any more.  Don't compute nested
662         types here.
663         (mono_reflection_generic_inst_get_nested_types): New public method
664         to get nested types.
665
666         * class.c (mono_class_create_generic): Set `klass->nested_in' if
667         we're a nested class.
668
669         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
670         mono_reflection_generic_inst_get_nested_types() to compute the
671         nested types.
672
673 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
674
675         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
676         descriptive error message under windows.
677         
678 2004-03-17  Martin Baulig  <martin@ximian.com>
679
680         * class.c (dup_type): Added `const MonoType *original' argument;
681         copy the attrs from the original type.
682
683 2004-03-17  Martin Baulig  <martin@ximian.com>
684
685         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
686         `m->generic_inst_cache' here.
687
688 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
689
690         * exception.h exception.c: Add stack_overflow_exception.
691
692 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
693
694         * threadpool.c:
695         (overlapped_callback): call SetEvent *after* invoking the callback.
696         No need to call CloseHandle.
697
698 2004-03-16  Martin Baulig  <martin@ximian.com>
699
700         * reflection.c (mono_image_get_fieldref_token): Take a
701         `MonoReflectionField *' instead of a `MonoClassField *' and a
702         `MonoClass *'; store the `MonoReflectionField *' in the hash.
703
704 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
705
706         * appdomain.c: don't add the culture to the filename we're looking for
707         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
708
709 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
710
711         * locales.c: don't ignore symbols when doing case insensitive compares.
712         Thanks Dick! Fixes bug #54046.
713
714         * threads.c: surround 'threads' usage with enter/leave in
715         mono_thread_manage.
716
717 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
718
719         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
720         implicitly marshalled as [Out]. Fixes #55450.
721
722         (mono_marshal_get_runtime_invoke): Zero out the result if there is
723         an exception.
724
725 2004-03-16  Martin Baulig  <martin@ximian.com>
726
727         * class.c (mono_class_from_generic_parameter): Use the actual
728         parameter name. 
729
730 2004-03-16  Martin Baulig  <martin@ximian.com>
731
732         * reflection.c (type_get_signature_size): New static function.
733         Compues the size of the type in a method signature.
734         (method_get_signature_size): New static function; calls
735         type_get_signature_size() to compute the actual size of the
736         method's signature.
737         (method_encode_signature): Use method_get_signature_size() to get
738         the signature's size rather than using `nparams * 10'.
739
740 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
741
742         * file-io.h: define here WapiOverlapped on windows. I don't want the
743         regular OVERLAPPED one.
744
745         * file-io.c:
746         * threadpool.c: somehow, BindIoCompletionCallback is not found.
747         Disabling AIO on windows.
748
749 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
750
751         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
752         bug #55385.
753
754 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
755
756         * appdomain.c: upgraded corlib version.
757
758         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
759         and BeginWrite. Allow opening files for asynchrnous operations.
760
761         * file-io.h: new struct that maps FileStreamAsyncResult.
762         * icall.c: added new icalls.
763         * process.[ch]: support setting child process environment variables
764         and use the SHELL or COMSPEC when UseShellExecute is true.
765
766         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
767         callback for async. IO is here and also BindHandle.
768
769         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
770         from here.
771
772 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
773
774         * reflection.c (create_custom_attr): Allow len == 0.
775
776         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
777         computation on big-endian machines.
778
779 2004-03-13  Martin Baulig  <martin@ximian.com>
780
781         * class.h (MonoGenericInst): Added `int count_ifaces'.
782
783         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
784         `ginst->count_ifaces' instead `klass->interface_count' since we
785         may get called before the vtable is created.
786
787         * loader.c (mono_method_get_param_names): If we're a generic
788         instance, return and don't initialize the class.
789
790         * reflection.c (mono_reflection_setup_generic_class): Don't call
791         ensure_runtime_vtable().
792         (mono_reflection_bind_generic_parameters): Set
793         `ginst->count_ifaces'.
794
795 2004-03-11  Jackson Harper <jackson@ximian.com>
796
797         * icall.c:
798         * unicode.c:
799         * unicode.h: Remove unused System.Char icalls.
800         
801 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
802
803         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
804         code when we P/Invoke the first library in Windows.Forms, instead
805         of when we first open the assembly.
806
807         * assembly.c: Drop the lookup from here.
808
809 2004-03-10  Martin Baulig  <martin@ximian.com>
810
811         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
812         class for properties, fields and events.  Finally fixes #54945.
813
814 2004-03-10  Martin Baulig  <martin@ximian.com>
815
816         * metadata.c (mono_metadata_class_equal): New static function;
817         checks whether two generic instances or two generic parameters are
818         equal.
819         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
820         compare classes.        
821
822 2004-03-10  Martin Baulig  <martin@ximian.com>
823
824         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
825
826         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
827         argument and write it into the `reflection_info' field.
828
829         * icall.c
830         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
831         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
832
833 2004-03-09  Jackson Harper  <jackson@ximian.com>
834
835         * char-conversions.h: use 8 bits for numeric data its all we need
836         * icall.c: numeric data is only 8 bits now.
837
838 2004-03-09  Martin Baulig  <martin@ximian.com>
839
840         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
841
842         * class.c (init_properties, init_events): Initialize the new
843         `parent' field.
844
845         * reflection.c (typebuilder_setup_properties): Likewise.
846         (typebuilder_setup_events): Likewise.
847
848         * reflection.h (MonoEventInfo): Replaced `parent with
849         `declaring_type' and `reflected_type'.
850
851         * icall.c (ves_icall_get_property_info): Distinguish between
852         declaring and reflected type.
853         (ves_icall_get_event_info): Likewise.
854
855 2004-03-09  Martin Baulig  <martin@ximian.com>
856
857         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
858         (ves_icall_Type_GetField): Correctly set field->klass.
859
860 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
861
862         * loader.h: Fix warning.
863
864 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
865
866         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
867         library routine if present.  Notice that it will still continue
868         executing even if its missing, for those working on the Gtk#
869         edition of Windows.Forms.
870
871         * assembly.c (do_mono_assembly_open): If loading the
872         System.Windows.Forms call mono_loader_wini_init.
873
874 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
875
876         * class.h: Added MonoRemoteClass struct.
877         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
878         function for MonoStrings.
879         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
880         Added internal call for getting the proxy type.
881         * marshal.c: Get the type of transparent proxies from its remote_class.
882         Added methods that generate the IL for type checks and casts:
883         mono_marshal_get_isinst, mono_marshal_get_castclass, 
884         mono_marshal_get_proxy_cancast.
885         * marshal.h: Declaration of the previous new methods.
886         * object.c: Added new moethods for creating and updating MonoRemoteClass
887         instances: mono_remote_class, mono_upgrade_remote_class, 
888         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
889         * verify.c: FIx transparent_proxy_fields layout.
890         * appdomain.c: Bump corlib version.
891
892 2004-03-04  Jackson Harper  <jackson@ximian.com>
893
894         * icall.c: Add icall to access char conversion tables.
895         * char-conversions.h: Character conversion tables.
896         * Makefile.am: Add char-conversions.h private header file.
897         
898 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
899
900         * appdomain.c (unload_thread_main): Increase unloading timeout to
901         10 sec as a temporary workaround for Nant problems.
902
903 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
904
905         * gc.c: Add checks for GC_enable and GC_disable.
906
907         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
908         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
909         (bug #54988).
910         
911 2004-02-27  Martin Baulig  <martin@ximian.com>
912
913         * reflection.c (mono_reflection_bind_generic_parameters): Take a
914         `MonoReflectionType *' instead of a `MonoType *'.
915
916 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
917
918         * gc.c (run_finalize): Avoid finalizing the object representing the
919         finalizer thread.
920         (finalizer_thread): Fix warning.
921
922 2004-02-25  Martin Baulig  <martin@ximian.com>
923
924         * class.c (_mono_class_get_instantiation_name): Added `int offset'
925         argument for nested types.
926         (mono_class_create_generic): Added support for nested generictypes.
927
928         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
929         `GList *nested'.
930
931         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
932
933         * reflection.c (method_encode_signature): Increase the minimum
934         value of `size' from 10 to 11.
935         (mono_reflection_bind_generic_parameters): Take `int type_argc'
936         and `MonoType **types' arguments instead of the `MonoArray
937         *types'; added `MonoType *nested_in'.  Recursively instantiate
938         nested classes. 
939
940 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
941
942         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
943         stack_overflow_ex members which are used by exception handling.
944
945         * appdomain.c (mono_runtime_init): Initialize the new members.
946
947         * gc.c (mono_gc_enable): New helper function.
948         * gc.c (mono_gc_disable): New helper function.
949
950 2004-02-23  Martin Baulig  <martin@ximian.com>
951
952         * icall.c: I must have been really stupid - make it actually work
953         this time ;-)
954
955 2004-02-23  Martin Baulig  <martin@ximian.com>
956
957         * loader.c (method_from_memberref): Only inflate the method if
958         it's in another klass.
959
960 2004-02-23  Martin Baulig  <martin@ximian.com>
961
962         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
963         (mono_class_init): If we're a generic instance and an interface,
964         compute `class->interface_id'; also create `class->interfaces'
965         here and inflate them.
966
967         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
968         `ginst->is_open'.
969         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
970
971         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
972
973 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
974
975         * reflection.c (method_encode_code): Improved the error message
976         generated by the exception.
977
978 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
979
980         * icall.c: Martin did not do what he said in the ChangeLog for
981         2004-02-18, but put back the changes for properties and events.
982         Commenting those changes out again and adding comment to bug #54518.
983         
984         * process.c: removed warning.
985
986 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
987
988         * marshal.c (emit_struct_conv): Print an error message instead of
989         asserting when a type does not have the StructLayout attribute.
990
991 2004-02-20  Martin Baulig  <martin@ximian.com>
992
993         * reflection.c (mono_type_get_object): Also use the cache for
994         generic instances.
995         (mono_reflection_bind_generic_parameters): Always compute
996         `ginst->ifaces'.        
997
998 2004-02-20  Martin Baulig  <martin@ximian.com>
999
1000         * class.h (MonoGenericMethod): Removed `klass'.
1001
1002         * class.c (mono_class_inflate_generic_method): Added `MonoClass
1003         *klass' argument.
1004
1005 2004-02-20  Martin Baulig  <martin@ximian.com>
1006
1007         * reflection.c (method_encode_methodspec): Actually use the
1008         uninflated signature for the memberref.
1009
1010 2004-02-20  Martin Baulig  <martin@ximian.com>
1011
1012         * class.h (MonoGenericMethod): Removed `declaring'.
1013
1014         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
1015         is NULL, compute it here.
1016
1017 2004-02-20  Martin Baulig  <martin@ximian.com>
1018
1019         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
1020
1021         * metadata.c (mono_metadata_generic_inst_hash): New method.
1022         (mono_metadata_generic_inst_equal): New method.
1023
1024         * reflection.c (mono_reflection_bind_generic_parameters): Use the
1025         `klass->image->generic_inst_cache' cache to avoid creating
1026         duplicate MonoGenericInst's.
1027
1028         * class.c (mono_class_inflate_generic_type): Use the cache.
1029
1030 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1031
1032         * object.c: fixed gc descriptor calculation for embedded valuetypes.
1033
1034 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1035
1036         * icall.c: added Socket.WSAIoctl icall.
1037
1038         * socket-io.[ch]: implemented
1039         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
1040
1041 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
1042
1043         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
1044
1045 2004-02-18  Urs C Muff  <umuff@quark.com>
1046
1047         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
1048         this work on PPC and other big-endian architectures.
1049
1050         * debug-mono-symfile.h: Prepended the names of all the `guint32'
1051         fields with an underscore to make sure they're only accessed by
1052         the read32() macro.
1053
1054 2004-02-18  Martin Baulig  <martin@ximian.com>
1055
1056         * icall.c: Put the klass->refclass changes back for methods and
1057         fields, but not for properties and events.  We're currently not
1058         distinguishing between DeclaringType and ReflectedType for
1059         properties and events, that's what caused the regressions.
1060
1061 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1062
1063         * object.c:
1064         (mono_async_result_new): the handle can be NULL.
1065
1066         * threadpool.c: Use an event instead of a semaphore, don't initialize
1067         it until needed. This saves quite a few semaphores from being created
1068         when using the threadpool.
1069
1070 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
1071
1072         * object.c (mono_string_is_interned_lookup): Fix interning of long
1073         strings. Fixes #54473.
1074
1075         * domain.c (ldstr_equal): Optimize if the two strings are equal.
1076
1077         * icall.c: Revert the klass->refclass changes since they introduce
1078         regressions (bug #54518).
1079
1080 2004-02-18  Martin Baulig  <martin@ximian.com>
1081
1082         * class.c (mono_class_init): If we're a generic instance and don't
1083         come from a TypeBuilder, inflate our members here.
1084         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
1085         (mono_class_create_generic): New public method.
1086         (mono_class_initialize_generic): Removed.
1087         (get_instantiation_name): Renamed to
1088         _mono_class_get_instantiation_name() and made it public.
1089
1090 2004-02-18  Martin Baulig  <martin@ximian.com>
1091
1092         * class.c (mono_class_inflate_generic_type): Clear the new
1093         instance's `nginst->klass' when inflating a generic instance.
1094         (mono_class_is_subclass_of): Added (basic) support for generic
1095         instances.
1096
1097 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
1098
1099         * appdomain.h, domain.c: use a MonoCodeManager instead of a
1100         MonoMempool to hold compiled native code.
1101
1102 2004-02-17  Martin Baulig  <martin@ximian.com>
1103
1104         * class.h (MonoDynamicGenericInst): Added `count_properties' and
1105         `properties'.
1106
1107         * reflection.c (mono_reflection_generic_inst_initialize): Added
1108         `MonoArray *properties' argument.
1109
1110         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
1111
1112 2004-02-17  Martin Baulig  <martin@ximian.com>
1113
1114         * icall.c (ves_icall_Type_GetFields): Renamed to
1115         ves_icall_Type_GetFields_internal() and added a
1116         `MonoReflectionType *rtype' argument; pass it to
1117         mono_field_get_object() to set the field's "reflected" type.
1118         (ves_icall_Type_GetConstructors): Likewise.
1119         (ves_icall_Type_GetEvents): Likewise.
1120         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
1121         argument; pass it to mono_method_get_object() to set the method's
1122         "reflected" type.       
1123
1124 2004-02-17  Martin Baulig  <martin@ximian.com>
1125
1126         * class.h (MonoDynamicGenericInst): New type.
1127         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
1128
1129         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
1130         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
1131         (ves_icall_MonoGenericInst_GetFields): New interncall.
1132
1133         * class.c (mono_class_from_generic): Don't call
1134         mono_class_initialize_generic() if this is a dynamic instance;
1135         ie. it's being created from a TypeBuilder.
1136         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
1137         `class->byval_arg.type'.
1138
1139         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
1140         to `inflate_method' and made static.
1141         (mono_reflection_inflate_field): Removed.
1142         (mono_reflection_generic_inst_initialize): New public method.
1143
1144         * reflection.h (MonoReflectionGenericInst): Removed `methods',
1145         `ctors' and `fields'; added `initialized'.
1146
1147 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
1148
1149         * debug-helpers.c (mono_method_full_name): Fix output for empty
1150         namespaces.
1151
1152 2004-02-12  Martin Baulig  <martin@ximian.com>
1153
1154         * class.h (MonoClassField): Added `MonoType *generic_type'.
1155
1156         * reflection.c (mono_image_get_fieldref_token): Added support for
1157         instantiated generic types.
1158         (field_encode_inflated_field): Removed.
1159         (mono_image_get_inflated_field_token): Removed.
1160         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
1161
1162         * reflection.h (MonoReflectionInflatedField): Removed.
1163
1164 2004-02-12  Martin Baulig  <martin@ximian.com>
1165
1166         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
1167         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
1168
1169         * reflection.c (mono_image_get_methodspec_token): Take a
1170         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
1171         (mono_image_create_token): Check whether we have a
1172         `method->signature->gen_method' and call
1173         mono_image_get_methodspec_token() if appropriate.
1174         (inflated_method_get_object): Removed.
1175         (mono_reflection_bind_generic_method_parameters): Return a
1176         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
1177         (mono_reflection_inflate_method_or_ctor): Likewise.
1178
1179         * reflection.h (MonoReflectionInflatedMethod): Removed.
1180
1181 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
1182
1183         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
1184         for custom valuetype marshalling.
1185
1186         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
1187
1188 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1189
1190         * icall.c: fixed WSAGetLastError_internal name.
1191
1192 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
1193
1194         * threads.c (mono_thread_attach): Allow this to be called multiple
1195         times for a thread.
1196         
1197         * threads.c (build_wait_tids): Do not wait for ourselves.
1198
1199         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
1200         appdomain list is empty.
1201
1202         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
1203         memory returned by mono_string_builder_to_utf16, since it points into
1204         managed memory. Thanks to Bernie Solomon for noticing this.
1205
1206         * icall.c: Add AppDomainSetup icalls.
1207
1208         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
1209
1210         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
1211         types.
1212
1213         * reflection.c (reflection_methodbuilder_to_mono_method): Save
1214         custom attributes to the method_aux struct. Also fix array indexes etc.
1215
1216         * loader.c (mono_method_get_param_names): Make dynamic case work again.
1217         
1218 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
1219
1220         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
1221         (both static and runtime) and reduce startup time.
1222
1223 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
1224
1225         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
1226         AsAny marshalling conversion instead of crashing.
1227
1228         * marshal.c: Fix warnings.
1229
1230 2004-02-09  Martin Baulig  <martin@ximian.com>
1231
1232         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
1233
1234         * reflection.h (MonoReflectionInflatedMethod): Removed the
1235         `declaring' field, it's now in the unmanaged MonoGenericMethod.
1236
1237         * reflection.c (method_encode_methodspec): Removed the `method'
1238         argument; we get it from `gmethod->declaring'.
1239         (inflated_method_get_object): Removed the `declaring' argument.
1240
1241 2004-02-09  Martin Baulig  <martin@ximian.com>
1242
1243         * class.h (MonoGenericMethod): New type.
1244         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
1245         `generic_method'.
1246
1247         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
1248         a `MonoGenericMethod *gen_method' one.
1249
1250         * class.c (mono_class_inflate_generic_type): Take an additional
1251         `MonoGenericMethod * argument.  This is only non-NULL if we're
1252         inflating types for a generic method.   
1253         (mono_class_inflate_generic_signature): Renamed to
1254         inflate_generic_signature() and made static; take a
1255         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1256         (inflate_generic_header): Take a `MonoGenericMethod *' argument
1257         instead of a `MonoGenericInst *' one.
1258         (mono_class_inflate_generic_method): Likewise.
1259
1260         * reflection.c (encode_generic_method_sig): Take a
1261         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1262         (method_encode_methodspec): Likewise.
1263         (inflated_method_get_object): Likewise. 
1264
1265         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
1266         field with a `MonoGenericMethod *gmethod' one.  
1267
1268 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
1269
1270         * class.h (mono_class_has_parent): add parens to expansion
1271         so you can ! this.
1272
1273 2004-02-08  Martin Baulig  <martin@ximian.com>
1274
1275         * image.h (MonoImage): Removed `generics_cache'.
1276
1277         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
1278         instead of a `MonoType *' argument; removed the `inflate_methods'
1279         argument.  Don't inflate methods here.
1280
1281         * loader.c (find_method): If it's a generic instance, call
1282         mono_class_init() on the `sclass->generic_inst->generic_type'.
1283
1284         * metadata.c (mono_type_size): Make this work on uninitialized
1285         generic instances; call it on the `ginst->generic_type's class.
1286
1287         * reflection.c (mono_reflection_bind_generic_parameters): Call
1288         mono_class_from_generic() to create the `ginst->klass'.
1289
1290 2004-02-08  Martin Baulig  <martin@ximian.com>
1291
1292         * class.h (MonoClass): Changed type of `generic_inst' from
1293         `MonoType *' to `MonoGenericInst *'.
1294
1295 2004-02-08  Martin Baulig  <martin@ximian.com>
1296
1297         * icall.c (ves_icall_Type_BindGenericParameters): Just call
1298         mono_type_get_object(), this is now creating a `MonoGenericInst'
1299         for MONO_TYPE_GENERICINST.
1300         (ves_icall_MonoGenericInst_GetParentType): Likewise.
1301         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
1302
1303         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
1304         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
1305         (inflated_method_get_object): Added `MonoClass *refclass' argument.
1306         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
1307         and reflected type.
1308
1309         * reflection.h (MonoReflectionInflatedMethod): Removed
1310         `declaring_type' and `reflected_type'.
1311
1312 2004-02-08  Martin Baulig  <martin@ximian.com>
1313
1314         * class.h (MonoGenericInst): Added `MonoType *parent' and
1315         `MonoType **ifaces'.
1316
1317         * reflection.h (MonoReflectionGenericInst): Removed `klass',
1318         `parent' and `interfaces'.
1319
1320         * reflection.c (mono_reflection_bind_generic_parameters): Take a
1321         `MonoType *' argument and return a `MonoType *'.
1322
1323         * icall.c
1324         (ves_icall_MonoGenericInst_GetParentType): New interncall.
1325         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
1326
1327 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
1328
1329         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
1330         valuetype marshalling.
1331
1332 2004-02-06  Martin Baulig  <martin@ximian.com>
1333
1334         * class.c
1335         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
1336         (my_mono_class_from_generic_parameter): Likewise.
1337
1338 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
1339
1340         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
1341         contents of the symbol files lazily.
1342
1343         * object.h (MonoThread): Add 'name' and 'name_len' fields.
1344
1345         * threads.h threads.c icall.c: New icalls for getting and setting the
1346         threads name.
1347
1348 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
1349
1350         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
1351         Raise an exception when the domain is not found.
1352
1353 2004-02-03  Martin Baulig  <martin@ximian.com>
1354
1355         * reflection.c (mono_image_get_methodspec_token): Use the
1356         uninflated signature; fixes gen-33.
1357
1358 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
1359
1360         * gc.c threads.c: Make the finalizer thread a normal managed thread so
1361         the finalizer code can use thread functionality.
1362
1363         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
1364         the finalizer thread.
1365
1366         * threads.c: Make some functions more robust.
1367
1368         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
1369
1370         * metadata.h: Add new marshalling conventions.
1371
1372         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
1373         stringbuilder marshalling. Fixes #53700.
1374
1375         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
1376
1377         * reflection.c (mono_image_get_type_info): Save declarative security
1378         info.
1379
1380         * reflection.c (mono_image_get_field_info): Handle uninitialized 
1381         unmanaged fields as well.
1382
1383         * appdomain.c: Bump corlib version.
1384
1385 2004-02-01  Martin Baulig  <martin@ximian.com>
1386
1387         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
1388         method type arguments.  
1389
1390 2004-01-30  Duncan Mak  <duncan@ximian.com>
1391
1392         * marshal.h: Add prototype for
1393         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
1394         and
1395         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
1396         fix the build.
1397
1398 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
1399
1400         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
1401         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
1402
1403 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
1404
1405         * marshal.c (mono_marshal_get_native_wrapper): Add support for
1406         custom marshalling of valuetypes.
1407
1408         * marshal.c: Fix some warnings.
1409
1410 2004-01-29  Martin Baulig  <martin@ximian.com>
1411
1412         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
1413         for generic method parameters.
1414
1415         * reflection.c (method_encode_methodspec): Write the uninflated
1416         signature into the methodspec table.
1417         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
1418         is always the uninflated method.
1419         (reflection_methodbuilder_to_mono_method): Copy the generic
1420         parameters from the MethodBuilder into `header->gen_params'.
1421
1422 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
1423
1424         * class.c (mono_class_from_generic_parameter): Fix warning.
1425
1426 2004-01-27  Martin Baulig  <martin@ximian.com>
1427
1428         * class.c (mono_class_from_generic_parameter): Don't create
1429         `klass->methods' here.  
1430
1431 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
1432
1433         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
1434         extension since it does not work with libraries named lib<FOO>.dll.so.
1435
1436 2004-01-25  Martin Baulig  <martin@ximian.com>
1437
1438         * class.c (mono_class_inflate_generic_type): Added support for
1439         MONO_TYPE_GENERICINST.
1440
1441         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
1442         inflate methods on open constructed types.      
1443
1444 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1445
1446         * object.c: fire ProcessExit event in the root AppDomain after running
1447         Main. Fixes bug #53299.
1448
1449 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
1450
1451         * socket-io.c: include the new socket-wrappers.h header.
1452         Use the wrappers instead of the unix socket functions to make the code
1453         more clear.
1454
1455 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
1456
1457         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
1458
1459         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
1460         Fixes #22532.
1461
1462 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
1463
1464         * reflection.c (mono_image_create_pefile): Handle the case when the
1465         entry point is not a MethodBuilder.
1466
1467         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
1468         field to ReflectionMethod since it is not allways a builder.
1469
1470         * reflection.c (type_get_fully_qualified_name): New helper function to
1471         return the fully qualified name of a type.
1472
1473         * reflection.c (encode_marshal_blob): Always emit the fully qualified
1474         type name for custom marshallers.
1475
1476         * reflection.c (mono_marshal_spec_from_builder): Ditto.
1477
1478         * class.c (mono_class_setup_vtable): If a parent class already 
1479         implements an interface, use the implementing methods from that class.
1480         Fixes #53148.
1481
1482 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1483
1484         * threadpool.c: just return instead of ExitThread to allow for thread
1485         clean up earlier.
1486
1487 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
1488
1489         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
1490         when closing resource modules.
1491
1492         * reflection.c (mono_image_create_pefile): Handle the case when the
1493         entry point is not a MethodBuilder.
1494
1495         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
1496         field to ReflectionMethod since it is not allways a builder.
1497
1498 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
1499
1500         * marshal.c (mono_marshal_get_managed_wrapper): 
1501         mono_marshal_alloc takes native int so CONV_I
1502         the arg for 64bits.
1503
1504 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
1505
1506         * reflection.c (fixup_cattrs): New function to fixup the methoddef
1507         tokens in the cattr table. Fixes #53108.
1508
1509 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1510
1511         * loader.c: don't trim ".dll" before looking up in the config file.
1512         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
1513
1514 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
1515
1516         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
1517         Return the module which contains the resource as well.
1518         (ves_icall_System_Reflection_Module_Close): New icall.
1519
1520         * appdomain.c: Bump corlib version number.
1521
1522         * image.c (mono_image_addref): New public function.
1523
1524         * assembly.c: Call mono_image_addref.
1525
1526         * reflection.c (mono_module_get_object): Increase reference count of 
1527         the image.
1528
1529         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
1530         Fixes #22532.
1531
1532         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
1533         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
1534         proper exceptions on DllImport problems.
1535
1536 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
1537
1538         * class.c, metadata.c: eliminate CSIZE macro.
1539
1540 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
1541
1542         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
1543         * object.h: Added async_callback field in MonoAsyncResult.
1544         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
1545         * verify.c: Added async_callback in MonoAsyncResult layout.
1546
1547 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
1548
1549         * reflection.c (mono_reflection_get_custom_attrs): Add support
1550         for Modules.
1551
1552 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
1553
1554         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
1555         marshalling.
1556         (mono_marshal_method_from_wrapper): Add null pointer check.
1557
1558 2004-01-16  Martin Baulig  <martin@ximian.com>
1559
1560         * debug-mono-symfile.h: Set version number to 36 and reflect
1561         latest symbol writer changes.
1562
1563 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
1564
1565         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
1566         multi-dimensional arrays.
1567         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
1568         (mono_class_from_mono_type): Use bounded_array_class_get.
1569         
1570         * class.c (mono_bounded_array_class_get): New function which takes
1571         a 'bounded' bool argument to distinguish vectors from one dimensional
1572         arrays.
1573
1574         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
1575         bounded_array_class_get if the array has bounds.
1576
1577         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
1578         Search modules loaded using AssemblyBuilder:AddModule as well.
1579
1580 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1581
1582         * appdomain.c: increased corlib version.
1583         * filewatcher.c: removed g_print.
1584         * icall.c:
1585         (get_property_info): only allocate what is actually requested.
1586         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
1587
1588 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1589
1590         * Makefile.am: added filewatcher.[ch]
1591         * filewatcher.[ch]: FileSystemWatcher runtime support.
1592         * icall.c: added new FSW icalls.
1593
1594 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
1595
1596         * string-icalls.c: fix stringbuilder regression as suggested by
1597         Iain McCoy <iain@mccoy.id.au>.
1598
1599 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
1600
1601         * process.c (process_read_stringtable_block): Recognize '007f' as
1602         a language neutral stringtable block.
1603
1604 2004-01-12  Patrik Torstensson
1605
1606         * object.h (MonoStringBuilder) : Changed layout to support our
1607         new stringbuilder class.
1608         * marshal.c: Change marshalling to support the new layout of 
1609         string builder.
1610         * appdomain.c: increased version number because new layout of
1611         string builder.
1612
1613 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
1614
1615         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
1616         assembly name as an string instead of an AssemblyName, since it is
1617         easier to extract info from it.
1618
1619         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
1620         the culture subdirectories too. Fixes #52231.
1621
1622 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1623
1624         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
1625         It takes 2 new parameters with an optional name for the method to look
1626         for and case ignoring info.
1627
1628         * threadpool.c: removed unused variable.
1629
1630 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1631
1632         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
1633         It takes 2 new parameters with an optional name for the property to look
1634         for and case ignoring info.
1635         Fixes bug #52753.
1636
1637 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
1638
1639         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
1640         Fix #52451.
1641
1642 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1643
1644         * appdomain.c:
1645         * assembly.c: escape the uri before passing it to g_filename_from_uri.
1646         Fixes bug #52630.
1647
1648 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
1649
1650         * reflection.c: Add support for more than one unmanaged resource.
1651
1652         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
1653         in field->def_value, as done in all other cases.
1654
1655         * reflection.c (mono_reflection_get_custom_attrs): Add support for
1656         TypeBuilders.
1657
1658         * reflection.c (mono_reflection_create_runtime_class): Remove 
1659         errorneous assignment to klass->element_class, since it is already
1660         done in mono_reflection_setup_internal_class.
1661
1662 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1663
1664         * gc.c: added missing LeaveCriticalSection.
1665         * icall.c: indented a couple of lines.
1666         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
1667         if we call EndInvoke inside a callback. Fixes bug #52601.
1668
1669 2004-01-07  Martin Baulig  <martin@ximian.com>
1670
1671         * mono-debug-debugger.h
1672         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
1673
1674 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
1675
1676         * appdomain.c: Use messages in NotImplementedException.
1677
1678         * exception.c (mono_get_exception_not_implemented): Now this takes
1679         a message argument.
1680
1681         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
1682         exception instead of g_asserting an aborting when something is not
1683         implemented.
1684
1685         Add some inline docs.
1686
1687 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
1688
1689         * reflection.h: Update after changes to object layout.
1690
1691         * reflection.c: Implement saving of unmanaged aka win32 resources.
1692
1693         * appdomain.c: Bump version number.
1694
1695         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
1696         Handle missing domains gracefully.
1697
1698 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
1699
1700         * file-io.c : On Windows, there are much more invalid_path_chars.
1701
1702 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
1703
1704         * class.h, object.c: prepare for GetType () speedup.
1705
1706 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
1707
1708         * profiler.c: workaround for --profile null reference exception on
1709           cygwin. Patch by Patrik Torstensson.
1710
1711 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
1712
1713         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
1714         make work for unaligned access.
1715
1716 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
1717
1718         * class.c: small cleanup (class->fields [i] -> field).
1719         * image.c: check address of metadata is valid.
1720
1721 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
1722
1723         * assembly.h assembly.c (mono_assembly_loaded): New public function to
1724         search the list of loaded assemblies.
1725
1726         * reflection.c (mono_reflection_type_from_name): Use 
1727         mono_assembly_loaded instead of mono_image_loaded.
1728
1729         * reflection.c: Fix warnings.
1730
1731 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
1732
1733         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
1734         is dynamic. This is needed since an assembly can contain both dynamic and
1735         non-dynamic images.
1736
1737         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
1738         assembly->dynamic.
1739
1740         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
1741
1742         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
1743         to store modules loaded using AddModule.
1744
1745         * reflection.c (mono_image_fill_file_table): Generalize this so it works
1746         on Modules.
1747
1748         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
1749
1750         * reflection.c (mono_image_fill_export_table_from_module): New function to
1751         fill out the EXPORTEDTYPES table from a module.
1752
1753         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
1754         into a separate function. Also handle loaded non-dynamic modules.
1755
1756         * reflection.c (mono_image_basic_init): Fix memory allocation.
1757
1758         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1759
1760         * assembly.c (mono_assembly_load_references): Make this public.
1761
1762 2003-12-19  Martin Baulig  <martin@ximian.com>
1763
1764         * class.c (mono_class_initialize_generic): Made this static, take
1765         a `MonoGenericInst *' instead of a `MonoClass *'.
1766         (mono_class_from_generic): Call mono_class_initialize_generic()
1767         unless we're already initialized or being called from
1768         do_mono_metadata_parse_generic_inst().
1769
1770         * class.h (MonoGenericInst): Added `initialized' and
1771         `init_pending' flags.
1772
1773         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
1774         `mono_class_init (gklass)' or mono_class_initialize_generic()
1775         here; set `generic_inst->init_pending' while parsing the
1776         `type_argv'.
1777
1778 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
1779
1780         * locales.c: include string.h for memxxx prototypes
1781
1782 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
1783
1784         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
1785         constructor when accessing literal fields.
1786
1787 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
1788
1789         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1790
1791         * reflection.c (assembly_add_resource_manifest): New function to fill
1792         the MANIFESTRESOURCE table.
1793
1794         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
1795
1796         * reflection.h: Update to changes in class layout.
1797
1798         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
1799         Reenable call to mono_runtime_is_shutting_down ().
1800
1801         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
1802         determine if the runtime is shutting down.
1803
1804 2003-12-16  Jackson Harper <jackson@ximian.com>
1805
1806         * icall.c: comment out call to mono_runtime_is_shutting_down to
1807         fix build.
1808         
1809 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
1810
1811         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
1812         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
1813
1814 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
1815
1816         * reflection.c: move definition of swap_with_size
1817         to before its first call
1818
1819 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
1820
1821         * appdomain.c (mono_runtime_is_shutting_down): New public function.
1822
1823         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
1824         icall.
1825
1826         * object.c: Fix warnings.
1827
1828         * icall.c (ves_icall_Type_Get...): Only consider inherited static
1829         members if FlattenHierarchy is set.
1830
1831         * reflection.c (mono_image_add_decl_security): New function to emit
1832         declarative security.
1833
1834         * reflection.h reflection.c: Add support for declarative security.
1835
1836         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1837         
1838 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
1839
1840         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1841         
1842         * appdomain.c verify.c: Moved corlib version checking into its own
1843         function in appdomain.c since it needs to create vtables etc.
1844
1845 2003-12-13  Patrik Torstensson <p@rxc.se>
1846
1847         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
1848         instead of unwrapped server.
1849
1850 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
1851
1852         * verify.c (check_corlib): Fix field index.
1853
1854 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
1855
1856         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
1857         GetGacPath icall.
1858
1859 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
1860
1861         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
1862         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
1863         cope with sizeof(size_t) != sizeof(guint32).
1864
1865 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1866
1867         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
1868         in case of failure.
1869
1870 2003-12-10  Mark Crichton <crichton@gimp.org>
1871
1872         * icall.c: removed the GetNonZeroBytes.  We now handle this case
1873         in managed code.
1874
1875         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
1876
1877 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
1878
1879         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
1880         marked as deleted.
1881
1882 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
1883
1884         * verify.c (check_corlib): Handle the case when the version field is 
1885         initialized by a static constructor.
1886
1887 2003-12-08  Patrik Torstensson  <p@rxc.se>
1888
1889     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
1890
1891 2003-12-08  Martin Baulig  <martin@ximian.com>
1892
1893         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
1894         a MonoReflectionGenericParameter, also take the parameter index
1895         and name as arguments.
1896         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
1897         (ves_icall_MonoGenericParam_initialize): New interncall.
1898         (ves_icall_Type_make_byref_type): New interncall.
1899
1900         * reflection.h (MonoReflectionGenericParam): Derive from
1901         MonoReflectionType, not just from MonoObject.  Added `refobj' and
1902         `index' fields.
1903
1904         * reflection.c (mono_reflection_define_generic_parameter): Create
1905         and return a new MonoReflectionGenericParam; don't initialize the
1906         constraints here.
1907         (mono_reflection_initialize_generic_parameter): New public method;
1908         initializes the constraints and creates the `param->pklass'.
1909
1910 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
1911
1912         * reflection.h reflection.c: Use the new fields 'num_types', 
1913         'num_fields' and 'num_methods' to track the number of types etc.
1914
1915         * verify.c (check_corlib): Check corlib version number.
1916
1917 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
1918
1919         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
1920         function works on all methods.
1921
1922 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
1923
1924         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
1925         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
1926         the custom_type_info flag of the transparent proxy.
1927         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
1928         objects that supports IRemotingTypeInfo.
1929         * object.h: Added custom_type_info field in transparent proxy.
1930
1931 2003-12-06  Martin Baulig  <martin@ximian.com>
1932
1933         * class.c (mono_class_create_from_generic): Removed.
1934         (mono_class_from_generic): Check `ginst->klass' before doing
1935         anything else.  This is important to fully support "recursive"
1936         generic types.
1937
1938         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
1939         empty `generic_inst->klass' before doing anything else.
1940
1941 2003-12-06  Dick Porter  <dick@ximian.com>
1942
1943         * verify.c: 
1944         * object.h:
1945         * icall.c:
1946         * locales.c: Use C structs to access class fields.  Don't do a
1947         conversion between MonoString and UChar because both are
1948         platform-endian UTF-16.  Compare now takes startindex and count
1949         parameters.  Add a char overload for IndexOf.  Speed up the
1950         invariant string IndexOf.
1951
1952 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
1953
1954         * Makefile.am (monosn_LDADD): Fix parallel build.
1955
1956 2003-12-04  Martin Baulig  <martin@ximian.com>
1957
1958         * icall.c
1959         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
1960         (ves_icall_Type_make_array_type): New interncall.       
1961
1962 2003-12-04  Martin Baulig  <martin@ximian.com>
1963
1964         * locales.c: also change it in the !HAVE_ICU case.
1965
1966 2003-12-04  Dick Porter  <dick@ximian.com>
1967
1968         * icall.c:
1969         * locales.c: construct_compareinfo is now in CompareInfo, not
1970         CultureInfo.
1971
1972 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
1973
1974         * image.c (mono_image_load_file_for_image): Cache loaded images in the
1975         image->files array.
1976
1977         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
1978         table as well.
1979
1980         * assembly.c (mono_assembly_load_references): Only load references
1981         once.
1982
1983         * class.c (mono_class_from_name): Avoid linear search of the 
1984         EXPORTEDTYPE table.
1985
1986         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
1987
1988 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
1989
1990         * image.h (MonoImage): Add 'field_cache' field.
1991
1992         * loader.c (mono_field_from_token): Cache field lookups.
1993         
1994         * reflection.c (mono_module_get_object): Fix name property.
1995
1996         * icall.c (ves_icall_get_enum_info): Update after changes to 
1997         mono_metadata_get_constant_index ().
1998
1999         * icall.c: Get rid of get_type_info icall, use a separate icall for
2000         each type property to avoid needless memory allocations. Fixes #51514.
2001
2002         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
2003         to avoid needless binary searches.
2004
2005         * class.c (class_compute_field_layout): Move the initialization of
2006         field->def_value to mono_class_vtable ().
2007
2008         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
2009         non-corlib types.
2010
2011         * object.c (mono_object_allocate): Make it inline.
2012
2013         * object.c (mono_object_allocate_spec): Make it inline.
2014         
2015 2003-12-02  Dick Porter  <dick@ximian.com>
2016
2017         * locales.c (create_NumberFormat): NumberFormatInfo construction.
2018         Patch by Mohammad DAMT (mdamt@cdl2000.com).
2019
2020 2003-12-01  Dick Porter  <dick@ximian.com>
2021
2022         * threads.c: Fix signature and call in CreateMutex and
2023         CreateEvent.
2024
2025 2003-12-01  Dick Porter  <dick@ximian.com>
2026
2027         * icall.c: 
2028         * locales.c: Implement string compares and searching
2029
2030         * object.h: Add extra Thread field
2031
2032 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
2033
2034         * reflection.c (fixup_method): Add support for MonoCMethod.
2035
2036 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
2037
2038         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
2039
2040         * reflection.c (assembly_name_to_aname): Allow extra characters in
2041         assembly names. Fixes #51468.
2042
2043 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
2044
2045         * exception.c (mono_exception_from_name_domain): New helper function.
2046
2047         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
2048         exception object in the correct domain.
2049
2050         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
2051         formatting + make a copy a the input data.
2052
2053         * loader.c (mono_get_method_from_token): Methods which contain
2054         native code do not have entries in the ImplMap.
2055
2056         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
2057         Thanks to Gonzalo for spotting this.
2058         
2059         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
2060         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
2061
2062         * assembly.h (mono_assembly_load_from): Split the second part of 
2063         assembly loading into a new public function.
2064
2065         * exception.h (mono_get_exception_bad_image_format): New function.
2066
2067 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
2068
2069         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
2070         Enumerate all modules inside a dynamic assembly. Fixes #51293.
2071         
2072         * icall.c: Add new icall for creating dynamic methods.
2073
2074         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
2075
2076         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
2077
2078         * reflection.c (mono_reflection_create_dynamic_method): New icall to
2079         create a dynamic method.
2080
2081         * reflection.c (resolve_object): New helper function.
2082
2083         * reflection.c: Generalize ReflectionMethodBuilder and the functions
2084         which manipulate it so they can also work on dynamic methods.
2085
2086         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
2087         creating the MonoReflectionMethodAux structure if it is not needed.
2088         
2089         * reflection.h verify.c: Update after changes to object layout.
2090
2091         * reflection.c (method_builder_encode_signature): Fix compilation on
2092         gcc 2.95.x.
2093
2094 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
2095
2096         * appdomain.h: Added support for context static fields. Added static_data
2097           field to MonoAppContext and renamed thread_static_fields to a more
2098           generic special_static_fields in MonoAppDomain, since it can now contain
2099           context static fields.
2100         * domain.c: Updated hashtable name.
2101         * object.c: Replaced field_is_thread_static() for a more generic
2102           field_is_special_static() which also checks for context static attribute.
2103           In mono_class_vtable(), added support for static context fields.
2104         * threads.c: Changed methods that manage thread static fields to more
2105           generic methods so they can be reused both for thread and context static
2106           data.
2107         * threads.h: Declared some new methods.
2108
2109 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
2110
2111         * reflection.h: Update after changes to the managed types.
2112
2113         * reflection.c (encode_custom_modifiers): New helper function.
2114
2115         * reflection.c (method_encode_signature): Emit custom modifiers.
2116
2117         * reflection.c (field_encode_signature): Emit custom modifiers.
2118
2119 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
2120
2121         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
2122
2123         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
2124         implementation.
2125
2126         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
2127         icall.
2128
2129         * object.c (mono_field_get_value_object): New function.
2130
2131         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
2132         specific.
2133
2134 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
2135
2136         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
2137         return a preallocated out-of-memory exception instance.
2138
2139         * object.c (out_of_memory): Use the new function.
2140
2141         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
2142         flag is before the custom modifiers. Fixes #49802.
2143
2144 2003-11-16  Martin Baulig  <martin@ximian.com>
2145
2146         * class.c (mono_class_is_open_constructed_type): Implemented the
2147         MONO_TYPE_GENERICINST case.
2148
2149 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
2150
2151         * assembly.c (mono_assembly_fill_assembly_name): New function to
2152         fill out the MonoAssemblyName structure.
2153         (mono_assembly_open): Use the new function.
2154
2155         * icall.c (fill_reflection_assembly_name): New helper function.
2156
2157         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
2158         new function.
2159
2160         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
2161
2162 2003-11-15  Martin Baulig  <martin@ximian.com>
2163
2164         * class.c (mono_class_is_open_constructed_type): New public
2165         function; checks whether a type is an open constructed type,
2166         ie. whether it still contains type parameters.
2167         (mono_class_inflate_generic_type): If we're a type parameter and
2168         the inflated type is also a MONO_TYPE_(M)VAR, return the original
2169         type.
2170
2171         * class.h (MonoGenericInst): Added `guint32 is_open'.
2172
2173         * loader.c (method_from_methodspec): Check whether we're an open
2174         or closed constructed type and set `ginst->is_open'.
2175
2176         * reflection.c (mono_reflection_bind_generic_parameters): Check
2177         whether we're an open or closed constructed type and set
2178         `ginst->is_open'.
2179         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
2180         from open constructed types.
2181
2182 2003-11-15  Martin Baulig  <martin@ximian.com>
2183
2184         * reflection.c (mono_reflection_bind_generic_parameters): If we're
2185         a generic instance (instead of a generic type declaration) with
2186         unbound generic parameters, bind them to our actual types.
2187
2188 2003-11-14  Martin Baulig  <martin@ximian.com>
2189
2190         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
2191
2192         * reflection.c (mono_reflection_bind_generic_parameters): If we're
2193         an interface type, populate `res->interfaces' with instantiated
2194         versions of all the interfaces we inherit.
2195
2196 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
2197
2198         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
2199         when MONO_PATH is set but doesn't contain the install dir.
2200
2201 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2202
2203         * icall.c:
2204         (ves_icall_Type_GetInterfaces): don't return an interface twice when
2205         it's also implemented in base classes. Fixes bug #50927.
2206
2207 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
2208
2209         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
2210         if this method is called from a finalizer. Fixes #50913.
2211
2212 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
2213
2214         * threads.c: Implement VolatileRead/VolatileWrite
2215
2216         * icall.c: Add new icalls for VolatileRead/VolatileWrite
2217
2218 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
2219
2220         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
2221         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
2222         2.95.3.
2223
2224         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
2225         from Peter Ross (pro@missioncriticalit.com).
2226         
2227 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
2228
2229         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
2230
2231 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
2232
2233         * assembly.c (mono_assembly_load_references): Disable check because it
2234         triggers on older corlibs which lots of people have.
2235
2236 2003-11-12  Jackson Harper  <jackson@ximian.com>
2237
2238         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
2239         load corlib.dll if mscorlib.dll is not found.
2240         * assembly.h: Remove corlib name define.
2241         * class.c:
2242         * domain.c:
2243         * image.c: Change corlib name to mscorlib.
2244         
2245 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
2246
2247         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
2248
2249 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
2250
2251         * appdomain.h: Added loader_optimization here to sync with the C#
2252         code, and add disallow_binding_redirects field.
2253
2254 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
2255
2256         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
2257
2258         * reflection.c (mono_image_build_metadata): Fix crash on modules
2259         with no types.
2260
2261         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
2262
2263         * icall.c (ves_icall_get_method_info): Return callingConvention as
2264         well.
2265
2266         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
2267         namespaces from the EXPORTEDTYPE table as well.
2268
2269         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
2270         from all modules inside the assembly.
2271         
2272 2003-11-11  Martin Baulig  <martin@ximian.com>
2273
2274         * reflection.c (mono_reflection_bind_generic_parameters): Make
2275         this work for interfaces.
2276
2277 2003-11-11  Martin Baulig  <martin@ximian.com>
2278
2279         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
2280
2281 2003-11-11  Martin Baulig  <martin@ximian.com>
2282
2283         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
2284         "MonoInflatedMethod" and "MonoInflatedCtor".
2285
2286 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
2287
2288         * reflection.c (resolution_scope_from_image): Use the assembly table
2289         from the manifest module, since other modules don't have it.
2290
2291         * debug-helpers.c (mono_type_full_name): New helper function.
2292
2293         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
2294
2295         * image.c (mono_image_load_file_for_image): New public function which
2296         is a replacement for the load_file_for_image in class.c.
2297
2298         * assembly.c (mono_assembly_load_module): A wrapper for the function
2299         above which does assembly association and reference loading too.
2300
2301         * class.c (mono_class_from_name): Call mono_assembly_load_module.
2302
2303 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2304
2305         * appdomain.c: not all of the attributes for the full assembly name
2306         are required and the order doesn't matter. Fixes bug #50787.
2307
2308 2003-11-10  Dick Porter  <dick@ximian.com>
2309
2310         * locales.c: Use platform-endian UTF16
2311
2312 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
2313
2314         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
2315         
2316 2003-11-10  Martin Baulig  <martin@ximian.com>
2317
2318         * metadata.c
2319         (mono_metadata_load_generic_params): Make this actually work.
2320
2321         * reflection.c (mono_reflection_bind_generic_parameters): If our
2322         parent is a generic instance, pass all the `types' to it, no
2323         matter whether it has the same number of type parameters or not.
2324
2325 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
2326
2327         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
2328
2329         * assembly.c (mono_assembly_load_references): Move the image<->assembly
2330         assignment code to this function so it gets called recursively for all
2331         modules.
2332
2333         * image.c (load_modules): Remove the assembly assignment since it is
2334         now done by mono_assembly_load_references.
2335         
2336         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
2337         Add 'module' argument.
2338         (mono_module_get_types): New helper function.
2339         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
2340
2341 2003-11-08  Martin Baulig  <martin@ximian.com>
2342
2343         * class.c (mono_class_inflate_generic_method): Interface method
2344         don't have a header.
2345
2346         * reflection.c (mono_image_get_methodspec_token): Take an
2347         additional `MonoGenericInst *' argument instead of reading it from
2348         the header; this is necessary to support interfaces.
2349         (mono_image_create_token): Pass the `MonoGenericInst *' from the
2350         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
2351         (inflated_method_get_object): Take an additional `MonoGenericInst *'
2352         argument.
2353
2354         * reflection.h (MonoReflectionInflatedMethod): Added
2355         `MonoGenericInst *ginst'.
2356
2357 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
2358
2359         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
2360
2361 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
2362
2363         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
2364
2365 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
2366
2367         * reflection.c 
2368         (reflection_methodbuilder_from_method_builder):
2369         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
2370         initialize a ReflectionMethodBuilder structure.
2371         (mono_image_get_methodbuilder_token):
2372         (mono_image_get_ctorbuilder_token): New functions to emit memberref
2373         tokens which point to types in another module inside the same assembly.
2374
2375         * reflection.c: Use the new helper functions.
2376         
2377         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
2378
2379         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
2380         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
2381
2382         * reflection.c (resolution_scope_from_image): Emit a moduleref if
2383         neccesary.
2384
2385         * reflection.c (mono_image_build_metadata): Emit metadata only for the
2386         current module. Emit the manifest only for the main module.
2387
2388         * reflection.c (mono_image_create_token): Add assertion when a 
2389         memberref needs to be created.
2390
2391         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
2392
2393         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
2394         larger buffer for the custom attribute blob. Fixes #50637.
2395         
2396 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2397
2398         * threadpool.c: notify listener on async processing handles after
2399         invoking the async callback. Thanks to Zoltan.
2400
2401 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
2402
2403         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
2404         avoid code duplication.
2405
2406         * reflection.h (MonoDynamicImage): New type which is currently unused,
2407         but will be used through the ref.emit code in place of 
2408         MonoDynamicAssembly.
2409
2410         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
2411         object layout.
2412
2413         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
2414         a MonoDynamicImage instead of just a MonoImage.
2415         
2416         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
2417         icalls to ModuleBuilder but keep their semantics, so they will work
2418         with moduleb->assemblyb. This will change later.
2419         
2420 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
2421
2422         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
2423         object layout.
2424
2425         * reflection.c (mono_image_build_metadata): Avoid creation of a default
2426         main module, since it is now done by the managed code.
2427
2428 2003-11-03  Martin Baulig  <martin@ximian.com>
2429
2430         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
2431         `ginst->klass' here.
2432         (method_encode_methodspec): Don't use the `ginst->generic_method's
2433         klass if it's a generic instance, use `ginst->klass' in this case.
2434
2435 2003-11-03  Martin Baulig  <martin@ximian.com>
2436
2437         * reflection.c (mono_image_get_generic_method_param_info):
2438         Removed, use mono_image_get_generic_param_info() instead.
2439         (mono_image_get_type_info): Write the GenericParam table before
2440         the Method table.  This is neccessary because in the GenericParam
2441         table, type parameters of the class (ie. '!0' etc.) must come
2442         before the ones from its generic methods (ie. '!!0' etc).
2443
2444 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
2445
2446         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
2447
2448 2003-11-02  Martin Baulig  <martin@ximian.com>
2449
2450         * reflection.c (create_generic_typespec): Take a
2451         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
2452         the generic parameters from it.
2453
2454 2003-11-02  Martin Baulig  <martin@ximian.com>
2455
2456         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
2457         instead of a `MonoClassField *' since we just need the type.
2458         (create_generic_typespec): New static function.  Creates a
2459         TypeSpec token for a generic type declaration.
2460         (mono_image_get_generic_field_token): New static function.
2461         (mono_image_create_token): If we're a FieldBuilder in a generic
2462         type declaration, call mono_image_get_generic_field_token() to get
2463         the token.
2464
2465 2003-11-02  Martin Baulig  <martin@ximian.com>
2466
2467         * reflection.h
2468         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
2469         `MonoReflectionGenericInst *declaring_type' and
2470         `MonoReflectionGenericInst *reflected_type' fields.
2471
2472         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
2473         `MonoReflectionGenericInst *declaring_type' and a
2474         `MonoReflectionGenericInst *reflected_type' argument instead of a
2475         single `MonoReflectionGenericInst *type' one.  Set
2476         `res->declaring_type' and `res->reflected_type' from them.
2477         (mono_reflection_inflate_field): Likewise.      
2478
2479 2003-11-02  Martin Baulig  <martin@ximian.com>
2480
2481         * class.c (mono_class_setup_vtable): Don't store generic methods
2482         in the vtable.  
2483
2484 2003-11-02  Martin Baulig  <martin@ximian.com>
2485
2486         * reflection.h (MonoReflectionGenericInst): Added
2487         `MonoReflectionType *declaring_type'.
2488
2489         * reflection.c (mono_reflection_bind_generic_parameters): Use
2490         `if (tb->parent)' instead of `klass->parent'.
2491
2492 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
2493
2494         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
2495         with an empty ASSEMBLY table.
2496
2497         * reflection.c (mono_image_build_metadata): Avoid using the same loop
2498         variable in the inner and outer loops.
2499
2500 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
2501
2502         * metadata.h (mono_metadata_make_token): Put parentheses around macro
2503         argument.
2504
2505         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
2506         
2507         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
2508         icalls. Instead, do everything in managed code. This is needed since
2509         it is hard to restore the original domain etc. in unmanaged code in the
2510         presence of undeniable exceptions.
2511
2512         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
2513         New icalls to push and pop appdomain refs.
2514
2515 2003-10-31  Martin Baulig  <martin@ximian.com>
2516
2517         * class.c (inflate_generic_type): Renamed to
2518         mono_class_inflate_generic_type() and made it public.
2519
2520         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
2521         New interncall.
2522
2523         * loader.c (mono_field_from_memberref): Also set the retklass for
2524         typespecs.
2525
2526         * fielder.c (mono_image_get_inflated_field_token): New static
2527         method; creates a metadata token for an inflated field.
2528         (mono_image_create_token, fixup_method): Added support for
2529         "MonoInflatedField".
2530         (fieldbuilder_to_mono_class_field): New static function.
2531         (mono_reflection_inflate_field): New public function.
2532
2533         * reflection.h
2534         (MonoReflectionGenericInst): Added `MonoArray *fields'.
2535         (MonoReflectionInflatedField): New typedef.     
2536
2537 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
2538
2539         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
2540         for Solaris and other platforms without s6_addr16
2541
2542 2003-10-30  Martin Baulig  <martin@ximian.com>
2543
2544         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
2545         argument instead of two.
2546         (mono_class_inflate_generic_signature): Likewise.
2547         (inflate_generic_header): Likewise.
2548         (mono_class_inflate_generic_method): Likewise.  In addition, if
2549         `ginst->klass' is set, it becomes the new `method->klass'.
2550
2551         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
2552         field.
2553
2554         * reflection.c (encode_generic_method_sig): Write a 0xa as the
2555         first byte. [FIXME]
2556         (method_encode_methodspec): If we have generic parameters, create
2557         a MethodSpec instead of a MethodRef.
2558         (fixup_method): Added support for "MonoInflatedMethod" and
2559         "MonoInflatedCtor".
2560         (mono_image_create_token): Added support for "MonoInflatedMethod"
2561         and "MonoInflatedCtor".
2562         (inflated_method_get_object): New static function; returns a
2563         managed "System.Reflection.MonoInflatedMethod" object.
2564         (mono_reflection_bind_generic_method_parameters): Return a
2565         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
2566         (mono_reflection_inflate_method_or_ctor): Likewise.
2567         (mono_image_get_generic_method_param_info): Initialize unused
2568         fields to zero.
2569         (mono_image_get_generic_param_info): Likewise.
2570
2571         * reflection.h (MonoReflectionInflatedMethod): New public
2572         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
2573         "S.R.MonoInflatedCtor" classes.
2574
2575         * loader.c (method_from_memberref): If we're a TypeSpec and it
2576         resolves to a generic instance, inflate the method.
2577
2578 2003-10-28  Dick Porter  <dick@ximian.com>
2579
2580         * object.c (mono_runtime_run_main): Convert command-line arguments
2581         into utf8, falling back to the user's locale encoding to do so.
2582
2583 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
2584
2585         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
2586         at this time.
2587
2588         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
2589
2590         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
2591         up icalls at method definition time. Partially fixes #33569.
2592
2593 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
2594
2595         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
2596         marshalling of arrays. Fixes #50116.
2597
2598         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
2599
2600         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
2601         points to a vtable in the dying appdomain.
2602
2603         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
2604         listeners into unmanaged code inside the lock.
2605
2606         * object.c (mono_class_vtable): Turn off typed allocation in non-root
2607         domains and add some comments.
2608
2609 2003-10-25  Martin Baulig  <martin@ximian.com>
2610
2611         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
2612
2613         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
2614
2615         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
2616         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
2617         currently parsing.  Create the generic class and store it in
2618         `generic_inst->klass' before parsing the type arguments.  This is
2619         required to support "recursive" definitions; see mcs/tests/gen-23.cs
2620         for an example.
2621         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
2622         to support recursive typespec entries.
2623
2624         * class.c (mono_class_setup_parent): If our parent is a generic
2625         instance, we may get called before it has its name set.
2626         (mono_class_from_generic): Splitted into
2627         mono_class_create_from_generic() and mono_class_initialize_generic().
2628
2629 2003-10-25  Martin Baulig  <martin@ximian.com>
2630
2631         * icall.c (ves_icall_Type_BindGenericParameters): Return a
2632         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
2633         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
2634         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
2635
2636         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
2637         (create_typespec): Likewise.
2638         (mono_reflection_bind_generic_parameters): Return a
2639         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
2640         (mono_reflection_inflate_method_or_ctor): New public function.
2641
2642         * reflection.h (MonoReflectionGenericInst): New typedef.        
2643
2644 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
2645
2646         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
2647         inside the domain lock. Fixes #49993.
2648         
2649         * object.c (mono_class_vtable): When typed allocation is used, 
2650         allocate vtables in the GC heap instead of in the mempool, since the
2651         vtables contain GC descriptors which are used by the collector even
2652         after the domain owning the mempool is unloaded.
2653
2654         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
2655
2656         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
2657         reflect what it does. Also invalidate mempools instead of freeing
2658         them if a define is set.
2659
2660         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
2661         of the appdomain.
2662         
2663         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
2664         hold the finalizable objects in this domain.
2665
2666         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
2667         appdomain.
2668
2669         * appdomain.c (mono_domain_set): New function to set the current
2670         appdomain, but only if it is not being unloaded.
2671
2672         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
2673         appdomain which is being unloaded.
2674         
2675         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
2676         unloading of the root appdomain.
2677
2678         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
2679         icall to execute a method in another appdomain. Intended as a 
2680         replacement for InternalSetDomain, which can confuse the code 
2681         generation in the JIT.
2682
2683         * appdomain.c (mono_domain_is_unloading): New function to determine
2684         whenever an appdomain is unloading.
2685
2686         * appdomain.c (mono_domain_unload): New function to correctly unload
2687         an appdomain.
2688
2689         * assembly.c (mono_assembly_load_references): Check that an assembly
2690         does not references itself.
2691
2692         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
2693         domain manually, it asks the finalizer thread to do it, then waits for
2694         the result. Also added a timeout.
2695
2696         * icall.c: Register the new icalls.
2697
2698         * threads.h threads.c: Export the mono_gc_stop_world and 
2699         mono_gc_start_world functions.
2700         
2701         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
2702         function to fill out the mempool with 0x2a.
2703
2704 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
2705
2706         * reflection.h (MonoReflectionMethodAux): New structure to store
2707         information which is rarely used, thus is not in the MonoMethod
2708         structure.
2709
2710         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
2711         store the aux info.
2712
2713         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
2714         and marshalling info into the aux structure.
2715
2716         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
2717         from the aux structure.
2718
2719         * loader.c (mono_method_get_param_names): Retrieve the param names from
2720         the aux structure.
2721         
2722 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
2723
2724         * exception.h exception.c: Add AppDomainUnloadedException && fix 
2725         warning.
2726
2727 2003-10-21  Dick Porter  <dick@ximian.com>
2728
2729         * socket-io.c
2730         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
2731         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
2732
2733 2003-10-21  Martin Baulig  <martin@ximian.com>
2734
2735         * reflection.c (mono_reflection_bind_generic_parameters):
2736         `klass->parent' is NULL for interfaces.
2737
2738 2003-10-21  Martin Baulig  <martin@ximian.com>
2739
2740         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
2741
2742 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
2743
2744         * exception.c (mono_exception_from_name_msg): New helper function for
2745         creating exceptions and initializing their message field.
2746
2747         * exception.c: Simplify functions using the new helper.
2748
2749         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
2750         New function.
2751
2752         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
2753         mono_raise_exception, since otherwise gcc doesn't generate the function
2754         epilog for raise_exception, confusing the stack unwinding in the JIT.
2755         Fixes #45043.
2756
2757         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
2758         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
2759         Fixes #49499.
2760
2761 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2762
2763         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
2764         utf8.
2765
2766 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
2767
2768         * icall.c: Removed GetUninitializedObject method because
2769           AllocateUninitializedClassInstance does the same.
2770
2771 2003-10-18  Martin Baulig  <martin@ximian.com>
2772
2773         * class.c (inflate_generic_signature): Renamed to
2774         mono_class_inflate_generic_signature() and made it public.
2775         (my_mono_class_from_generic_parameter): New static function; if we
2776         don't already have the generic parameter's MonoClass, create a
2777         very simple one which is just used internally in the runtime and
2778         not passed back to managed code.
2779
2780         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
2781
2782         * metadata.h (MonoMethodSignature): Moved the
2783         `MonoGenericParam *gen_params' to the MonoMethodHeader.
2784         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
2785
2786         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
2787         ves_icall_MonoMethod_GetGenericArguments(); this is now an
2788         interncall on the MonoMethod class, not on MethodInfo.
2789         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
2790         calling mono_reflection_bind_generic_method_parameters() directly.
2791
2792         * loader.c (mono_method_get_signature): If this is a MethodSpec;
2793         return the already computed `method->signature'.
2794         (method_from_methodspec): New static function to load a method
2795         from a MethodSpec entry.
2796         (mono_get_method_from_token): Call the new method_from_methodspec()
2797         for MethodSpec tokens.  
2798         (mono_get_method_from_token): If we're a generic method, load the
2799         type parameters.
2800
2801         * reflection.c (mono_image_get_memberref_token): Allow
2802         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
2803         table.
2804         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
2805         (mono_image_create_token): First check whether it's a generic
2806         method (so we'd need to create a MethodSpec), then do the other
2807         two alternatives.
2808         (mono_reflection_bind_generic_method_parameters): Return a
2809         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
2810         called directly from the interncall.
2811
2812 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
2813
2814         * reflection.c (load_public_key): Move loading of the public key
2815         into managed code.
2816
2817         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
2818
2819         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
2820         fields.
2821
2822         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
2823         culture, hash_alg and public_key. Fixes #49555.
2824
2825 2003-10-17  Martin Baulig  <martin@ximian.com>
2826
2827         * class.h (MonoGenericInst): Moved this declaration here and added
2828         `MonoMethod *generic_method'.
2829
2830         * icall.c
2831         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
2832         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
2833
2834         * metadata.c (mono_metadata_type_equal): Two types of
2835         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
2836         index; ie. don't compare the address of the `MonoGenericParam'
2837         structure.
2838         (mono_metadata_load_generic_params): Removed the `MonoMethod
2839         *method' argument.
2840
2841         * metadata.h (MonoGenericInst): Moved declaration to class.h.
2842         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
2843
2844         * reflection.c (method_encode_signature): Encode the number of
2845         generic parameters.
2846         (encode_generic_method_sig): New static function.
2847         (method_encode_methodspec): New static function; creates an entry
2848         in the MethodSpec table for a generic method.
2849         (mono_image_get_methodspec_token): New static function.
2850         (mono_image_create_token): Call mono_image_get_methodspec_token()
2851         for generic methods.
2852         (mono_reflection_bind_generic_method_parameters): New public
2853         function.  Instantiates a generic method.
2854
2855 2003-10-16  Martin Baulig  <martin@ximian.com>
2856
2857         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
2858         *gen_params' here from MonoMethodHeader.
2859
2860         * metadata.c (mono_metadata_parse_method_signature): If we have
2861         generic parameters, initialize `method->gen_params' and then set
2862         the correct `type->data.generic_param' in all the parameters.
2863
2864 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
2865
2866         * threads.c (mono_threads_get_default_stacksize): New function to 
2867         return the default stacksize.
2868
2869         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
2870         termination of the finalizer thread, since the previous method had
2871         race conditions. Fixes #49628.
2872
2873         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
2874         as for the other managed threads.
2875
2876 2003-10-16  Martin Baulig  <martin@ximian.com>
2877
2878         * class.c (inflate_generic_signature): Copy `generic_param_count'
2879         and `gen_params'.
2880
2881         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
2882         New interncall.
2883
2884         * metadata.c (mono_metadata_parse_method_signature): Actually set
2885         the `method->generic_param_count' here.
2886         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
2887
2888 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
2889
2890         * object.h: Add a new field to TypedRef to simplify the implementation
2891         of the REFANY opcodes in the JIT.
2892
2893         * icall.c: Make use of the new field.
2894
2895         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
2896         dynamically.
2897
2898 2003-10-15  Martin Baulig  <martin@ximian.com>
2899
2900         * class.c (mono_class_from_gen_param): Renamed to
2901         mono_class_from_generic_parameter() and moved most of the
2902         functionality from mono_reflection_define_generic_parameter()
2903         here; ie. we create a "real" class here.
2904         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
2905         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
2906         previously been called.
2907
2908         * class.h (MonoGenericParam): Moved the declaration of this struct
2909         here from metadata.h and added `MonoMethod *method'.
2910
2911         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
2912         interncall.
2913
2914         * loader.c (mono_get_method_from_token): If we have any generic
2915         parameters, call mono_metadata_load_generic_params() to read them
2916         from the MONO_TABLE_GENERICPAR.
2917
2918         * metadata.c (mono_metadata_load_generic_params): Added
2919         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
2920
2921         * metadata.h (MonoMethodSignature): Replaced
2922         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
2923         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
2924
2925         * reflection.c (mono_reflection_define_generic_parameter): Moved
2926         most of the functionality into the new
2927         mono_class_from_generic_parameter(); set the `method' field if
2928         we're a method parameter.       
2929
2930 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
2931
2932         * marshal.c (emit_struct_conv): if native size is 0
2933         emit no code.
2934
2935 2003-10-14  Martin Baulig  <martin@ximian.com>
2936
2937         * icall.c: The generics API has changed in the spec since it was
2938         added to System.Type; these modifications make it match the spec
2939         again.
2940         (ves_icall_Type_GetGenericParameters): Renamed to
2941         `ves_icall_Type_GetGenericArguments'.
2942         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
2943         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
2944         `ves_icall_MonoType_get_HasGenericArguments'.
2945         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
2946         `ves_icall_MonoType_get_IsGenericParameter'.
2947         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
2948         this is no interncall anymore.
2949         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
2950         `ves_icall_TypeBuilder_get_IsGenericParameter'.
2951
2952 2003-10-14  Martin Baulig  <martin@ximian.com>
2953
2954         * reflection.c (mono_reflection_bind_generic_parameters): Also
2955         inflate generic methods if we're reading the class from IL.
2956
2957 2003-10-13  Martin Baulig  <martin@ximian.com>
2958
2959         * reflection.c (mono_reflection_define_generic_parameter): This
2960         method isn't called directly from the icall anymore; take a
2961         `MonoReflectionAssemblyBuilder *' so we can use this for type and
2962         method generic parameters.
2963         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
2964         (method_builder_encode_signature): Encode generic parameters.
2965         (mono_image_get_method_info): Write generic params to the
2966         MONO_TABLE_GENERICPARAM table.
2967
2968         * reflection.h (MonoReflectionMethodBuilder): Added
2969         `MonoArray *generic_params'.
2970
2971         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
2972
2973         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
2974         wrapper for mono_reflection_define_generic_parameter().
2975         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
2976
2977 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
2978
2979         * marshal.h: Add missing function to fix build.
2980
2981         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
2982         the SetLastError pinvoke attribute.
2983
2984         * marshal.c (mono_marshal_set_last_error): New helper function called
2985         by the generated code.
2986         
2987         * marshal.c (mono_mb_emit_branch): New helper function.
2988
2989         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
2990
2991         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
2992         classes as parameters and return values of delegates. Fixes #29256. 
2993
2994 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
2995
2996         * locales.c: use gint32 in non HAVE_ICU case
2997
2998 2003-10-11  Martin Baulig  <martin@ximian.com>
2999
3000         * mono-debug.c (mono_debug_add_method): Added a workaround for
3001         bug #48591.
3002
3003 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
3004
3005         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
3006         delegates passed to native code must use the STDCALL calling 
3007         convention. Fixes #35987.
3008
3009 2003-10-10  Martin Baulig  <martin@ximian.com>
3010
3011         * class.c (inflate_generic_type): If we're inflating for a generic
3012         type instance (and not for a generic method), return
3013         MONO_TYPE_MVAR unchanged.
3014
3015 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3016
3017         * string-icalls.c: Join ignores null strings in the source array.
3018         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
3019         * threads.c: GetAvailableTheads is slightly more accurate.
3020
3021 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
3022
3023         * threads.h threads.c : add mono_threads_set_default_stacksize
3024         and pass default to CreateThread calls.
3025
3026 2003-10-09  Dick Porter  <dick@ximian.com>
3027
3028         * icall.c:
3029         * locales.h:
3030         * locales.c: Internal calls for constructing CultureInfo and
3031         related objects from libicu (if its available.)
3032
3033 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
3034
3035         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
3036
3037 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3038
3039         * threadpool.c: added an argument to async_invoke_thread that is the
3040         item to process, pass the MonoAsyncResult to the thread start function
3041         when creating a new thread. This way we don't need to acquire any lock
3042         when we're creating a new thread. Readded a semaphore for faster
3043         response times (instead of that Sleep i added).
3044
3045 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
3046
3047         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
3048         get daylight change dates better on Windows, fix handling
3049         of platforms without tm_gmtoff.
3050
3051 2003-10-06  Martin Baulig  <martin@ximian.com>
3052
3053         * class.c (inflate_generic_method): Renamed to
3054         mono_class_inflate_generic_method() and made public.
3055         (mono_class_init): Don't inflate the generic methods here.
3056         (mono_class_from_generic): Added `gboolean inflate_methods'
3057         argument.  Inflate the methods here.
3058
3059         * loader.c (mono_method_get_param_names): Ignore instances of
3060         generic types for the moment.
3061
3062         * reflection.c (fixup_method): Added support for inflated methods.
3063         (mono_image_create_token): Use mono_image_get_methodref_token()
3064         for inflated methods.
3065         (mono_custom_attrs_from_param): Ignore instances of generic types
3066         for the moment.
3067         (mono_reflection_bind_generic_parameters): New public function.
3068         Moved all the functionality from
3069         ves_icall_Type_BindGenericParameters() here and added support for
3070         dynamic types.
3071         (mono_reflection_define_generic_parameter): Initialize
3072         `klass->methods' here.
3073
3074         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
3075         functionality into mono_reflection_define_generic_parameter().
3076         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
3077         TypeBuilder, return that TypeBuilder.
3078
3079 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3080
3081         * appdomain.c: removed mono_delegate_semaphore.
3082
3083         * threadpool.c:
3084         (mono_thread_pool_add): moved hash table creation inside and the thread 
3085         creation outside of the critical region.
3086         (mono_thread_pool_finish): removed obsolete code.
3087         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
3088         continue or exit the thread depending on the queue.
3089
3090 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
3091
3092         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
3093         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
3094         handle more bool marshalling options
3095
3096 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
3097
3098         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
3099         arrays of structs. Also add a more descriptive error message when
3100         a structure member is marshalled as LPArray.
3101
3102 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
3103
3104         * marshal.c (mono_marshal_get_native_wrapper): Add support for
3105         marshalling arrays of complex types. Fixes #29098. Also remove an
3106         usused and incomplete function.
3107
3108 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3109
3110         * gc.c: report heap_size - free_bytes as total memory allocated
3111         (bug#49362).
3112
3113 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
3114
3115         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
3116         fix timezone handling problems on Windows.
3117         
3118         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
3119         asserts when the year is outside the range handled by ms the functions.
3120
3121         * class.c (setup_interface_offsets): If the class is an interface,
3122         fill out its interface_offsets slot.
3123
3124 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3125
3126         * threadpool.c: mark threadpool threads as background.
3127
3128 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
3129
3130         * decimal.c - define DECINLINE to nothing if not using GCC
3131
3132 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
3133
3134         * assembly.c: More refcount fixes.
3135
3136 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3137
3138         * string-icalls.c: if we're not trimming, return the same string.
3139         When not splitting, don't create a new string.
3140
3141 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3142
3143         * image.c:
3144         (mono_image_open): increment the ref_count inside the critical section.
3145
3146 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
3147
3148         * image.c (mono_image_open): Fix reference counting bug.
3149
3150 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
3151
3152         * marshal.c (mono_marshal_type_size) struct alignment changed for 
3153         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
3154         64bits. Avoid leak in mono_marshal_get_native_wrapper when
3155         mono_lookup_pinvoke_call throws.        
3156
3157 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
3158
3159         * reflection.c (mono_reflection_parse_type): Fix #49114.
3160
3161         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
3162         temporary workaround for cygwin header problem.
3163
3164         * object.c (mono_object_isinst): Synchronize this with the code
3165         generated by the JIT for casts.
3166
3167 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
3168
3169         * reflection.c (encode_type): Fix #38332.
3170
3171 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
3172
3173         * marshal.c (mono_marshal_method_from_wrapper): New function to return
3174         the original method from the wrapper method.
3175
3176 2003-09-25  Martin Baulig  <martin@ximian.com>
3177
3178         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
3179         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
3180         (ves_icall_Type_get_IsGenericInstance): New interncall.
3181
3182 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
3183
3184         * object.c: fix cast warning in big endian code.
3185
3186 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
3187
3188         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
3189         
3190 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3191
3192         * assembly.c: don't call check_env from mono_assembly_load. It's
3193         already done once in mono_assemblies_init and may cause headaches when
3194         multiple threads are loading assemblies.
3195
3196 2003-09-19  Martin Baulig  <martin@ximian.com>
3197
3198         * reflection.c (mono_reflection_define_generic_parameter): Don't
3199         allocate `klass->methods', set `klass->flags' to
3200         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
3201
3202 2003-09-18  Martin Baulig  <martin@ximian.com>
3203
3204         * class.c (mono_class_init): Don't create `class->methods' if it's
3205         already initialized.
3206
3207         * metadata.c (mono_metadata_load_generic_params): Make this
3208         actually work.
3209
3210         * reflection.c (mono_reflection_define_generic_parameter): Set
3211         parent class and interfaces from the constraints.
3212
3213         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
3214         to keep this struct in sync with the declaration in TypeBuilder.cs.
3215
3216 2003-09-17  Martin Baulig  <martin@ximian.com>
3217
3218         * metadata.h (MonoType): Replaced the data's `int type_param'
3219         field with `MonoGenericParam *generic_param'.
3220         (MonoGenericParam): Added `MonoClass *klass'.
3221
3222         * class.c (mono_class_from_gen_param): Removed the
3223         `MonoImage *image' and `int type_num' arguments.
3224
3225         * metadata.c (mono_metadata_parse_generic_param): New static
3226         method; creates a MonoGenericParam which just contains the index.
3227         (do_mono_metadata_parse_type): Call
3228         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
3229         MONO_TYPE_MVAR.
3230
3231         * reflection.c (mono_image_typedef_or_ref): Generic type
3232         parameters may be in the same assembly, but never use a typedef
3233         for them.
3234         (mono_reflection_define_generic_parameter): We're now creating a
3235         "real" class for the type parameter; it's now safe to call
3236         mono_class_from_mono_type() on the class'es type, it'll do the
3237         right thing.
3238
3239 2003-09-16  Martin Baulig  <martin@ximian.com>
3240
3241         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
3242         `symfile->range_entry_size' and `symfile->class_entry_size' here;
3243         the `symfile' data structure must be fully initialized before it
3244         gets added to the table.
3245
3246 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
3247
3248         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
3249
3250         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
3251         class init trampolines.
3252
3253 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
3254
3255         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
3256         to the built-in profiler to turn off time and allocation profiling
3257         respectively.
3258
3259 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
3260
3261         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
3262         g_direct_equal.
3263
3264         * debug-helpers.c (mono_method_full_name): Print the wrapper type
3265         in human readable form.
3266
3267 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
3268
3269         * reflection.c icall.c: Fixed warnings.
3270
3271         * image.c (load_class_names): Use a temporary hash table to hold the
3272         namespaces in order to avoid doing many string comparisons.
3273
3274         * image.h: Fix typo.
3275
3276         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
3277         Pass NULL instead of g_direct_equal to the GHashTable constructor 
3278         since the NULL case is short-circuited inside g_hash_table_lookup, 
3279         leading to better performance.  
3280
3281         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
3282         obtain the first custom attribute for a given index. Depends on the
3283         CustomAttribute table being sorted by the parent field.
3284
3285         * reflection.c (mono_custom_attrs_from_index): Use the new function 
3286         for better performance.
3287
3288 2003-09-07  Martin Baulig  <martin@ximian.com>
3289
3290         * class.c (mono_class_init): If we're a generic instance, inflate
3291         all our methods instead of loading them from the image.
3292         (mono_class_from_generic): Set `class->methods = gklass->methods'.
3293
3294 2003-09-07  Martin Baulig  <martin@ximian.com>
3295
3296         * mono-debug-debugger.c: Added support for constructors.
3297
3298 2003-09-06  Martin Baulig  <martin@ximian.com>
3299
3300         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
3301         New interncall.
3302
3303         * reflection.c (mono_reflection_setup_generic_class): Call
3304         ensure_runtime_vtable() to create the vtable.
3305
3306 2003-09-05  Martin Baulig  <martin@ximian.com>
3307
3308         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
3309         MONO_TYPE_MVAR.
3310
3311 2003-09-04  Martin Baulig  <martin@ximian.com>
3312
3313         * reflection.c (mono_reflection_define_generic_parameter): Generic
3314         parameters start with zero.
3315
3316 2003-09-04  Martin Baulig  <martin@ximian.com>
3317
3318         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3319
3320         * reflection.h (MonoReflectionGenericParam): New typedef.
3321         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
3322         the generic parameters from the managed TypeBuilder.
3323
3324         * reflection.c (mono_reflection_define_generic_parameter): New function.
3325         (mono_reflection_create_runtime_class): Encode generic parameters.
3326         (mono_reflection_setup_generic_class): New function; this is
3327         called after adding adding all generic params to the TypeBuilder.
3328         (encode_type): Added MONO_TYPE_VAR.
3329
3330 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
3331
3332         * class.h class.c (mono_class_needs_cctor_run): Moved this method
3333         here from the JIT.
3334
3335         * assembly.h assembly.c: Moved the AOT loading code into an assembly
3336         load hook.
3337
3338 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
3339
3340         * reflection.h reflection.c class.h class.c: Delete duplicate 
3341         definition of mono_type_get_name () from reflection.c and export the
3342         one in class.c.
3343
3344         * class.c: Class loading fixes from Bernie Solomon 
3345         (bernard@ugsolutions.com).
3346
3347         * reflection.c: Endianness fixes from Bernie Solomon 
3348         (bernard@ugsolutions.com).
3349         
3350 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
3351
3352         * assembly.h assembly.c: Define a file format version for AOT
3353         libraries.
3354         
3355         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
3356
3357         * appdomain.h (MonoJitInfo): New field to determine whenever the
3358         code is domain neutral.
3359         
3360 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
3361
3362         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
3363
3364 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
3365
3366         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
3367         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
3368         Avoid caching the result since strings must be domain specific. Fixes
3369         #48050.
3370
3371 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
3372
3373         * marshal.c (mono_marshal_init): Make this callable multiple times
3374         since it is hard to find a correct place to call it.
3375
3376         * object.c (mono_runtime_class_init): Execute static constructors in
3377         the correct appdomain.
3378
3379         * image.c (build_guid_table): Handle the case when multiple images have
3380         the same GUID.
3381
3382 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3383
3384         * icall.c: added a couple of icalls for System.Web.
3385
3386 2003-08-28  Martin Baulig  <martin@ximian.com>
3387
3388         * icall.c (ves_icall_Type_BindGenericParameters): Use
3389         `klass->generic_inst' instead of `&klass->byval_arg' in the
3390         mono_type_get_object() call.  The returned type must be
3391         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
3392
3393 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
3394
3395         * NOTES: New file.
3396
3397         * object.c (mono_class_proxy_vtable): Make it thread safe.
3398
3399         * pedump.c: Fix warning.
3400
3401         * object.c appdomain.h: Get rid of metadata_section. 
3402         It is no longer needed and it was causing deadlocks with domain->lock.
3403
3404         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
3405
3406 2003-08-26  Martin Baulig  <martin@ximian.com>
3407
3408         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
3409
3410 2003-08-26  Martin Baulig  <martin@ximian.com>
3411
3412         * pedump.c (main): Call mono_metadata_init(),
3413         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
3414         and mono_loader_init().
3415
3416 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
3417
3418         * loader.h: Add missing include to fix build.
3419
3420         * image.h: mono_image_load_references is no more.
3421
3422         * assembly.c: Reworked assembly loading to make it really thread safe.
3423         After these changes, the assembly returned by mono_assembly_open is
3424         fully initialized, i.e. all its references assemblies are loaded.
3425
3426         * assembly.c (mono_image_load_references): Renamed to 
3427         mono_assembly_load_references, and made private, since clients no
3428         longer need to call it.
3429
3430         * class.c: Removed calls to mono_assembly_load_references, since it was
3431         a source of deadlocks.
3432
3433         * loader.h loader.c class.h class.c: Protect data structures using a 
3434         new lock, the loader lock.
3435
3436         * class.c (mono_class_setup_vtable): Create temporary hash tables and
3437         GPtrArrays only when needed.
3438
3439         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
3440         into empty structures by mcs. Fixes pinvoke7.cs.
3441         
3442         * domain.c (mono_init): Call a new initialization function.
3443
3444         * appdomain.c (mono_runtime_init): Call the new initializer function
3445         of the marshal module.
3446
3447         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
3448         inserted into empty structures by mcs. Fixes pinvoke7.cs.
3449
3450         * marshal.h marshal.c: Added locks around the wrapper caches to make
3451         this module thread safe.
3452
3453         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
3454         this argument. Fixes pinvoke1.exe.
3455
3456 2003-08-25  Lluis Sanchez <lluis@ximian.com>
3457
3458         * object.h: Added call_type field to MonoMethodMessage and the corresponding
3459         enumeration of values. Removed fields to store remote call output values in
3460         MonoAsyncResult. Not needed any more.
3461         * object.c: Initialize call_type and async_result fields in mono_message_init.
3462         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
3463         dispatching the message.
3464         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
3465         async call to finish. To do it use a message with EndInvoke call type.
3466
3467 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
3468
3469         * loader.h loader.c (mono_method_hash_marhal_info): New function which
3470         determines whenever a method has marshalling info.
3471
3472 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3473
3474         * assembly.c: fix the build on windows.
3475
3476 2003-08-22 Lluis Sanchez <lluis@ximian.com>
3477
3478         * object.cs: Fixed bug #47785.
3479
3480 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
3481
3482         * string-icalls.c (StringReplace): If their are no occurances of
3483         the old string found return a reference to the supplied
3484         string. This saves some memory and matches MS behavoir.
3485         
3486 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3487
3488         * socket-io.c: fixed compilation for systems that define AF_INET6
3489         and don't define SOL_IP/SOL_IPV6.
3490
3491 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
3492
3493         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
3494         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
3495
3496         * rawbuffer.c rawbuffer.h: Make this module thread safe.
3497
3498         * domain.c: Make this module thread safe.
3499
3500         * domain.c (mono_init): Call new initialization function.
3501
3502         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
3503         reference types too. Fixes #38812.
3504
3505         * image.c (mono_image_init): Fixed warnings.
3506
3507         * class.c (mono_class_from_typeref): Handle assembly load failure
3508         correctly.
3509
3510         * appdomain.c (add_assemblies_to_domain): Handle the case when
3511         the references of an assembly are not yet loaded.
3512
3513         * metadata.c image.c assembly.c: Moved initialization of global
3514         variables to a separate function called at startup since lazy 
3515         initialization of these variables is not thread safe.
3516         
3517         * image.c assembly.c: Made this module thread safe by adding locks in 
3518         the appropriate places.
3519
3520         * domain.c (mono_init): Call the new initialization functions of the
3521         three modules.
3522
3523 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
3524
3525         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
3526           make a direct call. It is proxy's work to make the call asynchronous.
3527           mono_delegate_end_invoke(): If the targe is a proxy, just collect
3528           the return values.
3529         * object.cs: mono_method_call_message_new(): read AsyncResult and
3530           state object from parameters list, if this info is requested.
3531         * object.h: Added fields to store remote call output values in
3532           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
3533
3534 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3535
3536         * object.h: add needed fields to MonoThread.
3537         * threads.c, threads.h: allow registering a function to cleanup data
3538         allocated per thread by the JIT.
3539
3540 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3541
3542         * loader.h: portability fix by Bernie Solomon
3543         * <bernard@ugsolutions.com>.
3544
3545 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
3546
3547         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
3548         return a MonoArray. This simplifies the code and also ensures that
3549         the cache allways contains an object reference as a value.
3550
3551         * icall.c (ves_icall_get_parameter_info): Simplified using the new
3552         function.
3553
3554 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3555
3556         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
3557         fixes a problem with byte ordering when getting the address family for
3558         a socket.
3559
3560 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
3561
3562         * .cvsignore: Added monosn.
3563
3564         * reflection.h reflection.c loader.c: Added support for parameter
3565         marshalling to dynamically created types. Fixes #47295.
3566
3567 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
3568
3569         * rand.c: remove useless warnings.
3570
3571 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
3572
3573         * class.c: implemented ldtoken for methods and fieldrefs.
3574
3575 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3576
3577         * threadpool.c: when mono_async_invoke was called, no one took care of
3578         monitoring the queue. So if the method invoked took some time and we
3579         got new async invoke requests after 500 ms (the thread created waited
3580         that long in WaitForSingleObject), the new async invoke was not called
3581         until the previous one finished.
3582
3583         This is fixed now. Thanks to Totte for helping with it.
3584
3585 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3586
3587         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
3588
3589 2003-08-11  Martin Baulig  <martin@ximian.com>
3590
3591         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
3592
3593 2003-08-06  Martin Baulig  <martin@ximian.com>
3594
3595         * mono-debug-debugger.c: Added support for static fields,
3596         properties and methods.
3597
3598 2003-08-06  Martin Baulig  <martin@ximian.com>
3599
3600         * mono-debug-debugger.c: Don't store the MonoString's vtable to
3601         make this work for applications with multiple application domains.
3602
3603 2003-08-04  Martin Baulig  <martin@ximian.com>
3604
3605         * mono-debug-debugger.c: Completely reworked the type support; the
3606         most important thing is that we're now just using one single
3607         `MonoType' instance per type.
3608
3609 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
3610
3611         * mono-endian.h, mono-endian.c, icall.c: Added icall
3612         ves_icall_System_Double_AssertEndianity to assert double word endianity
3613         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
3614
3615 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3616
3617         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
3618         support, icalls and fixes.
3619
3620 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
3621
3622         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
3623         classes that are a punctuation character in .NET is not the same a
3624         g_unichar_ispunct.
3625
3626 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3627
3628         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
3629
3630 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
3631
3632         * icall.c: Add new MemCopy internalcall.
3633         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
3634         Simplified code; It is not necessary to handle all the cases here,
3635         as the C# code takes care of it.  Only handle the case of the name
3636         resource embedded into the assembly.
3637
3638         Changed signature to return the data pointer and the size of the
3639         data. 
3640
3641 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
3642
3643         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
3644         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
3645
3646 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
3647
3648         * socket-io.c: ignore EINTR error in select.
3649
3650 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
3651
3652         * class.h, class.c: removed unused subclasses field in MonoClass.
3653
3654 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
3655
3656         * icall.c: improve fix of get_base_definition(). If the parent class
3657           doesn't have the mehod, look at the parent of the parent.
3658         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
3659           to check if a parameter is an in or out parameter
3660           (PARAM_ATTRIBUTE_IN is not set by default).
3661           mono_method_return_message_restore(): Use mono_class_value_size to
3662           get the size of a value type. mono_type_stack_size (parameterType)
3663           does not return the correct value if parameterType is byRef.
3664           mono_load_remote_field(), mono_load_remote_field_new(),
3665           mono_store_remote_field(), mono_store_remote_field_new():
3666           raise exception if the remote call returns an exception.
3667
3668 2003-07-28  Martin Baulig  <martin@ximian.com>
3669
3670         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
3671         method.  This is a wrapper around mono_runtime_invoke() which
3672         boxes the instance object if neccessary.
3673
3674 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3675
3676         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
3677         metadata.h, row-indexes.h, verify.c: first cut of generics support.
3678
3679 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3680
3681         * icall.c: disable mcs bug workaround.
3682
3683 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
3684
3685         * object.c (mono_runtime_class_init): Take the metadata_section
3686         mutex before obtaining the domain mutex.
3687
3688         * appdomain.h: Added definition of metadata_section mutex here. 
3689
3690         * object.c: define metadata_mutex here.
3691
3692 2003-07-24  Ravi Pratap  <ravi@ximian.com>
3693
3694         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
3695         fixed.
3696
3697 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
3698
3699         * reflection.c: Fix bug #46669
3700
3701 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3702
3703         * exception.c:
3704         * exception.h:
3705         * icall.c:
3706         * object.h: fill in the type name for TypeLoadException.
3707
3708 2003-07-23  Ravi Pratap  <ravi@ximian.com>
3709
3710         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
3711         relationship between TypeBuilders while compiling corlib) and bug
3712         45993 (Array types returned from the runtime while compiling
3713         corlib were from the loaded corlib).
3714
3715 2003-07-22  Martin Baulig  <martin@ximian.com>
3716
3717         * mono-debug-debugger.c: Reworked the type support a bit more;
3718         distinguish between types and classes.
3719
3720 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
3721
3722         * icall.c: add IsArrayImpl icall.
3723
3724 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
3725
3726         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
3727         initializing real_size only once. Also fix bug #46602.
3728
3729 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
3730
3731         * object.c: Renamed mono_metadata_section to metadata_section.
3732
3733 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
3734
3735         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
3736           empty array if the type is an array. Fixed.
3737           ves_icall_MonoMethod_get_base_definition: if the base method
3738           is abstract, get the MethodInfo from the list of methods of
3739           the class.
3740         * reflection.c: ParameterInfo.PositionImpl should be zero-based
3741           and it was 1-based. Fixed in mono_param_get_objects.
3742
3743 2003-07-20  Martin Baulig  <martin@ximian.com>
3744
3745         * mono-debug.h: Set version number to 31.
3746         (mono_debug_init): Added `MonoDomain *' argument.
3747
3748         * mono-debug-debugger.c: Reworked the type support; explicitly
3749         tell the debugger about builtin types; pass the `klass' address to
3750         the debugger.
3751
3752 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
3753
3754         * image.c: Allow new metadata tables to be loaded without a
3755         warning. Also update the warning message to give the new constant value.
3756                 
3757 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
3758
3759         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
3760         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
3761         array type representation changes.
3762
3763 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
3764
3765         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
3766         on Environment.Exit () call.
3767
3768 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
3769
3770         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
3771         requires a matching corlib.
3772
3773 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
3774
3775         * Changelog: My editor decided to add a CR to each line. Sorry about that.
3776           Committed again without the CRs.
3777         
3778 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
3779
3780         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
3781           getting it from the "this" socket instance. Did not work
3782           if the socket is a subclass of Socket.
3783           Also fixed bug #35371.
3784
3785 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
3786
3787         * metadata.c: fixed size for TypedByRef.
3788         * loader.c: when searching for a method, consider the vararg amrker.
3789         * unicode.c, decimal.c: constify some arrays.
3790
3791 2003-07-15  Dick Porter  <dick@ximian.com>
3792
3793         * socket-io.c: Fixed compilation for gcc < 3.2.
3794
3795         Fixed compilation for machines that don't have AF_INET6 (thanks to
3796         Bernie Solomon <bernard@ugsolutions.com> for that part.)
3797
3798         Fixed compile warnings.
3799         
3800         Fixed formatting and line endings.
3801
3802 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
3803
3804         * socket-io.h:
3805         * socket-io.c: Added IPv6 support.
3806
3807 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
3808
3809         * class.c (mono_class_is_assignable_from): New function to implement
3810         the is_assignable_from logic. Used by mono_object_isinst, 
3811         Type::IsAssignableFrom () and the interpreter.
3812
3813         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
3814         Object, even interfaces.
3815         
3816         * object.c (mono_object_isinst): Implement in terms of 
3817         is_assignable_from.
3818
3819         * icall.c (ves_icall_type_is_assignable_from): New icall.
3820
3821 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
3822
3823         * domain.c (foreach_domain): fix compiler warning.
3824
3825 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
3826
3827         * image.c (load_metadata_ptrs): use g_strndup because strndup is
3828         not available on all plattforms
3829
3830 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
3831
3832         * image.h image.c: Store the metadata version string in MonoImage.
3833         * icall.c: New icall to retrieve the image version.
3834         * reflection.c (create_dynamic_image): Fill in the image version field
3835         * reflection.c (build_compressed_metadata): Use the image version
3836         from the image structure.
3837
3838 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3839
3840         * appdomain.c: modified comment.
3841         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
3842         That will be its last iteration when mono_gc_cleanup is called from
3843         mono_runtime_cleanup and before the domain is unloaded.
3844
3845         Fixes bug #45962.
3846
3847 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
3848
3849         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
3850         attributes.
3851
3852 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3853
3854         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
3855         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
3856         Bernie Solomon <bernard@ugsolutions.com>.
3857
3858 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
3859
3860         * object.c, object.h: provide mono_object_new_fast() for faster
3861         allocation in some special cases.
3862
3863 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
3864
3865         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
3866         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
3867
3868 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
3869
3870         * threadpool.c: fix leaks.
3871
3872 2003-07-01  Dick Porter  <dick@ximian.com>
3873
3874         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
3875         using MonoGHashTables.  Fixes threadpool bug posted to list.
3876
3877 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3878
3879         * image.h, image.c: added support to load an assembly from a byte array.
3880         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
3881         assembly bundle support.
3882
3883 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
3884
3885         * threadpool.c (mono_thread_pool_add): keep a reference to the
3886         AsyncResult to prevent GC
3887
3888 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
3889
3890         * class.c: leak fix.
3891
3892 2003-06-25  Dick Porter  <dick@ximian.com>
3893
3894         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
3895         for the async object, the WaitHandle object will close the handle.
3896         Fixes bug 45321.
3897
3898 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
3899
3900         * class.c: in mono_array_class_get (), lookup from the hash with the
3901         same type we insert: this works around a bug in
3902         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
3903         lluis. The real fix will have to wait for after the release.
3904
3905 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
3906
3907         * icall.c: fix memory leak when getting type members.
3908
3909 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
3910
3911         * reflection.c: added more pubtoken special cases.
3912
3913 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
3914
3915         * class.c: handle field offset correctly when class size
3916         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
3917
3918 2003-06-20  Martin Baulig  <martin@ximian.com>
3919
3920         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
3921         *image' field.
3922
3923 2003-06-20  Martin Baulig  <martin@ximian.com>
3924
3925         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
3926
3927 2003-06-20  Martin Baulig  <martin@ximian.com>
3928
3929         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
3930         just distinguish between variables in registers and variables at
3931         an offset relative to a register.
3932
3933 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3934
3935         * icall.c: #ifdef out latest changes until mcs is fixed.
3936
3937 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3938
3939         * icall.c: return members in metadata order.
3940
3941 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
3942
3943         * icall.c: avoid infinite loop in GetTimeZoneData.
3944
3945 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
3946
3947         * icall.c: added Marshal.Prelink/All icalls.
3948
3949 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
3950
3951         * object.c, object.h: fix warnings and do some overflow checking
3952         when creating arrays.
3953
3954 2003-06-17  Dick Porter  <dick@ximian.com>
3955
3956         * file-io.h:
3957         * file-io.c: File attributes need to be tweaked slightly when
3958         passed from the managed to the w32 world.
3959
3960 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
3961         * profiler.h profiler-private.h profiler.c: Rework last patch
3962         based on suggestion by Paolo.
3963         
3964 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
3965
3966         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
3967         instruction level coverage data collection.
3968         * profiler.h profiler.c (: Added new callback function which can be
3969         used by the profiler to limit which functions should have coverage
3970         instrumentation.
3971         * profiler.c (mono_profiler_load): Call g_module_build_path to
3972         generate the file name of the profiler library.
3973
3974 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3975
3976         * profiler.c, profiler.h, profiler-private.h: added basic block 
3977         coverage profiling API.
3978
3979 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
3980
3981         * reflection.c (mono_reflection_create_runtime_class): Add support
3982         for events in dynamically generated code.
3983
3984         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
3985         not allocated.
3986
3987 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
3988
3989         * icall.c: when getting timezone info, return reasonable values if we
3990         can't get the actual data.
3991
3992 2003-06-14  Dick Porter  <dick@ximian.com>
3993
3994         * threads.c (start_wrapper): Remove the reference to the thread
3995         object in the TLS data, so the thread object can be finalized.
3996         This won't be reached if the thread threw an uncaught exception,
3997         so those thread handles will stay referenced :-( (This is due to
3998         missing support for scanning thread-specific data in the Boehm GC
3999         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
4000
4001 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
4002
4003         * reflection.c: ensure streams and tables are first allocated with
4004         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
4005
4006 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4007
4008         * icall.c: fixed GetElementType for byrefs (bug# 44792).
4009
4010 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
4011
4012         * reflection.c (mono_reflection_create_runtime_class): Add support for
4013         properties to dynamically created classes.
4014         * reflection.c: Fix a few places where non-MonoObjects were inserted
4015         into the tokens hashtable.
4016
4017 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4018
4019         * object.c: some support to handle out of memory exceptions.
4020
4021 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
4022
4023         * marshal.c (mono_marshal_get_native_wrapper): support reference
4024         return types
4025
4026 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4027
4028         * object.h, object.c: more portability stuff from Bernie Solomon.
4029         Unexport mono_object_allocate(). Added mono_object_unbox ().
4030         Set exitcode when an unhandled exception is thrown.
4031
4032 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
4033
4034         * marshal.c (mono_marshal_get_native_wrapper): use custom
4035         marshaler for return types.
4036
4037 2003-06-10  Dick Porter  <dick@ximian.com>
4038
4039         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
4040         ip_mreq is available
4041
4042 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
4043
4044         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
4045         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
4046         by Bernie Solomon <bernard@ugsolutions.com>.
4047
4048 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
4049
4050         * gc.c (mono_gc_init): Avoid error message on shutdown when
4051         GC_DONT_GC=1 is used.
4052
4053         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
4054         New icall to return the GUID of a module.
4055
4056 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4057
4058         * class.c: ensure instance size always includes the parent's size
4059         even whem class size is set explicitly (fixes bug#44294).
4060
4061 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4062
4063         * profiler.h, profiler.c: made the simple profiler thread-safe,
4064         get more accurate timing info. Allow the loading of an
4065         externally-developed profiler module.
4066
4067 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
4068
4069         * marshal.c (mono_marshal_get_native_wrapper): improved
4070         class/byref arguments.
4071         (mono_marshal_get_native_wrapper): better string marshaling support.
4072
4073 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
4074
4075         * class.c: ensure .pack and .size are handled correctly and
4076         simplified layout of static fields.
4077
4078 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
4079
4080         * appdomain.c
4081         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
4082
4083         * loader.c (mono_lookup_pinvoke_call): look for modules in the
4084         current directory (fix bug 44008)
4085
4086 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
4087
4088         * marshal.c (mono_marshal_get_native_wrapper): started support for
4089         custom marshalers.
4090         (mono_delegate_to_ftnptr): consider marshalling specifications
4091
4092 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
4093
4094         * reflection.c, reflection.h: emit custom marshal info.
4095
4096 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4097
4098         * object.c: free the GError.
4099         * icall.c: added CloseEvent_internal.
4100         * threads.[ch]:
4101         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
4102         call.
4103
4104 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
4105
4106         * loader.c (mono_method_get_signature): Add support for dynamic
4107         assemblies.
4108
4109 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
4110
4111         * reflection.c: fixed bug #43905.
4112
4113 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4114
4115         * class.c, domain.c, icall.c, metadata.h, object.h: support for
4116         handling TypedReference and ArgIterator.
4117         * loader.c, loader.h: added function to get signature at call site.
4118
4119 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4120
4121         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
4122         data readonly. Buglets and warning fixes. Some MethodSpec support.
4123
4124 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4125
4126         * class.h, class.c, object.c: remove relative numbering support.
4127
4128 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
4129
4130         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
4131         free the string, until we get a chance to fix Gtk#
4132
4133 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4134
4135         * marshal.c: revert last patch.
4136
4137 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
4138
4139         * icall.c: updates for new mono_class_vtable() not calling
4140         the type constructor anymore.
4141
4142 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
4143
4144         * object.h, object.c: separate vtable creation from type
4145         initialization. Make running the .cctor thread safe.
4146
4147 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
4148
4149         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
4150
4151 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
4152
4153         * loader.c (mono_get_method): consider calling convention
4154
4155 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
4156
4157         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
4158         to return the invisible global type for a module.
4159
4160         * reflection.c (mono_image_build_metadata): Emit global fields too.
4161
4162 2003-05-20  Peter Williams  <peterw@ximian.com>
4163
4164         * loader.c (mono_lookup_internal_call): Add a few newlines.
4165
4166 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
4167
4168         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
4169         literal strings.
4170
4171         * appdomain.c (set_domain_search_path): Recalculate search path when
4172         AppDomainSetup.PrivateBinPath changes.
4173
4174         * object.c (mono_class_compute_gc_descriptor): It turns out some
4175         parts of the class libs (like System.Thread) holds pointers to
4176         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
4177         to treat native int a pointer type here.
4178         
4179 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
4180
4181         * appdomain.h, domain.c: add hashtable for jump target resolution.
4182
4183 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
4184
4185         * reflection.h reflection.c icall.c: Added new icalls 
4186         GetManifestResourceInfoInternal, GetModulesInternal and support
4187         infrastructure.
4188
4189 2003-05-16  Dick Porter  <dick@ximian.com>
4190
4191         * icall.c:
4192         * file-io.h:
4193         * file-io.c: Implement System.IO.MonoIO::GetTempPath
4194
4195 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
4196
4197         * object.c: mono_store_remote_field: little fix to previous patch.
4198
4199 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4200
4201         * class.c: add constructors to array classes.
4202         * icall.c: special case array construction for InternalInvoke (),
4203
4204 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
4205
4206         * class.h class.c reflection.c object.c: Added support for field
4207         defaults in dynamically generated classes.
4208
4209 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
4210
4211         * reflection.c: properly encode charset for ddlimport.
4212
4213 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
4214
4215         * threads.c: allow compiling without GC.
4216
4217 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4218
4219         * appdomain.h, object.c, object.h, threads.c, threads.h: added
4220         handling of thread static data.
4221
4222 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4223
4224         * reflection.h, reflection.c: added mono_custom_attrs_free ().
4225
4226 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
4227
4228         * class.c (mono_array_class_get): always set the serializable flags
4229         (mono_array_class_get): always set the SEALED attribute for array types
4230
4231 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
4232
4233         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
4234         attributes (fix for bug 42021).
4235
4236 2003-05-12  Dick Porter  <dick@ximian.com>
4237
4238         * gc.c: Don't run finalizers when the finalizer thread is
4239         finishing up, because the default domain has already been
4240         destroyed.
4241
4242 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
4243
4244         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
4245         value is null, we should throw an exception.   This is slightly
4246         different than the other conventions used for the constructor.
4247
4248 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4249
4250         * socket-io.c: fixed windows build.
4251
4252 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4253
4254         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
4255
4256 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
4257
4258         * object.c (mono_string_new_wrapper): Compatibility fix for MS
4259         compilers.
4260
4261 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
4262
4263         * class.c (mono_class_layout_fields): Add experimental GC aware
4264         auto layout facility. Requires class library changes to work correctly.
4265
4266         (mono_class_setup_vtable): Avoid overriding explicit interface
4267         method implementations. Fixes iface3.exe test.
4268
4269         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
4270         object reference.
4271         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
4272         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
4273
4274         * metadata.h: Add new type classification macro which determines
4275         whenever the type holds an object reference.
4276
4277 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
4278
4279         * marshal.c (mono_marshal_get_native_wrapper): cleanups
4280
4281 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
4282
4283         * gc.c (finalizer_thread): Work around a GC bug.
4284
4285 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
4286
4287         * marshal.c (emit_struct_conv): allow unions
4288
4289         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
4290
4291 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
4292
4293         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
4294
4295 2003-05-06  Martin Baulig  <martin@ximian.com>
4296
4297         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
4298
4299 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4300
4301         * socket-io.c:
4302         (Select_internal): allow NULLs, don't create arrays if not needed.
4303         Coupled with Socket.cs changes.
4304
4305         * threadpool.c:
4306         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
4307         register a finalizer for it that will close the semaphore handle. This
4308         fixes the leak and make Lupus' test run with > 4080 loops.
4309
4310 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
4311
4312         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
4313         Jerome Laban (bug #42287)
4314
4315 2003-05-02  Martin Baulig  <martin@ximian.com>
4316
4317         * debug-mono-symfile.h
4318         (MonoSymbolFile): Moved declaration into mono-debug.h.
4319         (MonoDebugMethodJitInfo): Likewise.
4320         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
4321         argument.
4322         (_mono_debug_address_from_il_offset): Take a
4323         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
4324
4325         * mono-debug.h
4326         (MonoDebugDomainData): New struct.
4327         (mono_debug_get_domain_data): New function.
4328         (mono_debug_add_method): Take an additional `MonoDomain *'
4329         argument.
4330         (mono_debug_source_location_from_address): Likewise.
4331         (mono_debug_il_offset_from_address): Likewise.
4332         (mono_debug_address_from_il_offset): Likewise.
4333
4334 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
4335
4336         * reflection.c: one more check for null type in custom attrs.
4337
4338 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4339
4340         * reflection.c: avoid warning (comparison is always false due to limited
4341         range of data type).
4342
4343 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4344
4345         * icall.c: throw an exception in Type.GetField if the argument 'name'
4346         is NULL.
4347
4348 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
4349
4350         * reflection.c: fixed handling of enums in named arguments to custom
4351         attributes (bug #42123).
4352
4353 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
4354
4355         * reflection.c: use the right array element type and handle
4356         a null for a Type argument, too.
4357
4358 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
4359
4360         * reflection.c: handle arrays as arguments to custom attributes.
4361
4362 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
4363
4364         * reflection.c: handle a string value in a custom attr
4365         ctor that takes an object.
4366
4367 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
4368
4369         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
4370         (fix bug #42063)
4371
4372 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
4373
4374         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
4375
4376 2003-04-27  Martin Baulig  <martin@ximian.com>
4377
4378         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
4379         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
4380         MONO_DEBUGGER_EVENT_BREAKPOINT.
4381         (mono_breakpoint_trampoline_code): Removed.
4382         (mono_debugger_event_handler): The last argument is now a
4383         `guint32'.
4384         (mono_debugger_insert_breakpoint_full): Removed the
4385         `use_trampoline' argument.
4386         (mono_debugger_method_has_breakpoint): Likewise.
4387         (mono_debugger_trampoline_breakpoint_callback): Renamed to
4388         mono_debugger_breakpoint_callback(); take the method and
4389         breakpoint number as arguments.
4390
4391 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
4392
4393         * metadata.c: fix off by one when loading parameters attributes.
4394
4395 2003-04-24  Martin Baulig  <martin@ximian.com>
4396
4397         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
4398
4399 2003-04-24  Martin Baulig  <martin@ximian.com>
4400
4401         * mono-debug-debugger.c: Moved all code which interacts with the
4402         Mono Debugger here.
4403
4404         * debug-mono-symfile.c: This code now just deals with the symbol
4405         file itself, the debugger code is now in mono-debug-debugger.c.
4406
4407 2003-04-23  Martin Baulig  <martin@ximian.com>
4408
4409         * mono-debug.c (mono_debug_source_location_from_il_offset):
4410         New method; like mono_debug_source_location_from_address(), but
4411         takes an IL offset instead of a machine address.
4412
4413 2003-04-23  Martin Baulig  <martin@ximian.com>
4414
4415         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
4416         `line' field; this is now computed by the debugger.
4417
4418 2003-04-23  Martin Baulig  <martin@ximian.com>
4419
4420         * mono-debug.[ch]: New files.  This is the new debugging interface.
4421
4422         * mono-debug-debugger.[ch]: New files.  Moved all code which
4423         interacts with the Mono Debugger here.
4424
4425 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
4426
4427         * domain.c (mono_init): initialize mono_defaults.monitor_class
4428
4429 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
4430
4431         * reflection.c (method_encode_code): Add a spicy exception to help
4432         future compiler authors.
4433
4434 2003-04-21  Martin Baulig  <martin@ximian.com>
4435
4436         * icall.c
4437         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
4438         Make this work with relative pathnames; g_filename_to_uri() needs
4439         an absolute filename.
4440
4441 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
4442
4443         * icall.c: Track name changes in Object and ValueType.
4444
4445 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
4446
4447         * metadata.c (mono_type_stack_size): size should be a multiple of
4448         sizeof (gpointer)
4449
4450 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4451
4452         * gc.c:
4453         (internal_domain_finalize): moved into mono_domain_finalize. No need
4454         to create another thread because the finalizers will be run in the
4455         finalizer thread.
4456         
4457         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
4458         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
4459         to be run (MS does this too).
4460
4461 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
4462
4463         * object.c (mono_class_compute_gc_descriptor): Update comment.
4464
4465         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
4466
4467         * image.h: Add synchronized wrapper cache.
4468
4469         * image.c (do_mono_image_open): Initialize cache.
4470
4471         * reflection.c (create_dynamic_mono_image): Initialize cache.
4472
4473 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4474
4475         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
4476         ves_icall_System_Buffer_ByteLengthInternal.
4477
4478 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4479
4480         * reflection.c: setup klass->nested_in earlier. Allow
4481         a dash in the assembly name.
4482
4483 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
4484
4485         * metadata.c (mono_type_to_unmanaged): dont access
4486         type->data.klass for MONO_TYPE_OBJECT
4487         (mono_type_to_unmanaged): consider System.Delegate class
4488
4489 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
4490
4491         * class.c: just setup supertypes in the proper place instead of
4492         initializing the full element class for arrays.
4493
4494 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
4495
4496         * class.c: ensure the element class of arrays is initialized.
4497         Setup the supertype info for array classes, too.
4498
4499 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
4500
4501         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
4502
4503 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4504
4505         * Makefile.am: re-added -m option when running cygpath. This way,
4506         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
4507         separator.
4508         * mono-config.c: same codepath for locating mono config file for WIN32
4509         and the rest.
4510         * assembly.c: if mono_assembly_setrootdir is called, don't override
4511         the value set.
4512
4513 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4514
4515         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
4516         MONO_ASSEMBLIES variable.
4517
4518 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
4519
4520         * icall.c: added Assembly::GetNamespaces() icall.
4521
4522 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4523
4524         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
4525
4526 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
4527
4528         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
4529         * object.c: fixed bug in the construction of vtable for proxies
4530
4531 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
4532
4533         * object.c (mono_array_new): Mark mono_array_new as an icall.
4534
4535 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4536
4537         * class.c: fixed test for public method when overriding interfaces.
4538         Closes bug #40970.
4539
4540 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4541
4542         * appdomain.h, domain.c: added mono_domain_foreach() to
4543         be able to access the currently loaded appdomains.
4544         * object.c: make string interning work across sppdomains.
4545         Mark some functions for use as icalls.
4546
4547 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
4548
4549         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
4550
4551         * reflection.h reflection.c: Allocate long living data using 
4552         GC_MALLOC_ATOMIC so the collector does not need to scan it.
4553
4554         * reflection.c: Double the allocation size in streams instead of
4555         increasing it, to prevent unneccesary copying on large assemblies.
4556         
4557         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
4558         creation if the assembly does not have the Run flag set.
4559
4560 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
4561
4562         * class.h: avoid the C++ keywords in header files (Jerome Laban
4563         spotted and fixed this).
4564
4565 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4566
4567         * object.c:
4568         (mono_unhandled_exception): fill in the arguments for the
4569         UnhandledException event. Only trigger that event for the default
4570         domain (as MS does).
4571
4572 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
4573
4574         * object.c: Improve typed allocation stuff based on suggestions from
4575         Paolo. Also turn it on if the GC library supports it.
4576
4577 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
4578
4579         * object.c object.h class.h: Added experimental typed allocation
4580         facility using the interfaces in gc_gcj.h.
4581
4582         * os/gc_wrapper.h: Added new include files.
4583         
4584 2003-04-03  Martin Baulig  <martin@ximian.com>
4585
4586         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
4587         which is not yet enabled by default.
4588
4589         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
4590         functions.
4591         (mono_gc_lock, mono_gc_unlock): New static functions.
4592
4593         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
4594         functions; stop/start the world for the garbage collector.  This
4595         is using the windows API; we need to complete the SuspendThread()/
4596         ResumeThread() implementation in the io-layer to make this work on Unix.
4597         (mono_gc_push_all_stacks): New public function; tells the garbage
4598         collector about the stack pointers from all managed threads.
4599
4600 2003-04-03  Martin Baulig  <martin@ximian.com>
4601
4602         * object.h (MonoThread): Added `gpointer stack_ptr'.
4603
4604         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
4605
4606 2003-04-03  Martin Baulig  <martin@ximian.com>
4607
4608         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
4609
4610 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
4611
4612         * reflection.c (typebuilder_setup_fields): Initialize field.first and
4613         field.last.
4614
4615 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
4616
4617         * loader.c (mono_lookup_internal_call): Report the corlib that is
4618         out of sync.
4619
4620 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
4621
4622         * icall.c (ves_icall_type_GetTypeCode): fixed check for
4623         System.DBNull (it's class not valuetype).
4624
4625 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
4626
4627         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
4628         if the array method was already assigned a token (fixes bug#40646).
4629
4630 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
4631
4632         * reflection.c (mono_reflection_get_type): Attempt type resolve even
4633         if no assembly is given.
4634
4635 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
4636
4637         * metadata.h: Added the new tables.
4638
4639         * row-indexes.h: Added definitions for new tables.
4640
4641         * metadata.c: Add schemas for new tables, and add support for
4642         computing the sizes of them.
4643
4644         * class.c: Update for handling the new type cases.
4645
4646 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
4647
4648         * metadata.h (MONO_TYPE_IS_VOID): new macro
4649
4650 2003-03-31  Martin Baulig  <martin@ximian.com>
4651
4652         * threads.h (MonoThreadCallbacks): Added `thread_created'.
4653
4654         * threads.c (mono_thread_new_init): Call `thread_created' in the
4655         mono_thread_callbacks.
4656
4657 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
4658
4659         * loader.h: added marshalbyrefobject_class to mono_defaults
4660         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
4661         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
4662           generation of output parameters.
4663           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
4664         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
4665           contextbound and the target object belongs to the context of the caller.
4666         * object.h: added context and unwrapped_server variables in MonoRealProxy.
4667         * object.c: Implemented support for interfaces and abstract classes
4668           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
4669           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
4670
4671 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
4672
4673         * class.h class.c (mono_class_is_subclass_of): New function.
4674         
4675         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
4676         routines for most common case (calls from ArrayList::ToArray).
4677
4678         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
4679         routine so programs which call Environment::Exit() can be profiled.
4680
4681         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
4682         Added MONO_ARCH_SAVE_REGS.
4683
4684         * icall.c (ves_icall_type_is_subtype_of): Use new function.
4685
4686 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
4687
4688         * blob.h: Add a couple of new MonoType types definitions.
4689
4690         * tabledefs.h: Add a couple of new call convs.
4691
4692 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
4693
4694         * reflection.h (MonoReflectionDynamicAssembly): track changes in
4695         the layout of the class.
4696
4697         * reflection.c (alloc_table): double the size on overflow to avoid
4698         unnecessary copying.
4699
4700         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
4701         avoid filling out metadata tables and blobs. Also set mb->ilgen to
4702         null so it can be garbage collected.
4703         
4704 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
4705
4706         * reflection.c (mono_reflection_get_type): Return the resolved type
4707         only if it is in the assembly we searched.
4708
4709         * reflection.c (ensure_runtime_vtable): Initialize method slots.
4710
4711         * class.c (mono_class_setup_vtable): Set the slot of the overriding
4712         method.
4713
4714 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4715
4716         * appdomain.c:
4717         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
4718         the right one is 'file:///blah', but MS allows it.
4719         * assembly.c:
4720         (mono_assembly_open): allow 'file://blah'
4721
4722         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
4723
4724 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
4725
4726         * socket-io.c: fixes bug #40310.
4727
4728 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
4729
4730         * reflection.c (mono_reflection_parse_type): handle deeply nested
4731         types correctly.
4732
4733         * reflection.c (mono_image_create_token): Use unique token values
4734         since they will be put into a hash table.
4735
4736         * class.c (mono_class_setup_vtable): If a method occurs in more than
4737         one place in the vtable, and it gets overriden, then change the
4738         other occurances too.
4739
4740         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
4741         object as return type.
4742
4743 2003-03-22  Pedro Martínez Juliá  <yoros@wanadoo.es>
4744
4745         * icall.c: Deleted "ToString" implementation for double and float
4746         because they are full implemented in managed code.
4747
4748 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
4749
4750         * reflection.c, reflection.h: implemented and exported functions
4751         to retrieve info about custom attributes.
4752
4753 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4754
4755         * appdomain.c: moved Uri handling to assembly.c
4756         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
4757         work when using a file Uri in *nix and windows.
4758
4759         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
4760         GetReferencedAssemblies.
4761
4762 2003-03-18  Dick Porter  <dick@ximian.com>
4763
4764         * icall.c: Rename a couple of internal calls
4765
4766         * threads.c: Set the thread state to Stopped when a thread exits.
4767         Fixes bug 39377.
4768
4769 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
4770
4771         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
4772         New icall.
4773
4774         * object.c (mono_class_vtable): fix warning.
4775
4776 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
4777
4778         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
4779
4780         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
4781         memory.
4782         (method_encode_clauses): Create exception info structures in the right
4783         order.
4784         (mono_reflection_setup_internal_class): Initialize supertypes field.
4785
4786         * class.c object.c: Handle interfaces which implement other interfaces 
4787         correctly.
4788
4789         * class.h class.c: Move the supertypes array initialization code into 
4790         a separate function so it can be used for dynamic types too. Also call
4791         it earlier, in mono_class_init(), since it can be used before the
4792         type is initialized.
4793
4794 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4795
4796         * Makefile.am:
4797         * assembly.c:
4798         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
4799
4800         * appdomain.c:
4801         * appdomain.h:
4802         * marshal.c:
4803         * object.c: remove warnings.
4804
4805 2003-03-13  Martin Baulig  <martin@ximian.com>
4806
4807         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
4808         (MonoDebugLexicalBlockEntry): New types.
4809
4810         * debug-mono-symfile.c
4811         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
4812
4813 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4814
4815         * process.c: ret can be any non-zero value accroding to MS doc.
4816
4817 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
4818
4819         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
4820         fixing a warning for a miss-used prototype, would have cause
4821         random memory corruption.
4822
4823 2003-03-07  Martin Baulig  <martin@ximian.com>
4824
4825         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
4826         getting really annoying ....
4827
4828 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
4829
4830         * reflection.c (fixup_method): added support for array methods.
4831
4832 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
4833
4834         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
4835         (pointed out by Michael Adams).
4836
4837 2003-03-04  Dick Porter  <dick@ximian.com>
4838
4839         * icall.c: Temporarily reverted the Double and Single ToString()
4840         change, because it broke nunit.
4841
4842 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
4843
4844         * object.h, threads.h: make include files compatible with C++
4845         (patch by Jerome Laban <jlaban@wanadoo.fr>).
4846
4847 2003-03-04  Pedro Martínez Juliá  <yoros@wanadoo.es>
4848
4849         * icall.c: Erased ToString helper functions for Double and Single.
4850         Now, that implementations ar all in managed code (Double and Single
4851         Formatters).
4852
4853 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
4854
4855         * appdomain.c: Added method for initializing the default context of
4856         a domain. Added internal call for getting the default context.
4857         * appdomain.h: Added context variable in MonoDomain struct.
4858         * domain.c: mono_domain_set also sets the default context of the domain
4859         * icall.c: Mapped internal method InternalGetDefaultContext.
4860         * object.c: mono_object_get_virtual_method returns always a remoting
4861         wrapper if the object is a transparent proxy.
4862         mono_runtime_invoke_array: when creating an object by calling the
4863         constructor, if the created object is a proxy, then the constructor should
4864         be called using the a remoting wrapper.
4865
4866 2003-03-03  Dick Porter  <dick@ximian.com>
4867
4868         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
4869         variable so it compiles on solaris.  Problem spotted by
4870         Christopher Taylor <ct@cs.clemson.edu>
4871
4872 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4873
4874         * appdomain.c:
4875         (get_info_from_assembly_name): don't leak value.
4876
4877         * icall.c:
4878         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
4879         result.
4880
4881 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
4882
4883         * assembly.c: export mono_image_load_references ().
4884         * class.c: handle function pointers. mono_class_from_name() now
4885         supports nested type names directly.
4886
4887 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
4888
4889         * reflection.h reflection.c: Encode already created dynamic methods 
4890         and fields correctly as a DEF instead of a REF.
4891
4892         * reflection.c: Get rid of the force_ref argument to 
4893         mono_image_typedef_or_ref since it was wrong in the first place.
4894
4895         * string-icalls.c: add error checking to string constructors according
4896         to the MSDN docs.
4897
4898         * reflection.c: Emit types in the order their TypeBuilders were 
4899         created. Previously, a new table index was assigned to each type before
4900         the tables were emitted. This was wrong because the signature blob
4901         might already refer to a type by its original table index.
4902
4903 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
4904
4905         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
4906         change.
4907         
4908 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4909
4910         * Makefile.am: make assemblies dir have \ instead of / on windows.
4911
4912 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
4913
4914         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
4915         iterate over the NESTEDCLASS table using a linear search since the
4916         table is not guaranteed to be sorted by the secondary key.
4917
4918         * class.c (mono_class_create_from_typedef): fixed up call to
4919         mono_metadata_nesting_typedef.
4920         
4921 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
4922
4923         * marshal.c (mono_string_to_byvalstr): clear the memory as
4924         suggested by Jerome Laban <jlaban@wanadoo.fr>
4925
4926 2003-02-26  Dick Porter  <dick@ximian.com>
4927
4928         * process.c: Cope with padding in .rsrc blocks
4929
4930 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
4931
4932         * metadata.h: reverted the filter_len change, it breaks reflection
4933         
4934 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
4935
4936         * metadata.h: added a new field to store the filter_len
4937         
4938
4939 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
4940
4941         * reflection.c: handle custom attributes for types and members
4942         created with Reflection.Emit (bug#38422).
4943
4944 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
4945
4946         * reflection.c: define RTSpecialName automatically for constructors for
4947         compatibility with MS.NET.
4948
4949         * reflection.c (mono_reflection_create_runtime_class): initialize
4950         nested_in field of dynamically created classes.
4951
4952 2003-02-22  Martin Baulig  <martin@ximian.com>
4953
4954         * debug-mono-symfile.h: Incremented version number.
4955
4956 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
4957
4958         * object.h icall.c process.c: fix warnings.
4959
4960 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
4961
4962         * appdomain.h appdomain.c:
4963         (mono_domain_try_type_resolve): split the 
4964         name_or_tb argument into a name and a tb argument.
4965         (mono_domain_has_type_resolve): new function to check whenever the
4966         application has registered a TypeResolve event handler.
4967         
4968         * icall.c reflection.h reflection.c: move the type resolve logic into
4969         mono_reflection_get_type () so it will be invoked when 
4970         Assembly::GetType () is called.
4971
4972         * reflection.c:
4973         (mono_reflection_get_type): renamed to get_type_internal.
4974         (mono_reflection_get_type): fixed type name generation so it works 
4975         for nested types too.
4976         (mono_reflection_get_type): call has_type_resolve () to avoid the 
4977         costly type name generation if there is no resolve event handler.
4978
4979 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
4980
4981         * class.c, image.c: load exported types from file references.
4982
4983 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
4984
4985         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
4986           used to cache the managed methods used to create proxies and make 
4987           remote invocation of methods.
4988         * class.h: Added in MonoVTable a flag to indicate that a class needs 
4989           to be remotely created.
4990         * object.c: Modified the method mono_class_vtable(). It now initializes 
4991           the remote flag of the vtable. Modified mono_object_new_specific(), 
4992           so now it checks the remote flag.
4993         * icall.c: Added a couple of internal methods, one for enabling instance 
4994           creation interception for a type, and one for creating objects bypassing
4995           the remote check.
4996
4997 2003-02-18  Martin Baulig  <martin@ximian.com>
4998
4999         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
5000         New interncall to get a method's metadata token.
5001
5002         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
5003         New interncall for the debugger.
5004
5005 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
5006
5007         * class.c (mono_class_setup_vtable): allocate supertype array
5008
5009 2003-02-18  Martin Baulig  <martin@ximian.com>
5010
5011         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
5012
5013 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5014
5015         * reflection.c:
5016         (assembly_name_to_aname): jump over unknown properties (i've found
5017         something like: 'type, assembly, version=xxx, custom=null, public...',
5018         so now will ignore custom=null and still get the rest of the values).
5019
5020 2003-02-17  Dick Porter  <dick@ximian.com>
5021
5022         * threads.c: Have Thread.Start() wait for a semaphore to signal
5023         that the thread has set up all its local data.  This fixes bug
5024         34323, where Abort() raced the new thread's TLS data.
5025
5026         Also removes the handle_store() call from start_wrapper, because
5027         threads are now always created suspended and there is no longer a
5028         race between the parent and child threads to store the info.
5029
5030 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
5031
5032         * image.c: explain the #- heap issue in a message, hopefully
5033         avoiding FAQs on mono-list.
5034
5035 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5036
5037         * icall.c:
5038         (GetEntryAssembly): if the domain has not invoked
5039         AppDomain.ExecuteAssembly yet, return the assembly of the default
5040         AppDomain.
5041
5042 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
5043
5044         * class.c (mono_ldtoken): make it work in dynamic assemblies.
5045
5046 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
5047
5048         * metadata.c, reflection.c: simple speedup to type hash
5049         and equals code.
5050
5051 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
5052
5053         * image.c, image.h, class.c, assembly.c: move module loading
5054         to MonoImage. When loading metadata, consider alignemnet from
5055         the start of metadata, not from the metadata address in memory.
5056
5057 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
5058
5059         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
5060         AssemblyBuilder objects. Factored out custom attribute creation into
5061         a separate function.
5062         (create_custom_attr): new function to create custom attributes.
5063
5064 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
5065
5066         * Makefile.am: Got tired of typing the full pathname to pedump.
5067         Until there is another option, am installing this.
5068
5069 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
5070
5071         * class.c (class_compute_field_layout): always set field->parent 
5072         (mono_ldtoken): use mono_defaults.fieldhandle_class;
5073
5074 2003-02-11  Dick Porter  <dick@ximian.com>
5075
5076         * threads-types.h:
5077         * monitor.c: Rewrote Monitor, making lock much faster and
5078         Pulse/Wait work as specified.  Also uses much fewer handles, and only
5079         creates them as needed.
5080
5081         * exception.c: Added SynchronizationLockException
5082
5083         * threads.c: Deleted old Monitor implementation.  The new one is
5084         in a new file.
5085
5086 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
5087
5088         * class.c: handled TypedReference type code. Set the correct size for
5089         class data. Setup interface_offsets for interface classes, too.
5090
5091 2003-02-09  Martin Baulig  <martin@ximian.com>
5092
5093         * debug-mono-symfile.h: Reflect latest symbol writer changes.
5094
5095 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
5096
5097         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
5098         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
5099         * object.c: fixed mono_object_get_virtual_method () for interfaces.
5100         * verify.c: check for code that runs after the end of the method.
5101
5102 2003-02-08  Pedro Martínez Juliá  <yoros@wanadoo.es>
5103
5104         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
5105         "System.Math::Round2".
5106         * sysmath.h: Added Floor, Round and Round2 definitions.
5107         * sysmath.c: Modified certain functions that were not 100% compliant
5108         with MS.NET (math precision) and added the implementation of Floor,
5109         Round and Round2.
5110
5111 2003-02-07  Martin Baulig  <martin@ximian.com>
5112
5113         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
5114
5115 2003-02-07  Martin Baulig  <martin@ximian.com>
5116
5117         * debug-mono-symfile.c: Reflected latest symwriter changes.
5118         (mono_debug_create_mono_symbol_file): Removed.
5119         (mono_debug_open_mono_symbol_file): Take an argument which
5120         specifies whether to create a dynamic symbol file.
5121
5122 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
5123
5124         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
5125
5126 2003-02-05  Martin Baulig  <martin@ximian.com>
5127
5128         * reflection.c (mono_image_build_metadata): Make this public,
5129         protect it against being called multiple times, don't create
5130         resources and don't build the compressed metadata here.
5131         (mono_image_create_pefile): Do this here.
5132
5133         * icall.c
5134         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
5135
5136 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5137
5138         * socket-io.c: fixed bug #36322.
5139
5140 2003-02-06  Piers Haken <piersh@friskit.com>
5141
5142         * appdomain.[ch]:
5143         * class.h:
5144         * debug-mono-symfile.c:
5145         * icall.c:
5146         * loader.c:
5147         * mono-config.c:
5148         * monosn.c:
5149         * reflection.c:
5150         * socket-io.c: warning cleanups
5151
5152 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
5153
5154         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
5155         function. works like remoting invoke, but does a check for the Proxy first.
5156
5157 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
5158
5159         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
5160
5161 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
5162
5163         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
5164         array of pointers.
5165         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
5166         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
5167
5168         * object.c (mono_store_remote_field_new): used by the new jit
5169         instead of mono_store_remote_field
5170         (mono_load_remote_field_new): used by the new jit
5171         instead of mono_load_remote_field
5172
5173 2003-02-05  Patrik Torstensson
5174
5175         * appdomain.c: changed unload to take the domain id instead
5176         of domain
5177         
5178         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
5179
5180
5181 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5182
5183         * appdomain.c: don't look for assemblies in ApplicationBase if
5184         PrivateBinPathProbe is set.
5185
5186 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5187
5188         * object.c: make the first argument in main_args contain the absolute
5189         path to the assembly. Fixes bug #37511.
5190
5191 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5192
5193         * icall.c: get correct UTC offset for countries not using daylight
5194         time saving. Fixes bug #30030.
5195
5196 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5197
5198         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
5199         and 1 are the family).
5200
5201 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
5202
5203         * icall.c (ves_icall_InternalExecute): removed wrong assertion
5204
5205         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
5206
5207 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
5208
5209         * reflection.c: added support for SignatureHelper tokens, which is
5210         needed by the Calli opcode.
5211
5212         * reflection.h: track changes to SignatureHelper class.
5213
5214         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
5215
5216 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5217
5218         * appdomain.c: fixed loading assemblies from PrivateBinPath.
5219
5220 2003-02-03  Patrik Torstensson
5221         * appdomain.[c|h], domain.c : 
5222          - Added support for getting a domain via domain id
5223          - Support for setting and getting domain from System.AppDomain 
5224            (used in cross appdomain channel)
5225          - Added support for get/set for a MonoAppContext on a thread 
5226            (Context class in System.Runtime.Remoting.Contexts),
5227          - Removed hack in Get/SetData and ExecuteAssembly.
5228         
5229         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
5230         the managed world to get control when a proxy is created.
5231
5232         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
5233         
5234 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
5235
5236         * icall.c
5237         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
5238         Populate the codebase field as well.
5239
5240 2003-02-02  Martin Baulig  <martin@ximian.com>
5241
5242         * debug-mono-symfile.c
5243         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
5244         (mono_debug_symfile_add_method): Allow interncalls.
5245
5246 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5247
5248         * icall.c: throw parse exception if strtod fails or the string is empty.
5249
5250 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
5251
5252         * marshal.c: handle object type separately from defined
5253         class types.
5254
5255 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
5256
5257         * marshal.c: handle NATIVE_LPSTR for strings when it's
5258         explicitly specified.
5259
5260 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
5261
5262         * reflection.c, reflection.h, icall.c: setup the reflection
5263         handle cache for ModuleBuilders and AssemblyBuilders.
5264
5265 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
5266
5267         * reflection.c (reflection_methodbuilder_to_mono_method): set
5268         pinvoke flag
5269
5270 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5271
5272         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
5273
5274 2003-01-29  Dick Porter  <dick@ximian.com>
5275
5276         * threads.c: No need for the fake_thread kludge now that Thread
5277         doesn't run a class constructor
5278         
5279 2003-01-29  Dick Porter  <dick@ximian.com>
5280
5281         * threads.c: Use g_direct_hash instead of the rather bogus
5282         g_int_hash
5283
5284 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
5285
5286         * marshal.c (mono_marshal_get_native_wrapper): add check for null
5287         (fix pinvoke12.exe)
5288         (mono_marshal_get_struct_to_ptr): generate valid IL code
5289         (mono_marshal_get_ptr_to_struct): generate valid IL code
5290         (*): correctly set sig->pinvoke, we need to memdup the signature
5291         to do that
5292
5293 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5294
5295         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
5296         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
5297
5298 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
5299
5300         * profiler.c: provide more callers information.
5301
5302 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
5303
5304         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
5305
5306         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
5307
5308         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
5309
5310 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
5311
5312         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
5313         exception instead of going into an infinite loop on dates which it 
5314         can't yet handle.
5315
5316         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
5317         out-of-range exception if needed.
5318
5319         * class.c (mono_class_setup_vtable): allow a virtual method to provide
5320         an implementation for an interface method and to override an inherited
5321         method at the same time. 
5322         Imagine a scenario when a virtual method is used to override a
5323         virtual abstract method in a parent class, and this same method 
5324         provides an implementation for an method inherited from an interface. 
5325         In this case, the interface resolution code will set im->slot, which 
5326         means that the virtual method override pass will skip this method 
5327         which means a pointer to the abstract method inherited from the parent
5328         will remain in the vtable of this non-abstract class.
5329
5330         * class.c: (mono_class_setup_vtable): continue search for a real 
5331         method if only an abstract method is found.     
5332
5333 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
5334
5335         * reflection.c: add size to encoding for ByValStr and ByValArray
5336         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
5337
5338 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
5339
5340         * class.c (mono_class_setup_vtable): pass the override info as an
5341         argument.
5342
5343         * class.c (mono_class_setup_vtable): set the slot of overriding methods
5344         correctly.
5345         
5346         * reflection.c (ensure_runtime_vtable); add support for method 
5347         overrides.
5348         
5349 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
5350
5351         * reflection.c (resolution_scope_from_image): Hack to work to work with
5352         dynamic assemblies.
5353
5354         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
5355         added a 'force_ref' argument to force this function to allways return 
5356         a TypeRef. This is needed by mono_image_get_memberref_token ().
5357         
5358 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
5359
5360         * reflection.c (mono_image_get_type_info): interfaces really don't have
5361         a parent.
5362
5363         * reflection.c (mono_image_basic_init): fill out missing fields of
5364         image structure.
5365
5366         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
5367         dynamic assemblies. This is required so dynamic assemblies show up in
5368         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
5369         Type::GetType() etc. This is consistent with MS behaviour.
5370
5371         * image.c image.h reflection.c: add newly created classes to the name 
5372         cache so mono_class_get () will find them.      
5373
5374 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
5375
5376         First part of changes to get IKVM.NET running under mono.
5377         
5378         * appdomain.h, appdomain.c: added new function 
5379         mono_domain_try_type_resolve() which will emit TypeResolve events. 
5380         This function will call AppDomain::DoTypeResolve to do the actual work.
5381
5382         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
5383         moved existing code dealing with dynamic tokens to a new function 
5384         called mono_reflection_lookup_dynamic_token (). This function will 
5385         raise TypeResolve events when appropriate. Since reflection.c is not 
5386         part of libmetadata, a new hook function called 
5387         mono_lookup_dynamic_token() is added to class.c which will call this.
5388
5389         * assembly.h assembly.c: make the invoke_load_hook function public,
5390         so it can be called for dynamic assemblies.
5391
5392         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
5393
5394         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
5395         type isn't found.
5396
5397         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
5398         MonoGHashTable, since it contains pointers to objects which the GC 
5399         needs to track.
5400
5401         * assembly.c (search_loaded): remove unused variable.
5402         
5403 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
5404
5405         * object.c: fixed issue exposed by gcc-generated IL programs
5406         that use RVA data for pointers.
5407
5408 2003-01-25  Martin Baulig  <martin@ximian.com>
5409
5410         * threads.c (start_wrapper): Moved the initialization of
5411         `start_func' above the mono_new_thread_init() call to which we
5412         pass it as argument.
5413
5414 2003-01-24  Martin Baulig  <martin@ximian.com>
5415
5416         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
5417         the MonoThread pointer.
5418
5419 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
5420
5421         * icall.c: Rename `PowImpl' to Pow.
5422
5423 2003-01-23  Dick Porter  <dick@ximian.com>
5424
5425         * threads.c (start_wrapper): Create a Thread object if needed, so
5426         the Main() thread can do the class initialisation in a subthread
5427         that has been set up to allow managed code execution.
5428
5429         Pass the thread ID instead of the MonoThread pointer to the thread
5430         start and attach callbacks.  This change is required, because the
5431         jit thread start callback must be called _before_ the Thread
5432         object can be created.
5433         
5434         (mono_thread_init): Removed much object creation code that is no
5435         longer needed.  No managed code is called from here now.
5436
5437         * object.c (mono_runtime_exec_managed_code): Create a subthread
5438         for Main, and call back to the runtime to use it.
5439         Set the exit code when Main exits.
5440
5441         * gc.c: Make sure domain finalisation happens in a subthread.
5442         Re-enable threaded GC, fixing bug 31333 (again).
5443
5444         * environment.c: System.Environment internall calls (so far just
5445         ExitCode is here, the others are still in icall.c)
5446
5447         * appdomain.c (mono_runtime_cleanup): All threads running managed
5448         code should have finished before mono_runtime_cleanup() is
5449         reached, so no need to clean up threads.
5450
5451 2003-01-22  Martin Baulig  <martin@ximian.com>
5452
5453         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
5454         `gpointer func' arguments.      
5455         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
5456         but added `MonoThread *thread' argument.
5457         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
5458
5459         * threads.c (mono_new_thread_init): Added `gpointer func' argument
5460         and pass it to the mono_thread_start_cb callback.
5461         (mono_install_thread_callbacks): New public function to install a
5462         set of callbacks which are set by the debugger.
5463         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
5464
5465 2003-01-22  Martin Baulig  <martin@ximian.com>
5466
5467         * Makefile.am: Install debug-mono-symfile.h.
5468
5469 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
5470
5471         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
5472
5473 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
5474
5475         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
5476         * class.c (mono_ptr_class_get): correctly set access levels of pointers
5477         (mono_array_class_get): correctly set access levels of arrays
5478
5479 2003-01-20      Patrik Torstensson
5480         * image.h (MonoAssemblyName): changed major, minor, build, revision
5481         from signed to unsigned.
5482
5483 2003-01-20  sean kasun <skasun@azstarnet.com>
5484
5485         * reflection.c (load_cattr_value): Now this handles
5486         MONO_TYPE_SZARRAY.  Fixes bug #35629
5487
5488 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
5489
5490         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
5491         integer value
5492
5493 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5494
5495         * decimal.c: fixed bug #26056.
5496
5497 2003-01-17  Martin Baulig  <martin@ximian.com>
5498
5499         * gc.c: Raise an ExecutionEngineException instead of using g_error().
5500
5501 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5502
5503         * exception.[ch]:
5504         (mono_get_exception_type_initialization): new function.
5505
5506         * object.c: throw a TypeInitializationException when an exception is
5507         thrown invoking the class constructor.
5508
5509 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5510
5511         * reflection.c: fixed attribute reading.
5512
5513 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5514
5515         * icall.c:
5516         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
5517         provided, look for the type in the calling assembly and then in
5518         mscorlib; if the assembly name is provided, only try that one.
5519
5520 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
5521
5522         * object.c: register the vtable before there is a chance it's
5523         queried again recursively.
5524
5525 2003-01-13  Duncan Mak  <duncan@ximian.com>
5526
5527         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
5528         gc-internal.h. 
5529         
5530 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
5531
5532         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
5533
5534 2003-01-11  Martin Baulig  <martin@ximian.com>
5535
5536         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
5537         this to 20 for the release.
5538
5539 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
5540
5541         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
5542
5543         * loader.c (mono_method_get_marshal_info): bug fix
5544
5545         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
5546         structures with explicit layout
5547
5548 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
5549
5550         * profiler.c: made the output more readable (and sorted). 
5551         Added caller information for the allocation profiler.
5552
5553 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
5554
5555         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
5556
5557 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5558
5559         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
5560         to get value types.
5561         
5562 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
5563
5564         * object.c, profiler.h, profiler.c, profiler-private.h:
5565         Added object allocation profiler.
5566
5567 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
5568
5569         * reflection.h, reflection.c: handle global methods.
5570         Compress blob entries.
5571
5572 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
5573
5574         * marshal.c: fix compilation.
5575
5576 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
5577
5578         * loader.c (mono_method_get_marshal_info): impl.
5579
5580         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
5581
5582 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5583
5584         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
5585         for reference types.
5586
5587 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
5588
5589         * loader.c: fixed off by one error in loaded parameter names.
5590
5591 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
5592
5593         * marshal.c (mono_marshal_get_icall_wrapper): like
5594         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
5595         instead of a MonoMethod.
5596
5597 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5598
5599         * decimal.c: fixed bug #36537.
5600
5601 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
5602
5603         * marshal.c: throw a missing method exception if a
5604         P/Invoke method is not found.
5605
5606 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
5607
5608         * icall.c: allow a null this for constructors.
5609
5610 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
5611
5612         * icall.c: raise the proper exceptions if the arguments to the
5613         internal Invoke are incorrect.
5614
5615 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
5616
5617         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
5618
5619 2003-01-03  Martin Baulig  <martin@ximian.com>
5620
5621         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
5622
5623 2002-12-31  Martin Baulig  <martin@ximian.com>
5624
5625         * debug-mono-symfile.c: Completely rewrote the type section.
5626         Instead of using individual malloc()ed fields, we use one big
5627         continuous memory area and offsets into this area.
5628         See the comments in the source code for details.
5629
5630 2002-12-30  Martin Baulig  <martin@ximian.com>
5631
5632         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
5633
5634 2002-12-30  Martin Baulig  <martin@ximian.com>
5635
5636         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
5637         line number table in this data blob instead of using an external
5638         pointer.
5639
5640 2002-12-28  Martin Baulig  <martin@ximian.com>
5641
5642         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
5643
5644 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
5645
5646         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
5647         as a boxed return type.
5648
5649 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
5650
5651         * appdomain.c
5652         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
5653         g_build_filename to properly get separators on the filename created.
5654
5655         * object.h: Small change, introduce MonoMarshalByRefObject to
5656         track the layout of that structure in the C# universe as we make
5657         changes there.
5658
5659 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
5660
5661         * object.c: removed assert to allow static fields on interfaces.
5662         * loader.c: a TypeSpec may be used for any type, not just arrays.
5663
5664 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
5665
5666         * class.c, class.h: added mono_class_array_element_size ().
5667         Ignore static methods in interfaces.
5668
5669 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5670
5671         * threads.c: fixed the build under cygwin.
5672
5673 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
5674
5675         * reflection.c: handle nullref constants. Allocate keys for
5676         reflection handles with the GC.
5677
5678 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
5679
5680         * threads.c, threads.h: added mono_thread_get_abort_signal()
5681         to get a suitable signal for thread abort.
5682
5683 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
5684
5685         * metadata.c: fix handling of ExportedType table.
5686
5687 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5688
5689         * icall.c: added WriteWindowsDebugString internal call.
5690
5691 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5692
5693         * reflection.h: added fields to match C# implementation.
5694
5695 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5696
5697         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
5698
5699 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
5700
5701         * gc.h, gc-internal.h: Rename header for GC internal calls to
5702         gc-internal.h from gc.h as to not clash with Boehm GC having its
5703         header installed as <gc.h> in outside include paths.
5704         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
5705         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
5706
5707 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5708
5709         * icall.c: assign minor, build and revision in FillName.
5710
5711 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
5712
5713         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
5714         Added support for running code generated by Reflection.Emit.
5715
5716 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5717
5718         * appdomain.c: check for NULL argument in LoadFrom.
5719
5720 2002-12-10  Dick Porter  <dick@ximian.com>
5721
5722         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
5723
5724 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5725
5726         * appdomain.c: fix buglet when building exe file name.  Handle full
5727         assembly name (needed after latest changes to AssemblyName).
5728         * image.c:
5729         (mono_image_close): free some hashtables.
5730
5731 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
5732
5733         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
5734         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
5735         on some systems (redhat 7.3) 
5736
5737 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
5738
5739         * threads.c: delete the critical section of a sync block,
5740         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
5741
5742 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
5743
5744         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
5745
5746 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5747
5748         * appdomain.[ch]: handle the assembly preload event to try loading the
5749         assemblies using the paths we have in the current domain.
5750
5751         * assembly.[ch]: created an assembly preload hook that is called to try
5752         loading the assembly by other means that the ones provided here.
5753
5754         * domain.c: initialize the domain search path.
5755
5756         From now on, assemblies (TODO: except corlib and System) are loaded
5757         according to these rules when using mono_assembly_load ():
5758
5759                 1. It tries to load the assembly from the ApplicationBase
5760                 of the current domain appending .dll and .exe (TODO: have to
5761                 try loading from name/name.dll and name/name.exe).
5762
5763                 2. It tries the search path specified in PrivateBinPath for the
5764                 current domain (if any).
5765
5766                 3. Previous behavior.
5767
5768 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
5769
5770         * icall.c: implemented GetInterfaceMap() related icall.
5771         * domain.c, loader.h: load MethodInfo in mono_defaults.
5772
5773 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
5774
5775         * gc.c: disable the finalizer thread for now, untill all the issues
5776         with it are resolved.
5777
5778 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5779
5780         * string-icalls.c: handle embedded nulls in string ctor when the
5781         length is specified.
5782
5783 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
5784
5785         * class.c: look for explicit interface implementation in parent
5786         classes, too.
5787
5788 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
5789
5790         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
5791
5792 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
5793
5794         * gc.c: protect handles with a critical section.
5795
5796 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5797
5798         * icall.c:
5799         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
5800         parameters. If no assembly specified, try getting the type from all
5801         the assemblies in the current domain, else, load the assembly and get
5802         the type from it.
5803
5804 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5805
5806         * marshal.c: applied patch from Aleksey Demakov that fixes
5807         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
5808
5809 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5810
5811         * icall.c: fixed get_location.
5812
5813 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
5814
5815         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
5816         declarations to make it work with older gcc. 
5817
5818         * loader.c (mono_get_method): set signature->pinvoke for native calls
5819
5820 2002-11-20  Dick Porter  <dick@ximian.com>
5821
5822         * threads.c (mono_thread_init): Set the main thread's handle
5823
5824 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
5825
5826         * gc.c: allow compilation without GC support. Changed to match the
5827         mono coding style.
5828
5829 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
5830
5831         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
5832
5833 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
5834
5835         * reflection.c: set a public key token on the core assemblies.
5836
5837 2002-11-18  Dick Porter  <dick@ximian.com>
5838
5839         * threads.c: Split out some thread initialisation so that other
5840         files can set the start callback function.
5841
5842         * gc.c: Run finalisers in a separate thread, to avoid stack
5843         overflow.  Fixes bug 31333.
5844
5845         * appdomain.c: Set up GC finalisation thread.
5846
5847         * reflection.c: 
5848         * object.c: 
5849         * domain.c: Use gc.h macros for GC_malloc
5850         
5851 2002-11-15  Dick Porter  <dick@ximian.com>
5852
5853         * threadpool.c: 
5854         * threads.c:
5855         * appdomain.c: Removed mono_runtime_init_with_attach(),
5856         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
5857         merging the extra parameter with the existing function.  Removed
5858         unneeded code in mono_thread_attach().
5859
5860 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
5861
5862         * image.c (mono_image_loaded_by_guid): a method to get loaded
5863         images by guid. 
5864         (load_metadata_ptrs): we store the guid as string.
5865
5866 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
5867
5868         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
5869
5870         * metadata.c (mono_guid_to_string): imported method form Zoltan
5871         Varga (slightly modified)
5872
5873         * assembly.c (mono_assembly_open): load precompiled code
5874
5875         * loader.h (MonoMethod): we store the method token for use in the
5876         aot compiler. 
5877
5878 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5879
5880         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
5881         the hook function called when an assembly is loaded.
5882         
5883         * domain.c: Modified file.
5884         (mono_domain_assembly_load): removed hash table insertion of assemblies.
5885
5886         Fixes bug #33196.
5887
5888 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
5889
5890         * reflection.c: Map PEFileKind to the value expected by the WinNT
5891         image loader. 
5892
5893 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5894
5895         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
5896         Read until the buffer is filled completely.
5897
5898 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5899
5900         * icall.c: implemented MonoType.InternalGetEvent ().
5901
5902 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5903
5904         * appdomain.c: implemented InitAppDomainSetup. Delayed
5905         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
5906         the entry_assembly.
5907
5908         * assembly.c: base_dir is now an absolute path ending with
5909         G_DIR_SEPARATOR.
5910
5911         * icall.c: modified get_location according to the above changes.
5912
5913         * object.c: init AppDomain.SetupInformation for the default domain after
5914         we have the entry assembly.
5915
5916         * domain.c: when unloading a domain, setup = NULL.
5917
5918 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
5919
5920         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
5921
5922 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
5923
5924         * object.h, object.c: introduced mono_object_get_virtual_method ()
5925         to lookup the method invoked on an object when a callvirt is done on
5926         a method.
5927         * icall.c: make MethodInfo::Invoke() always do a virtual call.
5928
5929 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5930
5931         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
5932         current domain when loaded an assembly and failed to load it.
5933
5934         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
5935
5936 2002-10-31  Dick Porter  <dick@ximian.com>
5937
5938         * icall.c: 
5939         * file-io.h: 
5940         * file-io.c: Return the error status in a parameter, as the
5941         GetLastError() value has long since been blown away if we try and
5942         look it up in a subsequent internal call invocation.  Delete the
5943         GetLastError() internal call, because it's useless.
5944
5945 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
5946
5947         * class.[ch]: added cast_class to fix bug 29517
5948
5949 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
5950
5951         * marshal.c: create valid IL code in the filter clause:
5952         the new JIT is less forgiving:-)
5953
5954 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5955
5956         * icall.c: removed get_property internal call.
5957
5958 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
5959
5960         * appdomain.h domain.c: Added an ID to appdomains.
5961         
5962         * threads.c threads.h icall.c: Implement icall
5963         Thread:GetDomainID(), and remove unused icall 
5964         CurrentThreadDomain_internal.
5965
5966 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5967
5968         * icall.c: Don't recurse through the base types in GetConstructor.
5969         Fixes bug #32063. 
5970
5971 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
5972
5973         * mempool.h, mempool.c: added mono_mempool_empty() and
5974         mono_mempool_stats().
5975
5976 2002-10-23  Dick Porter  <dick@ximian.com>
5977
5978         * file-io.c: 
5979         * file-io.h: 
5980         * icall.c: Added MonoIO.GetFileType internal call
5981
5982 2002-10-17  Dick Porter  <dick@ximian.com>
5983
5984         * appdomain.c (mono_runtime_cleanup): Don't signal the async
5985         delegate semaphore before waiting for all threads to finish,
5986         because new threads can also call async delegates.  Fixes bug
5987         32004.
5988
5989         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
5990         of 3 seconds, in case another async job is queued.  (This part is
5991         needed because the bug fix reintroduced the 3s exit lag.)  This
5992         makes the mono_runtime_shutdown flag superfluous.
5993
5994 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
5995
5996         * reflection.c: include ehader size in method section headers.
5997         Really check for suplicated modules entries.
5998
5999 2002-10-17  Martin Baulig  <martin@gnome.org>
6000
6001         * debug-mono-symfile.c: Added back support for locals.
6002
6003 2002-10-14  Martin Baulig  <martin@gnome.org>
6004
6005         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
6006         MONO_TYPE_VOID.
6007
6008 2002-10-14  Martin Baulig  <martin@gnome.org>
6009
6010         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
6011         mono_class_get() instead of looking in the class cache. 
6012
6013 2002-10-13  Martin Baulig  <martin@gnome.org>
6014
6015         * debug-mono-symfile.c: Set version number to 28, include the
6016         signature in method names.
6017
6018 2002-10-13  Martin Baulig  <martin@gnome.org>
6019
6020         * debug-mono-symfile.h: Set version number to 27.
6021
6022 2002-10-11  Martin Baulig  <martin@gnome.org>
6023
6024         * gc.c: Don't register/unregister NULL pointers as disappearing links.
6025
6026 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6027
6028         * metadata.c, metadata.h: added helper function to allocate signatures.
6029
6030 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6031
6032         * icall.c: added internal call to get the location of machine.config.
6033
6034 2002-10-08  Martin Baulig  <martin@gnome.org>
6035
6036         * debug-mono-symfile.c: Ignore classes with a pending init for the
6037         moment.
6038
6039 2002-10-03  Dick Porter  <dick@ximian.com>
6040
6041         * threads.c: Freebsd pthread_t is a pointer
6042
6043 2002-10-03  Dick Porter  <dick@ximian.com>
6044
6045         * socket-io.c: Implemented GetHostName_internal
6046
6047 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6048
6049         * mono-config.c:
6050         (mono_config_parse_file): don't leak the text.
6051
6052 2002-10-02  Martin Baulig  <martin@gnome.org>
6053
6054         * debug-mono-symfile.c: Added support for methods.
6055
6056 2002-10-01  Martin Baulig  <martin@gnome.org>
6057
6058         * debug-mono-symfile.c: Don't emit methods and line numbers for
6059         the dynamic symbol file, just write the type table.  We can easily
6060         have an external helper program which creates a symbol file for an
6061         IL file.        
6062
6063 2002-10-01  Dick Porter  <dick@ximian.com>
6064
6065         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
6066         Only add the handle to the cleanup array when we're about to
6067         launch the thread.  Bug 31425 deadlocked when the test was run on
6068         mono under w32.
6069
6070 2002-10-01  Martin Baulig  <martin@gnome.org>
6071
6072         * debug-mono-symfile.c: Added support for properties.
6073
6074 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6075
6076         * reflection.c: unaligned store fix from Mark Crichton
6077         <crichton@gimp.org>.
6078
6079 2002-09-27  Martin Baulig  <martin@gnome.org>
6080
6081         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
6082         New interncall.
6083
6084 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
6085
6086         * assembly.h, assembly.c: use a sane API to hook into the assembly
6087         loading process instead of a useless special-purpouse hack
6088         (ngen needs a hook, too, for example).
6089
6090 2002-09-27  Dick Porter  <dick@ximian.com>
6091
6092         * threads.c (mono_thread_init): Call GetCurrentProcess() so
6093         io-layer can set up some process handle info.  Not needed on w32,
6094         but doesn't hurt either.
6095
6096         * process.c: Pass the program name in the second parameter to
6097         CreateProcess, so the path is searched.  Include the working
6098         directory. Implemented process name, process enumeration, and some
6099         process detail internal calls.
6100         
6101         * icall.c: Added internal calls for process lookup, and some
6102         process details
6103
6104 2002-09-26  Martin Baulig  <martin@gnome.org>
6105
6106         * assembly.c (mono_install_open_assembly_hook): New global
6107         function to install a function to be invoked each time a new
6108         assembly is loaded.
6109         (mono_assembly_open): Run this callback function if set.
6110
6111         * debug-mono-symfile.c: Put back line numbers for the dynamic
6112         symbol file and also record the .il file as source file.  This
6113         allows us to install the temporary symbol file as `file.dbg' just
6114         like a compiler-generated one.
6115
6116 2002-09-26  Nick Zigarovich <nick@chemlab.org>
6117
6118         * Corrected typo in gc.c (BOHEM vs BOEHM).
6119
6120 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6121
6122         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
6123         GetProperties. Also avoid calling g_slist_length in GetProperties and
6124         GetMethods.
6125
6126 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6127
6128         * reflection.c: avoid unaligned stores (bug spotted by
6129         Mark Crichton  <crichton@gimp.org>).
6130
6131 2002-09-25  Martin Baulig  <martin@gnome.org>
6132
6133         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
6134         instead of guint64 for addresses and added prologue/epilogue info.
6135
6136 2002-09-25  Martin Baulig  <martin@gnome.org>
6137
6138         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
6139         store line number info.  For the dynamic symbol file, we only need
6140         to provide the JIT generated dynamic line number info for the dynamic
6141         symbol file.
6142
6143 2002-09-25  Martin Baulig  <martin@gnome.org>
6144
6145         * debug-mono-symfile.h: Incremented version number.
6146
6147 2002-09-24  Martin Baulig  <martin@gnome.org>
6148
6149         * class.c (mono_debugger_class_init_func): New global function
6150         pointer variable.
6151         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
6152         call it.
6153
6154         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
6155         function.  This is called via the mono_debugger_class_init_func
6156         hook to add all types to the dynamic type table.
6157         (ves_icall_MonoDebugger_GetType): New interncall to get a class
6158         from its metadata token.
6159
6160         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
6161         New interncall for the debugger.
6162
6163 2002-09-24  Nick Drochak <ndrochak@gol.com>
6164
6165         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
6166         before using it in case it is null.
6167         
6168 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6169
6170         * metadata.c: allow custom modifiers in local var signatures
6171         (bug spotted by Zoltan Varga).
6172
6173 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
6174
6175         * class.c: deal with the <Module> class that may have a NULL vtable.
6176         Eliminate warnings.
6177
6178 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6179
6180         * image.c, image.h: more strong name helpers.
6181         * monosn.c: more work: convert pem keys to cryptoapi format.
6182
6183 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6184
6185         * string-icalls.c: speedup IndexOf.
6186
6187 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6188
6189         * icall.c: updates from Zoltan.2.Varga@nokia.com.
6190
6191 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6192
6193         * icall.c: cleanup: use mono_object_domain ().
6194
6195 2002-09-23  Martin Baulig  <martin@gnome.org>
6196
6197         * debug-mono-symfile.c: Improved type support.
6198
6199 2002-09-22  Martin Baulig  <martin@gnome.org>
6200
6201         * debug-mono-symfile.c: Added support for reference types and strings.
6202
6203 2002-09-22  Martin Baulig  <martin@gnome.org>
6204
6205         * debug-mono-symfile.c: Started to work on the type table.
6206
6207 2002-09-21  Martin Baulig  <martin@gnome.org>
6208
6209         * debug-mono-symfile.c: Largely reworked the symbol table format.
6210         The symbol table is now incrementally updated each time a new
6211         method is added.  We're now also using our own magic and version
6212         so that you don't need to recompile all your classes if the
6213         dynamic table changes.
6214         (mono_debug_update_mono_symbol_file): Removed.
6215         (mono_debug_symfile_add_method): New function to add a method.
6216
6217 2002-09-21  Martin Baulig  <martin@gnome.org>
6218
6219         * icall.c
6220         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
6221         New interncall.
6222
6223         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
6224         New interncall to get a method from its metadata token.
6225
6226 2002-09-21  Martin Baulig  <martin@gnome.org>
6227
6228         * debug-mono-symfile.c: Create type table.
6229
6230 2002-09-20  Martin Baulig  <martin@gnome.org>
6231
6232         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
6233
6234 2002-09-20  Martin Baulig  <martin@gnome.org>
6235
6236         * debug-mono-symfile.c: Provide information about params and locals.
6237
6238 2002-09-20  Martin Baulig  <martin@gnome.org>
6239
6240         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
6241         New interncall.
6242
6243         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
6244         interncall to get a method from its metadata token.
6245
6246 2002-09-20  Martin Baulig  <martin@gnome.org>
6247
6248         * debug-mono-symfile.c: Added a few checks for method->header
6249         being non-NULL.  This should never happen, but for the moment
6250         let's use a g_warning() rather than a g_assert().
6251
6252 2002-09-19  Mark Crichton  <crichton@gimp.org>
6253
6254         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
6255         even if support for it isn't present.  Added an #ifdef to fix this.
6256
6257         * socket-io.c: Added checks back for Solaris support.
6258
6259 2002-09-19  Martin Baulig  <martin@gnome.org>
6260
6261         * debug-mono-symfile.c (read_string, write_string): Reflect latest
6262         changes in the symbol file format.
6263
6264 2002-09-18  Martin Baulig  <martin@gnome.org>
6265
6266         * debug-mono-symfile.c: Set version number to 21.
6267
6268 2002-09-18  Dick Porter  <dick@ximian.com>
6269
6270         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
6271         on netbsd.  Fixes bug 30051.
6272
6273 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6274
6275         * reflection.c:
6276         (set_version_from_string): little fix.
6277
6278 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6279
6280         * monosn.c, Makefile.am: added strong name utility.
6281         * reflection.h, reflection.c: implemented delayed signing,
6282         locale, version and hash id assembly attributes.
6283
6284 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
6285
6286         * loader.c, metadata.c: load param attributes in signatures.
6287
6288 2002-09-16  Martin Baulig  <martin@gnome.org>
6289
6290         * debug-mono-symfile.c: Added string table with all method names.
6291
6292 2002-09-14  Martin Baulig  <martin@gnome.org>
6293
6294         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
6295         fast method lookup.
6296
6297 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
6298
6299         * reflection.c: record the public key token of referenced assemblies.
6300
6301 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
6302
6303         * image.c, image.h: added functions to get the strong name and the
6304         public key of an assembly.
6305         * pedump.c: use them.
6306
6307 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
6308
6309         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
6310
6311 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
6312
6313         * marshal.c (mono_marshal_get_managed_wrapper): Added
6314         MONO_TYPE_BOOLEAN 
6315
6316 2002-09-11  Martin Baulig  <martin@gnome.org>
6317
6318         * gc.c: Call GC_unregister_disappearing_link() on all links when
6319         finalizing them, this is necessary to aviod a crash in boehm's
6320         finalize handler.
6321
6322 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6323
6324         * gc.c: handle GetTarget for finalized objects spotted and fixed by
6325         nick@chemlab.org.
6326
6327 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
6328
6329         * icall.c: implemented MonoType::Module.
6330         * reflection.c, reflection.h: mono_module_get_object () from
6331         Tomi Pakarinen <tomi.pakarinen@welho.com>.
6332
6333 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
6334
6335         * icall.c: ignore overridden methods in GetMethods ().
6336         Fix for FieldInfo::SetValue().
6337         * object.c: handle float/double in runtime invoke.
6338
6339 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
6340
6341         * object.c: allow a constructor to be called again on an object.
6342
6343 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6344
6345         * class.h, class.c: move field layout code to it's own function and
6346         export it. Get an interface id earlier. Move fields in MonoClass
6347         so they are more cache friendly and align the bitfields.
6348         * loader.c: temporary handle get_param_names() for a runtime method.
6349         * reflection.c, reflection.h: more code to handle runtime creation of
6350         types.
6351
6352 2002-09-09  Martin Baulig  <martin@gnome.org>
6353
6354         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
6355         signature with the pinvoke field being set for the actual call.
6356
6357 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6358
6359         * icall.c: removed some unused icalls. Start of map of glib charsets
6360         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
6361
6362 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
6363
6364         * debug-helpers.c: break infinite loop (found and fixed by
6365         Holger Arnold <harnold@gmx.de>).
6366
6367 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
6368
6369         * icall.c: target may be null in create_delegate.
6370
6371 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6372
6373         * marshal.c: handle a boolean return type.
6374
6375 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6376
6377         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
6378
6379 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
6380
6381         * gc.c: fix weakreferences.
6382
6383 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
6384
6385         * icall.c: added icall to get default codepage.
6386
6387 2002-09-03  Dick Porter  <dick@ximian.com>
6388
6389         * threads.h: 
6390         * threads.c: Use MonoThread instead of MonoObject where
6391         apropriate.
6392
6393         Store running thread objects in a hash table, so that we have all
6394         the info to hand when waiting for them to finish
6395         (means we don't need OpenThread() any more, so mingw builds should
6396         be fully functional again.)
6397
6398         * verify.c:
6399         * object.h: Added thread ID to MonoThread
6400
6401 2002-09-03  Martin Baulig  <martin@gnome.org>
6402
6403         * icall.c (System.Reflection.Assembly::get_location): New interncall.
6404
6405 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6406
6407         * icall.c: fixed leak in get_temp_path. Thanks lupus.
6408
6409 2002-09-03  Martin Baulig  <martin@gnome.org>
6410
6411         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
6412         argument to store the end address of the disassembled instruction.
6413
6414         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
6415         here from debug-symfile.h.
6416         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
6417         JIT into this struct.
6418         (MonoSymbolFile): Added `char *image_file' field.
6419         (MonoDebugGetMethodFunc): Removed.
6420         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
6421         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
6422         (mono_debug_find_method): New method.
6423
6424         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
6425         create a full symbol file.
6426         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
6427         and static symbol files.
6428         (mono_debug_find_method): The symbol file keeps an internal method hash,
6429         call this to get a MonoDebugMethodInfo from a MonoMethod.
6430
6431         * debug-symfile.[ch]: Removed.
6432
6433 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
6434
6435         * image.c (do_mono_image_open): Remove linker version check.
6436
6437 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
6438
6439         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
6440         wrappers for instance methods.
6441         
6442 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6443
6444         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
6445
6446 2002-08-28  Dick Porter  <dick@ximian.com>
6447
6448         * Makefile.am: Export HOST_CC for w32 builds
6449
6450 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6451
6452         * file-io.c process.c: MonoString are null terminated, no
6453         need for mono_string_to_utf16() anymore.
6454
6455 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6456
6457         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
6458
6459 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
6460
6461         * icall.c, reflection.h: speedup System.MonoType.
6462
6463 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6464
6465         * reflection.c: allow null as the value of a string argument in
6466         custom attributes constructors.
6467
6468 2002-08-27  Martin Baulig  <martin@gnome.org>
6469
6470         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
6471         `trampoline_address' field.
6472
6473 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
6474
6475         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
6476         check (fixes bug #29486) 
6477
6478 2002-08-27  Martin Baulig  <martin@gnome.org>
6479
6480         * debug-mono-symfile.c: Changed the file format in a way that allows us
6481         open it read-only and to use a specially malloced area for all the
6482         dynamic data.  We can now also generate a symbol file on-the-fly if we're
6483         debugging IL code and there is no MCS generated symbol file for it.
6484
6485 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
6486
6487         * object.c: added a define for a good string and array
6488         creation speedup (not enabled by default because we need to deal with
6489         the synch stuff).
6490
6491 2002-08-26  Martin Baulig  <martin@gnome.org>
6492
6493         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
6494         function to create a dynamic symbol file.  This is used by the
6495         debugger to create a symbol file for IL code on-the-fly.
6496
6497 2002-08-26  Martin Baulig  <martin@gnome.org>
6498
6499         * loader.c (mono_lookup_pinvoke_call): Include the error message
6500         from g_module_error() in the error message.
6501
6502 2002-08-24  Martin Baulig  <martin@gnome.org>
6503
6504         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
6505         function to update the symbol file.  The symbol file is mmap()ed
6506         writable, but private.  This allows us to install the symbol file
6507         together with the assembly.
6508
6509 2002-08-24  Martin Baulig  <martin@gnome.org>
6510
6511         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
6512         but they can read the new symbol file format which mcs is now creating.
6513
6514         * debug-symfile.c (mono_debug_find_source_location): Moved to
6515         debug-mono-symfile.c; this is now operating on the new symbol file.
6516
6517 2002-08-23  Martin Baulig  <martin@gnome.org>
6518
6519         * debug-helpers.c (mono_method_desc_from_method): New function to get
6520         a MonoMethodDesc from a MonoMethod.
6521
6522 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
6523
6524         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
6525         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
6526
6527 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
6528
6529         * string-icalls.[ch]: make helper methods static.
6530
6531 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6532
6533         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
6534         types to it and to SetValueInternal.
6535
6536         * object.c: Moved handle_enum label to its proper place. This was the
6537         f... bug! ;-)
6538
6539         This time i compiled mcs and gtk-sharp and they both work.
6540
6541 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6542
6543         * icall.c: reverted partially my previous patch until 
6544         object.c:set_value handles enums correcly.
6545
6546 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6547
6548         * icall.c:
6549         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
6550         (ves_icall_System_Environment_get_MachineName): removed warning when
6551         compiling under cygwin.
6552
6553 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
6554
6555         * object.c: fixed field_get_value() for reference types.
6556
6557 2002-08-22  Dick Porter  <dick@ximian.com>
6558
6559         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
6560         Don't free a buffer while it's still needed.  Patch from Jonathan
6561         Liger <Jonathan.liger@wanadoo.fr>
6562
6563 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
6564
6565         * icall.c (ves_icall_System_Environment_get_Platform): Add new
6566         internal call.
6567
6568 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
6569
6570         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
6571         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
6572
6573         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
6574         we call unmanaged code which throws exceptions.
6575
6576 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6577
6578         * appdomain.h: added per-domain entry_assembly.
6579         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
6580         arguments.
6581         * icall.c: Assembly::GetEntryAssembly icall.
6582         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
6583         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
6584
6585 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6586
6587         * appdomain.h, gc.c: added mono_domain_finalize ().
6588
6589 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6590
6591         * object.c:
6592         (mono_print_unhandled_exception): changed g_warning by g_printerr
6593         because g_log has a 1024 characters limit (yeah, i got a big stack
6594         trace). Don't print exception name, that should be in ToString 
6595         returned string.
6596
6597 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6598
6599         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
6600         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
6601
6602 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6603
6604         * object.c:
6605         (mono_print_unhandled_exception): after previous commit, i realized
6606         that MS calls ToString on the exception. I changed this function to
6607         do that. This way we get stack_trace for free.
6608
6609 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6610
6611         * object.c:
6612         (mono_print_unhandled_exception): invoke Message property instead of
6613         getting 'message' field from Exception. Don't allocate memory for
6614         'trace' and 'message' if not needed.
6615
6616 2002-08-18  Dick Porter  <dick@ximian.com>
6617
6618         * unicode.c: Fix asserts to match Encoder.cs checks
6619
6620 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6621
6622         * marshal.c: fix unaligned store issue and a few wrong
6623         opcode argument types.
6624
6625 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6626
6627         * icall.c: added GetUninitializedObjectInternal internal call.
6628
6629 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
6630
6631         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
6632         to the right domain.
6633
6634 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
6635
6636         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
6637
6638         * class.c (class_compute_field_layout): set blittable to false for Strings
6639
6640         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
6641
6642 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6643
6644         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
6645         first chunk of code to create types at runtime. Code to
6646         handle ReflectedType/DeclaringType. Make reflection handles
6647         domain specific.
6648
6649 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
6650
6651         * class.c: set correct name in arrays.
6652
6653 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
6654
6655         * appdomain.c (mono_domain_transfer_object): make it work with
6656         valuetypes. bug fixes.
6657
6658 2002-08-12  Dick Porter  <dick@ximian.com>
6659
6660         * object.h: Rename some parameters to avoid c++ keywords (Patch
6661         from Joseph Wenninger <kde@jowenn.at>)
6662
6663 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
6664
6665         * icall.c: added icall to implement Assembly.GetFile*.
6666
6667 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6668
6669         * reflection.h, reflection.c: code to embed managed resources.
6670
6671 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
6672
6673         * class.c: move all the type size stuff into
6674         class_compute_field_layout().
6675
6676 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6677
6678         * class.c: ensure enums have always the correct instance size.
6679         * unicode.c: remove wrong assert.
6680
6681 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
6682
6683         * assembly.c: fix mem corruption issue.
6684         * image.h, image.c: added mono_image_get_resource () to access
6685         managed resources.
6686         * icall.c: implemented Assembly.EntryPoint property and some
6687         Managed Resources related internalcalls.
6688
6689
6690 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6691
6692         * image.c, image.h: impemented mono_image_get_entry_point ().
6693         * appdomain.c: use mono_image_get_entry_point.
6694
6695 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6696
6697         * reflection.c: support the object type argument when loading
6698         custom attributes.
6699
6700 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
6701
6702         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
6703         String as return type.
6704
6705 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
6706
6707         * reflection.c: fix encoding of named args for custom attrs to match
6708         the ms implementation. Read them back when instantiating custom
6709         attributes.
6710
6711 2002-08-02  Radek Doulik  <rodo@ximian.com>
6712
6713         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
6714         by Dietmar as quick fix
6715         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
6716         16 as stack size, used on more places as quick fix before Dietmar
6717         will fix it properly
6718
6719 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6720
6721         * object.h, object.c: added accessors for fields and properties.
6722
6723 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6724
6725         * class.c, class.h: made mono_class_get_field_from_name ()
6726         loop on parent types.
6727         Added mono_class_get_property_from_name ().
6728
6729 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
6730
6731         * class.c, class.h: move the code to setup the type vtable in its own
6732         function so that it can be reused also for types created at runtime.
6733         Eliminate the "class" identifier from the header file.
6734         * reflection.c: setup the vtable for enums so that we can create
6735         objects for use in SetConstant ().
6736
6737 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
6738
6739         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
6740         instead of the delegate itself as this pointer (bug #28383)
6741
6742 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
6743
6744         * marshal.c (mono_marshal_get_managed_wrapper): added return type
6745         conversions.
6746
6747 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6748
6749         * loader.c: don't set the pinvoke bit on icalls.
6750
6751 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
6752
6753         * debug-helpers.c (mono_method_full_name): only print a number to
6754         indicate wrapper type (so that the output is more readable in traces).
6755
6756 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
6757
6758         * class.c (mono_class_init): include method override patch from Paolo
6759
6760 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
6761
6762         * icall.c: fixed GetTypeCode().
6763
6764 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
6765
6766         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
6767         use real delegate invoke function to make it work with multicast
6768         delegates (fix bug# 28291).
6769
6770 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
6771
6772         * object.c: load constant strings.
6773
6774 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
6775
6776         * reflection.c: no magic numbers.
6777         * tabledefs.h: security action enum.
6778
6779 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
6780
6781         * assembly.c: fix possible memory corruption.
6782
6783 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6784
6785         * reflection.h, reflection.c: added support for linking resources.
6786         * verify.c: check we have an updated corlib.
6787
6788 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
6789
6790         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
6791         string arrays.
6792         (mono_marshal_string_array): null terminate unmanaged string arrays.
6793         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
6794
6795 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
6796
6797         * icall.c: Type.GetType () can now return also types from the
6798         calling assembly.
6799
6800 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
6801
6802         * loader.h, loader.c: stack walking support.
6803         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
6804         GetCallingAssembly.
6805
6806 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
6807
6808         * marshal.c: added optimisations for blittable types 
6809
6810         * class.c (mono_array_class_get): do not set blittable attribute on arrays
6811         (mono_class_setup_mono_type): set blittable attribute for single
6812         and double.
6813
6814         * marshal.c (mono_string_utf8_to_builder): impl.
6815         (mono_string_builder_to_utf8): impl.
6816         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
6817
6818 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
6819
6820         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
6821         (mono_marshal_get_managed_wrapper): impl. byref types
6822
6823 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6824
6825         * icall.c:
6826         (search_method): don't display debug message. 
6827
6828 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
6829
6830         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
6831
6832 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
6833
6834         * appdomain.c: set the missing filename when throwing exception.
6835
6836 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
6837
6838         * metadata.c (mono_type_size): code cleanup
6839         (mono_type_stack_size): removed some test code
6840
6841 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
6842
6843         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
6844         mono_get_exception_file_not_found now.
6845
6846         * exception.c (mono_exception_from_name_two_strings): New version
6847         that will call a constructor with two string arguments. 
6848         (mono_get_exception_file_not_found): New helper routine, used to
6849         report file-not-found errors.
6850
6851 2002-07-20  Dick Porter  <dick@ximian.com>
6852
6853         * process.h:
6854         * process.c: Pass file handles to CreateProcess
6855         
6856         * icall.c:
6857         * file-io.h:
6858         * file-io.c: Implemented CreatePipe
6859
6860 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
6861
6862         * metadata.c (mono_get_param_info): set alignment for value types
6863
6864 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6865
6866         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
6867         Constify mono_domain_assembly_open().
6868         * loader.c: handle null namespace in icalls.
6869
6870 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
6871
6872         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
6873         (emit_str_to_ptr_conv): marshal object as structs
6874
6875         * metadata.c (mono_type_to_unmanaged): marshal object as structs
6876
6877         * marshal.c (mono_marshal_get_runtime_invoke): support value types
6878
6879 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
6880
6881         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
6882         (mono_marshal_get_native_wrapper): we an now return value types
6883
6884 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6885
6886         * verify.c: more checks implemented.
6887
6888 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
6889
6890         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
6891         (fix bug #27695)
6892         (mono_marshal_get_native_wrapper): allow byref arguments
6893         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
6894         impl. PtrToStringXXX methods
6895         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
6896         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
6897         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
6898         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
6899         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
6900
6901 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6902
6903         * reflection.c: fix buglet in parsing an assembly name.
6904
6905 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
6906
6907         * marshal.c (emit_ptr_to_str_conv): first impl.
6908
6909 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
6910
6911         * object.c, class.h: cache the vtable in the class as suggested by
6912         vargaz@freemail.hu (Zoltan Varga).
6913
6914 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6915
6916         * class.h, loader.c: added mono_field_from_token().
6917         * verify.c: first cut of type checking code.
6918
6919 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
6920
6921         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
6922
6923 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
6924
6925         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
6926         (fix bug #27782)
6927         (mono_marshal_get_remoting_invoke): impl.
6928         (mono_delegate_begin_invoke): impl.
6929         (mono_mb_emit_save_args): impl.
6930         (mono_delegate_end_invoke): impl.
6931         (mono_marshal_get_delegate_begin_invoke):
6932         (mono_marshal_get_delegate_end_invoke):
6933         (mono_marshal_get_delegate_invoke): generate a special name for
6934         those methods (including the signature) and associate them whith
6935         the delegate class. 
6936
6937 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
6938
6939         * reflection.[ch]: 
6940         (mono_reflection_type_from_name): now it has a MonoImage parameter
6941         which is used as the default image to search the type in. If the image
6942         is NULL or getting the type from it fails, it defaults to corlib.
6943
6944         * icall.c: changed 1 call to mono_reflection_type_from_name to match
6945         new parameter.
6946
6947 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6948
6949         * reflection.c: update the parameter table index.
6950
6951 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
6952
6953         * domain.c: don't include the mark byte in the string hash.
6954
6955 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
6956
6957         * icall.cs: icall for Type.GetTypeCode ().
6958         * verify: a couple of fixes and disabled local initialization checks.
6959
6960 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
6961
6962         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
6963
6964         * debug-helpers.c (mono_method_full_name): print the type of the
6965         runtime wrapper
6966
6967         * metadata.c (mono_signature_hash): a hash function for signatures
6968         (mono_signature_hash): better hash algorithm
6969
6970         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
6971
6972         * debug-helpers.c (mono_method_full_name): this can now generate
6973         method names with signatures
6974
6975         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
6976         method dont have this pointers.
6977
6978 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
6979
6980         * reflection.c: fixup typebuilder tokens.
6981         * image.c: fix buglet.
6982         * marshal.h: remove whitespace.
6983         * metadata.h, metadata.c: reinstate code that was removed.
6984         * verify.c: handle catch directives and fix another couple of bugs.
6985
6986 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
6987
6988         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
6989         (mono_marshal_get_native_wrapper): make it comp. with the old code
6990         (mono_marshal_get_native_wrapper): support boolean
6991         (mono_marshal_get_managed_wrapper): support more types
6992
6993 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
6994
6995         * class.c (class_compute_field_layout): compute class->blittable attribute.
6996
6997 2002-07-09  Dick Porter  <dick@ximian.com>
6998
6999         * threads.c: Make the thread cleaning up cope with threads that
7000         call ExitThread()
7001
7002 2002-07-08  Radek Doulik  <rodo@ximian.com>
7003
7004         * reflection.c (method_encode_code): use non-translated values to
7005         compute finally_start, this fixes exception handling on ppc, yay!
7006
7007         * decimal.h (struct signscale): fix endianess
7008
7009 2002-07-07  Radek Doulik  <rodo@ximian.com>
7010
7011         * reflection.c: swap box_val and not val
7012
7013 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
7014
7015         * reflection.c, reflection.h: handle full assembly info in type name.
7016         Handle Type arguments when loading custom attributes.
7017         * icall.c: updated to use new mono_reflection_type_from_name () method.
7018
7019 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7020
7021         * loader.c:
7022         (method_from_memberref): also print assembly name when method not found.
7023
7024 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7025
7026         * icall.c:
7027         (ves_icall_TypeGetProperties): fixed bug #27473. 
7028
7029 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7030
7031         * reflection.c: display image name and token when cannot find the
7032         .ctor for an attribute.
7033
7034 2002-07-05  Martin Baulig  <martin@gnome.org>
7035
7036         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7037
7038 2002-07-04  Dick Porter  <dick@ximian.com>
7039
7040         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
7041         compile on mingw.  This will cause mingw builds to not wait for
7042         subthreads to terminate after the main thread does.  I've lodged a
7043         bug with the mingw developers for them to wrap OpenThread().
7044
7045 2002-07-03  Dick Porter  <dick@ximian.com>
7046
7047         * threads.c: Store thread IDs instead of handles, because
7048         GetCurrentThread() returns a pseudohandle and therefore stores
7049         useless values.  mono_thread_cleanup() continues checking the
7050         array of threads until it is empty, to cope with subthreads
7051         spawning new threads after the main thread has finished.
7052
7053         * profiler.h:
7054         * profiler.c:
7055         * profiler-private.h: Pass the thread ID to thread profiler
7056         functions, instead of a handle
7057
7058 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7059
7060         * verify.c: fixes to make it more usable.
7061         * pedump.c: added --verify code to verify IL code in an assembly.
7062
7063 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7064
7065         * reflection.c: turn errors into warnings to allow compiling corlib.
7066
7067 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
7068
7069         * reflection.c: add special cases to compile corlib.
7070
7071 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7072
7073         * reflection.c: handle properties with only a set method.
7074
7075 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7076
7077         * opcodes.h: add enum with opcodes in opval order.
7078
7079 2002-07-01  Dick Porter  <dick@ximian.com>
7080         
7081         * object.h:
7082         * object.c (mono_runtime_run_main): Removed unneeded argument
7083
7084 2002-06-28  Martin Baulig  <martin@gnome.org>
7085
7086         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7087
7088 2002-06-27  Dick Porter  <dick@ximian.com>
7089
7090         * threads.c: Store the handle in both the parent thread and in the
7091         subthread, to minimise the time between starting a new thread and
7092         storing its ID.
7093
7094 2002-06-26  Dick Porter  <dick@ximian.com>
7095
7096         * appdomain.c (mono_runtime_cleanup): Close the socket library
7097         after all the threads have finished, not before
7098
7099 2002-06-26  Martin Baulig  <martin@gnome.org>
7100
7101         * debug-symfile.c (mono_debug_find_source_location): Added
7102         `guint32 *line_number' argument.  If it's not NULL, store the line number
7103         there and return the file name without the line number.
7104
7105 2002-06-25  Dick Porter  <dick@ximian.com>
7106
7107         * icall.c:
7108         * process.h:
7109         * process.c: Process forking and other support functions
7110
7111 2002-06-25  Dick Porter  <dick@ximian.com>
7112
7113         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
7114         things dont happen when the image is closed.
7115         (mono_image_lookup_resource): Walk the resource section looking
7116         for a particular entry
7117
7118         * cil-coff.h: PE resource section decoding
7119
7120 2002-06-25  Dick Porter  <dick@ximian.com>
7121         
7122         * assembly.h:
7123         * assembly.c: 
7124         (mono_assembly_foreach): Accessor functions to walk the list of
7125         loaded assemblies
7126         (mono_assembly_set_main):
7127         (mono_assembly_get_main): Process methods need to know which
7128         assembly is the "main" one
7129
7130         * object.c (mono_runtime_run_main): Record the main assembly
7131
7132         * debug-helpers.c: Fix typo
7133
7134 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
7135
7136         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
7137         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
7138
7139 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7140
7141         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
7142
7143 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
7144
7145         * image.c (do_mono_image_open): Initialize reference count,
7146         otherwise we leak the MonoImage.
7147
7148 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7149
7150         * reflection.c: small tweak to handle self-hosting.
7151
7152 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7153
7154         * reflection.c: fix type name parse code.
7155
7156 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7157
7158         * reflection.c: break out of the loop.
7159         * image.c: special case corlib.
7160
7161 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7162
7163         * reflection.c: add all the custom attrs at the end to ensure the
7164         ctors have been properly initialized when the attributes are defined
7165         in the current assembly.
7166
7167 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7168
7169         * reflection.c: handle correctly multiple-nested types.
7170
7171 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7172
7173         * row-indexes.h: fix typos.
7174         * reflection.c: adjust for typos and fix method_def_or_ref
7175         encoding in MethodImpl table.
7176
7177 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7178
7179         * reflection.c: fix entry point patching (thanks Serge!).
7180
7181 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
7182
7183         * verify.c: add check for System.Exception
7184
7185 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7186
7187         * image.c, class.c: minifix for code just c&p'ed.
7188         * reflection.c: warning fix.
7189         * object.h, loader.h, domain.c: load also StringBuilder.
7190
7191 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7192
7193         * marshal.h, marshal.c: some support code to handle complex marshaling.
7194
7195 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7196
7197         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
7198         Better signatures with vtable error dump.
7199
7200 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
7201
7202         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
7203
7204 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
7205
7206         * icall.c (ves_icall_Type_GetField): impl.
7207
7208 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7209
7210         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
7211         to retrieve a marshal description blob for a field or param.
7212
7213 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7214
7215         * reflection.h, reflection.c: change order of nested type emission
7216         to avoid table corruption. The NestedTypes table is sorted.
7217         * icall.c: change order of GetConstructor results to workaround mcs bug.
7218
7219 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7220
7221         * reflection.h, reflection.c: handle field and param marshal
7222         information.
7223
7224 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7225
7226         * icall.c, marshal.c marshal.h: more Marshal class implementation.
7227
7228 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7229
7230         * reflection.c: fix call convention.
7231
7232 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7233
7234         * reflection.h, reflection.c: mono_image_get_memberref_token()
7235         takes a type instead of a class, now. Added
7236         mono_image_get_array_token() to create tokens for the special
7237         multi-dim array methods.
7238
7239 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7240
7241         * assembly.c: handle modules (no assembly table). Split
7242         loading references in its own function.
7243         * class.c: handle moduleref resolution scope.
7244         * image.c, image.h: cache module name in image.
7245
7246 2002-06-07  Martin Baulig  <martin@gnome.org>
7247
7248         * reflection.c (mono_image_get_type_info): Only add a class layout entry
7249         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
7250
7251 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7252
7253         * icall.c: more signature fixes that used uint instead of int.
7254
7255 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7256
7257         * reflection.c: fixed signature of field refs.
7258
7259 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7260
7261         * class.c, reflection.c: handle typerefs of nested types
7262         (both on read and when writing files).
7263
7264 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
7265
7266         * icall.c: fix method signatures that tried to workaround the previous
7267         typo, d'oh!
7268
7269 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7270
7271         * debug-helpers.c: fix typo.
7272
7273 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7274
7275         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
7276         rewrote the PE/COFF writing code (our programs are understood by the
7277         ms runtime, now).
7278
7279 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7280
7281         * gc.c, gc.h, icall.c: weakreference support.
7282
7283 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7284
7285         * Makefile.am, mono-config.c: use $(sysconfdir).
7286
7287 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7288
7289         * icall.c: changed default precision of Double.ToString() to 15.
7290         Fixed memory leak. Unified with Single.ToString.
7291
7292 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
7293
7294         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
7295
7296 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
7297
7298         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
7299         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
7300         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
7301         and myself.
7302
7303 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7304
7305         * debug-symfile.c, sysmath.c: yet more compilation fixes.
7306
7307 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7308
7309         * reflection.c, socket-io.c: more compilation fixes.
7310
7311 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7312
7313         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
7314         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
7315         unicode.c: warning and compiler compatibility fixes.
7316
7317 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7318
7319         * class.h, metadata.c: fixed warnings/compilation errors.
7320
7321 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7322
7323         * Makefile.am, mono-config.c, mono-config.h: configuration file
7324         support routines.
7325         * loader.c, loader.h: make Dll mapping configurable at runtime in the
7326         config file. Export methods to insert and lookup mappings.
7327
7328 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7329
7330         * reflection.c: handle types and boxed objects in custom attr
7331         constructors.
7332
7333 2002-05-30  Martin Baulig  <martin@gnome.org>
7334
7335         * debug-symfile.c
7336         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
7337
7338 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
7339
7340         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
7341         to lookup the implmap row for a P/Invoke method.
7342         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
7343         P/Invoke method from the runtime on an as needed basis.
7344
7345 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
7346
7347         * metadata.c (mono_metadata_parse_signature): impl.
7348
7349 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7350
7351         * class.c: handle .pack directive.
7352
7353 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7354
7355         * object.c: initialize static fields with RVA data.
7356
7357 2002-05-25  Martin Baulig  <martin@gnome.org>
7358
7359         * debug-symfile.c
7360         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
7361
7362 2002-05-24  Martin Baulig  <martin@gnome.org>
7363
7364         * debug-symfile.c
7365         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
7366         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
7367         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
7368
7369 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7370
7371         * object.c: special case string ctros in invoke.
7372         * gc.c: silly whitespace changes.
7373
7374 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
7375
7376         * threadpool.[ch]: impl. a threadpool that can
7377         be used by mint and mono.
7378
7379 2002-05-22  Martin Baulig  <martin@gnome.org>
7380
7381         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
7382         The first argument is now a `MonoReflectionModuleBuilder *', the return
7383         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
7384         `methods' field to get the method builder.  The `token' argument is the
7385         unfixed token.
7386
7387         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
7388         invalid characters instead of g_assert_not_reached()ing.  This seems
7389         to be the behaviour of mscorlib.
7390
7391 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
7392
7393         * object.c (mono_runtime_invoke_array): applied patch from Rachel
7394         Hestilow to fix bug #25104
7395
7396 2002-05-21  Martin Baulig  <martin@gnome.org>
7397
7398         * debug-symfile.c (mono_debug_find_source_location): New function.
7399         Looks up an IL offset in the line number table and returns the source
7400         location as a string.
7401
7402 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7403
7404         * icall.c:
7405         (mono_double_ToStringImpl): changed %f by %g until we have something
7406         better.
7407
7408 2002-05-21  Nick Drochak  <ndrochak@gol.com>
7409
7410         * icall.c : Use different name for Math.Pow's icall.  Needed to check
7411         parameters first in C#.
7412
7413 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7414
7415         * icall.c, reflection.h: added icall to get info about an event.
7416
7417 2002-05-20  Radek Doulik  <rodo@ximian.com>
7418
7419         * object.c (mono_value_box): don't use memcpy for boxing on BIG
7420         endian
7421         (mono_value_box): don't use memcpy for small sizes on
7422         architectures with unaligned access
7423
7424 2002-05-20  Martin Baulig  <martin@gnome.org>
7425
7426         * reflection.c (mono_reflection_setup_internal_class): Don't crash
7427         if `tb->parent == NULL'.
7428         (mono_reflection_create_internal_class): New function.  This is
7429         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
7430         for enum types.
7431
7432         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
7433         New interncall.
7434
7435 2002-05-19  Martin Baulig  <martin@gnome.org>
7436
7437         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
7438         argument to get the length, don't default to the array length.
7439
7440 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
7441
7442         * assembly.c (mono_assembly_setrootdir): New function used to
7443         override the MONO_ASSEMBLIES directory.
7444
7445 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7446
7447         * icall.c: ValueType_GetHashCode() initialize local var.
7448
7449 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7450
7451         * reflection.c: sort custom attributes table.
7452
7453 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7454
7455         * reflection.c: support named args in custom attributes (write support).
7456
7457 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
7458
7459         * reflection.c: fix finally position calculation.
7460
7461 2002-05-15  Radek Doulik  <rodo@ximian.com>
7462
7463         * reflection.c: fixed endianess at many places
7464
7465         * icall.c (ves_icall_InitializeArray): comment out debug msg
7466
7467 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
7468
7469         * object.c (mono_unhandled_exception): new function to handle
7470         unhandled exceptions.
7471         (mono_unhandled_exception): call the UnhandledException event.
7472         (mono_runtime_delegate_invoke): impl.
7473
7474 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
7475
7476         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
7477         returns the RVA, not the direct pointer to the data. Handle the case
7478         when the class size is fixed.
7479
7480 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
7481
7482         * reflection.c: fix some endianess issues.
7483
7484 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
7485
7486         * object.c (mono_runtime_invoke): is now able to catch exceptions.
7487
7488         * threads.c (mono_thread_init): added a callback which is invoked
7489         at thread start.
7490
7491 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
7492         
7493         * icall.c: make GetHashCode return non-negative values.
7494
7495 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
7496
7497         * object.c, icall.c, gc.c: revert to address-based hashcode.
7498
7499 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
7500
7501         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
7502
7503 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7504
7505         * icall.c, class.c: special case <Module>.
7506
7507 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
7508
7509         * icall.c: fix bug in GetNow().
7510
7511 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
7512
7513         * object.c (mono_runtime_class_init): make sure that we call all
7514         static class constructors.
7515
7516 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7517
7518         * reflection.c: sort methodsemantics table.
7519
7520 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7521
7522         * reflection.h, reflection.c: honour init locals setting.
7523
7524 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
7525
7526         * icall.c: copied Double ToStringImpl for Single ToStringImpl
7527
7528 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7529
7530         * reflection.c: support ContructorBuilders in attribute blob creation.
7531
7532 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7533
7534         * reflection.c: some changes to build a binary that can be run
7535         directly in windows.
7536
7537 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
7538
7539         * loader.c: print a big message when an icall can't be found.
7540
7541 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7542
7543         * string-icalls.c: fix bug 24248.
7544
7545 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
7546
7547         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
7548         icall.c, reflection.h: separate assembly loading by pathname and by
7549         assembly name. Use the MONO_PATH env var to search for assemblies.
7550
7551 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7552
7553         * assembly.c, image.h: add some support for assemblies
7554         with multiple modules.
7555         * class.c, class.h: export mono_class_from_typeref().
7556         * loader.c: remove duplicated code and use mono_class_from_typeref(),
7557         instead.
7558
7559 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7560
7561         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
7562         documentation says (the ECMA one is correct).
7563
7564 2002-05-02  Dick Porter  <dick@ximian.com>
7565
7566         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
7567         Don't name the synchronisation mutex.
7568
7569 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
7570
7571         * rand.c
7572         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
7573         Make the prototypes match.
7574         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
7575         Same.
7576
7577         * icall.c
7578         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
7579         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
7580         all systems have tm.tm_zone, so use strftime() with %Z to print
7581         the timezone abreviation into a temp string.
7582
7583         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
7584         rather than mono_array_addr() on a MonoString on Big Endian
7585         machines.
7586
7587 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
7588
7589         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
7590         fix bug 24041
7591
7592 2002-04-30  Dick Porter  <dick@ximian.com>
7593
7594         * socket-io.c: Cope with SOCKET being an integer rather than a
7595         pointer now.
7596
7597         * threads.c: Added Thread_free_internal, to deal with thread
7598         handle cleanup.  Moved calls to handle_store() and handle_remove()
7599         to start_wrapper(), so each can only be called once.  Allocate
7600         synchronisation blocks with GC_malloc(), and use GC finalisation
7601         to close the handles.
7602
7603         * icall.c: added System.Threading.Thread::Thread_free_internal
7604
7605 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7606
7607         * icall.c: support Environment.Exit, CommandLineArgs().
7608
7609 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7610
7611         * object.c, object.h: added mono_runtime_run_main () and
7612         mono_runtime_get_main_args () for use in System.Environment.
7613
7614 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7615
7616         * gc.c: fix thinko, enable actual finalization since the jit is now
7617         fixed.
7618
7619 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7620
7621         * gc.c, object.c: take into account that an object may be offset wrt the address
7622         returned by GC_malloc().
7623
7624 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7625
7626         * image.c: handle files without entries in the assembly table (modules).
7627
7628 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
7629
7630         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
7631         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
7632         allowed to be null when it's System.Object class setup.
7633
7634 2002-04-27  Martin Baulig  <martin@gnome.org>
7635
7636         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
7637         if `tb->parent == NULL' rather than crashing.
7638
7639 2002-04-28  Nick Drochak  <ndrochak@gol.com>
7640
7641         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
7642         calling acos() where asin() should have been called.
7643
7644 2002-04-26  Martin Baulig  <martin@gnome.org>
7645
7646         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
7647         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
7648         there's a subdirectory called `System', but we don't want to read that
7649         subdirectory as an assembly.
7650
7651 2002-04-25  Martin Baulig  <martin@gnome.org>
7652
7653         * debug-symfile.c: Reflect latest MonoString changes.
7654
7655 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7656
7657         * rand.c, rand.h: instance method icalls need to have an explicit
7658         this pointer as first argument in the C implementation.
7659
7660 2002-04-25  Nick Drochak <ndrochak@gol.com>
7661
7662         * icall.c: Fix typo in map for GetNonZeroBytes
7663
7664 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
7665
7666         * string-icalls.c : String does now passes unit tests without any 
7667         errors, the following changes has been made:
7668         
7669         Implemented replace methods.
7670         Renaming of methods to (try) follow the standard.
7671         Fixed compare ordinal
7672         Made all memory allocated directly to function instead of via icall function.
7673         Small performance fix in is_in_array function
7674                         
7675  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
7676
7677         c (mono_string_Internal_ctor_charp_int_int):
7678         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
7679         sindex < 0, throw ArgumentOutOfRangeException instead of
7680         ArgumentNullException.
7681
7682         Added new check for length == 0, however
7683         I need to make it return String.Empty from the C code.
7684         
7685         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
7686         that calculate the length for us here.
7687         
7688         (mono_string_Internal_ctor_sbytep_int_int): Replaced
7689         mono_string_new_utf16 with mono_string_new, since value is utf8.
7690
7691 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7692
7693         * object.c: register the object for finalization if needed.
7694         Allocate one more char in the string for the terminating 0 char.
7695
7696 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7697
7698         * class.c, class.h, image.c: check if a type implemenst a destructor.
7699         Use the proper key for array class lookups.
7700         * icall.c: register the icalls in the System.GC class.
7701         * gc.c, gc.h: GC-related functions and icalls.
7702
7703 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7704
7705         * icall.c:
7706         * socket-io.c:
7707         * unicode.c: free some strings gotten from mono_string_to_utf8 and
7708         changed a couple of free () by g_free ().
7709
7710         * decimal.c: one-liner in the comments for decimal2string ().
7711
7712 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
7713
7714         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
7715
7716 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
7717
7718         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
7719         * object.c (mono_runtime_invoke_array) : handle null in params
7720
7721 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
7722
7723         * string-icalls.c: fixed bug in split (one off bug)
7724
7725 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
7726
7727         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
7728         * icalls.c: added String::Equals as internal method
7729
7730 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
7731
7732         * threads.c: fixed bug in the double interlocked functions
7733
7734 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
7735
7736         * threads.c: implemented all of the new interlocked icalls.
7737         * string-icalls.c: fix a bug in insert.
7738         * icalls.c: added the icalls for interlocked, removed old string functions.
7739         
7740 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7741
7742         * loader.c: fix off-by-one error when reading argument names.
7743
7744 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7745
7746         * profiler.c: win32 counter implementation (untested).
7747         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
7748         (the latter needs testing and more complete impl. from win32 folks).
7749
7750 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
7751
7752         * object.c: mono_array_new_full workaround mono_array_class_get
7753         problem.
7754
7755 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
7756
7757         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
7758         * object.h (mono_string_chars): Changed casting type.
7759
7760 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
7761
7762         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
7763                            method signatures to use gunichar2 instead of gint16.
7764
7765 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
7766
7767         * object.h, object.c: domain-specific versions of mono_object_new and
7768         mono_array_new.
7769
7770 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
7771
7772         * object.c: changed String layout
7773
7774         * string-icalls.c (mono_string_Internal_ctor_chara): added
7775         internal string constructors.
7776
7777 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
7778
7779         * threads.c: pass 'this' to the thread start routine.
7780
7781 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7782
7783         * string-icalls.c: fix IndexOf and LastIndexOf. Now
7784         InternalCompareStr don't call twice mono_string_cmp_char for the last
7785         character. Improved performance in mono_string_cmp_char.
7786
7787 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7788
7789         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
7790         code into its own library: libmonoruntime.
7791
7792 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
7793
7794         * object.h, object.c: changed array format so that szarrays do not
7795         require a bounds structure.
7796         * icall.c, appdomain.c: support for new szarray format.
7797
7798 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
7799
7800         * metadata.c: compare also the retuns type when comparing signatures:
7801         we didn't do this as an optimization since really overloaded methods
7802         must differ also in the arguments, but this doesn't work with
7803         low-level IL code (or when using explicit conversion operators: see
7804         bug#23498 for an example).
7805
7806 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7807
7808         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
7809
7810 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
7811
7812         * icall.c: make MonoType::GetElementType its own icall.
7813
7814 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7815
7816         * icall.c: remove MonoMethod_get_Name().
7817         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
7818         object.
7819
7820 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
7821
7822         * string-icalls.c: optimized a few methods.
7823
7824 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
7825
7826         * icall.c: added all new string internal calls
7827         * string-icalls.c: added, new string internal call implementation.
7828         * object.c: added mono_string_new_size for allocating a string a size
7829
7830 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
7831
7832         * object.c (mono_object_isinst): use the same code as in the
7833         optimized x86 version.
7834
7835 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7836
7837         * profiler.c: TSC-based timer code (faster and more accurate).
7838         Not hooked up in configure, yet (set USE_X86TSC to 1).
7839
7840 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
7841
7842         * profiler.c, profiler.h: track time spent compiling methods.
7843         * threads.c: track thread creation/destruction.
7844
7845 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
7846
7847         * profiler.c, profiler.h, profiler-private.h: profiling interface
7848         and sample implementation. Moved here so that it can be used also by
7849         the jit.
7850
7851 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
7852
7853         * reflection.c, reflection.h: keep types and other handles separate in
7854         the hash tables for referred tokens. Add guid for modules.
7855
7856 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7857
7858         * assembly.c: fix bugs found with valgrind.
7859         * metadata.h, metadata.c: added mono_metadata_guid_heap().
7860
7861 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
7862
7863         * threads: added icall support for getting current domain for
7864                    the thread.
7865  
7866 2002-04-13  Martin Baulig  <martin@gnome.org>
7867
7868         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
7869         (MonoDebugVarInfo): Added `index' field for register based addresses.
7870         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
7871         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
7872         `MonoDebugVarInfo *params' and `guint32 this_offset' with
7873         `MonoDebugVarInfo *this_var'.
7874
7875         * debug-symfile.c (relocate_variable): New static function to write
7876         a location description for a local variable or method parameter.
7877
7878 2002-04-12  Martin Baulig  <martin@gnome.org>
7879
7880         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
7881         stack offset and begin/end scope address of a local variable.
7882         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
7883         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
7884         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
7885
7886         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
7887         Added new relocation types for start/end scope of a local variable.
7888
7889 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7890
7891         * object.h: add mono_object_domain() macro.
7892         * reflection.c: handle typespecs.
7893         * icall.c: MonoMethod::get_Name() implementation.
7894
7895 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7896
7897         * icall.c: String::GetHashCode() icall implementation.
7898
7899 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7900
7901         * icall.c: String::IndexOfAny icall.
7902         * object.c, object.h: make array->max_length more useful.
7903         Intrduced mono_object_class() and mono_string_length() macros.
7904
7905 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7906
7907         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
7908         instead of g_unichar_isdigit.
7909
7910 2002-04-11  Nick Drochak  <ndrochak@gol.com>
7911
7912         * icall.c: Implement a simple Double.ToString().
7913
7914 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7915
7916         * appdomain.h: only io-layer.h is supposed to be included.
7917         * icall.c: explicitly import environ. Fix warning.
7918
7919 2002-04-10  Nick Drochak  <ndrochak@gol.com>
7920
7921         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
7922                 return true even if it's not Daylight Savings time.
7923                 Only return false for the case where the function isn't
7924                 implemented for a plaform (read Windows).
7925
7926 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7927
7928         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
7929         data with a mutex.
7930
7931 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
7932
7933         * mempool.c (mono_mempool_alloc): only use g_malloc when
7934         absolutely necessary.
7935
7936 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
7937
7938         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
7939
7940         * class.c (mono_class_vtable): use domain mempool to allocate vtable
7941         (mono_class_proxy_vtable): use domain mempool
7942
7943 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7944
7945         * appdomain.h, appdomain.c: split initialization that requires the
7946         execution engine support into mono_runtime_init().
7947
7948 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
7949
7950         * class.c (mono_class_init): don't include vtable inside MonoClass
7951         to save some memory, gather some statistics.
7952         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
7953
7954 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7955
7956         * icall.c: internalcall implementation for ValueType.Equals().
7957
7958 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
7959
7960         * object.c (mono_message_init): moved 
7961         (mono_runtime_exec_main): new arch. independent impl.
7962         (mono_runtime_invoke_array): new method - like
7963         mono_runtime_invoke, but you can pass an array of objects.
7964         (mono_remoting_invoke): new arch. independent impl.
7965         (mono_message_invoke): new arch. independent impl.
7966         (mono_runtime_class_init): new arch. independent impl.
7967         (mono_runtime_object_init): new arch. independent impl.
7968
7969 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7970
7971         * metadata.c, object.c, reflection.c: documented the exported
7972         functions.
7973
7974 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7975
7976         * icall.c: simpler code to pass the assembly builder data to corlib.
7977         Implement GetNestedTypes() internalcall.
7978
7979 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7980
7981         * class.c: warn if a type can't be loaded.
7982
7983 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
7984
7985         * image.h: typedef MonoImageOpenStatus
7986         * types.h: removed unused file
7987         
7988 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
7989
7990         * icall.c: Enum_ToObject accepts enum value arguments.
7991
7992 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7993
7994         * class.c: move initialization of properties, events and nested
7995         classes, so that they happen for interfaces, too.
7996
7997 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7998
7999         * icall.c: cleanup some ugly casts in Array_SetValue*.
8000
8001 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8002
8003         * icall.c: the values array fro enums is of the correct type, now.
8004         Implement (correctly) getFullName instead of assQualifiedName for
8005         MonoType.
8006         * reflection.h, reflection.c: added mono_type_get_name ().
8007
8008 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8009
8010         * assembly.c, image.h: for each MonoImage, record from wich assembly
8011         it was loaded.
8012         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
8013         Make Type.Assembly work.
8014
8015 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
8016
8017         * debug-symfile.h: use char* instead of gpointer to avoid
8018         unnecessary casts.
8019
8020         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
8021
8022         * icall.c (ves_icall_InternalExecute): impl. FielSetter
8023         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
8024
8025 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
8026
8027         * icall.c (mono_message_init): impl. (code cleanup)
8028         (ves_icall_InternalExecute): impl. FieldGetter
8029
8030         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
8031         defined we call all (non-static)methods through the vtable. 
8032
8033 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
8034
8035         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
8036         finalizer even though the memory is still referenced (and the chunk of
8037         memory is not freed).
8038
8039 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
8040
8041         * assembly.c: fix brokeness.
8042
8043 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
8044
8045         * class.c: kill some warnings. Check explicit interface method
8046         implementation also without considering the namespace.
8047         Load also literal strings in static class data.
8048
8049 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
8050
8051         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
8052         (default_assembly_name_resolver): Make the resolver take the
8053         "base" directory where the assembly was originally defined, so we
8054         can load DLLs that are in the same directory as the assembly that
8055         is being referenced.
8056
8057 2002-03-28  Dick Porter  <dick@ximian.com>
8058
8059         * file-io.h: 
8060         * file-io.c:
8061         * socket-io.c: 
8062         * unicode.h: 
8063         * unicode.c: Warning cleanups
8064
8065 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
8066
8067         * object.h, reflection.h: use the correct type instead of MonoObject.
8068
8069 2002-03-28  Martin Baulig  <martin@gnome.org>
8070
8071         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
8072         (mono_debug_update_symbol_file): Initialize classes if necessary.
8073
8074 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
8075
8076         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
8077         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
8078
8079 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
8080
8081         * assembly.h: fix function prototype.
8082         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
8083         * mono-endian.h: use const cast.
8084
8085 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
8086
8087         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
8088
8089 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
8090
8091         * loader.c: don't assert when a typeref can't be loaded, give
8092         a chance to the runtime to trow an exception instead.
8093         * loader.h: fix warning.
8094
8095 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
8096
8097         * class.c (mono_class_proxy_vtable): added proxy support
8098
8099 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
8100
8101         * icall.c: removed last of PAL calls, added System.Environment
8102         * file-io.h, file-io.c: MonoIO implementation
8103         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
8104
8105 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
8106
8107         * appdomain.c: do not use the byte marker in ldstr table lookup.
8108         * debug-helpers.c: allow two ':' to separate class and method name.
8109         * object.c: allocate arrays bounds with the GC, too.
8110         * verify: add a few more checks.
8111
8112 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
8113
8114         * reflection.c: output also literal strings. Allocate parameter data
8115         with GC_malloc() (thanks, Martin, for catching this!).
8116
8117 2002-03-26  Martin Baulig  <martin@gnome.org>
8118
8119         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
8120         include the `this' offset in the `param_offsets'.
8121
8122 2002-03-25  Martin Baulig  <martin@gnome.org>
8123
8124         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
8125         mono_debug_get_class() function to get the classes. Added new
8126         relocation types for arrays and strings.
8127         (mono_debug_get_class): New static function to search in all
8128         referenced assemblies for a metadata token.
8129
8130         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
8131
8132 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
8133
8134         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
8135         hold gc-allocated objects. Make the string heap a stream like the
8136         others. Removed duplicated code when writing stream info.
8137         Added asserts to catch possible buffer overflows. Set the sorted map
8138         for tables that need sorting. Added some documentation.
8139
8140 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
8141
8142         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
8143         for interned strings and vtables.
8144
8145 2002-03-24  Martin Baulig  <martin@gnome.org>
8146
8147         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
8148         it in the array since it was created with g_slist_prepend().
8149
8150 2002-03-24  Martin Baulig  <martin@gnome.org>
8151
8152         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
8153         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
8154         (mono_debug_method_from_token): Renamed to
8155         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
8156         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
8157
8158         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
8159         relocation types.
8160
8161         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
8162
8163 2002-03-24  Martin Baulig  <martin@gnome.org>
8164
8165         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
8166         (mono_debug_method_from_token): New func.
8167
8168         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
8169         New interncall, calls mono_debug_local_type_from_signature().
8170         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
8171         calls mono_debug_method_from_token().
8172
8173 2002-03-23  Martin Baulig  <martin@gnome.org>
8174
8175         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
8176         specifies the number of bytes to be converted, not the array size.
8177         Return the number of chars, not the number of bytes.
8178         (ves_icall_iconv_get_chars): The `byteCount' argument
8179         specifies the number of bytes to be converted, not the array size.
8180
8181 2002-03-23  Martin Baulig  <martin@gnome.org>
8182
8183         * reflection.h (MonoReflectionSigHelper): New type.
8184
8185         * reflection.c (mono_reflection_sighelper_get_signature_local),
8186         (mono_reflection_sighelper_get_signature_local): New functions.
8187
8188         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
8189         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
8190         interncalls.
8191
8192 2002-03-23  Martin Baulig  <martin@gnome.org>
8193
8194         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
8195         is_writeable is set.
8196         (mono_raw_buffer_update): New function to write the modified map
8197         back to disk.
8198
8199         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
8200
8201         * debug-symfile.c (mono_debug_update_symbol_file): Call
8202         mono_raw_buffer_update() when done writing.
8203
8204 2002-03-23  Martin Baulig  <martin@gnome.org>
8205
8206         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
8207
8208         * debug-symfile.c: Added support for arguments and local variables.
8209
8210 2002-03-23  Dick Porter  <dick@ximian.com>
8211
8212         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
8213         protected by ifdefs, hence breaking the w32 build.
8214
8215 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8216
8217         * object.c: implement is_interned() the right way.
8218
8219 2002-03-21  Martin Baulig  <martin@gnome.org>
8220
8221         * debug-symfile.[ch]: New files to handle debugging information
8222         files. There's also support to dynamically update these symbol
8223         files to include machine dependent information.
8224
8225 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
8226
8227         * threads.c (mono_thread_create): new function to create thread
8228         from C
8229
8230 2002-03-20  Martin Baulig  <martin@gnome.org>
8231
8232         * icall.c (ves_icall_InternalInvoke): Create a new object if the
8233         method is a constructor.
8234         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
8235         points to ves_icall_InternalInvoke().
8236
8237 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
8238
8239         * file-io.c: Flush shouldn't throw exceptions.
8240
8241 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
8242
8243         * file-io.c: FileStream flush support; FileSetLength now
8244         restores file pointer.
8245
8246 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
8247
8248         * class.c: set image for pointer classes.
8249
8250 2002/03/19  Nick Drochak <ndrochak@gol.com>
8251
8252         * sysmath.c: Forgot one.
8253
8254 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
8255
8256         * sysmath.c: Avoid redefining existing names.
8257
8258 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
8259
8260         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
8261         handled by runtime as icall rather than dllimport from libm.so
8262         * file-io.c, file-io.h: fixed handle argument type.
8263
8264 2002-03-18  Dick Porter  <dick@ximian.com>
8265
8266         * reflection.c (mono_image_get_type_info): rename interface to
8267         iface, because of "#define interface struct" on windows.
8268
8269 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
8270
8271         * class.c, class.h: rename and export mono_ptr_class_get().
8272         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
8273         * reflection.c, reflection.h, icall.c: better/saner type name
8274         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
8275         method signatures.
8276
8277 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
8278
8279         * class.c (mono_class_init): removed hardcoded GHC_SLOT
8280
8281         * icall.c (ves_icall_InternalInvoke): impl.
8282
8283 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
8284
8285         * reflection.c: output the interface map table, too.
8286
8287 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
8288
8289         * class.c (class_compute_field_layout): separate computation of 
8290         static field layout
8291
8292 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
8293
8294         * icall.c: added System.Buffer support.
8295         * file-io.c: moved file icalls from PAL to FileStream.
8296
8297 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
8298
8299         * icall.c (ves_icall_System_Object_GetHashCode): impl.
8300
8301 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
8302
8303         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
8304
8305 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8306
8307         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
8308
8309 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
8310
8311         * debug-helpers.{c,h}: moved here from monograph some useful functions
8312         to locate a method by name/signature in a class or image. Included
8313         also a small and flexible IL disassembler.
8314
8315 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8316
8317         * reflection.c: fixup tokens in methods with small header size, too.
8318
8319 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
8320
8321         * object.c (mono_string_to_utf8): remove assert(!error), instead
8322         print a warning. 
8323
8324 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
8325
8326         * icall.c: update to the new mono_Array_class_get interface.
8327
8328 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
8329
8330         * appdomain.c, object.c: Boehm-GC enable.
8331         * icall.c: make get_data_chunk() support split data requests.
8332         Ensure a class is initialized in more cases. Return only the first
8333         property found in GetProperties() or the compiler gets confused. 
8334         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
8335         * reflection.h, reflection.c: add fixup mechanism for field and method
8336         tokens. Initialize assembly->typeref in a single place. Output
8337         properties after events. Support custom attributes for events, too.
8338         Typo fix for paramter custom attrs.
8339
8340 2002-03-07  Martin Baulig  <martin@gnome.org>
8341
8342         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
8343
8344 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
8345
8346         * class.c (mono_array_class_get): fix. for multi. dim. arrays
8347
8348 2002-03-06  Martin Baulig  <martin@gnome.org>
8349
8350         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
8351         non-zero lower bounds. See testcases #F10-#F13.
8352
8353 2002-03-05  Martin Baulig  <martin@gnome.org>
8354
8355         * exception.c (mono_get_exception_argument_out_of_range): New exception.
8356
8357         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
8358         ves_icall_System_Array_GetValue(), only calculate the absolute array position
8359         here.
8360         (ves_icall_System_Array_SetValue): Likewise.
8361         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
8362         as argument and does the actual work. This function is used when copying a
8363         multi-dimensional array.
8364         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
8365         now do all the widening conversions of value types.
8366         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
8367
8368 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8369
8370         * class.c: remove some magic numbers and use the smbolic names,
8371         instead. Added init_events() to load event info at class init time.
8372         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
8373         and mono_metadata_methods_from_event().
8374         * reflection.h, reflection.c: added support for writing out the evnets
8375         related information.
8376
8377 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
8378
8379         * reflection.h, icall.c: use a different method (GetInterfaces)
8380         to gather interface info and add isbyref, isprimitive and
8381         ispointer to the ves_icall_get_type_info() return value.
8382
8383 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
8384
8385         * class.h: stared adding support for events.
8386         * icall.c: split find_members implementation. Added debug icall to get
8387         the address of an object.
8388         * reflection.c: handle TypeBuilders in mono_type_get_object().
8389
8390 2002-03-01  Martin Baulig  <martin@gnome.org>
8391
8392         * icall.c (ves_icall_System_Array_GetLength): This must throw an
8393         ArgumentOutOfRangeException(), not an ArgumentException().
8394         (ves_icall_System_Array_GetLowerBound): Likewise.
8395         (ves_icall_System_Array_GetValue): Improved argument checking.
8396         (ves_icall_System_Array_SetValue): Improved argument checking.
8397
8398 2002-03-01  Martin Baulig  <martin@gnome.org>
8399
8400         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
8401         called with invalid arguments rather than just dying with g_assert().
8402         (ves_icall_System_Array_SetValue): Likewise.
8403         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
8404         raise a NotImplementedException instead.
8405         (ves_icall_System_Array_GetLength): Added argument checking.
8406         (ves_icall_System_Array_GetLowerBound): Added argument checking.
8407
8408 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
8409
8410         * object.h (mono_assert): new macros mono_assert and
8411         mono_assert_not_reached
8412
8413 2002-02-28  Martin Baulig  <martin@gnome.org>
8414
8415         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
8416         and "System::String::IsInterned" to "System::String::_IsInterned".
8417
8418 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
8419
8420         * icall.c: remove hacks for typebuilder. Added icall to create a
8421         modified type from a tybebuilder.
8422         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
8423         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
8424         to create a backing MonoClass for a TypeBuilder.
8425
8426 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8427
8428         * class.c, class.h: more refactoring of class init.
8429         Export mono_class_setup_mono_type() and mono_class_setup_parent().
8430
8431 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
8432
8433         * marshal.c, marshal.h: start of marshaling interface.
8434
8435 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
8436
8437         * icall.c: fix order in assembly qualified name icall.
8438
8439 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
8440
8441         * class.c: do not free str, since we store it in the hash table.
8442         * reflection.h: add label field to MonoILExceptionInfo.
8443         * reflection.c: handle references to more than one assembly. Handle
8444         case when there isn't a module created in the assembly.
8445
8446 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
8447
8448         * class.c: Fix typo. Start refactoring of class init code.
8449
8450 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
8451
8452         * appdomain.c: exit with 1 on error.
8453         * class.c: we already have the name in MonoClassField.
8454         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
8455         MonoStreamHeader instead of an offset of image->raw_metadata.
8456
8457 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
8458
8459         * appdomain.c (mono_init): Be even more descriptive about the error.
8460
8461 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
8462
8463         * appdomain.c: give the user an informative message when corlib can't
8464         be loaded.
8465
8466 2002-02-26  Martin Baulig  <martin@gnome.org>
8467
8468         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
8469         New icall to get the time zone data.
8470
8471 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8472
8473         * reflection.c: set virtual and raw size of section correctly.
8474         * threads.c: transfer domain information to newly created threads.
8475
8476 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
8477
8478         * class.c: when instancing a class in a domain, load the default
8479         vaules for static fields from the constant table. Fix System.Enum to
8480         not be an enum.
8481         * icall.c: implement Object::GetType() internalcall. Implemented
8482         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
8483         Fixed checking of binding flags in find_members().
8484         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
8485         * reflection.c: handle enumerations when writing to the constant
8486         table. Use a different object cache for types.
8487
8488
8489 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
8490
8491         * object.c (mono_object_isinst): fix for arrays
8492
8493         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
8494
8495 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
8496
8497         * object.c: don't use mprotect ()  and fix intern pool hash table
8498         lookup for big endian systems.
8499
8500 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8501
8502         * icall.c: change type_is_subtype_of () signature.
8503
8504 2002-02-21  Mark Crichton  <crichton@gimp.org>
8505
8506         * rand.c, rand.h: Added random number generator for
8507         System.Security.Cryptography classes.
8508
8509         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
8510
8511         * icall.c: Added System.Security.Cryptography calls.
8512
8513 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
8514
8515         * class.c, icall.c, metadata.c: better support for pointer types.
8516         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
8517         * reflection.c: Add support for getting custom attrs for properties
8518         and simplify some code.
8519
8520 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8521
8522         * icall.c: change getToken () and add custom attribute GetBlob()helper
8523         method.
8524         * reflection.h: add custom attrs array to the reflection builder structures.
8525         * reflection.c: encode and emit custom attributes for all the relevant
8526         reflection objects. Cache fieldref and methodref tokens. Change
8527         mono_image_create_token() interface to take a MonoDynamicAssembly.
8528         More complete custom attributes decoder. Load custom attributes for
8529         Assembly, Field, Method and Constructor objects, too. Make the
8530         returned array an Attribute[] one, not object[]. Added
8531         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
8532         custom attribute constructor.
8533
8534 2002-02-20  Dick Porter  <dick@ximian.com>
8535
8536         * icall.c:
8537         * rawbuffer.c:
8538         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
8539         problem code out for now).
8540
8541 2002-02-19  Radek Doulik  <rodo@ximian.com>
8542
8543         * object.c (mono_ldstr): use hash table to avoid multiple swapping
8544
8545 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
8546
8547         * icall.c: register the GetCustomAttributes method.
8548         * object.c, object.h: add mono_string_new_len ().
8549         * reflection.h, reflection.c: added mono_runtime_invoke(),
8550         mono_install_runtime_invoke(). Added
8551         mono_reflection_get_custom_attrs () to load custom attributes and
8552         create the attribute objects.
8553
8554 2002-02-19  Dick Porter  <dick@ximian.com>
8555         * threads-dummy-types.c:
8556         * threads-dummy-types.h:
8557         * threads-dummy.c:
8558         * threads-dummy.h:
8559         * threads-pthread-types.c:
8560         * threads-pthread-types.h:
8561         * threads-pthread.c:
8562         * threads-pthread.h:  Deleted obsolete files
8563
8564 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
8565
8566         * class.c (mono_class_vtable): runtime init the class when we
8567         allocate static class data.
8568
8569         * icall.c (ves_icall_System_Array_SetValue): check for null values.
8570
8571         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
8572         and String - but we will need generic marshalling support in the
8573         future. 
8574         (mono_init): set the domain name in a ms compatible way
8575
8576         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
8577         String[].
8578
8579 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
8580
8581         * object.c (mono_array_clone): use alloca() instead of g_malloc  
8582         for sizes
8583
8584         * appdomain.c (mono_domain_unload): impl.
8585
8586 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
8587
8588         * appdomain.c, object.c: fix intern pool implementation.
8589         * class.c: fix alignment code.
8590
8591 2002-02-16  Radek Doulik  <rodo@ximian.com>
8592
8593         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
8594         and s2 > s1, just copy lower bytes to be compatible with little
8595         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
8596         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
8597
8598         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
8599         force big_endian to be 1 for big endian machines 
8600         (ves_icall_iconv_new_decoder): ditto
8601
8602 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
8603
8604         * socket-io.c (convert_sockopt_level_and_name): If the system
8605         doesn't define SOL_IP or SOL_TCP, get them by hand using
8606         getprotobyname() and caching the values (because this could be a
8607         slow operation).
8608         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
8609         Use the appropriate struct when the system does support it. Ie,
8610         not all systems have struct ip_mreqn so use struct ip_mreq when
8611         appropriate.
8612
8613 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
8614
8615         * reflection.c: handle finally clauses.
8616
8617 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
8618
8619         * socket-io.c: use g_snprintf() instead of snprintf.
8620
8621 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
8622
8623         * reflection.c (mono_param_get_objects): Cast second argument to
8624         mono_method_get_param_names to a const char** to silence the
8625         compiler warning.
8626
8627         * appdomain.c (mono_domain_assembly_open): Put parens around the
8628         truth statement in the for-loop.
8629
8630         * unicode.c (iconv_convert): Got rid of a compiler warning about
8631         int i being unused when the system has a new iconv.
8632         (iconv_get_length): Same.
8633
8634         * image.c (load_class_names): Cast the second argument to
8635         g_hash_table_insert() to char* to hush compiler warnings about the
8636         arg being a const.
8637         (mono_image_open): Same here.
8638
8639         * socket-io.c: Don't conditionally include sys/filio.h or
8640         sys/sockio.h here anymore since we now get them from
8641         io-layer/io-layer.h
8642         (inet_pton): If the system doesn't support inet_aton, implement
8643         using inet_addr and also #define INADDR_NONE if it isn't defined
8644         by the system.
8645
8646 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
8647
8648         * metadata.c, metadata.h: added function to get packing and size info
8649         of a typedef.
8650         * reflection.h, reflection.c: handle field RVA data. Save info about
8651         the table layout if needed. Assign typedef indexes to all the types
8652         before dumping the info about them to avoid forward reference problems.
8653
8654 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
8655
8656         * socket-io.c (convert_sockopt_level_and_name): ifdef
8657         SO_ACCEPTCONN because it is not defined on my system (old debian)
8658
8659 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
8660
8661         * opcode.c: use stddef.h to get NULL.
8662
8663 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
8664
8665         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
8666         for FIONBIO, FIONREAD and SIOCATMARK.
8667         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
8668         define INADDR_NONE and besides, inet_addr() is deprecated and
8669         should not be used. Use inet_pton() instead - it also has the
8670         added bonus that it can easily handle IPv6 addresses as well.
8671         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
8672
8673 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
8674
8675         * decimal.c: remove _MSC_VER conditional.
8676
8677 2002-02-13  Dick Porter  <dick@ximian.com>
8678
8679         * socket-io.c: 
8680         * icall.c: Internal calls for Blocking, Select, Shutdown,
8681         GetSocketOption and SetSocketOption
8682
8683 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8684
8685         * assembly.cs: better resolver: use it instead of some kludgy
8686         code.
8687
8688 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
8689
8690         * reflection.c: the best way to speed-up the compiler is to avoid
8691         infinite loops.
8692
8693 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
8694
8695         * class.c (mono_class_vtable): changed the object layout
8696         (obj->vtable->class). 
8697         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
8698
8699 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8700
8701         * assembly.c: look for assemblies in the assembly dir, too.
8702
8703 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8704
8705         * class.c: fix thinko in mono_class_from_type().
8706
8707 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8708
8709         * exception.h, exception.c: added TypeLoadException.
8710         * object.h, object.c: added mono_array_clone ().
8711         * icall.c: handle throwOnError in AssemblyGetType().
8712         Added Array.Clone().
8713         * opcode.h, opcode.c: use a single value for the opcode val.
8714         Compile fix for non-gcc compilers.
8715
8716 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
8717
8718         * opcodes.c, opcodes.h: export interesting info about opcodes.
8719
8720 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
8721
8722         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
8723         icalls. 
8724
8725         * class.c (class_compute_field_layout): set element_class for enums
8726         (mono_class_create_from_typedef): set element_class for normal classes
8727
8728         * icall.c (ves_icall_System_Enum_get_value): impl.
8729
8730         * class.c (mono_class_create_from_typedef): do not set valuetype
8731         flag for System.ValueType and System.Enum
8732
8733 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
8734
8735         * unicode.c (iconv_convert): fix big endian problem.
8736
8737 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
8738
8739         * class.c: add asserts if we are ever going to scribble over memory.
8740         * socket-io.c: not all systems have AF_IRDA defined.
8741
8742 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
8743
8744         * class.c (class_compute_field_layout): do not consider static
8745         fields to compute alignment
8746
8747 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
8748
8749         * appdomain.c (mono_appdomain_get): impl.
8750         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
8751
8752 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
8753
8754         * icall.c: ignore "file://" prefix when loading an assembly.
8755
8756 2002-01-23  Dick Porter  <dick@ximian.com>
8757
8758         * socket-io.c:
8759         * icall.c:
8760         * Makefile.am: Added socket support
8761
8762 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
8763
8764         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
8765         code back.  This should return the assemblies that are loaded by
8766         the runtime on behalf of an application domain. 
8767
8768         The current implementation is still broken, it just returns every
8769         assembly loaded, but until we get real applications domain this
8770         will do.
8771
8772 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
8773
8774         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
8775         AppDomain object.
8776
8777 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
8778
8779         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
8780         the mono_class_from_name lookup.
8781         (ves_icall_get_parameter_info): ditto.
8782         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
8783         method.
8784         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
8785
8786 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
8787
8788         * class.c: load also nested classes on class init.
8789         System.ValueType instance methods gets passed boxed
8790         values, unless methods in derived classed that get a pointer to the
8791         data.
8792         * icall.c: use better name parsing code in GetType().
8793         * image.c, image.h: add mono_image_loaded ().
8794         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
8795         * reflection.c, reflection.h: added mono_reflection_parse_type().
8796
8797 2002-01-22  Veronica De Santis <veron78@interfree.it>
8798
8799         * icall.c : Added mapping of internal calls for Manual and Auto reset events
8800         * threads.c : Added the implementation of internal calls for events
8801         * threads.h : Added prototypes of internal calls for events
8802         
8803 2002-01-21  Radek Doulik  <rodo@ximian.com>
8804
8805         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
8806
8807 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
8808
8809         * class.c (mono_class_init): set min_align to 1 (instead of 0)
8810         (mono_class_value_size): use min_align
8811
8812 2002-01-20  Dick Porter  <dick@ximian.com>
8813
8814         * threads.h:
8815         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
8816         so it compiles on w32.
8817
8818 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
8819
8820         * metadata.c (mono_type_stack_size): impl.
8821
8822         * class.c (mono_class_get_field): impl. memberref token
8823
8824 2002-01-16 Veronica De Santis <veron78@@interfree.it>
8825
8826         * icall.h : Added the internal calls mapping for CreateMutex_internal
8827                     and ReleaseMutex_internal.
8828         * threads.h : Added the prototype of mutexes internal calls.
8829         * threads.c : Added the implementations of mutexes internal calls.
8830
8831 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
8832
8833         * metaparse.h: removed unused file.
8834         * reflection.c, reflection.h: added stream_data_align () function 
8835         to align data in streams and keep stream aligned. Add support for
8836         exception support in method headers.
8837
8838 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
8839
8840         * unicode.c: make iconv_convert () return the number of bytess written
8841         in the output buffer.
8842
8843 2002-01-15  Dick Porter  <dick@ximian.com>
8844         * threads.c: Make the runtime's idea of infinite timeouts coincide
8845         with the class library's
8846
8847         Fix a particularly egregious bug in mono_thread_cleanup(). That
8848         code was so utterly bogus it must have been written on a Monday.
8849
8850 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
8851
8852         * reflection.h: add subtypes field to TypeBuilder.
8853         * reflection.c: encode constants for literal fields.
8854         Handle subtypes. Fix user string token (and add a zero byte)
8855         at the end.
8856         
8857 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
8858
8859         * class.c (mono_class_init): bug fix: assign slot numbers for
8860         abstract methods.
8861
8862 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8863
8864         * reflection.c: don't try to output a code RVA for abstract methods.
8865         Small fixes for method header format. Output parameter info to the
8866         ParamDef table. Save method overriding info to MethodImpl table.
8867         Fix property support. Allow typedef.extends to be a type in the
8868         building assembly.
8869         * verify.c: fix off-by-one error.
8870
8871 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
8872
8873         * class.c: fix mono_class_from_mono_type () for szarray types.
8874         Remove unused cache check in mono_class_from_type_spec().
8875         * icall.c: *type_from_name () functions handle simple arrays and byref.
8876         * reflection.c: handle byref and szarray types. Handle methods without
8877         body (gets P/Invoke compilation working). Handle types and fields in
8878         get_token ().
8879         * reflection.h: add rank to MonoTypeInfo.
8880
8881 2002-01-10  Dick Porter  <dick@ximian.com>
8882
8883         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
8884         internal calls
8885
8886 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
8887
8888         * icall.c: initialize class in type_from_handle ().
8889         Loop also in parent classes for get_method ().
8890         * reflection.c: properly encode class and valuetype types.
8891         Start on encoding TypeBuilder types. Handle fieldrefs.
8892         Use correct length when registering a user string.
8893         Handle ConstructorBuilder and MonoMethod in get_token ().
8894         Make mono_type_get_object () aware of cached types.
8895         * object.c: back out change to mono_string_new ().
8896
8897 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
8898         * object.c: mono_string_new should return a NULL when the string 
8899         passed in is NULL -- not try to deference it.
8900         
8901 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
8902
8903         * icall.c: hack to make IsSubType work for TypeBuilders.
8904         * reflection.c: emit constructors before methods.
8905         Retrieve param names in mono_param_get_objects().
8906
8907 2002/01/05  Nick Drochak  <ndrochak@gol.com>
8908
8909         * Makefile.am: fix list of headers and sources so automake 1.5
8910         doesn't complain. Removed \# at end of list.
8911
8912 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
8913
8914         * reflection.c: get token for a method ref. Set return type of
8915         constructor to void.
8916         * loader.c: debug message.
8917         * class.c: typo fix.
8918
8919 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
8920
8921         * icall.c: fix array init with rank > 1. FindMembers
8922         loops in parent class as well.
8923         * image.c: do not insert nested types in name cache.
8924         * reflection.c: warning fix.
8925         * reflection.h: add override method (for interface impl).
8926
8927 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
8928
8929         * metadata.c: fix customattr decoding.
8930
8931 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
8932
8933         * rawbuffer.cs: Added native Win32 implementation, avoids using
8934         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
8935
8936 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
8937
8938         * class.c: make the low-level routines handle the cache.
8939
8940 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
8941
8942         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
8943
8944 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
8945
8946         * class.c: fix mono_array_element_size() for objects.
8947         * class.h, class.c: add properties to MonoClass and load them
8948         at init time.
8949         * icall.c: check with isinst() when assigning a value to an array
8950         instead of requiring the classes to match exactly.
8951         Implemented icall for System.Type::GetType().
8952         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
8953         enums. Handle bindingflags when looking for methods and fields.
8954         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
8955         and mono_metadata_methods_from_property().
8956         * reflection.h, reflection.c: added structures for propreties,
8957         parameters and enums. Implemented mono_property_get_object() and
8958         mono_param_get_objects().
8959
8960 2001-12-18  Dick Porter  <dick@ximian.com>
8961
8962         * file-io.c: Use mono_string_to_utf16() instead of
8963         mono_string_chars()
8964
8965         * object.c: Added mono_string_to_utf16(), which copies the non
8966         NULL-terminated MonoString into a new double-null-terminated
8967         buffer.
8968
8969 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
8970
8971         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
8972
8973 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
8974
8975         * file-io.c: raise exceptions if handle is invalid.
8976
8977 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
8978
8979         * assembly.c: yet another check for mscorlib.
8980         * class.c, class.h: load nesting info for classes.
8981         * icall.c: many new functions to support the Reflection classes.
8982         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
8983         * reflection.h, reflection.c: mono_image_create_token(),
8984         mono_assembly_get_object(), mono_type_get_object(),
8985         mono_method_get_object(), mono_field_get_object(): methods to return
8986         objects that parallel the C representation of assemblies, types,
8987         methods, fields.
8988
8989 2001-12-11  Dick Porter  <dick@ximian.com>
8990
8991         * icall.c:
8992         * file-io.c: Internal calls for file IO.
8993
8994 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
8995
8996         * tabledefs.h: missing FileAttributes.
8997         * verify.h, verify.c: use is_valid_string () to simplify and check for
8998         valid strings more correctly. Fix warnings and speeling.
8999         Check more tables: Filed, File, ModuleRef, StandAloneSig.
9000         Check code: branches, maxstack, method calls.
9001
9002 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
9003
9004         * object.c (mono_object_allocate): removed static, so that the jit
9005         can allocate value types.
9006
9007         * icall.c (ves_icall_System_DateTime_GetNow): impl.
9008
9009 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9010
9011         * class.c: init enum types right away and register the
9012         token->MonoClass map in mono_class_create_from_typedef ().
9013         * verify.h, verify.c: first cut of the verifier.
9014         * pedump.c: add --verify switch to verify metadata tables.
9015         * tabledefs.h: add some missing enums.
9016
9017 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
9018
9019         * class.c (mono_install_runtime_class_init): impl.
9020         (mono_class_init): renamed mono_class_metadata_init to
9021         mono_class_init, also removed the metadata_inited flag
9022
9023         * object.c (mono_object_isinst): use faster algorithm
9024
9025 2001-11-30  Radek Doulik  <rodo@ximian.com>
9026
9027         * mono-endian.h: reverted last change
9028         added function prototypes
9029
9030         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
9031         add mono-endian.c back
9032
9033         * mono-endian.c: returned back, as Paolo pointed out, it's needed
9034         for unaligned access, I've mistaked it with endianess. I am
9035         sorry.
9036         (mono_read16): fix reverted endianess
9037         (mono_read64): ditto
9038         (mono_read32): ditto
9039
9040 2001-11-30  Dick Porter  <dick@ximian.com>
9041
9042         * exception.c: Implement mono_exception_from_name()
9043
9044 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9045
9046         * metadata.h, metadata.c: remove params_size and locals_size and their
9047         calculation from the metadata code: they are only usefult to the
9048         interp.
9049
9050 2001-11-29  Radek Doulik  <rodo@ximian.com>
9051
9052         * object.c (mono_ldstr): swap bytes here, it's probably not the
9053         best place, but works for me now, I'll redo it once I know mono
9054         better, also note that I add PROT_WRITE and don't reset back, also
9055         note that it's only affects big endians, so x86 should be OK
9056
9057         * mono-endian.h (read16): use just glib macros for both endians
9058
9059         * mono-endian.c: removed as glib macros are used in in
9060         mono-endian.h so we don't need to care about endianess for read
9061         macros as glib does that for us already
9062
9063 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
9064
9065         * class.h, class.h: take minimum alignment into consideration so
9066         that the fields of a class remain aligned also when in an array.
9067
9068 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9069
9070         * loader.h, loader.c: add mono_method_get_param_names().
9071         * class.c: 0-init class fields.
9072
9073 2001-11-26  Dick Porter  <dick@ximian.com>
9074
9075         * icall.c:
9076         * threads-types.h:
9077         * threads.c: New file that handles System.Threading on all platforms
9078
9079         * object.c: 
9080         * object.h: Remove the synchronisation struct from MonoObject,
9081         replace it with a pointer that gets initialised on demand
9082
9083         * Makefile.am: Replace all the system-specific threading code with
9084         a single file that uses the new wrapper library
9085
9086 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
9087
9088         * class.c, class.h: add mono_install_trampoline() so that the runtime
9089         can register a function to create a trampoline: removes the ugly
9090         requirement that a runtime needed to export arch_create_jit_trampoline.
9091         * object.h, object.c: added mono_install_handler() so that the runtime
9092         can install an handler for exceptions generated in C code (with
9093         mono_raise_exception()). Added C struct for System.Delegate.
9094         * pedump.c: removed arch_create_jit_trampoline.
9095         * reflection.c: some cleanups to allow registering user strings and
9096         later getting a token for methodrefs and fieldrefs before the assembly
9097         is built.
9098         * row-indexes.h: updates and fixes from the new ECMA specs.
9099
9100 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
9101
9102         * class.h, class.c: add enum_basetype field to MonoClass.
9103         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
9104         to get index in the constant table reated to a field, param or
9105         property.
9106         * reflection.h, reflection.c: handle constructors. Set public-key and
9107         version number of the built assembly to 0.
9108         * row-indexes.h: update from new ECMA spec.
9109
9110 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
9111
9112         * class.h, class.c: add a max_interface_id to MonoClass.
9113         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
9114         since it's used to do that. Added mono_type_type_from_obj().
9115         Make GetType() return NULL instead of segfaulting if the type was not
9116         found. Handle simple arrays in assQualifiedName.
9117         * object.h: add a struct to represent an Exception.
9118         * reflection.c: output call convention in method signature.
9119         Add code to support P/Invoke methods and fixed offsets for fields.
9120
9121 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
9122
9123         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
9124         the value.
9125         * icall.c: use mono_array_addr instead of array->vector: fixes the
9126         reflection image writing.
9127         * reflection.c: init call convention byte to 0 in method signature.
9128         Encode the property signature. Don't output property-related methods
9129         twice. Really process the properties for a type (don't cast a field to
9130         a property, my mom always told me that).
9131         Fix 64 bit issues in pointer alignment in a different and more
9132         readable way.
9133
9134 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
9135
9136         * loader.h: Removed type class from MonoDefaults, added monotype
9137
9138         * loader.c: Loaded MonoType, removed loading of Type
9139
9140         * icall.c (my_mono_new_object): Now returns a System.MonoType,
9141         and fills in System.Type._impl with a RuntimeTypeHandle rather
9142         than the actual MonoClass *
9143
9144         (ves_icall_type_from_handle): change from type_class to
9145         monotype_class
9146
9147         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
9148         implemented
9149
9150         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
9151         implemented
9152
9153         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
9154
9155         (ves_icall_System_Reflection_Assembly_GetType): implemented
9156
9157         (ves_icall_System_MonoType_assQualifiedName): implemented
9158
9159         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
9160
9161 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
9162
9163         * assembly.c (mono_assembly_open): Implement a cache for the
9164         assemblies. 
9165
9166         (mono_assembly_close): only destroy the assembly when the last
9167         reference is gone.
9168         
9169 2001-11-09  Dick Porter  <dick@ximian.com>
9170
9171         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
9172
9173 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
9174
9175         * class.c (mono_class_metadata_init): bug fix: compute the right slot
9176
9177 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9178
9179         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
9180         from Martin Weindel.
9181         * object.h: add mono_string_chars ().
9182
9183 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
9184
9185         * reflection.c (build_compressed_metadata): Eliminates warnings
9186         and uses 64-bit clean code.
9187
9188         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
9189         (mono_type_equal): Change signature to eliminate warnings.
9190
9191 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9192
9193         * icall.c, loader.c: remove the internalcall array constructors.
9194         Changes to match the new MonoArray structure.
9195         * object.h, object.c: an array object doesn't allocate an extra
9196         vector. Add mono_array_new_full () to create jagged arrays easily.
9197
9198 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
9199
9200         * metadata.h, metadata.c: add mono_metadata_field_info () to
9201         retreive all the info about a field from vairous tables.
9202         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
9203         * class.h, class.c: augment MonoClassField with more info.
9204         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
9205         policy and load a field's RVA if needed.
9206
9207 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
9208
9209         * class.c (mono_class_metadata_init): create a trampoline for all
9210         virtual functions instead of actually compiling them.
9211
9212 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
9213
9214         * class.h, class.c: include name in MonoClassField.
9215         * class.c: fix fundamental type of System.Object and System.String.
9216         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
9217         tokens in ldtoken.
9218         * icall.c: remove internalcalls for the Reflection stuff that is now
9219         done in C# code.
9220         * loader.c: mono_field_from_memberref () implementation.
9221         * mono-endian.c: thinko (s/struct/union/g).
9222         * object.c, object.h: make the mono_string_* prototypes actually use
9223         MonoString instead of MonoObject.
9224         * reflection.c, reflection.h: updates for changes in the reflection
9225         code in corlib: we use C structures that map to the actual C# classes.
9226         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
9227         fat method header if needed and use the info from the ILGenerator for
9228         methods. Handle fields in types. Misc fixes.
9229
9230 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
9231
9232         * class.c (mono_class_metadata_init): bug fix: always allocate
9233         space for static class data
9234
9235 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
9236
9237         * class.c (mono_compute_relative_numbering): use relative
9238         numbering to support fast runtime type checks.
9239
9240 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
9241
9242         * class.c (mono_class_create_from_typeref): added debugging output
9243         to print class name when MonoDummy is returned instead of real class
9244
9245 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
9246
9247         * class.c (mono_class_metadata_init): interface offset table now
9248         contains pointers into the vtable - this is more efficient for the jit
9249
9250 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
9251
9252         * class.c (mono_class_metadata_init): use a temporary vtable (the
9253         old algorithm only worked for the interpreter, but not for the jit)
9254
9255 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
9256
9257         * loader.c (method_from_memberref): use mono_class_get to get the
9258         class of an array instead of using System.Array directly.
9259         (mono_get_method): also add MEMBERREF methods to the method cache
9260         which usefull for arrays.
9261
9262 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
9263
9264         * pedump.c (arch_compile_method): added to compute vtable entry
9265
9266         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
9267         number of interfaces.
9268         
9269         * class.h: merged MonoArrayClass into MonoClass
9270
9271         * class.c (mono_class_create_from_typedef): compute the vtable size and
9272         allocate space to include the vtable inside MonoClass
9273         (mono_class_metadata_init): initialize the vtable
9274
9275 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
9276
9277         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
9278         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
9279         * image.c: endian fixes by Laurent Rioux.
9280         * object.h, object.c: rename MonoStringObject to MonoString and
9281         MonoArrayObject to MonoArray. Change some function names to conform to
9282         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
9283         guint16* as first argument, so don't use char*.
9284         Provide macros to do the interesting things on arrays in a portable way.
9285         * threads-pthread.c: updates for the API changes and #include <sched.h>
9286         (required for sched_yield()).
9287         * icall.c: updates for the API changes above.
9288         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
9289         platforms that need them.
9290
9291 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
9292
9293         * class.c: set the correct type for all the fundamental
9294         type when loading the class.
9295
9296 2001-10-05  Dick Porter  <dick@ximian.com>
9297
9298         * threads-pthread.c (pthread_mutex_timedlock): Simple
9299         compatibility version for C libraries that lack this call.
9300
9301 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9302
9303         * class.c: MonoTypes stored in MonoClass are stored as
9304         fundamental MonoTypes when the class represents a
9305         fundamental type (System.Int32, ...).
9306         The TypeHandle return by ldtoken is a MonoType*.
9307         * icall.c: ves_icall_get_data_chunk () write out all the
9308         PE/COFF stuff. Implement ves_icall_define_method (),
9309         ves_icall_set_method_body (), ves_icall_type_from_handle ().
9310         * image.c: properly skip unknown streams.
9311         * loader.h, loader.c: add type_class to mono_defaults.
9312         * metadata.c, metadata.h: export compute_size () as
9313         mono_metadata_compute_size () with a better interface.
9314         Typo and C&P fixes.
9315         * pedump.c: don't try to print the entry point RVA if there is no entry point.
9316         * reflection.c, reflection.h: many cleanups, fixes, output method
9317         signatures and headers, typedef and typeref info, compress the metadata
9318         tables, output all the heap streams, cli header etc.
9319         * row-indexes.h: typo fixes.
9320
9321 2001-10-04  Dick Porter  <dick@ximian.com>
9322
9323         * object.h: Add a synchronisation mutex struct to MonoObject
9324
9325         * object.c (mono_new_object): Initialise the object
9326         synchronisation mutexes
9327
9328         * icall.c: System.Threading.Monitor internal calls
9329         
9330         * threads-pthread.h:
9331         * threads-pthread.c: System.Threading.Monitor internal calls
9332
9333         * threads-types.h: New file, includes the system-specific thread
9334         structures
9335         
9336         * threads-pthread-types.h:
9337         * threads-pthread-types.c: New files, handle pthread-specific
9338         synchronisation types
9339
9340         * threads-dummy-types.h: 
9341         * threads-dummy-types.c: New files of dummy support for
9342         thread-specific types
9343
9344         * metadata.c:
9345         * image.c:
9346         * pedump.c: include mono-endian.h not endian.h
9347         
9348         * Makefile.am: More threads files.
9349         Name mono-endian.h not endian.h
9350
9351 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
9352
9353         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
9354         stuff and implement a few more bits.
9355         * icall.c: a field needs to be dereferenced twice. Do not use the same
9356         name for two variables in the same scope.
9357         * image.c, image.h: cleanups.
9358
9359 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
9360
9361         * class.c (mono_class_metadata_init): bug fix: compute the right size
9362
9363 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
9364
9365         * icall.c: implemented some of the Reflection internalcalls.
9366         * image.c, image.h: start writing out the PE/COFF image.
9367         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
9368         that does the reverse than decode_blob_size ().
9369         * object.c: use mono_metadata_encode_value (). Move here
9370         temporary implementation of mono_string_to_utf8 ().
9371         * rawbuffer.c: make malloc_map static.
9372
9373 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9374
9375         * metadata.c: fix type comparison for arrays.
9376         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
9377         Added a couple of new classes to monodefaults.
9378         * icall.c: added a couple of Reflection-related internalcalls.
9379         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
9380         Added a byval_arg MonoType to MonoClass.
9381
9382 2001-09-28  Dick Porter  <dick@ximian.com>
9383
9384         * icall.c:
9385         * threads-pthread.h: 
9386         * threads-pthread.c: Implemented internal calls for
9387         LocalDataStoreSlot operations.  Applied mutexes around all shared
9388         data.  Reworked the thread creation and Start() operations to
9389         avoid a race condition.
9390         
9391         * threads-dummy.h:
9392         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
9393
9394 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
9395
9396         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
9397
9398 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
9399
9400         * class.c, loader.c: warn and return NULL instead of erroring out.
9401         * icall.c: added System.AppDomain::getCurDomain().
9402         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
9403
9404 2001-09-25  Dick Porter  <dick@ximian.com>
9405
9406         * threads-pthread.h:
9407         * threads-pthread.c: Implemented timed thread joining and added
9408         System.Threading.Thread::Join_internal internal call
9409
9410         * icall.c: Added System.Threading.Thread::Join_internal internal call
9411
9412         * threads-dummy.h:
9413         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
9414
9415 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
9416
9417         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
9418         mono_string_intern () to implement the semantics of the ldstr opcode
9419         and the interning of System.Strings.
9420         * icall.c: provide hooks to make String::IsIntern and String::Intern
9421         internalcalls.
9422
9423 2001-09-23  Dick Porter  <dick@ximian.com>
9424
9425         * threads-dummy.c: 
9426         * threads-dummy.h: New files of dummy threading routines
9427
9428         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
9429         support code based on system specifics
9430
9431         Rename PTHREAD_LIBS to THREAD_LIBS
9432         
9433 2001-09-23  Dick Porter  <dick@ximian.com>
9434
9435         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
9436         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
9437         internal calls.
9438         (mono_thread_init): Set up a Thread object instance to return when
9439         the main thread calls Thread.CurrentThread
9440         (mono_thread_cleanup): Wait for all subthreads to exit
9441
9442         * icall.c: New internal calls for System.Threading.Thread::Sleep
9443         (including Schedule) and CurrentThread
9444
9445         * threads.h: New file, to insulate thread-specific stuff from the
9446         rest of the code
9447
9448 2001-09-21  Dick Porter  <dick@ximian.com>
9449
9450         * threads-pthread.h: 
9451         * threads-pthread.c: New file, for handling pthreads-style
9452         threading support.  Start() now starts a new thread and executes
9453         the ThreadStart delegate instance.
9454
9455         * icall.c: Added the internalcall for
9456         System.Threading.Thread::Start_internal
9457
9458         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
9459
9460 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
9461
9462         * loader.c: work around the different signatures for delegates
9463         constructors csc generates in compiled code vs the ones compiled in mscorlib.
9464
9465 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
9466
9467         * class.h, class.c: add mono_class_get_field_from_name ().
9468         * *: Fix C comments and other ANSI C issues.
9469
9470 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
9471
9472         * endian.h, assembly.c: fix some endianness issues.
9473
9474 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
9475
9476         * loader.h, load.c: add delegate_class to mono_defaults.
9477         Handle runtime provided methods in mono_get_method ().
9478
9479 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
9480
9481         * loader.c (mono_get_method): use pinvoke for internal call
9482
9483         * icall.c: use pinvoke for internal call
9484
9485         * loader.c (method_from_memberref): set the method name
9486
9487 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
9488
9489         * metadata.c: help the compiler generate better code for
9490         mono_class_from_mono_type ().
9491
9492 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
9493
9494         * class.c (mono_class_metadata_init): delayed computing of the
9495         class size to mono_class_metadata_init ()
9496
9497 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
9498
9499         * class.c, class.h: add an interfaces member to MonoClass.
9500         * image.c, image.h: add assembly_name field to MonoImage
9501         from the assembly table.
9502         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
9503
9504 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
9505
9506         * class.c: Handle Array in mono_class_from_mono_type ().
9507         * metadata.c, pedump.c: some endian fixes.
9508
9509 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
9510
9511         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
9512         * metadata.c: fix small problem introduced with the latest commit.
9513
9514 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
9515
9516         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
9517         We don't need a MonoMetadata pointer anymore to compare signatures in
9518         mono_metadata_signature_equal (), update callers.
9519         Reduced memory usage an number of allocations for MonoMethodHeader and
9520         MonoMethodSignature.
9521
9522 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
9523
9524         * metadata.c: added compare for szarray.
9525
9526 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
9527
9528         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
9529         and add a couple more types to it and mono_defaults. Give an hint on
9530         classes that need implementing in our corlib and are referenced
9531         in mscorlib.
9532
9533 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
9534
9535         * class.h, class.c: keep track if a class is also an Enum.
9536         * loader.c: Implement a couple more types for use in libffi
9537         marshalling. Gives better diagnostics when failing to dlopen
9538         a library. Set method->klass for P/Invoke methods, too.
9539
9540 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
9541
9542         * class.c, class.h: add a MonoType this_arg to MonoClass that
9543         represents a pointer to an object of the class' type that
9544         can be used by the interpreter and later the type cache.
9545         Add best guess alignment info for valuetype objects.
9546
9547 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
9548
9549         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
9550         into MonoType: one less level of indirection and allocation and
9551         simplifies quite a bit of code. Added cache for MonoTypes that are
9552         used frequently, so that we don't need to allocate them all the time.
9553
9554 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
9555
9556         * class.c (mono_class_create_from_typedef): System.Enum is also a
9557         value type, although it does not derive from System.ValueType
9558         (maybe a bug in the ms compiler?)
9559
9560         * metadata.c (mono_type_size): return the right size for value types
9561
9562         * loader.c (mono_get_method): only initialize method header if not abstract
9563
9564         * class.c (mono_class_from_mono_type): use mono_default values. 
9565
9566 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
9567
9568         * *: use MonoClass pointers instead of <type_tokens>
9569         
9570         * class.h: new flag: metadata_inited.
9571
9572         * class.c (mono_class_metadata_init): impl.
9573         (mono_class_instance_size): impl.
9574         (mono_class_data_size): impl.
9575
9576 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9577
9578         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
9579         MonoClass now has the name and name_space fields. 
9580         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
9581         mono_get_method () takes and optional MonoClass as argument.
9582         Removed mono_typedef_from_name() and added mono_class_token_from_name()
9583         instead that takes advantage of a map from class names to typedef
9584         tokens in MonoImage.
9585
9586 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
9587
9588         * metadata.c: zero is not a valid alignment boundary.
9589         Merge MONO_TYPE_VOID in default decoding code.
9590
9591 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
9592
9593         * image.h: merged MonoMetadata into MonoImage
9594
9595         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
9596         identify the type of elements.
9597
9598 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
9599
9600         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
9601         * cil-coff.h: split MonoMSDOSHeader and add size info.
9602         * image.c: add some consistency checks.
9603         * metadata.c: fix row size computation: one programmer
9604         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
9605         add explanation for the locator routine.
9606         Fix decoding of size in method header.
9607         
9608 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
9609
9610         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
9611         (g_concat_dir_and_file): Bring g_concat_dir_and_file
9612         function from gnome-libs.  This uses the right path separator
9613         based on the OS, and also works around a bug in some systems where
9614         a double slash is not allowed. 
9615         (default_assembly_name_resolver): Use g_concat_dir_and_file
9616         (mono_assembly_open): ditto.
9617
9618 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
9619
9620         * metadata.c (mono_metadata_signature_equal): impl.
9621
9622         * *: void is now a realy MonoType (instead of using NULL)
9623         
9624         * metadata.c (do_mono_metadata_parse_type): use
9625         mono_metadata_parse_type to parse void value.
9626
9627 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
9628
9629         * metadata.c, metadata.h: in the signature and method header store
9630         only the space required for holding the loca vars and incoming arguments.
9631
9632 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
9633
9634         * metadata.c (do_mono_metadata_parse_type): treat void like any
9635         other type (instead of assigning NULL);
9636
9637 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
9638
9639         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
9640
9641 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
9642
9643         * image.c (do_mono_image_open): added a cache for arrays.
9644
9645 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
9646
9647         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
9648         decode a single column from a row in a metadata table and changes
9649         to take advantage of it in the typedef locator (gives a nice speed up).
9650         Store offset info for function params.
9651
9652 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
9653
9654         * image.h (MONO_IMAGE_IS_CORLIB): removed 
9655
9656 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
9657
9658         * assembly.c: how could mono_assembly_close () had ever worked?
9659         * metadata.c, metadata.h: provide offset info for local vars.
9660         Implement mono_type_size () to take care of alignment as well
9661         as size (it was mono_field_type_size in cli/class.c before).
9662
9663 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
9664
9665         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
9666
9667         * assembly.h (CORLIB_NAME): set to corlib.dll
9668
9669         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
9670
9671 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
9672
9673         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
9674         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
9675         tokentype.h: massive namespace cleanup.
9676
9677 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
9678
9679         * metadata.h, metadata.c: decode exception clauses when parsing method header.
9680
9681 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
9682
9683         * metadata.c (mono_metadata_free_type): added check for type !=
9684         NULL (void) before calling mono_metadata_free_type()
9685
9686 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
9687
9688         * metadata.h, row_indexes.h: added header with enumerations to use
9689         to index in the columns from tables in metadata and to decode coded
9690         tokens: we should start using this instead of embedding magic numbers
9691         all over the code.
9692
9693 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
9694
9695         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
9696         Move metadata_t info from cli_image_info_t to MonoImage, where
9697         it's easily accessible. Changed all the uses accordingly.
9698         Added the method and class caches to MonoImage.
9699         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
9700         and mono_metadata_decode_value () signature to be more consistent
9701         with the other parse functions (and simplify code). Taken advantage
9702         of zero-length array allocation with GCC. Removed reduntant (and
9703         wrong) MonoFieldType struct and use MonoParam instead. Changed
9704         mono_metadata_parse_field_type () to use common code for parsing.
9705         Added mono_metadata_typedef_from_field () and
9706         mono_metadata_typedef_from_method () to lookup a typedef index from a
9707         field or method token.
9708         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
9709
9710 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
9711
9712         * metadata.c (mono_metadata_parse_field_type): Implement. 
9713         (do_mono_metadata_parse_type): Split engine from
9714         mono_metadata_parse_type, so that we can create smaller structures
9715         for things that just have one pointer to the MonoType (look at
9716         the MonoFieldType)
9717
9718 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
9719
9720         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
9721         as Jan Gray found out, it is incorrect. 
9722
9723 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
9724
9725         * assembly.c: Implement asssembly loading.  This loads an image
9726         and loads all the referenced assemblies.  Come to think of it, we
9727         could always do lazy loading of the assemblies. 
9728
9729         * image.c (mono_image_open): Keep loaded images in a hashtable.
9730
9731         * image.h (MonoImage): Add reference count.
9732
9733 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
9734
9735         * assembly.c (mono_assembly_open): Keep track of the file name in
9736         case the assembly has no ASSEMBLY table.
9737
9738         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
9739         from get.c here.
9740
9741 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
9742
9743         * metadata.c, metadata.h: decode local vars in method header
9744         parse function. Change callers accordingly.
9745
9746 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
9747
9748         * metadata.h, cil-coff.h: protect against multiple inclusion.
9749         Added some new structures to hold information decoded from metadata:
9750         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
9751         and relevant decoding/free functions.
9752         * metadata.c: implement decoding functions. Add warning for out of bounds
9753         index in mono_metadata_locate(). Implement mono_get_method () to retreive
9754         all the info about a method signature and invocation. Remove check on
9755         uninitialized local var in parse_mh() and fix memory leak.
9756
9757 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
9758
9759         * metadata.h: More macros.
9760
9761         * tokentype.h: New file.
9762
9763 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
9764
9765         * assembly.c: added a consistency check and initialize
9766         some structures with g_new0().
9767         * metadata.c: fixed a couple more bugs in table size computation
9768         and add other checks for out-of bound access to metadata.
9769
9770 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
9771
9772         * metatada.c: fix bugs computing table sizes. Spew a
9773         warning when index in string heap is out of bounds.
9774
9775 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
9776
9777         * metadata.h: Add a couple of macros to manipulate tokens. 
9778
9779 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
9780
9781         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
9782         cli_section_tables).
9783
9784 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
9785
9786         * metadata.c (mono_metadata_user_string): New function, provides
9787         access to the UserString heap. 
9788
9789 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
9790
9791         * metadata.c: Add inline documentation.
9792
9793 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
9794
9795         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
9796         files. 
9797
9798 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
9799
9800         * typeattr.h: New file, TypeAttribute flags. 
9801
9802 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
9803
9804         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
9805         mono_assembly_ensure_section): Section loading code.
9806         (load_section_tables): Load the sections.
9807
9808         * mono/metadata/metadata.c (mono_metadata_locate_token,
9809         mono_metadata_locate): Functions to locate the information
9810         definition given a token or a table and an index.
9811         (mono_metadata_compute_table_bases): New.
9812         (compute_size): New function to compute the sizes of the various
9813         tables.
9814
9815         * mono/metadata/metadata.h: Finish listing the different index
9816         types. 
9817
9818         * mono/metadata/pedump.c: Improve to dump new information.
9819
9820 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
9821
9822         * mono/metadata/metadata.c: Entered all the tables matching
9823         Beta2. 
9824
9825         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
9826
9827
9828
9829
9830
9831
9832
9833