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