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